Open mschreter opened 6 months ago
@johannes-resch for setting up a diagonal preconditioner, the following code lines should help:
https://github.com/MeltPoolDG/MeltPoolDG-dev/blob/846a3c6086a558674afd4bd2f9c11f9231f433e0/source/linear_algebra/preconditioner_matrixfree_generic.cpp#L79-L88
and
https://github.com/MeltPoolDG/MeltPoolDG-dev/blob/846a3c6086a558674afd4bd2f9c11f9231f433e0/source/advection_diffusion/advection_diffusion_operator.cpp#L316-L351
The resulting DiagonalMatrix can then be passed as a solver parameter to the iterative solver, as can be seen here: https://github.com/MeltPoolDG/MeltPoolDG-dev/blob/846a3c6086a558674afd4bd2f9c11f9231f433e0/source/advection_diffusion/advection_diffusion_operation.cpp#L216-L226
DiagonalMatrix
@peterrum FYI
Feel free to ask if you struggle with understanding the code @johannes-resch!
@johannes-resch for setting up a diagonal preconditioner, the following code lines should help:
https://github.com/MeltPoolDG/MeltPoolDG-dev/blob/846a3c6086a558674afd4bd2f9c11f9231f433e0/source/linear_algebra/preconditioner_matrixfree_generic.cpp#L79-L88
and
https://github.com/MeltPoolDG/MeltPoolDG-dev/blob/846a3c6086a558674afd4bd2f9c11f9231f433e0/source/advection_diffusion/advection_diffusion_operator.cpp#L316-L351
The resulting
DiagonalMatrix
can then be passed as a solver parameter to the iterative solver, as can be seen here: https://github.com/MeltPoolDG/MeltPoolDG-dev/blob/846a3c6086a558674afd4bd2f9c11f9231f433e0/source/advection_diffusion/advection_diffusion_operation.cpp#L216-L226@peterrum FYI