Hello there,
I was inspecting the source code of BlockJacobiPrecond
and BlockJacobiPrecondSymmetric
and I think I have noticed a different strategy for colouring their blocks.
In the first version, the procedure is along the lines of
for b in blocks
can_colour = true
for eq in b
if has_color[eq]
can_colour = false
//do some stuff
for eq in b
for eeq in mat.GetRowIndices(eq):
has_color[eq] = true
while on the symmetric version,
for b in blocks
can_colour = true
for eq in b
for eeq in mat.GetRowIndices(eq):
if has_color[eeq]
can_colour = false
//do some stuff
for eq in b
for eeq in mat.GetRowIndices(eq):
has_color[eq] = true
Assuming that we have an equation x
in block a
and an equation y
in block b
and that the dof corresponding to x
does not affect the residual of y
(and vice-versa), but they would both affect the residual of a given equation z
(that does not belong to blocks a
nor b
).
If I understood correctly, on the non symmetric version, a
and b
could be assigned the same colour. For the symmetric version, this does not hold.
If I may ask, is there a reasoning for this difference?