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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMSTAG/DMStagCreate1d.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMStagCreate1d</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.14.5 2021-03-03</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.14.5 v3.14.5 docs/manualpages/DMSTAG/DMStagCreate1d.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMStagCreate1d"><H1>DMStagCreate1d</H1></A>
Create an object to manage data living on the faces, edges, and vertices of a parallelized regular 1D grid.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
PETSC_EXTERN <A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DMSTAG/DMStagCreate1d.html#DMStagCreate1d">DMStagCreate1d</A>(<A HREF="../Sys/MPI_Comm.html#MPI_Comm">MPI_Comm</A> comm,<A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DMBoundaryType</A> bndx,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> M,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> dof0,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> dof1,<A HREF="../DMSTAG/DMStagStencilType.html#DMStagStencilType">DMStagStencilType</A> stencilType,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> stencilWidth,const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> lx[],<A HREF="../DM/DM.html#DM">DM</A>* dm)
</PRE>
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>comm </B></TD><TD>- MPI communicator
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bndx </B></TD><TD>- boundary type: <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_NONE</A>, <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_PERIODIC</A>, or <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_GHOSTED</A>
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M </B></TD><TD>- global number of grid points
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dof0 </B></TD><TD>- number of degrees of freedom per vertex/point/node/0-cell
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dof1 </B></TD><TD>- number of degrees of freedom per element/edge/1-cell
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stencilType </B></TD><TD>- ghost/halo region type: <A HREF="../DMSTAG/DMStagStencilType.html#DMStagStencilType">DMSTAG_STENCIL_BOX</A> or <A HREF="../DMSTAG/DMStagStencilType.html#DMStagStencilType">DMSTAG_STENCIL_NONE</A>
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stencilWidth </B></TD><TD>- width, in elements, of halo/ghost region
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lx </B></TD><TD>- array of local sizes, of length equal to the comm size, summing to M
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</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 new DMStag object
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Options Database Keys</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-dm_view </B></TD><TD>- calls <A HREF="../DM/DMViewFromOptions.html#DMViewFromOptions">DMViewFromOptions</A>() a the conclusion of <A HREF="../DM/DMSetUp.html#DMSetUp">DMSetUp</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-stag_grid_x <nx> </B></TD><TD>- number of elements in the x direction
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-stag_ghost_stencil_width </B></TD><TD>- width of ghost region, in elements
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-stag_boundary_type_x <none,ghosted,periodic> </B></TD><TD>- <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DMBoundaryType</A> value
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
You must call <A HREF="../DM/DMSetUp.html#DMSetUp">DMSetUp</A>() after this call before using the <A HREF="../DM/DM.html#DM">DM</A>.
If you wish to use the options database (see the keys above) to change values in the DMStag, you must call
<A HREF="../DM/DMSetFromOptions.html#DMSetFromOptions">DMSetFromOptions</A>() after this function but before <A HREF="../DM/DMSetUp.html#DMSetUp">DMSetUp</A>().
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DMSTAG/DMSTAG.html#DMSTAG">DMSTAG</A>, <A HREF="../DMSTAG/DMStagCreate2d.html#DMStagCreate2d">DMStagCreate2d</A>(), <A HREF="../DMSTAG/DMStagCreate3d.html#DMStagCreate3d">DMStagCreate3d</A>(), <A HREF="../DM/DMDestroy.html#DMDestroy">DMDestroy</A>(), <A HREF="../DM/DMView.html#DMView">DMView</A>(), <A HREF="../DM/DMCreateGlobalVector.html#DMCreateGlobalVector">DMCreateGlobalVector</A>(), <A HREF="../DM/DMCreateLocalVector.html#DMCreateLocalVector">DMCreateLocalVector</A>(), <A HREF="../DM/DMLocalToGlobalBegin.html#DMLocalToGlobalBegin">DMLocalToGlobalBegin</A>(), <A HREF="../DMDA/DMDACreate1d.html#DMDACreate1d">DMDACreate1d</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>beginner<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/impls/stag/stag1d.c.html#DMStagCreate1d">src/dm/impls/stag/stag1d.c</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/dm/impls/stag/tutorials/ex1.c.html">src/dm/impls/stag/tutorials/ex1.c.html</A><BR>
<BR><A HREF="./index.html">Index of all DMSTAG 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>
|