petsc4py.PETSc.DS#

class petsc4py.PETSc.DS#

Bases: Object

Discrete System object.

Enumerations

Type

The Discrete System types.

Methods Summary

create([comm])

Create an empty DS.

destroy()

Destroy the discrete system.

getComponents()

Return the number of components for each field on an evaluation point.

getCoordinateDimension()

Return the coordinate dimension of the DS.

getDimensions()

Return the size of the space for each field on an evaluation point.

getFieldIndex(disc)

Return the index of the given field.

getNumFields()

Return the number of fields in the DS.

getSpatialDimension()

Return the spatial dimension of the DS.

getTotalComponents()

Return the total number of components in this system.

getTotalDimensions()

Return the total size of the approximation space for this system.

getType()

Return the type of the discrete system.

setDiscretisation(f, disc)

Set the discretization object for the given field.

setFromOptions()

Set parameters in a DS from the options database.

setType(ds_type)

Build a particular type of a discrete system.

setUp()

Construct data structures for the discrete system.

view([viewer])

View a discrete system.

Methods Documentation

create(comm=None)#

Create an empty DS.

Collective.

The type can then be set with setType.

Parameters:

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

Return type:

Self

Source code at petsc4py/PETSc/DS.pyx:53

destroy()#

Destroy the discrete system.

Collective.

Source code at petsc4py/PETSc/DS.pyx:40

Return type:

Self

getComponents()#

Return the number of components for each field on an evaluation point.

Not collective.

Source code at petsc4py/PETSc/DS.pyx:246

Return type:

ArrayInt

getCoordinateDimension()#

Return the coordinate dimension of the DS.

Not collective.

The coordinate dimension of the DS is the dimension of the space into which the discretiaztions are embedded.

Source code at petsc4py/PETSc/DS.pyx:153

Return type:

int

getDimensions()#

Return the size of the space for each field on an evaluation point.

Not collective.

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

Return type:

ArrayInt

getFieldIndex(disc)#

Return the index of the given field.

Not collective.

Parameters:

disc (Object) – The discretization object.

Return type:

int

Source code at petsc4py/PETSc/DS.pyx:184

getNumFields()#

Return the number of fields in the DS.

Not collective.

Source code at petsc4py/PETSc/DS.pyx:170

Return type:

int

getSpatialDimension()#

Return the spatial dimension of the DS.

Not collective.

The spatial dimension of the DS is the topological dimension of the discretizations.

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

Return type:

int

getTotalComponents()#

Return the total number of components in this system.

Not collective.

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

Return type:

int

getTotalDimensions()#

Return the total size of the approximation space for this system.

Not collective.

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

Return type:

int

getType()#

Return the type of the discrete system.

Not collective.

Source code at petsc4py/PETSc/DS.pyx:95

Return type:

str

setDiscretisation(f, disc)#

Set the discretization object for the given field.

Not collective.

Parameters:
  • f (int) – The field number.

  • disc (Object) – The discretization object.

Return type:

None

Source code at petsc4py/PETSc/DS.pyx:261

setFromOptions()#

Set parameters in a DS from the options database.

Collective.

Source code at petsc4py/PETSc/DS.pyx:109

Return type:

None

setType(ds_type)#

Build a particular type of a discrete system.

Collective.

Parameters:

ds_type (Type | str) – The type of the discrete system.

Return type:

None

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

setUp()#

Construct data structures for the discrete system.

Collective.

See also

PetscDSSetUp

Source code at petsc4py/PETSc/DS.pyx:121

Return type:

Self

view(viewer=None)#

View a discrete system.

Collective.

Parameters:

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

Return type:

None

See also

PetscDSView

Source code at petsc4py/PETSc/DS.pyx:21