PCGASMCreateSubdomains2D — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PCGASMCreateSubdomains2D

Creates the index sets for the `PCGASM` overlapping Schwarz preconditioner for a two-dimensional problem on a regular grid.

## Synopsis

    #include "petscpc.h"
    PetscErrorCode PCGASMCreateSubdomains2D(PC pc, PetscInt M, PetscInt N, PetscInt Mdomains, PetscInt Ndomains, PetscInt dof, PetscInt overlap, PetscInt *nsub, IS *iis[], IS *ois[])

Collective

## Input Parameters

- pc - the preconditioner context

- M - the global number of grid points in the x direction

- N - the global number of grid points in the y direction

- Mdomains - the global number of subdomains in the x direction

- Ndomains - the global number of subdomains in the y direction

- dof - degrees of freedom per node

- overlap - overlap in mesh lines

## Output Parameters

- nsub - the number of local subdomains created

- iis - array of index sets defining inner (nonoverlapping) subdomains

- ois - array of index sets defining outer (overlapping, if overlap > 0) subdomains

## Note

Use `PCGASMDestroySubdomains()` to free the index sets and the arrays

## Fortran Notes

The `IS` must be declared as an array of length long enough to hold `Nsub` entries

## See Also

KSP: Linear System Solvers, `PCGASM`, `PCGASMSetSubdomains()`, `PCGASMGetSubKSP()`, `PCGASMSetOverlap()`, `PCASMCreateSubdomains2D()`, `PCGASMDestroySubdomains()`

## Level

advanced

## Location

src/ksp/pc/impls/gasm/gasm.c

## Examples

src/ksp/ksp/tutorials/ex62.c

Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages