Skip to content

Commit

Permalink
Periodic boundaries aren't tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 committed Sep 3, 2024
1 parent 9feeef7 commit 3dc6142
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions movement/monge_ampere.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,6 @@ def l2_projector(self):
for dirichlet_bc in self._l2_projector_bcs(boundary_tag)
]

# Check for an attempt to fix periodic boundary segments
subdomains = set()
for bc in bcs:
if not hasattr(bc, "sub_domain"):
subdomain = bc._F.sub_domain # EquationBC doesn't have sub_domain attr
else:
subdomain = bc.sub_domain
if not isinstance(subdomain, Iterable):
subdomain = [subdomain]
subdomains = subdomains.union(subdomain)
if set(self.fixed_boundary_segments).difference(subdomains):
raise ValueError("Cannot fix boundary nodes for periodic segments.")

# Create solver
problem = firedrake.LinearVariationalProblem(a, L, self._grad_phi, bcs=bcs)
self._l2_projector = firedrake.LinearVariationalSolver(
Expand Down
10 changes: 0 additions & 10 deletions test/test_monge_ampere.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ def test_invalid_plane_valuerror(self):
msg = "Could not determine a plane for the provided points."
self.assertEqual(str(cm.exception), msg)

def test_periodic_fixed_boundaries_valueerror(self):
mesh = self.mesh(n=3, periodic=True)
mover = MongeAmpereMover_Relaxation(
mesh, ring_monitor, fixed_boundary_segments=["on_boundary"]
)
with self.assertRaises(ValueError) as cm:
mover.move()
msg = "Cannot fix boundary nodes for periodic segments."
self.assertEqual(str(cm.exception), msg)

def test_curved_notimplementederror(self):
coords = Function(VectorFunctionSpace(UnitTriangleMesh(), "CG", 2))
coords.interpolate(coords.function_space().mesh().coordinates)
Expand Down

0 comments on commit 3dc6142

Please sign in to comment.