[Date Index] [Thread Index] [Author Index]
Numerical evaluation is Mathematica bottleneck?!
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