| 321429db | 07-Nov-2008 |
Barry Smith <bsmith@mcs.anl.gov> |
As long as you apply the scaling (either the diagonal or the scalar one) only once, it's all OK (I verified it).
When you try to apply the scaling more than once, this is what happens:
1) for the M
As long as you apply the scaling (either the diagonal or the scalar one) only once, it's all OK (I verified it).
When you try to apply the scaling more than once, this is what happens:
1) for the MatScale, the new scale factor is substituted to the previous one; I think this is not what should happen. I think that, once built, it should be possible, for the user, to use it nearly as an ordinary matrix. So, I suggest that MatScale, should control if a scale factor is already present. If it is, it should not substitute it. It should upgrade it (in other words scale_factor *= new_one). Only if it does not exist, it should create and store it.
2) for the MatDiagonalScale we could think to something analogous to what I told at point 1. Anyway, I did not verify the results, because, after having modified my test program to apply the MatDiagonalScale twice (in sequence), I, first of all, ran the program with valgrind and it found some memory leaks that did not appear with the single scaling.
I re-attached the test program. I added (commented) the two lines of code that can activate the "double scaling" (lines 155 and 161).
Thank you again. Best Regards.
Michele
Hg-commit: e67580c9014d755296cc00681ca01a93b901982f
show more ...
|