From f7e869a8033ffab6128c0f21cbbc22c23e96708b Mon Sep 17 00:00:00 2001 From: Laura Prieto Saavedra <40216050+lpsaavedra@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:31:12 -0600 Subject: [PATCH] Add prototypes flag to warnings CI (#1250) Description Add prototypes compilation to ensure that they are all up to date. Follow up on PR #1249. --- .github/workflows/warnings-gcc.yml | 2 +- .../direct_gls_navier_stokes.cc | 12 ++++++++++++ .../direct_steady_navier_stokes.cc | 12 ++++++++++++ prototypes/kokkos_poisson/kokkos_poisson.cc | 3 +++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/warnings-gcc.yml b/.github/workflows/warnings-gcc.yml index 48bfcfbbcd..b455d501c1 100644 --- a/.github/workflows/warnings-gcc.yml +++ b/.github/workflows/warnings-gcc.yml @@ -59,5 +59,5 @@ jobs: run: | mkdir build-warnings cd build-warnings - cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=ON + cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_PROTOTYPES=ON make -j${{ env.COMPILE_JOBS }} diff --git a/prototypes/direct_gls_navier_stokes/direct_gls_navier_stokes.cc b/prototypes/direct_gls_navier_stokes/direct_gls_navier_stokes.cc index 2854e8035b..3226d97d71 100644 --- a/prototypes/direct_gls_navier_stokes/direct_gls_navier_stokes.cc +++ b/prototypes/direct_gls_navier_stokes/direct_gls_navier_stokes.cc @@ -535,7 +535,13 @@ DirectSteadyGLSNavierStokes::refine_mesh() triangulation.execute_coarsening_and_refinement(); setup_dofs(); BlockVector tmp(dofs_per_block); + +#if DEAL_II_VERSION_GTE(9, 7, 0) solution_transfer.interpolate(tmp); +#else + solution_transfer.interpolate(tmp, present_solution); +#endif + nonzero_constraints.distribute(tmp); initialize_system(); present_solution = tmp; @@ -550,7 +556,13 @@ DirectSteadyGLSNavierStokes::refine_mesh_uniform() triangulation.refine_global(1); setup_dofs(); BlockVector tmp(dofs_per_block); + +#if DEAL_II_VERSION_GTE(9, 7, 0) solution_transfer.interpolate(tmp); +#else + solution_transfer.interpolate(tmp, present_solution); +#endif + nonzero_constraints.distribute(tmp); initialize_system(); present_solution = tmp; diff --git a/prototypes/direct_steady_navier_stokes/direct_steady_navier_stokes.cc b/prototypes/direct_steady_navier_stokes/direct_steady_navier_stokes.cc index e22c9027b7..f11b9b2ed2 100644 --- a/prototypes/direct_steady_navier_stokes/direct_steady_navier_stokes.cc +++ b/prototypes/direct_steady_navier_stokes/direct_steady_navier_stokes.cc @@ -429,7 +429,13 @@ DirectSteadyNavierStokes::refine_mesh() triangulation.execute_coarsening_and_refinement(); setup_dofs(); BlockVector tmp(dofs_per_block); + +#if DEAL_II_VERSION_GTE(9, 7, 0) solution_transfer.interpolate(tmp); +#else + solution_transfer.interpolate(tmp, present_solution); +#endif + nonzero_constraints.distribute(tmp); initialize_system(); present_solution = tmp; @@ -444,7 +450,13 @@ DirectSteadyNavierStokes::refine_mesh_uniform() triangulation.refine_global(1); setup_dofs(); BlockVector tmp(dofs_per_block); + +#if DEAL_II_VERSION_GTE(9, 7, 0) solution_transfer.interpolate(tmp); +#else + solution_transfer.interpolate(tmp, present_solution); +#endif + nonzero_constraints.distribute(tmp); initialize_system(); present_solution = tmp; diff --git a/prototypes/kokkos_poisson/kokkos_poisson.cc b/prototypes/kokkos_poisson/kokkos_poisson.cc index e78bf2b4bb..a7c9321f95 100644 --- a/prototypes/kokkos_poisson/kokkos_poisson.cc +++ b/prototypes/kokkos_poisson/kokkos_poisson.cc @@ -339,10 +339,13 @@ main(int argc, char **argv) run(n_refinements, table); run(n_refinements, table); + +#if DEAL_II_VERSION_GTE(9, 7, 0) run(n_refinements, table); run(n_refinements, table); run(n_refinements, table); run(n_refinements, table); +#endif table.write_text(std::cout); }