Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Jan 26, 2024
1 parent fa233d1 commit 424f836
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion firedrake/solving_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy

from pyop2 import op2
from firedrake_configuration import get_config
from firedrake import function, cofunction, dmhooks
from firedrake.exceptions import ConvergenceError
from firedrake.petsc import PETSc, DEFAULT_KSP_PARAMETERS
Expand Down
15 changes: 2 additions & 13 deletions tests/extrusion/test_variable_layers_numbering.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ def test_bcs_nodes(domain, expected):

@pytest.mark.parallel(nprocs=4)
def test_layer_extents_parallel():
from petsc4py import PETSc
# +-----+-----+
# |\ 1 |\ 3 | cell_layers = [[0, 1],
# | \ | \ | [0, 1],
Expand All @@ -463,27 +462,20 @@ def test_layer_extents_parallel():
else:
sizes = None
points = None

print("BEFORE MESH")

mesh = UnitSquareMesh(2, 1, reorder=False, distribution_parameters={"partition":
(sizes, points)})
print("AFTER MESH")
V = FunctionSpace(mesh, "DG", 0)
print("2")
x, _ = SpatialCoordinate(mesh)
selector = assemble(interpolate(x - 0.5, V))
print("3")
layers = numpy.empty((mesh.num_cells(), 2), dtype=IntType)
print("4")
data = selector.dat.data_ro_with_halos.real
for cell in V.cell_node_map().values_with_halo:
if data[cell] < 0.25:
layers[cell, :] = [0, 1]
else:
layers[cell, :] = [0, 2]
print("5")
extmesh = ExtrudedMesh(mesh, layers=layers, layer_height=1)
print("6")
if mesh.comm.rank == 0:
# Top view, plex points
# 4--8--6
Expand Down Expand Up @@ -588,14 +580,11 @@ def test_layer_extents_parallel():
[0, 2, 0, 2],
[0, 3, 0, 3],
[0, 3, 0, 3]], dtype=IntType)
print("7")
assert numpy.equal(extmesh.layer_extents, expected).all()

V = FunctionSpace(extmesh, "CG", 1)

assert V.dof_dset.layout_vec.getSize() == 15

print("END")


@pytest.mark.parallel(nprocs=3)
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/test_eigensolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


try:
from slepc4py import SLEPc
from slepc4py import SLEPc # noqa: F401
except ImportError:
# SLEPc is not installed
pytest.skip("SLEPc not installed", allow_module_level=True)
Expand Down
1 change: 0 additions & 1 deletion tests/slate/test_variational_prb.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def test_lvp_equiv_hdg(degree, nested, elimination):
}
}


if nested:
params['condensed_field']['localsolve'] = {'ksp_type': 'preonly',
'pc_type': 'fieldsplit',
Expand Down

0 comments on commit 424f836

Please sign in to comment.