Marco83
Mechanical
- Jun 21, 2006
- 8
In a time integration cycle I need to solve a non linear algebraic equation.
I know that fsolve can easily do it but I have two problems with it.
1) At each time step fsolve displays (and consequently prints on the output file):
Optimization terminated: first-order optimality is less than options.TolFun.
Since my program runs in background all the displayed infos are printed on an output file (say a.out). Call on a file and print on it is a very time consuming operation and I definately cannot afford it since I have to perform a few million loops.
So, I'd like to know if there is any way to prevent fsolve from printing the line mentioned above.
2) Since the function contains parameters that chage at every loop, I need to write the function itself in an m-file that fsolve calls everytime it is needed. This operation is time consuming and for the reasons mentioned above I'd like to avoid it.
Any suggestion on how to skip tis passage?
Thanks in advance
I know that fsolve can easily do it but I have two problems with it.
1) At each time step fsolve displays (and consequently prints on the output file):
Optimization terminated: first-order optimality is less than options.TolFun.
Since my program runs in background all the displayed infos are printed on an output file (say a.out). Call on a file and print on it is a very time consuming operation and I definately cannot afford it since I have to perform a few million loops.
So, I'd like to know if there is any way to prevent fsolve from printing the line mentioned above.
2) Since the function contains parameters that chage at every loop, I need to write the function itself in an m-file that fsolve calls everytime it is needed. This operation is time consuming and for the reasons mentioned above I'd like to avoid it.
Any suggestion on how to skip tis passage?
Thanks in advance