PETSc version 3.15.5
Fix/Edit manual page

# SNESMultiblockGetSubSNES

Gets the SNES contexts for all blocks

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESMultiblockGetSubSNES(SNES snes, PetscInt *n, SNES *subsnes[])

Collective on SNES

### Input Parameter

| snes | - the solver context

### Output Parameters

| n | - the number of blocks
| subsnes | - the array of SNES contexts

### Note

After SNESMultiblockGetSubSNES() the array of SNESs MUST be freed by the user (not each SNES, just the array that contains them).

You must call SNESSetUp() before calling SNESMultiblockGetSubSNES().

### See Also

SNESMULTIBLOCK

### Level

advanced

### Location

src/snes/impls/multiblock/multiblock.c

### Implementations

SNESMultiblockGetSubSNES_Default in src/snes/impls/multiblock/multiblock.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages