ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 04 Dec 2018 06:32:22 -0600Sagemanifold - Connection components from a tensor (not a metric)http://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/ Dear community.
This might sound *dump*, but I'm trying to determine whether a tensor satisfy the properties of a metric (under certain conditions). Of course it is a (0,2)-symmetric tensor, call it $S$, but I cannot (to my understanding) calculate the (Levi-Civita-like) connection components that would be associated to $S$... unless I declare it as a metric.
The way it is implemented makes sense... and it's solid!
## What I did...?
I defined like a metric and calculate the associated connection (and curvatures)
## Why should I do something else?
In the file `src/sage/manifolds/differentiable/metric.py` the metric is defined (as it should) to be symmetric, but it does not allow to consider extensions of General Relativity like say Einstein--Strauss model. Thus, I need an instance to calculate the *derived quantities* of a tensor that is a generalization of a metric.
### Question:
**Is this possible?**Tue, 04 Dec 2018 02:18:37 -0600http://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/Comment by rburing for <p>Dear community.</p>
<p>This might sound <em>dump</em>, but I'm trying to determine whether a tensor satisfy the properties of a metric (under certain conditions). Of course it is a (0,2)-symmetric tensor, call it $S$, but I cannot (to my understanding) calculate the (Levi-Civita-like) connection components that would be associated to $S$... unless I declare it as a metric.</p>
<p>The way it is implemented makes sense... and it's solid! </p>
<h2>What I did...?</h2>
<p>I defined like a metric and calculate the associated connection (and curvatures)</p>
<h2>Why should I do something else?</h2>
<p>In the file <code>src/sage/manifolds/differentiable/metric.py</code> the metric is defined (as it should) to be symmetric, but it does not allow to consider extensions of General Relativity like say Einstein--Strauss model. Thus, I need an instance to calculate the <em>derived quantities</em> of a tensor that is a generalization of a metric.</p>
<h3>Question:</h3>
<p><strong>Is this possible?</strong></p>
http://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/?comment=44577#post-id-44577This is not my field so I'm not sure: what generalization do you need exactly? What do you want to do (in code) that you can't? A code sample (e.g. of how you wish it would work) would help.Tue, 04 Dec 2018 03:58:55 -0600http://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/?comment=44577#post-id-44577Answer by eric_g for <p>Dear community.</p>
<p>This might sound <em>dump</em>, but I'm trying to determine whether a tensor satisfy the properties of a metric (under certain conditions). Of course it is a (0,2)-symmetric tensor, call it $S$, but I cannot (to my understanding) calculate the (Levi-Civita-like) connection components that would be associated to $S$... unless I declare it as a metric.</p>
<p>The way it is implemented makes sense... and it's solid! </p>
<h2>What I did...?</h2>
<p>I defined like a metric and calculate the associated connection (and curvatures)</p>
<h2>Why should I do something else?</h2>
<p>In the file <code>src/sage/manifolds/differentiable/metric.py</code> the metric is defined (as it should) to be symmetric, but it does not allow to consider extensions of General Relativity like say Einstein--Strauss model. Thus, I need an instance to calculate the <em>derived quantities</em> of a tensor that is a generalization of a metric.</p>
<h3>Question:</h3>
<p><strong>Is this possible?</strong></p>
http://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/?answer=44580#post-id-44580If you consider a non-symmetric "metric", you should probably define a function with a code similar to that of the method [LeviCivitaConnection.coef()](http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/levi_civita_connection.html#sage.manifolds.differentiable.levi_civita_connection.LeviCivitaConnection.coef) (starting at line 388 of `src/sage/manifolds/differentiable/levi_civita_connection.py` in SageMath 8.4), by replacing each instance of `self._metric` by your object.Tue, 04 Dec 2018 06:32:22 -0600http://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/?answer=44580#post-id-44580