petsc4py.PETSc.LGMap#
- class petsc4py.PETSc.LGMap#
Bases:
Object
Mapping from a local to a global ordering.
See also
Enumerations
Enum describing mapping behavior when global indices are missing.
Local to global map types.
Methods Summary
apply
(indices[, result])Convert a locally numbered list of integers to a global numbering.
applyBlock
(indices[, result])Convert a local block numbering to a global block numbering.
applyBlockInverse
(indices[, mode])Compute blocked local numbering from blocked global numbering.
applyIS
(iset)Create an index set with global numbering from a local numbering.
applyInverse
(indices[, mode])Compute local numbering from global numbering.
create
(indices[, bsize, comm])Create a local-to-global mapping.
createIS
(iset)Create a local-to-global mapping from an index set.
createSF
(sf, start)Create a local-to-global mapping from a star forest.
destroy
()Destroy the local-to-global mapping.
Return the global indices for each local block.
Determine the block indices shared with neighboring processes.
Return the block size of the local-to-global mapping.
Return the global indices for each local point in the mapping.
getInfo
()Determine the indices shared with neighboring processes.
getSize
()Return the local size of the local-to-global mapping.
Set mapping options from the options database.
setType
(lgmap_type)Set the type of the local-to-global map.
view
([viewer])View the local-to-global mapping.
Attributes Summary
The global indices for each local block in the mapping.
Mapping describing block indices shared with neighboring processes.
The block size.
The global indices for each local point in the mapping.
Mapping describing indices shared with neighboring processes.
The local size.
Methods Documentation
- apply(indices, result=None)#
Convert a locally numbered list of integers to a global numbering.
Not collective.
- Parameters:
- Returns:
Indices in global numbering. If
result
is notNone
then this is returned here.- Return type:
See also
- applyBlock(indices, result=None)#
Convert a local block numbering to a global block numbering.
Not collective.
- Parameters:
- Returns:
Block indices in global numbering. If
result
is notNone
then this is returned here.- Return type:
See also
- applyBlockInverse(indices, mode=None)#
Compute blocked local numbering from blocked global numbering.
Not collective.
- Parameters:
- Returns:
Indices with a local block numbering.
- Return type:
See also
- applyIS(iset)#
Create an index set with global numbering from a local numbering.
Collective.
- Parameters:
iset (IS) – Index set with local numbering.
- Returns:
Index set with global numbering.
- Return type:
See also
- applyInverse(indices, mode=None)#
Compute local numbering from global numbering.
Not collective.
- Parameters:
- Returns:
Indices with a local numbering.
- Return type:
See also
- create(indices, bsize=None, comm=None)#
Create a local-to-global mapping.
Not collective.
- Parameters:
- Return type:
See also
- createIS(iset)#
Create a local-to-global mapping from an index set.
Not collective.
- Parameters:
iset (IS) – Index set containing the global numbers for each local number.
- Return type:
See also
- createSF(sf, start)#
Create a local-to-global mapping from a star forest.
Collective.
- Parameters:
- Return type:
See also
- destroy()#
Destroy the local-to-global mapping.
Not collective.
See also
Source code at petsc4py/PETSc/IS.pyx:1174
- Return type:
- getBlockIndices()#
Return the global indices for each local block.
Not collective.
Source code at petsc4py/PETSc/IS.pyx:1318
- Return type:
- getBlockInfo()#
Determine the block indices shared with neighboring processes.
Collective.
- Returns:
Mapping from neighboring processor number to an array of shared block indices (in local numbering).
- Return type:
See also
- getBlockSize()#
Return the block size of the local-to-global mapping.
Not collective.
See also
Source code at petsc4py/PETSc/IS.pyx:1280
- Return type:
- getIndices()#
Return the global indices for each local point in the mapping.
Not collective.
See also
Source code at petsc4py/PETSc/IS.pyx:1294
- Return type:
- getInfo()#
Determine the indices shared with neighboring processes.
Collective.
- Returns:
Mapping from neighboring processor number to an array of shared indices (in local numbering).
- Return type:
See also
- getSize()#
Return the local size of the local-to-global mapping.
Not collective.
See also
Source code at petsc4py/PETSc/IS.pyx:1266
- Return type:
- setFromOptions()#
Set mapping options from the options database.
Not collective.
Source code at petsc4py/PETSc/IS.pyx:1143
- Return type:
- setType(lgmap_type)#
Set the type of the local-to-global map.
Logically collective.
Notes
Use
-islocaltoglobalmapping_type
to set the type in the options database.
- view(viewer=None)#
View the local-to-global mapping.
Not collective.
- Parameters:
viewer (Viewer | None) – Viewer instance, defaults to an instance of
Viewer.Type.ASCII
.- Return type:
See also
Attributes Documentation
- block_indices#
The global indices for each local block in the mapping.
Not collective.
- block_info#
Mapping describing block indices shared with neighboring processes.
Collective.
- block_size#
The block size.
Not collective.
See also
- indices#
The global indices for each local point in the mapping.
Not collective.
- info#
Mapping describing indices shared with neighboring processes.
Collective.
See also
- size#
The local size.
Not collective.
See also