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

Deprecate hp::DoFHandler. #11171

Merged
merged 2 commits into from Nov 16, 2020
Merged

Conversation

marcfehling
Copy link
Member

@marcfehling marcfehling commented Nov 12, 2020

Blocked by #11160. (EDIT: With the use of constructor aliases, there is no need to wait on a decision for the DoFHandler interface)

As there is no need for the hp-specialization anymore since #10328, we can deprecate hp::DoFHandler. @peterrum already left a changelog in that particular PR.

In this PR, we actually set the corresponding deprecated flag for hp::DoFHandler, and adjust the general documentation for the basic DoFHandler class. Further, all references to that particular class are removed in the deal.II library (in those entities which are not deprecated).

I'll address removing the hp::DoFHandler from the documentation in a separate PR.

Part of #10333.

@marcfehling
Copy link
Member Author

I've found an example in glib on how to tell the compiler to ignore deprecation warnings. I gave that a try and suppressed warnings on the reinit functions.

@marcfehling
Copy link
Member Author

Just as I wrote these lines, I've found the DEAL_II_DISABLE_EXTRA_DIAGNOSTICS pragma in base/config.h :-)

@marcfehling marcfehling force-pushed the deprecate-hpdofhandler branch 3 times, most recently from 1ff4958 to 55f90a7 Compare November 13, 2020 02:45
Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

DoFHandler &
operator=(const DoFHandler &) = delete;
using dealii::DoFHandler<dim, spacedim>::DoFHandler;
using dealii::DoFHandler<dim, spacedim>::operator=;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether the copy operator alias is necessary, but it probably won't hurt.

@marcfehling
Copy link
Member Author

With the use of constructor aliases, there is no need to wait on a decision for the DoFHandler interface. So we can deal with this independently. Ready for final review.

Copy link
Member

@peterrum peterrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have one question.

@@ -630,6 +630,8 @@ class MatrixFree : public Subscriptor
const std::vector<QuadratureType> & quad,
const AdditionalData &additional_data = AdditionalData());

DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if you can write:

  template <typename QuadratureType, typename number2, typename DoFHandlerType>
  DEAL_II_DEPRECATED void
  reinit(const Mapping<DoFHandlerType::dimension> &                                   mapping,
         const std::vector<const DoFHandlerType *> &       dof_handler_hp,
         const std::vector<const AffineConstraints<number2> *> &constraint,
         const std::vector<QuadratureType> &                    quad,
         const AdditionalData &additional_data = AdditionalData());

The other function should be simply a specialization.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and leave out the extra diagnostics flag? Hmm this could work.

There are a couple of tests using the hp-variant in tests/matrix_free. I'll add a commit and we'll see whether the testsuite complains.

@peterrum
Copy link
Member

/rebuild

Added missing deprecate flags in matrix_free.h.

Added DEAL_II_*_EXTRA_DIAGNOSTICS pragmas in matrix_free.h
to avoid deprecation warnings during CI.
@marcfehling
Copy link
Member Author

Testsuite is okay with the DoFHandlerType argument. So this is ready for merge!

@peterrum peterrum merged commit 1ee7daa into dealii:master Nov 16, 2020
@marcfehling marcfehling deleted the deprecate-hpdofhandler branch November 16, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants