Hi, Rutger,
Thank you for your prompt response!
I checked out the library in that link and appended the previous methods to the respective files. I had to make the following modifications in one of them:
// File: umfpack.hpp
template <typename T, typename VecI, typename VecR, typename MatrA>
inline
int getNumeric (MatrA& Lx, MatrA& Ux, VecI& P, VecI& Q,
VecR& Dx, int* do_recip, VecR& Rs,
numeric_type<T> const& Numeric)
{
return detail::getNumeric(bindings::begin_compressed_index_major(Lx),
bindings::begin_index_minor(Lx),
bindings::begin_value(Lx),
bindings::begin_compressed_index_major(Ux),
bindings::begin_index_minor(Ux),
bindings::begin_value(Ux),
bindings::begin_value(P),
bindings::begin_value(Q),
bindings::begin_value(Dx),
do_recip,
bindings::begin_value(Rs),
Numeric.ptr
);
}
But my L matrix is still full of zeros when I run the same test.cpp file I attached before. What am I missing?
Regards,
Bruno
Hello Bruno,On 2011-11-07 03:33, Bruno Abreu Calfa wrote:
Hello everyone,
I wanted to call the UMFPACK function "get_di_numeric" and I realized it
is not implemented in the numeric bindings package. So I appended the
following methods to the respective files:
// File: umfpack.hpp
template <typename T>
inline
int getLunz (int* lnz, int* unz, int* n_row, int* n_col,
int* nz_udiag, numeric_type<T> const& Numeric)
{
return detail::getLunz(lnz, unz, n_row, n_col, nz_udiag, Numeric.ptr);
}
template <typename T, typename VecI, typename VecR, typename MatrA>
inline
int getNumeric (MatrA& Lx, MatrA& Ux, VecI& P, VecI& Q,
VecR& Dx, int* do_recip, VecR& Rs,
numeric_type<T> const& Numeric)
{
return detail::getNumeric(traits::spmatrix_index1_storage(Lx),
traits::spmatrix_index2_storage(Lx),
traits::spmatrix_value_storage(Lx),
traits::spmatrix_index1_storage(Ux),
traits::spmatrix_index2_storage(Ux),
traits::spmatrix_value_storage(Ux),
traits::vector_storage(P),
traits::vector_storage(Q),
traits::vector_storage(Dx),
do_recip,
traits::vector_storage(Rs),
Numeric.ptr
);
}
// File: umfpack_overloads.hpp
inline
int getLunz (int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag,
void *Numeric)
{
return umfpack_di_get_lunz (lnz, unz, n_row, n_col, nz_udiag, Numeric);
}
inline
int getNumeric (int* Lp, int* Lj, double* Lx,
int* Up, int* Ui, double* Ux, int* P,
int* Q, double* Dx, int *do_recip,
double* Rs, void *Numeric)
{
return umfpack_di_get_numeric (Lp, Lj, Lx, Up, Ui, Ux,
P, Q, Dx, do_recip, Rs, Numeric);
}
Then, I ran the code in the attachment. The L matrix is all zeros, but
if I print the report from UMFPACK it works and obviously shows L and U
not all zeros. I am suspecting that the values are not being copied
correctly to my matrices. Does anyone have any idea why?
Thank you very much.
Bruno
I see you're using bindings version 1. Have you tried those at
http://svn.boost.org/svn/boost/sandbox/numeric_bindings/
?
Regards,
Rutger
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: bacalfa@gmail.com