JuliaGPU / AMGX.jl

MIT License
11 stars 4 forks source link

Update only diagonal elements of an AMGXMatrix #18

Open elise-palethorpe opened 2 years ago

elise-palethorpe commented 2 years ago

I would like to update only the diagonal elements of an AMGXMatrix but replace_coefficients seems to update all non zero elements. I don't understand what the diag_data parameter does but perhaps this is useful?

Thanks!

KristofferC commented 2 years ago

The diag_data is described in the manual as:

Optional array of external diagonal entries for each row. If there is no external diagonal, in other words, the diagonal is contained in the matrix itself the diag data must be set to a null pointer. If this value is non-null, it is assumed to be an array with nblock_dimxblockdimy entries in AoS layout. diag data[iblock_dimxblock_dimy] is the 0,0 entry in the i,i block in the matrix. Currently external diagonal is not supported.

Note:

Currently external diagonal is not supported.

So I don't think that parameter is useful right now.

I am not sure the functionality of only setting diagonal is currently available.