xref: /petsc/include/petscdmpatch.h (revision 6d8694c4fbab79f9439f1ad13c0386ba7ee1ca4b)
13a19ef87SMatthew G Knepley /*
23a19ef87SMatthew G Knepley   DMPatch, for domains covered by sets of patches.
33a19ef87SMatthew G Knepley */
4a4963045SJacob Faibussowitsch #pragma once
5ac09b921SBarry Smith 
63a19ef87SMatthew G Knepley #include <petscdm.h>
73a19ef87SMatthew G Knepley 
8*ce78bad3SBarry Smith /* MANSEC = DM */
9ac09b921SBarry Smith /* SUBMANSEC = DMPatch */
10ac09b921SBarry Smith 
113a19ef87SMatthew G Knepley /*S
1216a05f60SBarry Smith   DMPATCH - `DM` object that encapsulates a domain divided into many patches
133a19ef87SMatthew G Knepley 
143a19ef87SMatthew G Knepley   Level: intermediate
153a19ef87SMatthew G Knepley 
1687497f52SBarry Smith .seealso: `DM`, `DMPatchCreate()`, `DMPatchSolve()`, `DMPatchZoom()`, `DMPatchGetPatchSize()`, `DMPatchSetPatchSize()`,
1787497f52SBarry Smith           `DMPatchGetCommSize()`, `DMPatchSetCommSize()`, `DMPatchGetCoarse()`, `DMPatchCreateGrid()`
183a19ef87SMatthew G Knepley S*/
193a19ef87SMatthew G Knepley PETSC_EXTERN PetscErrorCode DMPatchCreate(MPI_Comm, DM *);
203a19ef87SMatthew G Knepley 
2160c22052SBarry Smith PETSC_EXTERN PetscErrorCode DMPatchZoom(DM, MatStencil, MatStencil, MPI_Comm, DM *, PetscSF *, PetscSF *);
226fbb21edSJed Brown PETSC_EXTERN PetscErrorCode DMPatchSolve(DM);
236fbb21edSJed Brown PETSC_EXTERN PetscErrorCode DMPatchGetPatchSize(DM, MatStencil *);
246fbb21edSJed Brown PETSC_EXTERN PetscErrorCode DMPatchSetPatchSize(DM, MatStencil);
25bb71ef15SMatthew G Knepley PETSC_EXTERN PetscErrorCode DMPatchGetCommSize(DM, MatStencil *);
26bb71ef15SMatthew G Knepley PETSC_EXTERN PetscErrorCode DMPatchSetCommSize(DM, MatStencil);
276fbb21edSJed Brown PETSC_EXTERN PetscErrorCode DMPatchGetCoarse(DM, DM *);
28bb71ef15SMatthew G Knepley PETSC_EXTERN PetscErrorCode DMPatchCreateGrid(MPI_Comm, PetscInt, MatStencil, MatStencil, MatStencil, DM *);
296fbb21edSJed Brown 
303a19ef87SMatthew G Knepley /*
313a19ef87SMatthew G Knepley  * We want each patch to consist of an entire DM, DMDA at first
323a19ef87SMatthew G Knepley  - We cannot afford to store much more than the data from a single patch in memory
333a19ef87SMatthew G Knepley    - No global PetscSection, only PetscLayout
343a19ef87SMatthew G Knepley    - Optional scatters
353a19ef87SMatthew G Knepley    * There is a storable coarse level, which will also be a traditional DM (DMDA here)
363a19ef87SMatthew G Knepley    * The local and global vectors correspond to a ghosted patch
373a19ef87SMatthew G Knepley  * Need a way to activate a patch
383a19ef87SMatthew G Knepley    * Jack in sizes for l/g vectors
393a19ef87SMatthew G Knepley  - Need routine for viewing a full global vector
403a19ef87SMatthew G Knepley  - Jed handles solver
413a19ef87SMatthew G Knepley */
42