[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-gsl] Copy C Matrix Data to GSL Matrix

**From**: |
Rodney Sparapani |

**Subject**: |
Re: [Help-gsl] Copy C Matrix Data to GSL Matrix |

**Date**: |
Mon, 15 Aug 2011 08:59:16 -0500 |

**User-agent**: |
Thunderbird 2.0.0.24 (X11/20110614) |

Marcel Bechmann wrote:

Dear all,

`I'm working on researching the root water uptake by plants. In my model,
``I have to fill in Data from a dense SuperLU Matrix (which is a general C
``Matrix with some additional information) into a gsl Matrix. I'm doing
``this element wise by now, but as my problem grows, this assignment is
``very slow. Is it possible to pass the whole matrix data to the gsl
``matrix structure by assigning the gsl_Matrix.data = &CMatrix? What shall
``i do with tda, block and owner?
`
Cheers,
Marcel

Hi Marcel:
I think you leave owner alone since you will free the matrix via

`SuperLU rather than GSL (not sure about block). I've been doing this
``for a while with CHOLMOD via pre-processor macros.
`

`#define MAT(C, G) gsl_matrix G; G.size1=C->ncol; G.size2=C->nrow;
``G.tda=C->nrow; G.data=C->x;
`
#define VEC(C, G) gsl_vector G; G.size=C->nrow; G.stride=1; G.data=C->x;

`I've created some docs which you can find at
``http://www.mcw.edu/FileLibrary/Groups/Biostatistics/Software/JulySoftware/manual.pdf
`See the first 2 pages.
Rodney