开发者

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 diagon开发者_StackOverflowals, 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜