Registered Member
|
So... i'm kinda new to eigen, and i'm having some issues on performance here...
consider the following: i'm trying to build a Vertically arranged non-square matrix D, which is m x n sized, and changes at every iteration a chunk of D is going to be a fixed normalized laplacian matrix A which is n x n the next chunk is B, which has variable row size (but never bigger than n) and changes it's content at each iteration and finally, a chunk C which is the biggest, being 6*n^2 x n but changing it's content at each iteration A B = D matrix C my question is: what would be the fastest way to build matrix D considering the variable sizes of B, fixed sized but changing content C and never changing A ? |
Registered Member
|
Alright... in the end, the speed problem was during the factorization of my matrix
Perhaps someone can shed some light on what i'm doing wrong? I want to solve a least square system Ax = b for x A is my my vertically arranged matrix consisting of a normalized laplacian matrix concatenated with a matrix consisting of rows with just a " 1 " on a random column what i'm currently doing is:
but factorizing is taking a very long time ... roughly 30 seconds, which becomes a toll as i need to re-factorize it again (A changes every step of the simulation) would there be a better way to approach the problem ? |
Moderator
|
If A is the assembly of a Laplacian matrix and rows implementing hard-constraints, then I would recommend you to implement these hard constraints by reordering the variable/equation to cluster the unknowns at the top while keeping the symmetry. Then you can split the matrix and move the fixed part to the right hand side. Regarding the normalization, don't put it in the Laplacian matrix but rather in a diagonal matrix D so that you can preserve the symmetry of the Laplacian matrix L:
D * L x = b <=> L x = D^-1 * b |
Registered Member
|
I don't think i follow you ):
here's a hypothetical example: where λ is just a weight factor (ignore it for now) and so that the vertical arrangement composes A b contains the delta coordinates for the laplacian and the absolute position of certain points for the hard constraints i don't think i understand what you mean by keeping the symmetry or by splitting the matrix and moving only the fixed part sorry for being a bit slow on the math over here ): |
Moderator
|
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]