SimFlowCFD / RapidCFD-dev

RapidCFD is an OpenFOAM fork running fully on CUDA platform. Brought to you by
https://sim-flow.com
Other
317 stars 93 forks source link

Supported Linear Algebra Operations? #110

Open klausbu opened 6 months ago

klausbu commented 6 months ago

I am thinking on implementing stronger, parallel preconditioners for "p".

Is there support for the following linear algebra operations:

1: general matrix x matrix multiplication 2: matrix x diagonal matrix multiplication where the diagonal value becomes the multiplication factor of its row or column depending on whether it's pre- or post multiplied - this might be implemented in a simpler way than the general matrix x matrix multiplication 3: subtraction of a matrix C from the identity matrix I i.e. M_temp = I - C 4: invert the diagonal D i.e. matrix Dinv_temp = 1.0/D 5: adding/subtracting matrices i.e. matrix J = M_temp +/- N_temp

klausbu commented 6 months ago

1: general matrix x matrix multiplication >> not needed, there's a trick to avoid it 2: matrix (just lower will do) x diagonal matrix multiplication where the diagonal value becomes the multiplication factor of its row or column depending on whether it's pre- or post multiplied - this might be implemented in a simpler way than the general matrix x matrix multiplication _3: subtraction of a matrix C from the identity matrix I i.e. Mtemp = I - C >> there is probably a workaround _4: invert the diagonal D i.e. matrix Dinvtemp = 1.0/D >> this is available, I found it when studying the source code 5: adding/subtracting matrices i.e. matrix J = M_temp +/- N_temp

  1. and 5. are open questions, 5. will probably also cover 3.