petsc4py.PETSc.AO#

class petsc4py.PETSc.AO#

Bases: Object

Application ordering object.

Enumerations

Type

The application ordering types.

Methods Summary

app2petsc(indices)

Map an application-defined ordering to the PETSc ordering.

createBasic(app[, petsc, comm])

Return a basic application ordering using two orderings.

createMapping(app[, petsc, comm])

Return an application mapping using two orderings.

createMemoryScalable(app[, petsc, comm])

Return a memory scalable application ordering using two orderings.

destroy()

Destroy the application ordering.

getType()

Return the application ordering type.

petsc2app(indices)

Map a PETSc ordering to the application-defined ordering.

view([viewer])

Display the application ordering.

Methods Documentation

app2petsc(indices)#

Map an application-defined ordering to the PETSc ordering.

Collective.

Any integers in indices that are negative are left unchanged. This allows one to convert, for example, neighbor lists that use negative entries to indicate nonexistent neighbors due to boundary conditions, etc.

Integers that are out of range are mapped to -1.

If IS is used, it cannot be of type stride or block.

Parameters:

indices (Sequence[int] | IS) – The indices; to be replaced with their mapped values.

Return type:

Sequence[int] | IS

Source code at petsc4py/PETSc/AO.pyx:214

createBasic(app, petsc=None, comm=None)#

Return a basic application ordering using two orderings.

Collective.

The arrays/indices app and petsc must contain all the integers 0 to len(app)-1 with no duplicates; that is there cannot be any “holes” in the indices. Use createMapping if you wish to have “holes” in the indices.

Parameters:
Return type:

Self

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

createMapping(app, petsc=None, comm=None)#

Return an application mapping using two orderings.

Collective.

The arrays app and petsc need NOT contain all the integers 0 to len(app)-1, that is there CAN be “holes” in the indices. Use createBasic if they do not have holes for better performance.

Parameters:
Return type:

Self

Source code at petsc4py/PETSc/AO.pyx:154

createMemoryScalable(app, petsc=None, comm=None)#

Return a memory scalable application ordering using two orderings.

Collective.

The arrays/indices app and petsc must contain all the integers 0 to len(app)-1 with no duplicates; that is there cannot be any “holes” in the indices. Use createMapping if you wish to have “holes” in the indices.

Comparing with createBasic, this routine trades memory with message communication.

Parameters:
Return type:

Self

Source code at petsc4py/PETSc/AO.pyx:102

destroy()#

Destroy the application ordering.

Collective.

See also

AODestroy

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

Return type:

Self

getType()#

Return the application ordering type.

Not collective.

See also

AOGetType

Source code at petsc4py/PETSc/AO.pyx:200

Return type:

str

petsc2app(indices)#

Map a PETSc ordering to the application-defined ordering.

Collective.

Any integers in indices that are negative are left unchanged. This allows one to convert, for example, neighbor lists that use negative entries to indicate nonexistent neighbors due to boundary conditions, etc.

Integers that are out of range are mapped to -1.

If IS is used, it cannot be of type stride or block.

Parameters:

indices (Sequence[int] | IS) – The indices; to be replaced with their mapped values.

Return type:

Sequence[int] | IS

Source code at petsc4py/PETSc/AO.pyx:248

view(viewer=None)#

Display the application ordering.

Collective.

Parameters:

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

Return type:

None

See also

AOView

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