petsc4py.PETSc.Object#

class petsc4py.PETSc.Object#

Bases: object

Base class wrapping a PETSc object.

See also

PetscObject

Methods Summary

appendOptionsPrefix(prefix)

Append to the prefix used for searching for options in the database.

compose(name, obj)

Associate a PETSc object using a key string.

decRef()

Decrement the object reference count.

destroy()

Destroy the object.

getAttr(name)

Return the attribute associated with a given name.

getClassId()

Return the class identifier of the object.

getClassName()

Return the class name of the object.

getComm()

Return the communicator of the object.

getDict()

Return the dictionary of attributes.

getName()

Return the name of the object.

getOptionsPrefix()

Return the prefix used for searching for options in the database.

getRefCount()

Return the reference count of the object.

getTabLevel()

Return the PETSc object tab level.

getType()

Return the object type name.

incRef()

Increment the object reference count.

incrementTabLevel(tab[, parent])

Increment the PETSc object tab level.

query(name)

Query for the PETSc object associated with a key string.

setAttr(name, attr)

Set an the attribute associated with a given name.

setFromOptions()

Configure the object from the options database.

setName(name)

Associate a name to the object.

setOptionsPrefix(prefix)

Set the prefix used for searching for options in the database.

setTabLevel(level)

Set the PETSc object tab level.

stateGet()

Return the PETSc object state.

stateIncrease()

Increment the PETSc object state.

stateSet(state)

Set the PETSc object state.

view([viewer])

Display the object.

viewFromOptions(name[, objpre])

View the object via command line options.

Attributes Summary

classid

The class identifier.

comm

The object communicator.

fortran

Fortran handle.

handle

Handle for ctypes support.

klass

The class name.

name

The object name.

prefix

Options prefix.

refcount

Reference count.

type

Object type.

Methods Documentation

appendOptionsPrefix(prefix)#

Append to the prefix used for searching for options in the database.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:138

Parameters:

prefix (str | None)

Return type:

None

compose(name, obj)#

Associate a PETSc object using a key string.

Logically collective.

Parameters:
  • name (str | None) – The string identifying the object to be composed.

  • obj (Object) – The object to be composed.

Return type:

None

Source code at petsc4py/PETSc/Object.pyx:276

decRef()#

Decrement the object reference count.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:336

Return type:

int

destroy()#

Destroy the object.

Collective.

Source code at petsc4py/PETSc/Object.pyx:81

Return type:

Self

getAttr(name)#

Return the attribute associated with a given name.

Not collective.

See also

setAttr, getDict

Source code at petsc4py/PETSc/Object.pyx:355

Parameters:

name (str)

Return type:

object

getClassId()#

Return the class identifier of the object.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:231

Return type:

int

getClassName()#

Return the class name of the object.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:245

Return type:

str

getComm()#

Return the communicator of the object.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:189

Return type:

Comm

getDict()#

Return the dictionary of attributes.

Not collective.

See also

setAttr, getAttr

Source code at petsc4py/PETSc/Object.pyx:383

Return type:

dict

getName()#

Return the name of the object.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:203

Return type:

str

getOptionsPrefix()#

Return the prefix used for searching for options in the database.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:124

Return type:

str

getRefCount()#

Return the reference count of the object.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:259

Return type:

int

getTabLevel()#

Return the PETSc object tab level.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:464

Return type:

None

getType()#

Return the object type name.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:94

Return type:

str

incRef()#

Increment the object reference count.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:319

Return type:

int

incrementTabLevel(tab, parent=None)#

Increment the PETSc object tab level.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:437

Parameters:
Return type:

None

query(name)#

Query for the PETSc object associated with a key string.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:299

Parameters:

name (str)

Return type:

Object

setAttr(name, attr)#

Set an the attribute associated with a given name.

Not collective.

See also

getAttr, getDict

Source code at petsc4py/PETSc/Object.pyx:369

Parameters:
Return type:

None

setFromOptions()#

Configure the object from the options database.

Collective.

Source code at petsc4py/PETSc/Object.pyx:152

Return type:

None

setName(name)#

Associate a name to the object.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:217

Parameters:

name (str | None)

Return type:

None

setOptionsPrefix(prefix)#

Set the prefix used for searching for options in the database.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:110

Parameters:

prefix (str | None)

Return type:

None

setTabLevel(level)#

Set the PETSc object tab level.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:451

Parameters:

level (int)

Return type:

None

stateGet()#

Return the PETSc object state.

Not collective.

Source code at petsc4py/PETSc/Object.pyx:408

Return type:

int

stateIncrease()#

Increment the PETSc object state.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:396

Return type:

None

stateSet(state)#

Set the PETSc object state.

Logically collective.

Source code at petsc4py/PETSc/Object.pyx:422

Parameters:

state (int)

Return type:

None

view(viewer=None)#

Display the object.

Collective.

Parameters:

viewer (Viewer | None) – A Viewer instance or None for the default viewer.

Return type:

None

See also

PetscObjectView

Source code at petsc4py/PETSc/Object.pyx:62

viewFromOptions(name, objpre=None)#

View the object via command line options.

Collective.

Parameters:
  • name (str) – The command line option.

  • objpre (Object | None) – Optional object that provides prefix.

Return type:

None

Source code at petsc4py/PETSc/Object.pyx:164

Attributes Documentation

classid#

The class identifier.

Source code at petsc4py/PETSc/Object.pyx:509

comm#

The object communicator.

Source code at petsc4py/PETSc/Object.pyx:496

fortran#

Fortran handle.

Source code at petsc4py/PETSc/Object.pyx:534

handle#

Handle for ctypes support.

Source code at petsc4py/PETSc/Object.pyx:526

klass#

The class name.

Source code at petsc4py/PETSc/Object.pyx:514

name#

The object name.

Source code at petsc4py/PETSc/Object.pyx:501

prefix#

Options prefix.

Source code at petsc4py/PETSc/Object.pyx:488

refcount#

Reference count.

Source code at petsc4py/PETSc/Object.pyx:519

type#

Object type.

Source code at petsc4py/PETSc/Object.pyx:480