Skip to content

Commit

Permalink
remove redundant constant handling in project() after adding similar …
Browse files Browse the repository at this point in the history
…handling to meshmode DirectDiscretizationConnection
  • Loading branch information
majosm authored and inducer committed Mar 6, 2024
1 parent df1c6f2 commit 211b63e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions grudge/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
BoundaryDomainTag,
ConvertibleToDOFDesc)

from numbers import Number


def project(
dcoll: DiscretizationCollection,
Expand Down Expand Up @@ -78,7 +76,7 @@ def project(

# }}}

if isinstance(vec, Number) or src_dofdesc == tgt_dofdesc:
if src_dofdesc == tgt_dofdesc:
return vec

return dcoll.connection_from_dds(src_dofdesc, tgt_dofdesc)(vec)

0 comments on commit 211b63e

Please sign in to comment.