[Maxima] errors in ctensor and csetup
Viktor T. Toth
vttoth at vttoth.com
Sun Apr 12 08:03:21 CDT 2009
First of all, you don't need csetup() to use ctensor. On the contrary,
csetup() is just a simple interactive helper function that supposedly helps
novice users of ctensor set up a simple metric. It doesn't do anything that
you cannot do with more direct commands.
The failure occurs because csetup() is interactive, so it really only works
reliably in command-line Maxima and it is known to fail in some front-ends.
What happens is that csetup() sends a prompt, but this prompt is buffered by
the front end and not displayed. Thinking that nothing happened, you are
entering csetup(); again when in fact csetup() is already running and it
expects a number. First, this results in a recursive call to csetup() (so
you get the error message telling you to use kill(all) and tensorkill:true);
second, as this call to csetup() fails to return an integer, the original
call to csetup() complains and gives up. But the real problem has nothing to
do with kill or tensorkill or indeed, with csetup(); it is the front-end's
failure to show the prompt that csetup() sends when it requests input.
You can actually work around this if you know what prompt is about to be
displayed. For instance, after entering csetup();, you can blindly enter the
and set up the Schwarzschild metric. But you could just as easily not use
csetup() at all, and instead enter the metric directly:
(NB: The dim:4 command is unnecessary, as 4 is the default.)
In other words, you don't have to use csetup(). Indeed, it adds very little
value to the ctensor package, and because of the issues of compatibility
with front-ends, I more than once felt tempted to remove it from ctensor
If you wish to use csetup() anyway, please try using it from command-line
One thing I do recommend is demo(tensor), by the way. It contains a large
number of examples that exercise almost all the functionality present in the
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Soichi Ishida
Sent: Sunday, April 12, 2009 6:54 AM
To: maxima at math.utexas.edu
Subject: [Maxima] errors in ctensor and csetup
environment: latest ubuntu, latest emacs, latest maxima
I have a problem settin up "ctensor".
generally, we first load...
the output is "done". this is fine.
but next is...
gives nothing, no output but gets to the next line (no input signe either).
so I type
again, then I would get...
(*) \verb| Enter the dimension of the coordinate system:|\linebreak
Type KILL(ALL); and then TENSORKILL:TRUE;
before you enter a new metric.
#0: csetup()(ctensor.mac line 208)
#1: readvalue(message=Enter the dimension of the coordinate
system:,pred=lambda([v],if integerp(v) then
block([u:v],mode_declare(u,fixnum),if u > 0 then true)),badboy=["Must be a
#2: csetup()(ctensor.mac line 213)
-- an error. To debug this try debugmode(true);
well, I have tried as instructed.
again. but nothing has been improved.
it says about "debugmode" but I am not sure how to use it.
Could someone help me on this problem.
Maxima mailing list
Maxima at math.utexas.edu
More information about the Maxima