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

Method J

python/dolfinx/fem/petsc.py:1530–1539  ·  view source on GitHub ↗

Assemble the Jacobian matrix. Args: x: Vector containing the latest solution A: Matrix to assembler into.

(self, x: PETSc.Vec, A: PETSc.Mat)

Source from the content-addressed store, hash-verified

1528 b.ghostUpdate(addv=PETSc.InsertMode.ADD, mode=PETSc.ScatterMode.REVERSE) # type: ignore[attr-defined]
1529
1530 def J(self, x: PETSc.Vec, A: PETSc.Mat) -> None: # type: ignore[name-defined]
1531 """Assemble the Jacobian matrix.
1532
1533 Args:
1534 x: Vector containing the latest solution
1535 A: Matrix to assembler into.
1536 """
1537 A.zeroEntries()
1538 assemble_matrix(A, self._a, self.bcs) # type: ignore[arg-type]
1539 A.assemble()
1540
1541
1542# -- Additional free helper functions (interpolations, assignments etc.) --

Callers

nothing calls this directly

Calls 1

assemble_matrixFunction · 0.70

Tested by

no test coverage detected