MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / create_sparsity_pattern

Function create_sparsity_pattern

python/dolfinx/fem/utils.py:38–51  ·  view source on GitHub ↗

Create a sparsity pattern from a bilinear form. Args: a: Bilinear form to build a sparsity pattern for. Returns: Sparsity pattern for the form ``a``. Note: The pattern is not finalised, i.e. the caller is responsible for calling ``assemble`` on the spar

(a: dolfinx.fem.forms.Form)

Source from the content-addressed store, hash-verified

36
37
38def create_sparsity_pattern(a: dolfinx.fem.forms.Form) -> SparsityPattern:
39 """Create a sparsity pattern from a bilinear form.
40
41 Args:
42 a: Bilinear form to build a sparsity pattern for.
43
44 Returns:
45 Sparsity pattern for the form ``a``.
46
47 Note:
48 The pattern is not finalised, i.e. the caller is responsible for
49 calling ``assemble`` on the sparsity pattern.
50 """
51 return _create_sparsity_pattern(a._cpp_object)
52
53
54def build_sparsity_pattern(pattern: SparsityPattern, a: dolfinx.fem.forms.Form):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected