def test_R3(): a, b, c = symbols('a b c', positive=True) m = Matrix([[a], [b], [c]]) assert m == R3_c.coord_tuple_transform_to(R3_r, R3_r.coord_tuple_transform_to(R3_c, m)).applyfunc(simplify) #TODO assert m == R3_r.coord_tuple_transform_to(R3_c, R3_c.coord_tuple_transform_to(R3_r, m)).applyfunc(simplify) assert m == R3_s.coord_tuple_transform_to(R3_r, R3_r.coord_tuple_transform_to(R3_s, m)).applyfunc(simplify) #TODO assert m == R3_r.coord_tuple_transform_to(R3_s, R3_s.coord_tuple_transform_to(R3_r, m)).applyfunc(simplify) assert m == R3_s.coord_tuple_transform_to(R3_c, R3_c.coord_tuple_transform_to(R3_s, m)).applyfunc(simplify)
def main(): a, b, c = symbols('a b c', real=True) x, y, z = R3_r.coord_functions() dx, dy, dz = R3_r.base_oneforms() ex, ey, ez = R3_r.base_vectors() fx = a* x * y * z fy = b * x ** 2 * z fz = -3 * x**2 * y omega = fx * dx + fy * dy + fz * dz print_latex(omega) domega = Differential(omega) print_latex(domega) print_latex(domega(ey, ez)) # for WedgeProduct(dy, dz) print_latex(domega(ez, ex)) # for WedgeProduct(dz, dx) print_latex(domega(ex, ey)) # for WedgeProduct(dx, dy)