File: DACreate3d.html

package info (click to toggle)
petsc 2.1.3-1.woody.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 70,272 kB
  • ctags: 310,869
  • sloc: ansic: 257,275; sh: 9,870; makefile: 7,622; fortran: 6,211; cpp: 1,026; python: 416; csh: 41; asm: 9
file content (87 lines) | stat: -rw-r--r-- 5,876 bytes parent folder | download
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>DACreate3d</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="DACreate3d"><H1>DACreate3d</H1></A>
Creates an object that will manage the communication of three-dimensional  regular array data that is distributed across some processors. 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscda.h"    
int DACreate3d(MPI_Comm comm,DAPeriodicType wrap,DAStencilType stencil_type,int M,
               int N,int P,int m,int n,int p,int dof,int s,int *lx,int *ly,int *lz,DA *inra)
</PRE>
Collective on MPI_Comm
<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 the array should have, if any.  Use one
of DA_NONPERIODIC, DA_XPERIODIC, DA_YPERIODIC, DA_XYPERIODIC, DA_XYZPERIODIC, DA_XZPERIODIC, or DA_YZPERIODIC.
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>stencil_type </B></TD><TD>- Type of stencil (DA_STENCIL_STAR or DA_STENCIL_BOX)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Vec/M.html#M">M</A>,N,P </B></TD><TD>- global dimension in each direction of the array
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m,n,p </B></TD><TD>- corresponding number of processors in each dimension 
(or PETSC_DECIDE 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>lx, ly, lz </B></TD><TD>- arrays containing the number of nodes in each cell along
the x, y, and z coordinates, or PETSC_NULL. If non-null, these
must be of length as m,n,p and the corresponding
m,n, or p cannot be PETSC_DECIDE. Sum of the lx[] entries must be <A HREF="../Vec/M.html#M">M</A>, sum of
the ly[] must n, sum of the lz[] must be P
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>s </B></TD><TD>- stencil width
</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/DACreate3d.html#DACreate3d">DACreate3d</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_grid_x &lt;nx&gt; </B></TD><TD>- number of grid points in x direction, if <A HREF="../Vec/M.html#M">M</A> &lt; 0
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_grid_y &lt;ny&gt; </B></TD><TD>- number of grid points in y direction, if N &lt; 0
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-da_grid_z &lt;nz&gt; </B></TD><TD>- number of grid points in z direction, if P &lt; 0
</TD></TR></TABLE>
<P>

<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
The stencil type DA_STENCIL_STAR with width 1 corresponds to the
standard 7-pt stencil, while DA_STENCIL_BOX with width 1 denotes
the standard 27-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, three-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/DACreate2d.html#DACreate2d">DACreate2d</A>(), <A HREF="../DA/DAGlobalToLocalBegin.html#DAGlobalToLocalBegin">DAGlobalToLocalBegin</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/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/da3.c.html#DACreate3d">src/dm/da/src/da3.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/sles/examples/tutorials/ex22.c.html">src/sles/examples/tutorials/ex22.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex14.c.html">src/snes/examples/tutorials/ex14.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex20.c.html">src/snes/examples/tutorials/ex20.c.html</A><BR>
</BODY></HTML>