petsc4py.PETSc.LGMap¶
- class petsc4py.PETSc.LGMap¶
Bases:
Object
Mapping from an arbitrary local ordering from
0
ton-1
to a global PETSc ordering used by a vector or matrix.See also
petsc.ISLocalToGlobalMapping
Enumerations
Enum describing mapping behavior for global-to-local maps when global indices are missing.
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
LGMap.applyBlock
,petsc.ISLocalToGlobalMappingApply
- 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
LGMap.apply
,petsc.ISLocalToGlobalMappingApplyBlock
- 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
petsc.ISGlobalToLocalMappingApplyBlock
- 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
petsc.ISLocalToGlobalMappingApplyIS
- applyInverse(indices, mode=None)¶
Compute local numbering from global numbering.
Not collective.
- Parameters:
- Returns:
Indices with a local numbering.
- Return type:
See also
petsc.ISGlobalToLocalMappingApply
- create(indices, bsize=None, comm=None)¶
Create a local-to-global mapping.
Not collective.
- Parameters:
- Return type:
See also
petsc.ISLocalToGlobalMappingCreate
- 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
petsc.ISLocalToGlobalMappingCreateIS
- createSF(sf, start)¶
Create a local-to-global mapping from a star forest.
Collective.
- Parameters:
- Return type:
See also
petsc.ISLocalToGlobalMappingCreateSF
- destroy()¶
Destroy the local-to-global mapping.
Not collective.
See also
petsc.ISLocalToGlobalMappingDestroy
Source code at petsc4py/PETSc/IS.pyx:1176
- Return type:
- getBlockIndices()¶
Return the global indices for each local block.
Not collective.
See also
petsc.ISLocalToGlobalMappingGetBlockIndices
Source code at petsc4py/PETSc/IS.pyx:1321
- 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
petsc.ISLocalToGlobalMappingGetBlockInfo
- getBlockSize()¶
Return the block size of the local-to-global mapping.
Not collective.
See also
petsc.ISLocalToGlobalMappingGetBlockSize
Source code at petsc4py/PETSc/IS.pyx:1283
- Return type:
- getIndices()¶
Return the global indices for each local point in the mapping.
Not collective.
See also
petsc.ISLocalToGlobalMappingGetIndices
Source code at petsc4py/PETSc/IS.pyx:1297
- 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
petsc.ISLocalToGlobalMappingGetInfo
- getSize()¶
Return the local size of the local-to-global mapping.
Not collective.
See also
petsc.ISLocalToGlobalMappingGetSize
Source code at petsc4py/PETSc/IS.pyx:1269
- Return type:
- setFromOptions()¶
Set mapping options from the options database.
Not collective.
See also
Working with PETSc options (TODO),
petsc.ISLocalToGlobalMappingSetFromOptions
Source code at petsc4py/PETSc/IS.pyx:1145
- 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.See also
Working with PETSc options (TODO),
petsc.ISLocalToGlobalMappingSetType
- 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
petsc.ISLocalToGlobalMappingView
Attributes Documentation
- block_indices¶
The global indices for each local block in the mapping.
Not collective.
See also
LGMap.getBlockIndices
,petsc.ISLocalToGlobalMappingGetBlockIndices
- block_info¶
Mapping describing block indices shared with neighboring processes.
Collective.
See also
LGMap.getBlockInfo
,petsc.ISLocalToGlobalMappingGetBlockInfo
- block_size¶
The block size.
Not collective.
See also
- indices¶
The global indices for each local point in the mapping.
Not collective.
See also
LGMap.getIndices
,petsc.ISLocalToGlobalMappingGetIndices
- info¶
Mapping describing indices shared with neighboring processes.
Collective.
See also
LGMap.getInfo
,petsc.ISLocalToGlobalMappingGetInfo
- size¶
The local size.
Not collective.
See also