|
Ublas : |
From: Tunç BahçecioÄlu (tuncbah_at_[hidden])
Date: 2008-03-18 16:31:24
Hi,
I have the following code that I use in my FEM program
for (int i=0;i<cCount;i++)
{
for (int j=0;j<cCount;j++) // for every col and row that used the used DOF
{
if (E(i)>=0 && E(j) >=0)
{
globalStifnessMatrix (E(i),E(j)) += K(i,j); }
}
}
When I use the code with a coordinate_matrix the += operation get slower and
slower as I assemble more element stiffness matrices to the global one. If I
use compressed matrix issue resolves but since I want to use mumps binding I
believe I am stuck with the coordinate matrix type. Also I don't want to
change the += operator(maybe using append_element will solve my problem?)
since my function is a template one and I want to use it with different
matrix types (dense, sparse etc..).
this is the type of the globalStifnessMatrix
ublas::compressed_matrix<double, ublas::column_major, 1,
ublas::unbounded_array<int> >
Any help?
Best regards,
Tunç BahçecioÄlu
-- View this message in context: http://www.nabble.com/coordinate_matrix-%2B%3D-operation-gets-slower-as-the-indices-get-bigger-tp16130076p16130076.html Sent from the Boost - uBLAS mailing list archive at Nabble.com.