Skip to main content
`Ctrl`+`K`

# petsc4py.PETSc.Quad

class petsc4py.PETSc.Quad

  Bases: `Object`

  Quadrature rule for integration.

  Methods Summary

  `create`([comm]) | Create a `Quad` object.
  `destroy`() | Destroy the `Quad` object.
  `duplicate`() | Create a deep copy of the `Quad` object.
  `getData`() | Return the data defining the `Quad`.
  `getNumComponents`() | Return the number of components for functions to be integrated.
  `getOrder`() | Return the order of the method in the `Quad`.
  `setNumComponents`(nc) | Return the number of components for functions to be integrated.
  `setOrder`(order) | Set the order of the method in the `Quad`.
  `view`([viewer]) | View a `Quad` object.

  Methods Documentation

  create(comm=None)

    Create a `Quad` object.

    Collective.

    Parameters:

      comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `PetscQuadratureCreate`

    Source code at petsc4py/PETSc/DT.pyx:28

  destroy()

    Destroy the `Quad` object.

    Collective.

    See also

    `PetscQuadratureDestroy`

    Source code at petsc4py/PETSc/DT.pyx:63

    Return type:

      Self

  duplicate()

    Create a deep copy of the `Quad` object.

    Collective.

    See also

    `PetscQuadratureDuplicate`

    Source code at petsc4py/PETSc/DT.pyx:49

    Return type:

      Quad

  getData()

    Return the data defining the `Quad`.

    Not collective.

    Returns:

      - points (`ArrayReal`) – The coordinates of the quadrature points.

      - weights (`ArrayReal`) – The quadrature weights.

    Return type:

      tuple[ArrayReal, ArrayReal]

    See also

    `PetscQuadratureGetData`

    Source code at petsc4py/PETSc/DT.pyx:76

  getNumComponents()

    Return the number of components for functions to be integrated.

    Not collective.

    See also

    `setNumComponents`, `PetscQuadratureGetNumComponents`

    Source code at petsc4py/PETSc/DT.pyx:104

    Return type:

      int

  getOrder()

    Return the order of the method in the `Quad`.

    Not collective.

    See also

    `setOrder`, `PetscQuadratureGetOrder`

    Source code at petsc4py/PETSc/DT.pyx:136

    Return type:

      int

  setNumComponents(nc)

    Return the number of components for functions to be integrated.

    Not collective.

    Parameters:

      nc (int) – The number of components.

    Return type:

      None

    See also

    `getNumComponents`, `PetscQuadratureSetNumComponents`

    Source code at petsc4py/PETSc/DT.pyx:118

  setOrder(order)

    Set the order of the method in the `Quad`.

    Not collective.

    Parameters:

      order (int) – The order of the quadrature, i.e. the highest degree polynomial that is exactly integrated.

    Return type:

      None

    See also

    `getOrder`, `PetscQuadratureSetOrder`

    Source code at petsc4py/PETSc/DT.pyx:150

  view(viewer=None)

    View a `Quad` object.

    Collective.

    Parameters:

      viewer (Viewer | None) – A `Viewer` to display the graph.

    Return type:

      None

    See also

    `PetscQuadratureView`

    Source code at petsc4py/PETSc/DT.pyx:9