Skip to content
Snippets Groups Projects
Commit 73d30afe authored by Matt Wala's avatar Matt Wala
Browse files

mean_curvature(): Return an array.

parent 9b29076b
No related branches found
No related tags found
1 merge request!36Symbolic: Implement mean_curvature() for curves in 2D.
......@@ -372,8 +372,7 @@ def mean_curvature(ambient_dim, dim=None, where=None):
reference_jacobian([xp[0], yp[0]], ambient_dim, dim, where),
"p2d_matrix", cse_scope.DISCRETIZATION)
return MultiVector(make_obj_array(
[(xp[0]*ypp[0] - yp[0]*xpp[0]) / (xp[0]**2 + yp[0]**2)**(3/2)]))
return (xp[0]*ypp[0] - yp[0]*xpp[0]) / (xp[0]**2 + yp[0]**2)**(3/2)
# FIXME: make sense of this in the context of GA
# def xyz_to_local_matrix(dim, where=None):
......
......@@ -118,9 +118,9 @@ def test_mean_curvature(ctx_getter, discr_name, discr_and_ref_mean_curvature_get
from pytential import bind
mean_curvature = bind(
discr,
prim.mean_curvature(discr.ambient_dim))(queue).as_vector(np.object)
prim.mean_curvature(discr.ambient_dim))(queue)
assert np.allclose(mean_curvature[0].get(), ref_mean_curvature)
assert np.allclose(mean_curvature.get(), ref_mean_curvature)
# You can test individual routines by typing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment