From bc6340da2fe59833d2e978c938eec4b988bcba10 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 22 Jun 2020 12:31:43 -0400 Subject: [PATCH] Check for deprecated functions in tutorials --- examples/CMakeLists.txt | 5 +++++ include/deal.II/base/timer.h | 4 ++-- include/deal.II/grid/tria_accessor.templates.h | 6 +++--- include/deal.II/matrix_free/matrix_free.h | 10 ++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f7e2854207..4904326ed5 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -48,6 +48,11 @@ IF(DEAL_II_COMPONENT_EXAMPLES) ) IF(DEAL_II_COMPILE_EXAMPLES) + # + # Make sure that there are no deprecated functions used in the tutorials. + # + STRIP_FLAG(DEAL_II_CXX_FLAGS "-Wno-deprecated-declarations") + # # Set up all executables: # diff --git a/include/deal.II/base/timer.h b/include/deal.II/base/timer.h index 82cc6a75f2..2bc08dd750 100644 --- a/include/deal.II/base/timer.h +++ b/include/deal.II/base/timer.h @@ -973,7 +973,7 @@ inline TimerOutput::Scope::Scope(dealii::TimerOutput &timer_, , section_name(section_name_) , in(true) { - timer.enter_section(section_name); + timer.enter_subsection(section_name); } @@ -985,7 +985,7 @@ TimerOutput::Scope::stop() return; in = false; - timer.exit_section(section_name); + timer.leave_subsection(section_name); } diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 30af451477..e60670ad3f 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -3274,7 +3274,7 @@ template <> inline dealii::internal::SubfaceCase<2> CellAccessor<2>::subface_case(const unsigned int face_no) const { - Assert(active(), TriaAccessorExceptions::ExcCellNotActive()); + Assert(is_active(), TriaAccessorExceptions::ExcCellNotActive()); AssertIndexRange(face_no, GeometryInfo<2>::faces_per_cell); return ((face(face_no)->has_children()) ? dealii::internal::SubfaceCase<2>::case_x : @@ -3285,7 +3285,7 @@ template <> inline dealii::internal::SubfaceCase<2> CellAccessor<2, 3>::subface_case(const unsigned int face_no) const { - Assert(active(), TriaAccessorExceptions::ExcCellNotActive()); + Assert(is_active(), TriaAccessorExceptions::ExcCellNotActive()); AssertIndexRange(face_no, GeometryInfo<2>::faces_per_cell); return ((face(face_no)->has_children()) ? dealii::internal::SubfaceCase<2>::case_x : @@ -3297,7 +3297,7 @@ template <> inline dealii::internal::SubfaceCase<3> CellAccessor<3>::subface_case(const unsigned int face_no) const { - Assert(active(), TriaAccessorExceptions::ExcCellNotActive()); + Assert(is_active(), TriaAccessorExceptions::ExcCellNotActive()); AssertIndexRange(face_no, GeometryInfo<3>::faces_per_cell); switch (static_cast(face(face_no)->refinement_case())) { diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 95498dc7b3..71c02cecf9 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -207,6 +207,12 @@ public: color = internal::MatrixFreeFunctions::TaskInfo::color }; + // clang-format off + // Remove with level_mg_handler +#ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#endif /** * Constructor for AdditionalData. */ @@ -266,6 +272,9 @@ public: , cell_vectorization_categories_strict( other.cell_vectorization_categories_strict) {} +#ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA + _Pragma("GCC diagnostic pop") +#endif /** * Copy assignment. @@ -294,6 +303,7 @@ public: return *this; } + // clang-format on /** * Set the scheme for task parallelism. There are four options available. -- 2.39.5