Skip to content

Commit 546f11a

Browse files
committed
fix
1 parent e58dd9c commit 546f11a

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

demos/netgen/netgen_mesh.py.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ We can set the degree of the geometry via ``netgen_flags`` keyword argument of t
346346
ngmesh = OCCGeometry(shape, dim=2).GenerateMesh(maxh=1.)
347347
else:
348348
ngmesh = netgen.libngpy._meshing.Mesh(2)
349-
mesh = Mesh(ngmesh, comm=COMM_WORLD, netgen_flags={"degree": 3})
349+
mesh = Mesh(ngmesh, comm=COMM_WORLD, netgen_flags={"degree": 4})
350350
VTKFile("output/MeshExample5.pvd").write(mesh)
351351

352352
.. figure:: Example5.png
@@ -365,7 +365,7 @@ We will now show how to solve the Poisson problem on a high-order mesh, of order
365365
ngmesh = OCCGeometry(shape, dim=3).GenerateMesh(maxh=1.)
366366
else:
367367
ngmesh = netgen.libngpy._meshing.Mesh(3)
368-
mesh = Mesh(ngmesh, netgen_flags={"degree": 4})
368+
mesh = Mesh(ngmesh, netgen_flags={"degree": 3})
369369

370370
# Solving the Poisson problem
371371
VTKFile("output/MeshExample6.pvd").write(mesh)

firedrake/netgen.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def netgen_distribute(V: firedrake.functionspaceimpl.WithGeometryBase,
3838
Parameters
3939
----------
4040
V
41-
The target function space defining the data DMPlex layout.
41+
The target function space defining the DMPlex layout.
4242
netgen_data
4343
The data in the layout of the underlying netgen mesh.
4444
@@ -97,6 +97,7 @@ def find_permutation(points_a: npt.NDArray[np.inexact], points_b: npt.NDArray[np
9797
raise ValueError("`points_a` and `points_b` must have the same shape.")
9898

9999
p = [np.where(cdist(a, b).T < tol)[1] for a, b in zip(points_a, points_b)]
100+
100101
if len(p) == 0:
101102
return p
102103

@@ -145,7 +146,7 @@ class FiredrakeMesh:
145146
:param netgen_flags: The dictionary of flags to be passed to ngsPETSc.
146147
:arg comm: the MPI communicator.
147148
'''
148-
def __init__(self, mesh, netgen_flags=None, user_comm=COMM_WORLD):
149+
def __init__(self, mesh, netgen_flags, user_comm=COMM_WORLD):
149150
self.comm = user_comm
150151
# Parsing netgen flags
151152
if not isinstance(netgen_flags, dict):

0 commit comments

Comments
 (0)