amgcl icon indicating copy to clipboard operation
amgcl copied to clipboard

How to deal with multiple right hand sides.

Open g873249824 opened this issue 1 year ago • 8 comments

Hi Professor, I have a basic question. If I have vectors rhss and xs as arguments to solver operator () as (rhss,xs), which are multiple right hand sides (continusly stored) and solutions, I want to handle rhss and xs inside the header file by changing the operator (). Can I declare a vector reference to part of rhss or xs without additional memory storage? or something alternative?

{
vector &rhs=rhss(0,n-1);
vector &x=xs(0,n-1);
//do some iteration cycles for the first rhs.
}
{
vector &rhs=rhss(n,2n-1);
vector &x=xs(n,2n-1);
//do some iteration cycles for the second rhs.
}// maybe i will continue  the iteration cycle for first rhs

How can i implement this in a elegant way for several backends? With best regards.

g873249824 avatar Oct 31 '22 12:10 g873249824