PetscObjectSetOptions — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscObjectSetOptions

Sets the options database used by the object. Call immediately after creating the object.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscObjectSetOptions(PetscObject obj, PetscOptions options)

Collective

## Input Parameters

- obj - any PETSc object, for example a `Vec`, `Mat` or `KSP`.

- options - the options database, use NULL for default

## Note

If this is not called the object will use the default options database

## Developer Notes

This functionality is not used in PETSc and should, perhaps, be removed

## See Also

`PetscOptionsCreate()`, `PetscOptionsDestroy()`, `PetscObjectSetOptionsPrefix()`, `PetscObjectAppendOptionsPrefix()`, `PetscObjectPrependOptionsPrefix()`, `PetscObjectGetOptionsPrefix()`, `PetscObjectGetOptions()`

## Level

advanced

## Location

src/sys/objects/prefix.c

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