Skip to content

Commit f90939f

Browse files
authored
Add prototypes flag to warnings CI (chaos-polymtl#1250)
Description Add prototypes compilation to ensure that they are all up to date. Follow up on PR chaos-polymtl#1249. Former-commit-id: f7e869a
1 parent 9463a09 commit f90939f

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

.github/workflows/warnings-gcc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ jobs:
5959
run: |
6060
mkdir build-warnings
6161
cd build-warnings
62-
cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
62+
cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_PROTOTYPES=ON
6363
make -j${{ env.COMPILE_JOBS }}

prototypes/direct_gls_navier_stokes/direct_gls_navier_stokes.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,13 @@ DirectSteadyGLSNavierStokes<dim>::refine_mesh()
535535
triangulation.execute_coarsening_and_refinement();
536536
setup_dofs();
537537
BlockVector<double> tmp(dofs_per_block);
538+
539+
#if DEAL_II_VERSION_GTE(9, 7, 0)
538540
solution_transfer.interpolate(tmp);
541+
#else
542+
solution_transfer.interpolate(tmp, present_solution);
543+
#endif
544+
539545
nonzero_constraints.distribute(tmp);
540546
initialize_system();
541547
present_solution = tmp;
@@ -550,7 +556,13 @@ DirectSteadyGLSNavierStokes<dim>::refine_mesh_uniform()
550556
triangulation.refine_global(1);
551557
setup_dofs();
552558
BlockVector<double> tmp(dofs_per_block);
559+
560+
#if DEAL_II_VERSION_GTE(9, 7, 0)
553561
solution_transfer.interpolate(tmp);
562+
#else
563+
solution_transfer.interpolate(tmp, present_solution);
564+
#endif
565+
554566
nonzero_constraints.distribute(tmp);
555567
initialize_system();
556568
present_solution = tmp;

prototypes/direct_steady_navier_stokes/direct_steady_navier_stokes.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,13 @@ DirectSteadyNavierStokes<dim>::refine_mesh()
429429
triangulation.execute_coarsening_and_refinement();
430430
setup_dofs();
431431
BlockVector<double> tmp(dofs_per_block);
432+
433+
#if DEAL_II_VERSION_GTE(9, 7, 0)
432434
solution_transfer.interpolate(tmp);
435+
#else
436+
solution_transfer.interpolate(tmp, present_solution);
437+
#endif
438+
433439
nonzero_constraints.distribute(tmp);
434440
initialize_system();
435441
present_solution = tmp;
@@ -444,7 +450,13 @@ DirectSteadyNavierStokes<dim>::refine_mesh_uniform()
444450
triangulation.refine_global(1);
445451
setup_dofs();
446452
BlockVector<double> tmp(dofs_per_block);
453+
454+
#if DEAL_II_VERSION_GTE(9, 7, 0)
447455
solution_transfer.interpolate(tmp);
456+
#else
457+
solution_transfer.interpolate(tmp, present_solution);
458+
#endif
459+
448460
nonzero_constraints.distribute(tmp);
449461
initialize_system();
450462
present_solution = tmp;

prototypes/kokkos_poisson/kokkos_poisson.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,13 @@ main(int argc, char **argv)
339339

340340
run<dim, fe_degree, 1, MemorySpace::Host>(n_refinements, table);
341341
run<dim, fe_degree, 1, MemorySpace::Default>(n_refinements, table);
342+
343+
#if DEAL_II_VERSION_GTE(9, 7, 0)
342344
run<dim, fe_degree, dim, MemorySpace::Host>(n_refinements, table);
343345
run<dim, fe_degree, dim, MemorySpace::Default>(n_refinements, table);
344346
run<dim, fe_degree, dim + 1, MemorySpace::Host>(n_refinements, table);
345347
run<dim, fe_degree, dim + 1, MemorySpace::Default>(n_refinements, table);
348+
#endif
346349

347350
table.write_text(std::cout);
348351
}

0 commit comments

Comments
 (0)