|
45 | 45 | from dolfinx.fem import Expression, Function, dirichletbc, functionspace, locate_dofs_topological |
46 | 46 | from dolfinx.fem.bcs import DirichletBC |
47 | 47 | from dolfinx.fem.function import Function as _Function |
48 | | -from dolfinx.fem.petsc import NonlinearProblem, apply_lifting, assemble_vector, set_bc |
| 48 | +from dolfinx.fem.petsc import NewtonSolverNonlinearProblem, apply_lifting, assemble_vector, set_bc |
49 | 49 | from dolfinx.mesh import CellType, create_rectangle, locate_entities_boundary |
50 | 50 | from dolfinx.nls.petsc import NewtonSolver |
51 | 51 | from ufl import grad, inner, split |
@@ -545,8 +545,8 @@ def compute_cell_contributions(V, points): |
545 | 545 | at that point""" |
546 | 546 | # Determine what process owns a point and what cells it lies within |
547 | 547 | mesh = V.mesh |
548 | | - point_ownership_data = dolfinx.cpp.geometry.determine_point_ownership( |
549 | | - mesh._cpp_object, points, 1e-6 |
| 548 | + point_ownership_data = dolfinx.geometry.determine_point_ownership( |
| 549 | + mesh, points, 1e-6 |
550 | 550 | ) |
551 | 551 |
|
552 | 552 | owning_points = np.asarray(point_ownership_data.dest_points).reshape(-1, 3) |
@@ -589,7 +589,7 @@ def compute_cell_contributions(V, points): |
589 | 589 | # We define a custom `NonlinearProblem` which is able to include the point |
590 | 590 | # force. |
591 | 591 | # %% |
592 | | -class NonlinearProblemPointSource(NonlinearProblem): |
| 592 | +class NonlinearProblemPointSource(NewtonSolverNonlinearProblem): |
593 | 593 | def __init__( |
594 | 594 | self, |
595 | 595 | F: ufl.form.Form, |
|
0 commit comments