Tutorial :How do you store a discretized 3D domain (for solve PDE) in sparse format, when boundary conditions can change?


I am looking at solving a problem that is a PDE, and the 3D discretized domain can have a different boundary condition on each of the 6 boundaries (or all the same).

What is the best way to put this sparse matrix into a compressed format? Is CSR going to be my only option here? I thought about using ellpack, but I am not sure how that works for changing boundary conditions.

Thinking about the 2D matrix representation of the 3d space...it will be primarily diagonally dominant with 7 diagonals, but those diagonals will potentially change along the boundaries. Doesnt seem like I can use a format where I store the values, and an offset from the diagonal that is the same every time.

Obviously i am trying to set this problem up to be more cache friendly for my CG solver which is doing a lot of vector-matrix multiply


coordinate reduce row format..it works.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »