Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/to_firedrake.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Nb: Some of the initial setup was adapted from meshmode/examplse/simple-dg.py
# written by Andreas Klockner:
# https://gitlab.tiker.net/inducer/meshmode/-/blob/7826fa5e13854bf1dae425b4226865acc10ee01f/examples/simple-dg.py # noqa : E501
# https://gitlab.tiker.net/inducer/meshmode/-/blob/7826fa5e13854bf1dae425b4226865acc10ee01f/examples/simple-dg.py
def main():
# If can't import firedrake, do nothing
#
Expand Down
2 changes: 1 addition & 1 deletion meshmode/discretization/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def show_scalar_in_mayavi(self, field, **kwargs):

args = (*nodes, field)

# https://docs.enthought.com/mayavi/mayavi/auto/example_plotting_many_lines.html # noqa: E501
# https://docs.enthought.com/mayavi/mayavi/auto/example_plotting_many_lines.html
src = mlab.pipeline.scalar_scatter(*args)

src.mlab_source.dataset.lines = vis_connectivity.reshape(-1, 2)
Expand Down
4 changes: 2 additions & 2 deletions meshmode/interop/firedrake/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _get_firedrake_facial_adjacency_groups(fdrake_mesh_topology,
# (ordered lexicographically by the vertex excluded from the face,
# search for "local facet number" in the following paper for
# a reference on this...
# https://spiral.imperial.ac.uk/bitstream/10044/1/28819/2/mlange-firedrake-dmplex-accepted.pdf # noqa : E501
# https://spiral.imperial.ac.uk/bitstream/10044/1/28819/2/mlange-firedrake-dmplex-accepted.pdf
# )
# and meshmode's facet ordering: obtained from a simplex element group
import modepy as mp
Expand Down Expand Up @@ -476,7 +476,7 @@ def _get_firedrake_orientations(fdrake_mesh, unflipped_group, vertices,
# In this case we have a 2-surface embedded in 3-space.
# In this case, we assume the user has called
# :func:`firedrake.mesh.MeshGeometry.init_cell_orientations`, see
# https://www.firedrakeproject.org/variational-problems.html#ensuring-consistent-cell-orientations # noqa : E501
# https://www.firedrakeproject.org/variational-problems.html#ensuring-consistent-cell-orientations
# for a tutorial on how these are usually initialized.
#
# Unfortunately, *init_cell_orientations* is currently only implemented
Expand Down
2 changes: 1 addition & 1 deletion meshmode/mesh/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ def idx(i: int, j: int) -> int:

# {{{ evaluate on torus

# https://web.archive.org/web/20160410151837/https://www.math.hmc.edu/~gu/curves_and_surfaces/surfaces/torus.html # noqa: E501
# https://web.archive.org/web/20160410151837/https://www.math.hmc.edu/~gu/curves_and_surfaces/surfaces/torus.html

# create new vertices without the endpoints
u = np.linspace(0.0, 2.0 * np.pi, n_major, endpoint=False)
Expand Down
4 changes: 2 additions & 2 deletions meshmode/mesh/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def rand_rotation_matrix(ambient_dim, deflection=1.0, randnums=None, rng=None):
:arg randnums: 3 random numbers in the range [0, 1]. If *None*, they will be
auto-generated.
"""
# from https://www.realtimerendering.com/resources/GraphicsGems/gemsiii/rand_rotation.c # noqa: E501
# from https://blog.lostinmyterminal.com/python/2015/05/12/random-rotation-matrix.html # noqa: E501
# from https://www.realtimerendering.com/resources/GraphicsGems/gemsiii/rand_rotation.c
# from https://blog.lostinmyterminal.com/python/2015/05/12/random-rotation-matrix.html

if ambient_dim != 3:
raise NotImplementedError(f"ambient_dim: {ambient_dim}")
Expand Down
4 changes: 2 additions & 2 deletions test/test_firedrake_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def check_consistency(fdrake_fspace, discr, group_nr=0):

# Ensure that the vertex sets are identical up to reordering
# Nb: I got help on this from stack overflow:
# https://stackoverflow.com/questions/38277143/sort-2d-numpy-array-lexicographically # noqa: E501
# https://stackoverflow.com/questions/38277143/sort-2d-numpy-array-lexicographically
lex_sorted_mm_verts = meshmode_verts[:, np.lexsort(meshmode_verts)]
lex_sorted_fdrake_verts = fdrake_verts[np.lexsort(fdrake_verts.T)]
np.testing.assert_allclose(lex_sorted_mm_verts, lex_sorted_fdrake_verts.T,
Expand Down Expand Up @@ -278,7 +278,7 @@ def test_from_boundary_consistency(actx_factory: ArrayContextFactory,
# the boundary are identical to the resultant meshes' vertices up to
# reordering
# Nb: I got help on this from stack overflow:
# https://stackoverflow.com/questions/38277143/sort-2d-numpy-array-lexicographically # noqa: E501
# https://stackoverflow.com/questions/38277143/sort-2d-numpy-array-lexicographically
lex_sorted_mm_verts = meshmode_verts[:, np.lexsort(meshmode_verts)]
lex_sorted_fdrake_verts = fdrake_verts[np.lexsort(fdrake_verts.T)]
np.testing.assert_allclose(lex_sorted_mm_verts, lex_sorted_fdrake_verts.T,
Expand Down
Loading