diff --git a/grudge/geometry/__init__.py b/grudge/geometry/__init__.py index 4106888f42bf4e2dd5bb94ad90622b3cc4a8955f..8613f99cabccf6839bf15c2553c77fc9fd687b23 100644 --- a/grudge/geometry/__init__.py +++ b/grudge/geometry/__init__.py @@ -27,7 +27,9 @@ from grudge.geometry.metrics import ( forward_metric_derivative_mat, inverse_metric_derivative_mat, inverse_surface_metric_derivative, + pseudoscalar, area_element, + surface_normal, normal ) @@ -35,6 +37,8 @@ __all__ = ( "forward_metric_derivative_mat", "inverse_metric_derivative_mat", "inverse_surface_metric_derivative", + "pseudoscalar", "area_element", + "surface_normal", "normal" ) diff --git a/grudge/geometry/metrics.py b/grudge/geometry/metrics.py index 90a17eecd950923abbb3465d7c7d9274b436fb5b..188c889526ff0ed959c5b29b2695908d85e6aab9 100644 --- a/grudge/geometry/metrics.py +++ b/grudge/geometry/metrics.py @@ -322,10 +322,14 @@ def mv_normal(actx, dcoll, dd): from grudge.op import project import grudge.dof_desc as dof_desc - volm_normal = project(dcoll, dof_desc.DD_VOLUME, dd, - surface_normal(actx, dcoll, - dim=dim + 1, - dd=dof_desc.DD_VOLUME)) + volm_normal = MultiVector( + project(dcoll, dof_desc.DD_VOLUME, dd, + surface_normal( + actx, dcoll, + dim=dim + 1, + dd=dof_desc.DD_VOLUME + ).as_vector(dtype=object)) + ) pder = pseudoscalar(actx, dcoll, dd=dd) mv = -(volm_normal ^ pder) << volm_normal.I.inv()