[MBDyn-users] Output of the condition number of the Jacobian matrix
masarati at aero.polimi.it
Thu Dec 6 15:03:15 CET 2012
On 12/06/2012 11:48 AM, Marco Morandini wrote:
> Dear Reinhard,
> I think you should rely on the
> facilities provided by the different solvers
> rather than copying the matrix and factorizing it with lapack.
> For example, Info [UMFPACK_RCOND] for UMFPACK,
> klu_condest in klu, and so on....
I agree, condition number is a property of the matrix; in our intention,
the matrix during the solution is transparent to the solver, which
should call the SolutionManager to get this info. Then, within each
solution manager there could be specific code depending on the type of
matrix and so.
I see two different ways:
1) you want the condition number of a matrix which it needs to be
computed using the matrix; the specific MatrixHandler provides a
dedicated condition number algorithm (for example, when using the full
matrix handler the matrix is already in the desired format; otherwise,
since our matrices are *very* sparse, each sparse matrix handler
provides an iterator that only returns non-zero entries, so you could
use that within a generic matrix fill-in algorithm)
2) you want the condition number of a matrix within a SolutionManager,
which could be available or computed within the factorization process;
in that case, you use that condition number
In my opinion it boils down to:
a) adding a ConditionNumber() method to MatrixHandler, which uses your
method but collects the matrix in the form needed by lapack's routines
for condition number using iterators or directly uses the matrix as is
in case of full matrix handler
b) adding a ConditionNumber() method to SolutionManager, which uses
whatever facility provided by the solver, or calls the matrix's method
in case the solver does not provide any. In the latter case, make sure
you use the matrix before factorization!
What do you think?
Dipartimento di Ingegneria Aerospaziale
Politecnico di Milano
More information about the MBDyn-users