dolfinx.cpp.fem.petsc

PETSc-specific finite element module

Functions

assemble_matrix(*args, **kwargs)

Overloaded function.

create_matrix(a[, type])

Create a PETSc Mat for bilinear form.

create_matrix_block(a[, type])

Create monolithic sparse matrix for stacked bilinear forms.

create_matrix_nest(a[, types])

Create nested sparse matrix for bilinear forms.

create_vector_block(maps)

Create a monolithic vector for multiple (stacked) linear forms.

create_vector_nest(maps)

Create nested vector for multiple (stacked) linear forms.

discrete_gradient(V0, V1)

insert_diagonal(A, V, bcs, diagonal)

interpolation_matrix(V0, V1)

dolfinx.cpp.fem.petsc.assemble_matrix(*args, **kwargs)

Overloaded function.

  1. assemble_matrix(A: mat, a: dolfinx.cpp.fem.Form_float64, constants: numpy.ndarray[numpy.float64], coeffs: Dict[Tuple[dolfinx.cpp.fem.IntegralType, int], numpy.ndarray[numpy.float64]], bcs: List[dolfinx.cpp.fem.DirichletBC_float64], unrolled: bool = False) -> None

Assemble bilinear form into an existing PETSc matrix

  1. assemble_matrix(A: mat, a: dolfinx.cpp.fem.Form_float64, constants: numpy.ndarray[numpy.float64], coeffs: Dict[Tuple[dolfinx.cpp.fem.IntegralType, int], numpy.ndarray[numpy.float64]], rows0: numpy.ndarray[numpy.int8], rows1: numpy.ndarray[numpy.int8], unrolled: bool = False) -> None

dolfinx.cpp.fem.petsc.create_matrix(a: dolfinx.cpp.fem.Form_float64, type: str = '') mat

Create a PETSc Mat for bilinear form.

dolfinx.cpp.fem.petsc.create_matrix_block(a: List[List[dolfinx.cpp.fem.Form_float64]], type: str = '') mat

Create monolithic sparse matrix for stacked bilinear forms.

dolfinx.cpp.fem.petsc.create_matrix_nest(a: List[List[dolfinx.cpp.fem.Form_float64]], types: List[List[str]] = []) mat

Create nested sparse matrix for bilinear forms.

dolfinx.cpp.fem.petsc.create_vector_block(maps: List[Tuple[dolfinx.cpp.common.IndexMap, int]]) vec

Create a monolithic vector for multiple (stacked) linear forms.

dolfinx.cpp.fem.petsc.create_vector_nest(maps: List[Tuple[dolfinx.cpp.common.IndexMap, int]]) vec

Create nested vector for multiple (stacked) linear forms.

dolfinx.cpp.fem.petsc.discrete_gradient(V0: dolfinx.cpp.fem.FunctionSpace_float64, V1: dolfinx.cpp.fem.FunctionSpace_float64) mat
dolfinx.cpp.fem.petsc.insert_diagonal(A: mat, V: dolfinx.cpp.fem.FunctionSpace_float64, bcs: List[dolfinx.cpp.fem.DirichletBC_float64], diagonal: float) None
dolfinx.cpp.fem.petsc.interpolation_matrix(V0: dolfinx.cpp.fem.FunctionSpace_float64, V1: dolfinx.cpp.fem.FunctionSpace_float64) mat