petsc4py.PETSc.AO#
- class petsc4py.PETSc.AO#
Bases:
ObjectApplication ordering object.
Enumerations
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
indicesthat 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
ISis 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:
See also
- createBasic(app, petsc=None, comm=None)#
Return a basic application ordering using two orderings.
Collective.
The arrays/indices
appandpetscmust contain all the integers0tolen(app)-1with no duplicates; that is there cannot be any “holes” in the indices. UsecreateMappingif you wish to have “holes” in the indices.- Parameters:
- Return type:
- createMapping(app, petsc=None, comm=None)#
Return an application mapping using two orderings.
Collective.
The arrays
appandpetscneed NOT contain all the integers0tolen(app)-1, that is there CAN be “holes” in the indices. UsecreateBasicif they do not have holes for better performance.- Parameters:
- Return type:
See also
- createMemoryScalable(app, petsc=None, comm=None)#
Return a memory scalable application ordering using two orderings.
Collective.
The arrays/indices
appandpetscmust contain all the integers0tolen(app)-1with no duplicates; that is there cannot be any “holes” in the indices. UsecreateMappingif you wish to have “holes” in the indices.Comparing with
createBasic, this routine trades memory with message communication.- Parameters:
- Return type:
- destroy()#
Destroy the application ordering.
Collective.
See also
Source code at petsc4py/PETSc/AO.pyx:38
- Return type:
- getType()#
Return the application ordering type.
Not collective.
See also
Source code at petsc4py/PETSc/AO.pyx:201
- Return type:
- petsc2app(indices)#
Map a PETSc ordering to the application-defined ordering.
Collective.
Any integers in
indicesthat 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
ISis 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:
See also