I was trying to understand #6116 and got stuck, because the block indices are named a bit confusingly. This PR just tries to make the use of the block indices a bit more consistent and easier to read. Note that in some places we create block vectors with only the Stokes blocks (velocity and/or pressure blocks) and translate between full solution vectors and only the Stokes vectors. We currently assert that those indices are the same between those two vectors (velocity block == 0; pressure block == 1 (iterative solver) or 0 (direct solver)), which is why I used the same block index variables for both. This could theoretically change in the future, but it hasnt in the past ten years, and until we do I just think it is easier to read distributed_stokes_solution.block(velocity_block_index) than distributed_stokes_solution.block(0) or introducing another index variable which just happens to be the same as the existing one.
I was trying to understand #6116 and got stuck, because the block indices are named a bit confusingly. This PR just tries to make the use of the block indices a bit more consistent and easier to read. Note that in some places we create block vectors with only the Stokes blocks (velocity and/or pressure blocks) and translate between full solution vectors and only the Stokes vectors. We currently assert that those indices are the same between those two vectors (velocity block == 0; pressure block == 1 (iterative solver) or 0 (direct solver)), which is why I used the same block index variables for both. This could theoretically change in the future, but it hasnt in the past ten years, and until we do I just think it is easier to read
distributed_stokes_solution.block(velocity_block_index)
thandistributed_stokes_solution.block(0)
or introducing another index variable which just happens to be the same as the existing one.This PR should not change any tests.