Skip to main content
`Ctrl`+`K`

# petsc4py.PETSc.TAOTerm

class petsc4py.PETSc.TAOTerm

  Bases: `Object`

  TAO Term.

  Enumerations

  `Type` | TAO Term Types.

  Methods Summary

  `create`([comm]) | Create a TAO Term.
  `destroy`() | Destroy the term object.
  `getType`() | Return the type of the term.
  `setFromOptions`() | Configure the term from the options database.
  `setSolutionTemplate`(x) | Set the solution vector template.
  `setType`(term_type) | Set the type of the term.
  `setUp`() | Set up the internal data structures for using the term.
  `view`([viewer]) | View the term object.

  Methods Documentation

  create(comm=None)

    Create a TAO Term.

    Collective.

    Parameters:

      comm – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `Sys.getDefaultComm`, `TaoTermCreate`

    Source code at petsc4py/PETSc/TAO.pyx:2550

  destroy()

    Destroy the term object.

    Collective.

    See also

    `TaoTermDestroy`

    Source code at petsc4py/PETSc/TAO.pyx:2537

    Return type:

      Self

  getType()

    Return the type of the term.

    Not collective.

    See also

    `setType`, `TaoTermGetType`

    Source code at petsc4py/PETSc/TAO.pyx:2590

    Return type:

      str

  setFromOptions()

    Configure the term from the options database.

    Collective.

    See also

    Working with PETSc options, `TaoTermSetFromOptions`

    Source code at petsc4py/PETSc/TAO.pyx:2604

    Return type:

      None

  setSolutionTemplate(x)

    Set the solution vector template.

    Collective.

    See also

    `TaoTermSetSolutionTemplate`

    Source code at petsc4py/PETSc/TAO.pyx:2628

    Parameters:

      x (Vec)

    Return type:

      None

  setType(term_type)

    Set the type of the term.

    Logically collective.

    Parameters:

      term_type (Type | str) – The type of the term.

    Return type:

      None

    See also

    `getType`, `TaoTermSetType`

    Source code at petsc4py/PETSc/TAO.pyx:2571

  setUp()

    Set up the internal data structures for using the term.

    Collective.

    See also

    `TaoTermSetUp`

    Source code at petsc4py/PETSc/TAO.pyx:2616

    Return type:

      None

  view(viewer=None)

    View the term object.

    Collective.

    Parameters:

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

    Return type:

      None

    See also

    `TaoTermView`

    Source code at petsc4py/PETSc/TAO.pyx:2518

  __init__()
  classmethod __new__(*args, **kwargs)