PyDEC: Adaptando para SageMath
Error in lines 3-3
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_jupyter.py", line 32, in __call__
raise ValueError("You may not run Sage kernels from a Sage worksheet.\nInstead use the sage_select command in a Terminal to\nswitch to a different version of Sage, then restart your project.")
ValueError: You may not run Sage kernels from a Sage worksheet.
Instead use the sage_select command in a Terminal to
switch to a different version of Sage, then restart your project.
Simples Triângulo
[[-1 1 0]
[-1 0 1]
[ 0 -1 1]]
[[ 1 -1 1]]
[[ 0.171875 0. 0. ]
[ 0. 0.171875 0. ]
[ 0. 0. 0.15625 ]]
[[ 0.375 0. 0. ]
[ 0. 0.25 0. ]
[ 0. 0. 0.25 ]]
ht0 = [[ 0.194125 0. 0. ]
[ 0. 0.154625 0. ]
[ 0. 0. 0.15125 ]]
ht1 = [[ 0.395 0. 0. ]
[ 0. 0.35 0. ]
[ 0. 0. 0.15 ]]
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-25-588a565cbb99> in <module>() ----> 1 sct=compute_circumcenters
NameError: name 'compute_circumcenters' is not defined
[[ 2.03477141 1.80296201 0. ]
[-2.5545675 0. 0.97008892]
[ 0. -2.31404959 -0.99173554]]
Malha Triângular
[simplex((0, 1),parity=0), simplex((1, 2),parity=0), simplex((0, 3),parity=0), simplex((3, 4),parity=0), simplex((2, 4),parity=0)]
b0 = [[-1 1 0 0 0]
[-1 0 0 1 0]
[ 0 -1 1 0 0]
[ 0 -1 0 1 0]
[ 0 0 -1 1 0]
[ 0 0 -1 0 1]
[ 0 0 0 -1 1]]
b1 = [[ 1 -1 0 1 0 0 0]
[ 0 0 1 -1 1 0 0]
[ 0 0 0 0 -1 1 -1]]
h0 = [[ 0.125 0. 0. 0. 0. ]
[ 0. 0.5 0. 0. 0. ]
[ 0. 0. 0.25 0. 0. ]
[ 0. 0. 0. 0.375 0. ]
[ 0. 0. 0. 0. 0.25 ]]
h1 = [[ 0.5 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0.5 0. 0. 0. 0. ]
[ 0. 0. 0. 1. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0.5 0. ]
[ 0. 0. 0. 0. 0. 0. 0.5]]
pydec/dec/simplicial_complex.py:175: RuntimeWarning: divide by zero encountered in divide
data.star_inv = sparse.spdiags([1.0/stardiag],[0], N, N, format='csr')
[[ 4. 0. 0. 0. 0. 0. 0. ]
[-1. 0. 1. 2. 0. 0. 0. ]
[ 0. 0. -2. 0. 0. 2. 0. ]
[ 0. 0. 0. -2.66666667 0. 0.
1.33333333]
[ 0. 0. 0. 0. 0. -2. -2. ]]
Complex abstrato: Faixa de Mobius Discreta
simplicial_complex:
complex:
1: 3-simplices
4: 2-simplices
6: 1-simplices
4: 0-simplices
[[-1 1 0 0]
[-1 0 1 0]
[-1 0 0 1]
[ 0 -1 1 0]
[ 0 -1 0 1]
[ 0 0 -1 1]]
[[ 6.40722222 0. 0. 0. ]
[ 0. 7.08793924 0. 0. ]
[ 0. 0. 9.8506705 0. ]
[ 0. 0. 0. 4.94002463]]
Error in lines 3-3
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'simplicial_complex' is not defined
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'sct2' is not defined
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'sct2' is not defined
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'sct2' is not defined
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'sct' is not defined
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "<string>", line 1
+print L
^
SyntaxError: invalid syntax
Error in lines 2-2
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1009, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'L' is not defined