petsc4py.PETSc.DMShell#
- class petsc4py.PETSc.DMShell#
Bases:
DMA shell DM object, used to manage user-defined problem data.
Methods Summary
create([comm])Creates a shell DM object.
setCoarsen(coarsen[, args, kargs])Set the routine used to coarsen the
DMShell.setCreateDomainDecomposition(decomp[, args, ...])Set the routine used to create a domain decomposition.
setCreateDomainDecompositionScatters(scatter)Set the routine used to create the scatter contexts for domain decomposition.
setCreateFieldDecomposition(decomp[, args, ...])Set the routine used to create a field decomposition.
setCreateGlobalVector(create_gvec[, args, kargs])Set the routine to create a global vector.
setCreateInjection(create_injection[, args, ...])Set the routine used to create the injection operator.
setCreateInterpolation(create_interpolation)Set the routine used to create the interpolation operator.
setCreateLocalVector(create_lvec[, args, kargs])Set the routine to create a local vector.
setCreateMatrix(create_matrix[, args, kargs])Set the routine to create a matrix.
setCreateRestriction(create_restriction[, ...])Set the routine used to create the restriction operator.
setCreateSubDM(create_subdm[, args, kargs])Set the routine used to create a sub DM from the
DMShell.setGlobalToLocal(begin, end[, begin_args, ...])Set the routines used to perform a global to local scatter.
Set a
Scattercontext for global to local communication.setGlobalVector(gv)Set a template global vector.
setLocalToGlobal(begin, end[, begin_args, ...])Set the routines used to perform a local to global scatter.
Set a
Scattercontext for local to global communication.setLocalToLocal(begin, end[, begin_args, ...])Set the routines used to perform a local to local scatter.
Set a
Scattercontext for local to local communication.setLocalVector(lv)Set a template local vector.
setMatrix(mat)Set a template matrix.
setRefine(refine[, args, kargs])Set the routine used to refine the
DMShell.Methods Documentation
- create(comm=None)#
Creates a shell DM object.
Collective.
- Parameters:
comm (Comm | None) – MPI communicator, defaults to
Sys.getDefaultComm.- Return type:
See also
- setCoarsen(coarsen, args=None, kargs=None)#
Set the routine used to coarsen the
DMShell.Logically collective.
- Parameters:
- Return type:
See also
- setCreateDomainDecomposition(decomp, args=None, kargs=None)#
Set the routine used to create a domain decomposition.
Logically collective.
- Parameters:
- Return type:
See also
- setCreateDomainDecompositionScatters(scatter, args=None, kargs=None)#
Set the routine used to create the scatter contexts for domain decomposition.
Logically collective.
- Parameters:
- Return type:
- setCreateFieldDecomposition(decomp, args=None, kargs=None)#
Set the routine used to create a field decomposition.
Logically collective.
- Parameters:
- Return type:
See also
- setCreateGlobalVector(create_gvec, args=None, kargs=None)#
Set the routine to create a global vector.
Logically collective.
- Parameters:
- Return type:
- setCreateInjection(create_injection, args=None, kargs=None)#
Set the routine used to create the injection operator.
Logically collective.
- Parameters:
- Return type:
See also
- setCreateInterpolation(create_interpolation, args=None, kargs=None)#
Set the routine used to create the interpolation operator.
Logically collective.
- Parameters:
- Return type:
See also
- setCreateLocalVector(create_lvec, args=None, kargs=None)#
Set the routine to create a local vector.
Logically collective.
- Parameters:
- Return type:
- setCreateMatrix(create_matrix, args=None, kargs=None)#
Set the routine to create a matrix.
Logically collective.
- Parameters:
- Return type:
See also
- setCreateRestriction(create_restriction, args=None, kargs=None)#
Set the routine used to create the restriction operator.
Logically collective.
- Parameters:
- Return type:
See also
- setCreateSubDM(create_subdm, args=None, kargs=None)#
Set the routine used to create a sub DM from the
DMShell.Logically collective.
- Parameters:
- Return type:
See also
- setGlobalToLocal(begin, end, begin_args=None, begin_kargs=None, end_args=None, end_kargs=None)#
Set the routines used to perform a global to local scatter.
Logically collective.
- Parameters:
dm – The
DMShell.begin (Callable[[DM, Vec, InsertMode, Vec], None] | None) – The routine which begins the global to local scatter.
end (Callable[[DM, Vec, InsertMode, Vec], None] | None) – The routine which ends the global to local scatter.
begin_args (tuple[Any, ...] | None) – Additional positional arguments for
begin.begin_kargs (dict[str, Any] | None) – Additional keyword arguments for
begin.end_args (tuple[Any, ...] | None) – Additional positional arguments for
end.end_kargs (dict[str, Any] | None) – Additional keyword arguments for
end.
- Return type:
See also
- setGlobalToLocalVecScatter(gtol)#
Set a
Scattercontext for global to local communication.Logically collective.
See also
- setGlobalVector(gv)#
Set a template global vector.
Logically collective.
See also
- setLocalToGlobal(begin, end, begin_args=None, begin_kargs=None, end_args=None, end_kargs=None)#
Set the routines used to perform a local to global scatter.
Logically collective.
- Parameters:
begin (Callable[[DM, Vec, InsertMode, Vec], None] | None) – The routine which begins the local to global scatter.
end (Callable[[DM, Vec, InsertMode, Vec], None] | None) – The routine which ends the local to global scatter.
begin_args (tuple[Any, ...] | None) – Additional positional arguments for
begin.begin_kargs (dict[str, Any] | None) – Additional keyword arguments for
begin.end_args (tuple[Any, ...] | None) – Additional positional arguments for
end.end_kargs (dict[str, Any] | None) – Additional keyword arguments for
end.
- Return type:
See also
- setLocalToGlobalVecScatter(ltog)#
Set a
Scattercontext for local to global communication.Logically collective.
See also
- setLocalToLocal(begin, end, begin_args=None, begin_kargs=None, end_args=None, end_kargs=None)#
Set the routines used to perform a local to local scatter.
Logically collective.
- Parameters:
begin (Callable[[DM, Vec, InsertMode, Vec], None] | None) – The routine which begins the local to local scatter.
end (Callable[[DM, Vec, InsertMode, Vec], None] | None) – The routine which ends the local to local scatter.
begin_args (tuple[Any, ...] | None) – Additional positional arguments for
begin.begin_kargs (dict[str, Any] | None) – Additional keyword arguments for
begin.end_args (tuple[Any, ...] | None) – Additional positional arguments for
end.end_kargs (dict[str, Any] | None) – Additional keyword arguments for
end.
- Return type:
See also
- setLocalToLocalVecScatter(ltol)#
Set a
Scattercontext for local to local communication.Logically collective.
See also
- setLocalVector(lv)#
Set a template local vector.
Logically collective.
See also
- setMatrix(mat)#
Set a template matrix.
Collective.
See also