On 11/29/22 17:20, 'yy.wayne' via deal.II User Group wrote:
**
Well it takes several steps to Renumber on the coarsest level.
1) For a multigrid problem, I want to solve the coarsest grid directly using
TrilinosWrappers::SolverDirect. The system has 2 components (real part and
imaginary part). On finer level it's constructed in MatrixFree method so it
can only solve BlockVectors. However TrilinosWrappers::SolverDirect requires
Vector, therefore I transform (Trilinos) BlockVectors to Vectors;
2) It works fine for fe_degree with 1 or 2 because DoFs are arranged point by
point, say 0&1 on node 0, 2&3 on node 1. But when fe_degree goes to 3 and
higher, some nodes don't arranged that way(in picture below rightmost, DoFs
0-7 arranged good but from 8,9 the layout is break). So I choose Renumbering
the DoFs component wise so the DoF layout will be consistent. Actually it
works then.
I see. Yes, what you try to do makes sense then.
Like I said in my previous email, it is uncommon to do what you're doing and
so it is entirely possible that the function you're trying to use has never
been used in the context you're looking for. You might have to take a look at
how these renumbering functions are implemented and fix the implementation --
that shouldn't be too difficult given that none of them is very complicated,
and we would of course be excited to get a patch with the fixes!
The second option you have is to use deal.II functions to query which
component a DoF corresponds to. If I understand you correctly, you're trying
to select which DoF belongs to which vector component, and that is easy if you
renumber them by component but not so easy without because it is no longer the
case that co-located DoFs have successive indices. But there are functions in
DoFTools that allow you to query which DoFs belong to which vector component,
and maybe that helps you with the selection and copying around.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/8354a4f8-aa44-380c-eb8c-badd06e992de%40colostate.edu.