MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Converting Power terms to Times terms

  • To: mathgroup at
  • Subject: [mg88003] Converting Power terms to Times terms
  • From: Reza Farrahi Moghaddam <imriss at>
  • Date: Mon, 21 Apr 2008 14:38:32 -0400 (EDT)

I am using Dolfin/FFC for solving finite element problems. I want to use Mathematica for generating the linear and bilinear terms of the weak equation. After computing the terms, I use the "InputForm", and then give the results to FFC compiler. The problem is that FFC does not accept "power" function. Therefore, terms such as "a^2" must be written as "a*a". Because there are many terms in the weak form of my problem, manual conversion of power terms takes a long time (and probably is subject to errors).
Is there any way to disable "power" function, or stop "times" function to be simplified in the "power" form?
Any other solution?

  • Prev by Date: Re: Polygon cutter
  • Next by Date: need help with Plot
  • Previous by thread: problem during polygon deletion
  • Next by thread: Re: Converting Power terms to Times terms