PetscObjectChangeTypeName — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscObjectChangeTypeName

Changes the type name stored on a `PetscObject`

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscObjectChangeTypeName(PetscObject obj, const char type_name[])

Logically collective

## Input Parameters

- obj - the `PetscObject`

- type_name - the new type name

## Note

Also clears any Fortran subtype callbacks previously registered on the object so they cannot be accidentally invoked after the type change. This routine is normally called from within a `XXXSetType()` implementation.

## See Also

`PetscObject`, `PetscObjectGetType()`, `PetscObjectSetName()`

## Level

developer

## Location

src/sys/objects/pname.c

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