def test_spherical_grad(): sheet = generation.ellipsoid_sheet(1, 1, 1, 10) sheet.settings["geometry"] = "spherical" EllipsoidGeometry.update_all(sheet) np.testing.assert_approx_equal( np.linalg.norm(height_grad(sheet), axis=1).mean(), 1, 2 )
def gradient(eptm): grad = height_grad(eptm) * to_nd(eptm.vert_df.eval('radial_tension'), 3) grad.columns = ['g' + c for c in eptm.coords] return grad, None
def gradient(eptm): grad = height_grad(eptm) * _to_3d( eptm.vert_df.eval('vitelline_K * delta_rho')) grad.columns = ['g' + c for c in eptm.coords] return grad, None