inducer / meshmode

High-order unstructured mesh representation and discrete function spaces
https://documen.tician.de/meshmode/
26 stars 23 forks source link

Allow passing scalars (and containers of scalars) to `DirectDiscretizationConnection` #398

Closed majosm closed 7 months ago

majosm commented 7 months ago

project(...) in grudge currently fails when passed an object array of numbers, because it only checks whether the entire input is a number (code), not whether it's an array container of them. Checking down inside DirectDiscretizationConnection instead fixes that.

inducer commented 7 months ago

LGTM.

When this is done, could you remove the old (and then-redundant) number handling from project?

https://github.com/inducer/grudge/blob/df1c6f28fb8283a6af52edc5df4d7c1aa5f9d85d/grudge/projection.py#L81-L82