Skip to content
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

Link to wrong header file in Docu of MappingQ? #13329

Closed
nfehn opened this issue Feb 3, 2022 · 6 comments · Fixed by #13330
Closed

Link to wrong header file in Docu of MappingQ? #13329

nfehn opened this issue Feb 3, 2022 · 6 comments · Fixed by #13330

Comments

@nfehn
Copy link
Contributor

nfehn commented Feb 3, 2022

The docu of MappingQ https://www.dealii.org/developer/doxygen/deal.II/classMappingQ.html links to the header file

#include <deal.II/fe/mapping_manifold.h>

but it should be "#include <deal.II/fe/mapping_q.h>" instead, shouldn't it?

@kronbichler
Copy link
Member

That is a good remark, I never noticed it. It seems Doxygen has difficulties in picking up the right include (it does have a few problems also elsewhere) sometimes. In this particular case, it seems it picks up a forward declaration here

template <int, int>
class MappingQ;
rather than the actual declaration of MappingQ. Does anyone have an idea (or do we already have a strategy) to prevent doxygen from picking up the wrong link? Of course, we could #ifndef DOXYGEN out all places we find, but maybe there is something more generic.

@nfehn
Copy link
Contributor Author

nfehn commented Feb 3, 2022

Is the forward declaration in mapping_manifold.h actually needed? The one in mapping_q.h should at least not be needed.

I will try it out and maybe open a PR

@nfehn
Copy link
Contributor Author

nfehn commented Feb 3, 2022

This should work, see #13330

@nfehn
Copy link
Contributor Author

nfehn commented Feb 3, 2022

MappingQCache also has a wrong link due to a forward declaration in mapping_q.h.

The problem is more involved since it is defined a friend in MappingQ. I am currently trying to remove the friend declaration, so that we get rid of the forward declaration of MappingQCache as well.

@nfehn
Copy link
Contributor Author

nfehn commented Feb 3, 2022

MappingQCache also has a wrong link due to a forward declaration in mapping_q.h.

The problem is more involved since it is defined a friend in MappingQ. I am currently trying to remove the friend declaration, so that we get rid of the forward declaration of MappingQCache as well.

This does not work. MappingQCache derives from MappingQ, but an independent object mapping_q of MappingQ calls the protected function compute_mapping_support_points().

Independently of the problem of wrong header files, I think that this should be resolved somehow, as this is difficult to understand (one would expect that a protected function can be called in a derived class without the need to declare it a friend class). One solution is obviously to make the function public, but there might also be reasons against it ... I guess someone else should resolve this. At least the documentation should be made more precise regarding the friend declaration in my opinion.

@nfehn
Copy link
Contributor Author

nfehn commented Feb 3, 2022

For the problem with MappingQCache, I decided to follow the suggestion here #13330 (review)

The friend topic should be discussed elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants