Actual source code: packimpl.h

petsc-3.5.2 2014-09-08
Report Typos and Errors
  1: #if !defined(_packimpl_h)
  2: #define _packimpl_h

  4: #include <petscdmcomposite.h>    /*I "petscdmcomposite.h" I*/
  5: #include <petsc-private/dmimpl.h>      /*I      "petscdm.h"     I*/

  7: /*
  8:    rstart is where an array/subvector starts in the global parallel vector, so arrays
  9:    rstarts are meaningless (and set to the previous one) except on the processor where the array lives
 10: */

 12: struct DMCompositeLink {
 13:   struct DMCompositeLink *next;
 14:   PetscInt               n;             /* number of owned */
 15:   PetscInt               rstart;        /* rstart is relative to this process */
 16:   PetscInt               grstart;       /* grstart is relative to all processes */
 17:   PetscInt               nlocal;

 19:   /* only used for DMCOMPOSITE_DM */
 20:   PetscInt *grstarts;                   /* global row for first unknown of this DM on each process */
 21:   DM       dm;
 22: };

 24: typedef struct {
 25:   PetscInt               n,N,rstart;           /* rstart is relative to all processors, n unknowns owned by this process, N is total unknowns */
 26:   PetscInt               nghost;               /* number of all local entries (includes DMDA ghost points) */
 27:   PetscInt               nDM,nmine;            /* how many DM's and seperate redundant arrays used to build DM(nmine is ones on this process) */
 28:   PetscBool              setup;                /* after this is set, cannot add new links to the DM*/
 29:   struct DMCompositeLink *next;

 31:   PetscErrorCode (*FormCoupleLocations)(DM,Mat,PetscInt*,PetscInt*,PetscInt,PetscInt,PetscInt,PetscInt);
 32: } DM_Composite;

 34: PETSC_INTERN PetscErrorCode DMCreateMatrix_Composite(DM,Mat*);

 36: #endif