The example here https://sagemanifolds.obspm.fr/examples.html of 

> Electromagnetism in Minkowski spacetime 
> <https://nbviewer.jupyter.org/github/ernestyalumni/Gravite/blob/master/EMsage.ipynb>
>  [ipynb 
> <https://raw.githubusercontent.com/ernestyalumni/Gravite/master/EMsage.ipynb>]
>  (Electromagnetic field 2-form from E and B, Maxwell equations, conserved 
> current, Lorentz force, Poynting vector)

Fails with the error in the title and in more detail below. I created a MWE. I 
presume this worked at some point but how do I get the exterior derivative of a 
1-form in the latest release of sage manifolds?


> M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')
> BL.<t,x,y,z> = M.chart(r"t x y z") 
> var('E_x E_y E_z')
> dt, dx, dy, dz = BL.coframe()[:]
> E = E_x * dx + E_y * dy + E_z * dz
> E.set_name('E')
> (E.wedge(BL.coframe()[0])).exterior_der()

fails with

> ---------------------------------------------------------------------------
> AttributeError                            Traceback (most recent call last)
> Cell In [66], line 1
> ----> 1 (E.wedge(BL.coframe()[Integer(0)])).exterior_der()
> 
> File 
> /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/element.pyx:488,
>  in sage.structure.element.Element.__getattr__ 
> (build/cythonized/sage/structure/element.c:4846)()
>     486         AttributeError: 
> 'LeftZeroSemigroup_with_category.element_class' object has no attribute 
> 'blah_blah'
>     487     """
> --> 488     return self.getattr_from_category(name)
>     489 
>     490 cdef getattr_from_category(self, name):
> 
> File 
> /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/element.pyx:501,
>  in sage.structure.element.Element.getattr_from_category 
> (build/cythonized/sage/structure/element.c:4958)()
>     499     else:
>     500         cls = P._abstract_element_class
> --> 501     return getattr_from_other_class(self, cls, name)
>     502 
>     503 def __dir__(self):
> 
> File 
> /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/cpython/getattr.pyx:357,
>  in sage.cpython.getattr.getattr_from_other_class 
> (build/cythonized/sage/cpython/getattr.c:2706)()
>     355     dummy_error_message.cls = type(self)
>     356     dummy_error_message.name = name
> --> 357     raise AttributeError(dummy_error_message)
>     358 cdef PyObject* attr = instance_getattr(cls, name)
>     359 if attr is NULL:
> 
> AttributeError: 'DiffFormFreeModule_with_category.element_class' object has 
> no attribute 'exterior_der'


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4A450800-F1F1-444D-A289-3EB8C09018C1%40gmail.com.

Reply via email to