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

Method J

python/test/unit/nls/test_newton.py:51–57  ·  view source on GitHub ↗

Assemble Jacobian matrix.

(self, x, A)

Source from the content-addressed store, hash-verified

49 set_bc(b, [self.bc], x, -1.0)
50
51 def J(self, x, A):
52 """Assemble Jacobian matrix."""
53 from dolfinx.fem.petsc import assemble_matrix
54
55 A.zeroEntries()
56 assemble_matrix(A, self.a, bcs=[self.bc])
57 A.assemble()
58
59 def matrix(self):
60 """Create a PETSc matrix for the problem."""

Callers

nothing calls this directly

Calls 1

assemble_matrixFunction · 0.90

Tested by

no test coverage detected