New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce DoFHandlerBase #9760
Introduce DoFHandlerBase #9760
Conversation
/rebuild |
9be2778
to
e6b6375
Compare
I have run the test suite with the following configuration:
with the following result:
This is identical to the test run with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect nobody is excited about reviewing this :-( Do you think you could chop off smaller pieces that could be independently merged? For example, the block_info.*
changes seem relatively unrelated. There are also a lot of additions of dealii::
that seem unrelated and could be made separate.
In general, it is very very difficult to review code that is moved because one doesn't get to see what is actually different. I would very much like it if you could keep simple moves of code blocks (possibly including adjustment of class names, template lists, etc -- everything that has no functional impact) in separate commits, and to make follow-up functional changes in separate commits.
ebed913
to
fe9d3e7
Compare
Yes, I can do that. I will create a PR for the
Actually, I am waiting that #9758 is merged (this contains these changes).
I would suggest that I split this PR up in two parts. Part one: move the implementation of What do you think about this approach? Generally what is your opinion of our proposal in the description? |
I will be working in close collaboration with @kronbichler on the evergreen issue #2000. In that issue many topics have been discussed, most notably, the refactoring of internal data structures of the
DoFHandler
. I would like to propose to replace the current implementation by a flat CRS-based implementation (suited both for the regular and the hp case).As a first step, this PR merges the implementation of
DoFHandler
andhp::DoFHandler
in a new classDoFHandlerBase
. I regard this as a first step towards a possible Native support for the hp case (see the discussion in #2000). However, the intermediate goal of this change is that improvements to theDoFHandler
automatically are part alsohp::DoFHandler
.The consequence of rewriting the internal data structures is that also parts of the
DoFAccessor
s classes (these are the classes directly accessing the internal data structures of theDoFHandler
) have to be rewritten. However, the consequence might be that no different specializations forDoFHandler
andhp::DoFHandler
is not needed any more (at least in the case of the accessors). Once this is done, theDoFHandlerBase
could be renamed toDoFHandler
(andhp::DoFHandler
can be removed since all its functionalities are incorporated inDoFHandler
).Now to the details of this PR:
DoFHandlerBase
(containing the implementations fromDoFHandler
,hp::DoFHandler
)DoFHandler
andhp::DoFHandler
are hollow implementations to be compatible with the rest of the code and the iteratorsDoFHandlerBase
(to work in hp-context or not) is determined via a template parameterI would like to point out the internal data structures:
vertex_dofs
,levels
,faces
for normal operationvertex_dofs
,vertex_dof_offsets
,levels_hp
,faces_hp
for hpmg_vertex_dofs
,mg_levels
,mg_faces
for multigridIf the direction of this PR is accepted, I will be working (in a follow-up PR) on merging the first two sets of data structures.
The multgrid data could be adjusted accordingly, so that - if the right transfer operator given - geometric multigrid might work also in the hp case.
You will probably see that in the new code there are the following sins:
if (is_hp_dof_handler)
DoFHandlerBase
has a third template parameterDoFHandler
andhp::DoFHandler
Point 2 and 3 should be resolved once the internal data structures of
DoFHandler
andhp::DoFHandler
are merged and no specializations (e.g. inDoFAccessor
) are needed.Once, we agree that this is a useful change, I would try to implement this as soon as possible (next two weeks), so my sins are not part of the release.
Regarding incompatibility. At the moment, I don't think there will be any major incompatibility issues (if any). The
DoFHandlerBase
is at the moment a union of the methods ofDoFHandler
andhp::DoFHandler
(e.g. it takesFiniteElement
andFECollection
). OnceDoFHandlerBase
is renamed toDoFHandler
, thehp::DoFHandler
could inherit fromDoFHandler
and could be deprecated.Does anyone see any further issues I was not thinking about?
This PR does not contain any changes related to the functionalities and the internal data structures. It copies the content of the
DoFHandler
- andhp::DoFHandler
-related files to new files (and removes some duplicates). So that the 6000 lines of addition are not actually 6000 new lines of code.The variable
is_hp_dof_handler
might become in the future to a synonym offe_collection.size()>1
. Depending on this, different policies could be uses. I.e. we will be able to switch dynamically policies. But to implement this is not urgent to the release.All tests
ctest -j30 -R "hp|dofs|matrix_free"
have passed. I am currently running the full test suite.