Skip to main content
`Ctrl`+`K`

# PetscDSGetDiscretization

Returns the discretization object for the given field

## Synopsis

    #include "petscds.h"
    PetscErrorCode PetscDSGetDiscretization(PetscDS prob, PetscInt f, PetscObject *disc)

Not Collective

## Input Parameters

- prob - The `PetscDS` object

- f - The field number

## Output Parameter

- disc - The discretization object, this can be a `PetscFE` or a `PetscFV`

## See Also

`PetscDS`, `PetscFE`, `PetscFV`, `PetscDSSetDiscretization()`, `PetscDSAddDiscretization()`, `PetscDSGetNumFields()`, `PetscDSCreate()`

## Level

beginner

## Location

src/dm/dt/interface/dtds.c

## Examples

src/dm/impls/plex/tutorials/ex8.c
src/dm/impls/plex/tutorials/ex4f90.F90

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