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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DACreate2d</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="DACreate2d"><H1>DACreate2d</H1></A>
Creates an object that will manage the communication of two-dimensional regular array data that is distributed across some processors.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscda.h"
PetscErrorCode PETSCDM_DLLEXPORT DACreate2d(MPI_Comm comm,DAPeriodicType wrap,DAStencilType stencil_type,
PetscInt M,PetscInt N,PetscInt m,PetscInt n,PetscInt dof,PetscInt s,PetscInt *lx,PetscInt *ly,DA *inra)
</PRE>
Collective on <A HREF="../Sys/MPI_Comm.html#MPI_Comm">MPI_Comm</A>
<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><A HREF="../Sys/comm.html#comm">comm</A> </B></TD><TD>- MPI communicator
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>wrap </B></TD><TD>- type of periodicity should the array have.
Use one of DA_NONPERIODIC, DA_XPERIODIC, DA_YPERIODIC, or DA_XYPERIODIC.
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stencil_type </B></TD><TD>- stencil type. Use either DA_STENCIL_BOX or <A HREF="../DA/DA_STENCIL_STAR.html#DA_STENCIL_STAR">DA_STENCIL_STAR</A>.
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>M,N </B></TD><TD>- global dimension in each direction of the array (use -M and or -N to indicate that it may be set to a different value
from the command line with -da_grid_x <M> -da_grid_y <N>)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m,n </B></TD><TD>- corresponding number of processors in each dimension
(or <A HREF="../Sys/PETSC_DECIDE.html#PETSC_DECIDE">PETSC_DECIDE</A> to have calculated)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dof </B></TD><TD>- number of degrees of freedom per node
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD>- stencil width
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lx, ly </B></TD><TD>- arrays containing the number of nodes in each cell along
the x and y coordinates, or <A HREF="../Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</A>. If non-null, these
must be of length as m and n, and the corresponding
m and n cannot be <A HREF="../Sys/PETSC_DECIDE.html#PETSC_DECIDE">PETSC_DECIDE</A>. The sum of the lx[] entries
must be M, and the sum of the ly[] entries must be N.
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>inra </B> -the resulting distributed array object
<br>
<P>
<H3><FONT COLOR="#CC3333">Options Database Key</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_view </B></TD><TD>- Calls <A HREF="../DA/DAView.html#DAView">DAView</A>() at the conclusion of <A HREF="../DA/DACreate2d.html#DACreate2d">DACreate2d</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_grid_x <nx> </B></TD><TD>- number of grid points in x direction, if M < 0
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_grid_y <ny> </B></TD><TD>- number of grid points in y direction, if N < 0
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_processors_x <nx> </B></TD><TD>- number of processors in x direction
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_processors_y <ny> </B></TD><TD>- number of processors in y direction
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_refine_x </B></TD><TD>- refinement ratio in x direction
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_refine_y </B></TD><TD>- refinement ratio in y direction
</TD></TR></TABLE>
<P>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
The stencil type <A HREF="../DA/DA_STENCIL_STAR.html#DA_STENCIL_STAR">DA_STENCIL_STAR</A> with width 1 corresponds to the
standard 5-pt stencil, while DA_STENCIL_BOX with width 1 denotes
the standard 9-pt stencil.
<P>
The array data itself is NOT stored in the <A HREF="../DA/DA.html#DA">DA</A>, it is stored in <A HREF="../Vec/Vec.html#Vec">Vec</A> objects;
The appropriate vector objects can be obtained with calls to <A HREF="../DA/DACreateGlobalVector.html#DACreateGlobalVector">DACreateGlobalVector</A>()
and <A HREF="../DA/DACreateLocalVector.html#DACreateLocalVector">DACreateLocalVector</A>() and calls to <A HREF="../Vec/VecDuplicate.html#VecDuplicate">VecDuplicate</A>() if more are needed.
<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
distributed array, create, two-dimensional
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DA/DADestroy.html#DADestroy">DADestroy</A>(), <A HREF="../DA/DAView.html#DAView">DAView</A>(), <A HREF="../DA/DACreate1d.html#DACreate1d">DACreate1d</A>(), <A HREF="../DA/DACreate3d.html#DACreate3d">DACreate3d</A>(), <A HREF="../DA/DAGlobalToLocalBegin.html#DAGlobalToLocalBegin">DAGlobalToLocalBegin</A>(), <A HREF="../DA/DAGetRefinementFactor.html#DAGetRefinementFactor">DAGetRefinementFactor</A>(),
<BR><A HREF="../DA/DAGlobalToLocalEnd.html#DAGlobalToLocalEnd">DAGlobalToLocalEnd</A>(), <A HREF="../DA/DALocalToGlobal.html#DALocalToGlobal">DALocalToGlobal</A>(), <A HREF="../DA/DALocalToLocalBegin.html#DALocalToLocalBegin">DALocalToLocalBegin</A>(), <A HREF="../DA/DALocalToLocalEnd.html#DALocalToLocalEnd">DALocalToLocalEnd</A>(), <A HREF="../DA/DASetRefinementFactor.html#DASetRefinementFactor">DASetRefinementFactor</A>(),
<A HREF="../DA/DAGetInfo.html#DAGetInfo">DAGetInfo</A>(), <A HREF="../DA/DACreateGlobalVector.html#DACreateGlobalVector">DACreateGlobalVector</A>(), <A HREF="../DA/DACreateLocalVector.html#DACreateLocalVector">DACreateLocalVector</A>(), <A HREF="../DA/DACreateNaturalVector.html#DACreateNaturalVector">DACreateNaturalVector</A>(), <A HREF="../DA/DALoad.html#DALoad">DALoad</A>(), <A HREF="../DA/DAView.html#DAView">DAView</A>()
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>beginner
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/dm/da/src/da2.c.html#DACreate2d">src/dm/da/src/da2.c</A>
<BR><A HREF="./index.html">Index of all DA 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>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex29.c.html">src/ksp/ksp/examples/tutorials/ex29.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex32.c.html">src/ksp/ksp/examples/tutorials/ex32.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex14f.F.html">src/ksp/ksp/examples/tutorials/ex14f.F.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex5.c.html">src/snes/examples/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex18.c.html">src/snes/examples/tutorials/ex18.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex19.c.html">src/snes/examples/tutorials/ex19.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex25.c.html">src/snes/examples/tutorials/ex25.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex27.c.html">src/snes/examples/tutorials/ex27.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex29.c.html">src/snes/examples/tutorials/ex29.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex30.c.html">src/snes/examples/tutorials/ex30.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex31.c.html">src/snes/examples/tutorials/ex31.c.html</A><BR>
</BODY></HTML>
|