simplify_indexed() didn't fully simplify the expressions
Hi! I am using GiNaC1.1.0 It seems that for some expression(suppose it's defined as e1) simplify_indexed() doesn't do simplification fully. However, if I define another ex objec tmp = e1, and e1.simplify_indexed() will give a more simple expression which, although, is still not of the simplest form. Anyone knows a more efficient way? Another problem I met is that when I simplify an expression which is composed of 240 terms, where every term is a simple product of indexed objects, the complilation will stop, saying "out of memory". I don't think that GiNaC can't handle such expressions. Anything wrong?
Hi!
I am using GiNaC1.1.0
It seems that for some expression(suppose it's defined as e1) simplify_indexed() doesn't do simplification fully. However, if I define another ex objec tmp = e1, and e1.simplify_indexed() will give a more sorry ~~~~~~~~~~~it's tmp.simplify_indexed()
simple expression which, although, is still not of the simplest form. Anyone knows a more efficient way?
Another problem I met is that when I simplify an expression which is composed of 240 terms, where every term is a simple product of indexed objects, the complilation will stop, saying "out of memory". I don't think that GiNaC can't handle such expressions. Anything wrong?
Hi, On Mon, 9 Jun 2003, Yong Xiao wrote:
It seems that for some expression(suppose it's defined as e1) simplify_indexed() doesn't do simplification fully. However, if I define another ex objec tmp = e1, and e1.simplify_indexed() will give a more simple expression which, although, is still not of the simplest form. Anyone knows a more efficient way?
Can you provide a definition of "simple"? No kidding, an example of what you have and what you want to get would be really helpful. Without that nobody can help you, I'm afraid.
Another problem I met is that when I simplify an expression which is composed of 240 terms, where every term is a simple product of indexed objects, the complilation will stop, saying "out of memory". I don't think that GiNaC can't handle such expressions. Anything wrong?
Your compiler optimizing too aggressivly. Try this ctor instead: /** Construct ex from string and a list of symbols. The input grammar is * similar to the GiNaC output format. All symbols and indices to be used * in the expression must be specified in a lst in the second argument. * Undefined symbols and other parser errors will throw an exception. */ GiNaC::ex::ex(const std::string &s, const GiNaC::ex &l); Regards -richy. -- Richard B. Kreckel <Richard.Kreckel@GiNaC.DE> <http://www.ginac.de/~kreckel/>
Richard B. Kreckel wrote:
Hi,
On Mon, 9 Jun 2003, Yong Xiao wrote:
It seems that for some expression(suppose it's defined as e1) simplify_indexed() doesn't do simplification fully. However, if I define another ex objec tmp = e1, and e1.simplify_indexed() will give a more simple expression which, although, is still not of the simplest form. Anyone knows a more efficient way?
Can you provide a definition of "simple"?
No kidding, an example of what you have and what you want to get would be really helpful. Without that nobody can help you, I'm afraid. I am sorry that I made a mistake. The problem is caused by the fact that I used three identical dummy indices in the summation. Thank you very much for your kind help.
cheers
participants (2)
-
Richard B. Kreckel
-
Yong Xiao