[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-12 Thread Travis Scrimshaw
Hey,
   I disagree; both go against OOP concepts and the Lie function too 
ambiguous to me (for instance, I would probably try Lie(ZZ['x']) and expect 
to get the Lie algebra of ZZ['x']).

Best,
Travis


On Friday, July 12, 2013 4:04:53 AM UTC+5:30, Eric Gourgoulhon wrote:
>
>
>
> Le jeudi 11 juillet 2013 21:26:43 UTC+2, mmarco a écrit :
>>
>>
>> It looks very good. Just one remark: i think that the different functions 
>> you define (Lie, xdef...) should be methods better than external functions. 
>> In general, the use seems a bit confuding to me... i would say that it 
>> looks much more mathematica-like than pythonic.
>
>
> Actually the functions Lie and xder are shortcuts to class methods: here 
> are their definitions:
>
>  
> def xder(form):
> r"""
> Exterior derivative of a differential form
> """
> return form.exterior_der()
>
>
>
> def Lie(vector, tensor):
> r"""
> Lie derivative of a tensor field with respect to a vector field
> """
> return tensor.lie_der(vector)
>
> We thought these shortcuts are more user friendly, being closer to the 
> standard mathematical notation.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-11 Thread Eric Gourgoulhon


Le jeudi 11 juillet 2013 21:26:43 UTC+2, mmarco a écrit :
>
>
> It looks very good. Just one remark: i think that the different functions 
> you define (Lie, xdef...) should be methods better than external functions. 
> In general, the use seems a bit confuding to me... i would say that it 
> looks much more mathematica-like than pythonic.


Actually the functions Lie and xder are shortcuts to class methods: here 
are their definitions:

 
def xder(form):
r"""
Exterior derivative of a differential form
"""
return form.exterior_der()



def Lie(vector, tensor):
r"""
Lie derivative of a tensor field with respect to a vector field
"""
return tensor.lie_der(vector)

We thought these shortcuts are more user friendly, being closer to the 
standard mathematical notation.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-11 Thread mmarco

It looks very good. Just one remark: i think that the different functions 
you define (Lie, xdef...) should be methods better than external functions. 
In general, the use seems a bit confuding to me... i would say that it 
looks much more mathematica-like than pythonic.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-11 Thread Eric Gourgoulhon
We have just added a tutorial introducing the package at the page:
http://sagemanifolds.obspm.fr/documentation.html

A mailing list has also been opened:
http://sagemanifolds.obspm.fr/contact.html

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-08 Thread Dox
Thx Michael, I didn't know that feature of sage notebook!

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-08 Thread Michal Bejger


On Monday, July 8, 2013 4:31:43 PM UTC+2, Dox wrote:
>
> I'm trying to reproduce the examples in the page, starting with 
> "Schwarzschild spacetime"
>
> So far I'm getting the following:
>
> * When defining a `Chart`, say `X`, t
> from manifolds.all import *
> M = Manifold(4, 'M', r'M'); M
> X = Chart(M, r't, r:positive, th:positive:\theta, ph:\phi', 'BL')
> X
> does not return the latex output, but this
>
> chart 'BL' (t, r, th, ph)
>
> this is not a problem because after trying 
> X.show()
> the expected output pops up!
>

It may be that the option typeset is not set in your notebook. 

 Cheers,  

 Michał

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-08 Thread Dox
I'm trying to reproduce the examples in the page, starting with 
"Schwarzschild spacetime"

So far I'm getting the following:

* When defining a `Chart`, say `X`, t
from manifolds.all import *
M = Manifold(4, 'M', r'M'); M
X = Chart(M, r't, r:positive, th:positive:\theta, ph:\phi', 'BL')
X
does not return the latex output, but this

chart 'BL' (t, r, th, ph)

this is not a problem because after trying 
X.show()
the expected output pops up!

When using the `show()`method on the metric the output is not shown in the 
way I expected (with the tensor product of the basis,
g[0,0], g[1,1], g[2,2], g[3,3] = -(1 - 2*m/r), 1/(1 - 2*m/r), r^2, (r*sin(th
))^2; show(g)

g = (2*m/r - 1) dt*dt - 1/(2*m/r - 1) dr*dr + r^2 dth*dth +
r^2*sin(th)^2 dph*dph

I try a couple of things and non of them yields the result shown in the 
documentation. Similar behaviour goes on and on through the WS.

* I'd add the following line to the WS
nab[:]
because people can see the components of the connection.

* Additionally, I shall propose to define a method to show only the 
non-trivial components of the tensors... including the `name` of the 
component (in indices). The code below will do the work, but of course it 
can be improved.
for i in M.irange():
for j in M.irange():
for k in xrange(j,M.dimension()):
if (nab[:][i][j][k] != 0):
print "Gam_{%d %d %d}: "  %(i, j, k)
print "\t", nab[:][i][j][k], "\n\n"
This method should be implemented for tensors.

I'm still learning the stuff, and should be posting more suggestions later! 
Thank you for the wonderful work done with this package!!! Cheers



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-08 Thread Dox



I just installed SageManifolds package, and tried 

> sage: Chart?

to review the documentation, and the format is not OK, Is it just me or a 
documentation `bug`?


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-08 Thread Dox
Impressive work! I started improving my programming skills to try 
implementing the Hodge star on DifferentialForms, I see you went much 
further!

I'll immediately install the package, working on several examples, and asap 
start contributing with it!

Congratulations! 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-08 Thread Eric Gourgoulhon


Le dimanche 7 juillet 2013 10:39:30 UTC+2, vdelecroix a écrit :

>
> Cool! It looks nice. How do you intend to define a manifold: numerically 
> (via fine triangulations) or via symbolic expressions? Both?
>
>
At the moment, a manifold is mostly defined as a set of charts with the 
associated transition maps, the latter being given by symbolic expressions. 
But why not adding the possibility to define a manifold numerically as you 
mention ? 
 

> Are you aware of #9439 (hyperbolic geometry) and #10132 (surfaces embedded 
> in R^3) which are somewhat related?
>
>
Thanks for pointing these two packages; they are definitevely relevant to 
our project. I did not know #9439 and will give a look. Regarding #10132, 
it differs from SageManifolds in various points:
- the chart on the surface is fixed, as well as the chart in the embedding 
space (R^3), while in SageManifolds various charts can be used on the same 
manifold; also various vector frames can be used to expand tensors, not 
only coordinate bases. 
- it implements extrinsic geometry, which SageManifolds does not do yet 
(but should do soon) (cf. Joris Vankerschaver's message). 

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-07 Thread Joris Vankerschaver
This is a very nice package! 

Are you aware of #9439 (hyperbolic geometry) and #10132 (surfaces embedded 
> in R^3) which are somewhat related?
>
>
As for #10132, I can see the functionality of that patch being subsumed 
into this package, once the extrinsic manifold geometry has been 
implemented.

J.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: SageManifolds: differential geometry and tensor calculus in Sage

2013-07-07 Thread vdelecroix
Hi,

Cool! It looks nice. How do you intend to define a manifold: numerically 
(via fine triangulations) or via symbolic expressions? Both?

Are you aware of #9439 (hyperbolic geometry) and #10132 (surfaces embedded 
in R^3) which are somewhat related?

Best,
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.