Boost logo

Ublas :

Subject: Re: [ublas] FE assembly : a huge time time difference
From: Riccardo Rossi (rrossi_at_[hidden])
Date: 2011-01-03 07:34:34

Hi ...
   in my previous post i just suggested it could be useful to give
direct access...i believe it is not yet possible unfortunately


Riccardo Rossi, Ph.D, Civil Engineer
member of the Kratos Group:
Centro Internacional de Métodos Numéricos en Ingeniería (CIMNE)
Universidad Politécnica de Cataluña (UPC)
Edificio C-1, campus Norte UPC
Gran Capitan, s/n
08034 Barcelona, España
Tel. (+34) 93 401 73 99
Los datos de carácter personal contenidos en el mensaje, se registrarán
en un fichero para facilitar la gestión de las comunicaciones de CIMNE.
Se pueden ejercitar los derechos de acceso, rectificación, cancelación y
oposición por escrito, dirigiéndose a nuestras oficinas de CIMNE, Gran
Capitán s/n,  Edificio C1 - Campus Norte UPC, 08034 Barcelona, España.
Les dades de caràcter personal contingudes en aquest missatge es
registraran en un fitxer per facilitar la gestió de les comunicacions
del CIMNE. Es poden exercir els drets d'accés, rectificació,
cancel·lació i oposició, per escrit a les nostres oficines del CIMNE,
Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona, Espanya.
All personal data contained in this mail will be processed
confidentially and stored in a file property of CIMNE in order to manage
corporate communications. You may exercise the right of access,
rectification, deletion and objection by letter sent to CIMNE, Gran
Capitán, Edificio C1 - Campus Norte UPC, 08034 Barcelona, Spain.
On Mon, 2011-01-03 at 13:22 +0100, Umut Tabak wrote:
> On 01/03/2011 11:37 AM, Riccardo Rossi wrote:
> > Hi,
> >        i have no experience with Ansys, however ublas CSR is reasonably
> > fast at FE assembly, provided that you preallocate the structure of the
> > matrix
> >
> > if you like to see how we do it follow this link:
> >
> >
> >
> > ConstructMatrixStructure fills in the zero structure of the matrix
> > (ccNUMA aware approach)
> >    
> Hi Ricardo,
> Thanks for the quick reply, however, it is a difficult track down from 
> the code.
> But I guess you mean allocating the zeros on each row, and assemble row 
> by row, by the way I found that generalized_vector_of_vector is faster 
> than the compressed_matrix following the wiki of Gunther Winkler.
> For instance to assemble a model, with 10-node tetrahedrons each having 
> 30 dofs, of size 300k takes only 4.98 seconds, if I am not doing 
> something wrong, tests with 3, or 4 matrices assembled onto the global 
> system shows it is right.
> By the way, digging some more on the mailing lists, I saw some of your 
> posts, on the index1(2)_data()  and value_data() functions. In of them, 
> you propose sth like to get the C-style arrays of the 
> values, however this approach does not work anymore I guess, could you 
> also comment on that. I found out from the documentation that the 
> index1_data() returns unbouded_array (which is typedef'ed as IA), so I 
> also tried to use the unbounded_array class for my operations. Like,
>     unbounded_array<std::size_t> rowI(m.index1_data());
>     unbounded_array<std::size_t> colI(m.index2_data());
>     unbounded_array<double> vals(m.value_data());
> which seems to work, not sure if there are better ways to get the 
> triplet information to interface the matrices in Matrix Market format. 
> However, still row_ptr information should be converted to sensible row 
> counts conforming with the column indices, that seems not too difficult 
> though.
> I used that like that for the moment, that is too bad that one has to 
> look at the documentation in detail and dig down the mailing list to 
> find out important details.
> Best regards,
> Umut