{{{id=107| # trac 22801 on top of ... version() /// }}} {{{id=45| Parallelism().set(nproc=1) /// }}} {{{id=1| var('rho12,rho13,rho23', domain='real') assume(rho12>0, rho13>0, rho23>0) var('r12,r13,r23', domain='real') var('m1 m2 m3', domain='real') var('mu12,mu13,mu23', domain='real') assume(m1>0, m2>0, m3>0) #m1=1; m2=1; m3=1 # m3 = m2 #Extra constraint for 2 electrons # N.B.: If all {m1,m2,m3} are in SR and no two are equal, G.simplify_full() will seg-fault. # mu12 = 1/m1+1/m2; mu13 = 1/m1+1/m3; mu23 = 1/m2+1/m3; rho12 = r12^2; rho13 = r13^2; rho23 = r23^2 /// }}} {{{id=2| Ginv = matrix([[1/mu12, 1/m1*(rho12+rho13-rho23)/(2*r12*r13), 1/m2*(rho12+rho23-rho13)/(2*r12*r23)],\ [1/m1*(rho12+rho13-rho23)/(2*r12*r13), 1/mu13, 1/m3*(rho13+rho23-rho12)/(2*r13*r23)],\ [1/m2*(rho12+rho23-rho13)/(2*r12*r23), 1/m3*(rho13+rho23-rho12)/(2*r13*r23), 1/mu23]]) Ginv /// }}}

Feed the following into the metric tensor: M.metric().set() seems to require the covariant form.

{{{id=3| G = Ginv.inverse(); #G.simplify_full() /// }}} {{{id=7| (G*Ginv).simplify_full(); (Ginv*G).simplify_full() # Check 2 /// }}}

Begin manifold creation

{{{id=38| M = Manifold(3,'R^3',field='real',start_index=1) # The following choice seems not to matter. The code always goes through manifolds/utilities.py where it calls simplify_trig(), which dives down the rat-hole. ### M.set_calculus_method('SR') # N.B. 'sympy' fails w/ nproc>1 (above) ### U = M.open_subset('U') /// }}} {{{id=39| Rho. = U.chart("r12:(0,+oo) r13:(0,+oo) r23:(0,+oo)") Rho.add_restrictions([r23 }}} {{{id=108| # Check rij's r12.is_real(); r12.is_positive(); bool(rho12==r12^2) /// }}} {{{id=109| # Pekeris coordinates Tau. = U.chart("u1:(0,+oo) u2:(0,+oo) u3:(0,+oo)") Rho_Tau = Rho.transition_map(Tau, ((r12+r13-r23)/2, (r12-r13+r23)/2, (-r12+r13+r23)/2)) Tau_Rho = Rho_Tau.inverse() U.set_default_chart(Tau) U.set_default_frame(Tau.frame()) Rho_Tau.display(); Tau_Rho.display(); /// }}} {{{id=113| U.atlas(); Rho.frame(); Tau.frame() /// }}} {{{id=46| ginv = g.inverse(); ginv.display() /// Traceback (most recent call last): File "", line 1, in File "_sage_input_15.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Z2ludiA9IGcuaW52ZXJzZSgpOyBnaW52LmRpc3BsYXkoKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmpciHctE/___code___.py", line 2, in exec compile(u'ginv = g.inverse(); ginv.display()' + '\n', '', 'single') File "", line 1, in File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/manifolds/differentiable/metric.py", line 692, in inverse self._inverse._restrictions[dom] = rst.inverse() # forces the File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/manifolds/differentiable/metric.py", line 2281, in inverse val = chart.simplify(gmat_inv[i-si,j-si], method='SR') File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/manifolds/calculus_method.py", line 236, in simplify return self._simplify_dict[method](expression) File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/manifolds/utilities.py", line 597, in simplify_chain_real expr = expr.simplify_trig() File "sage/symbolic/expression.pyx", line 10015, in sage.symbolic.expression.Expression.simplify_trig (build/cythonized/sage/symbolic/expression.cpp:56590) File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 657, in __call__ return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds) File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 578, in function_call return self.new(s) File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 347, in new return self(code) File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 282, in __call__ return cls(self, x, name=name) File "/home/rllozes/Development/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 697, in __init__ raise TypeError(x) TypeError: ECL says: THROW: The catch RAT-ERR is undefined. }}}