On 05/04/2011 11:42 AM, Andriy Andreykiv wrote:
Hi Umut,

Regarding the assignment, probably the easiest way is:
if A and B are your matrices and you want to place a part of A into a
part of B (or the whole A into part of B, or any combinations)
do:

gmm::copy(  gmm::sub_matrix(A, gmm::sub_interval(startAX, sizeAX),
gmm::sub_interval(startAY, sizeAY)),
                    gmm::sub_matrix(B, gmm::sub_interval(startBX,
sizeBX), gmm::sub_interval(startBY, sizeBY))   )
of course the sizes should match: sizeAXY=sizeBXY etc. .
Hi Andriy,

I could not really understand the internals of the library but there is a general rule-of-thumb, I suppose. If you are doing a write related operation than that should be done with copy and if you would like to do some kind of matrix-vector multiplication then you should use csr or csc formats where you should copy your gmm::row_matrix< gmm::wsvector<double> > K for instance into a csr matrix. Am I right on this?

As an experienced user, could you please comment on this?

Thanks for the above tip, by the way.

Umut

_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to