PetscObjectParameterSetDefault — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscObjectParameterSetDefault

sets a parameter default value in a `PetscObject` to a new default value. If the current value matches the old default value, then the current value is also set to the new value. No Fortran Support

## Synopsis

    #include <petscsys.h>
    PetscBool PetscObjectParameterSetDefault(PetscObject obj, char* NAME, PetscReal value);

## Input Parameters

- obj - the `PetscObject`

- NAME - the name of the parameter, unquoted

- value - the new value

## Notes

The defaults for an object are the values set when the object’s type is set.

This should only be used in object constructors, such as, `SNESCreate_NGS()`.

This only works for parameters that are declared in the struct with `PetscObjectParameterDeclare()`

## See Also

`PetscObjectParameterDeclare()`, `PetscInitialize()`, `PetscFinalize()`, `PetscObject`, `SNESParametersInitialize()`

## Level

developer

## Location

include/petscsys.h

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