Hello everyone,
I am getting started with SageMath and try to define a metric on a differential manifold. Despite tutorials, search online and asking questions to colleagues, I cannot understand the following error.
Here is the code, with Kernel SageMath 9.0
FM = Manifold(2,'FM', structure='Riemannian', start_index=1)
K = FM.metric('K')
K[1,1]=1
which generates the following error AttributeError Traceback (most recent call last) <ipython-input-17-f83570b8b1cf> in <module>() 1 K = FM.metric('K') ----> 2 K[Integer(1),Integer(1)]=Integer(1)
/ext/sage/sage-9.0/local/lib/python3.7/site-packages/sage/tensor/modules/freemoduletensor.py in setitem(self, args, value) 1629 else: 1630 basis = self.fmodule.defbasis -> 1631 self.setcomp(basis)[args] = value 1632 1633 def copyfrom(self, other): /ext/sage/sage-9.0/local/lib/python3.7/site-packages/sage/manifolds/differentiable/tensorfieldparal.py in setcomp(self, basis) 883 self.iszero = False # a priori 884 --> 885 if basis.domain == self.domain: 886 # Setting components on the tensor field domain: 887 return FreeModuleTensor.setcomp(self, basis=basis) AttributeError: 'One' object has no attribute '_domain'
It seems that the index type in the metric is wrong. Is that the problem? Have you some ideas to solve the problem?
Thanks