SNESMultiblockGetSubSNES#

Gets the SNES contexts for all blocks in a SNESMULTBLOCK solver.

Synopsis#

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

Not Collective but each SNES obtained is parallel

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#

SNESMULTBLOCK, SNESMultiblockSetIS(), SNESMultiblockSetFields()

Level#

advanced

Location#

src/snes/impls/multiblock/multiblock.c

Implementations#

SNESMultiblockGetSubSNES_Default in src/snes/impls/multiblock/multiblock.c


Edit on GitLab

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