Numerical evaluation is Mathematica bottleneck?!
- To: mathgroup at smc.vnet.net
- Subject: [mg69024] Numerical evaluation is Mathematica bottleneck?!
- From: gregorc <gregor.cernivec at fe.uni-lj.si>
- Date: Sun, 27 Aug 2006 01:23:44 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear mathgroup members, I am solving a non-linear semiconductor PDE problem with finite difference discretization. The Compiled algebraic equation and its Jacobian take as input central point and two adjacent neighbors and they are Threaded over the whole mesh. A LinearSolve and some damping schemes are used to obtain next step towards the solution. Typical mesh is about 300 points and the solution is usually found in 7 iterations, which takes about 7 seconds of computational time.This is already too slow, but since I plan to solve the problem in 2D this is much too slow!!! The bottleneck is the numerical evaluation of the compiled equation and its Jacobian. I am thinking of using MathLink and write the numerical evaluation routine in C++, which would take a list of data and return evaluated function and the Jacobian. Is this the right way? Could the link itself be a timing bottleneck? Any other suggestions? Regards, Gregor