Nik,
it sounds like you've already figured out the big building blocks. Indeed, the
right way to deal with this is to use different finite elements on the
different parts of the domain (like in step-46), and then to sort DoFs by
vector component -- which then automatically produces the block structure.
> * For a single processor, I was able to write a function to compute the new
> cell ordering and then pass it to DoFRenumbering::cell_wise(). However, in
> parallel, cell_wise() only works on the locally owned cells, so I don't
> know how I could produce the desired global reordering.
>
> I think both DoFRenumbering::cell_wise() or also DoFRenumbering::
> sort_selected_dofs_back() won't work here, since they are not implement for
> global reordering on meshes, distributed using MPI. Please correct me if I'm
> wrong on this.
This is correct. You can sort the DoFs by cells *within a subdomain* according
to whatever criterion, but you probably don't want to do that on the entire
domain (and in any case, there is not currently a function that would that).
The reason is that if you did, the DoF indices stored by each process would
not form a contiguous range, and that would result in problems with vector and
matrix classes.
(I will note that when you sort by vector component, you *also* don't end up
with contiguous ranges -- but then you use block vectors and block matrices,
and *within these*, each process owns a contiguous range of DoFs.)
If you have any questions left, feel free to open a separate question!
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/