Skip to content

Commit

Permalink
Add prototypes flag to warnings CI (#1250)
Browse files Browse the repository at this point in the history
Description
Add prototypes compilation to ensure that they are all up to date. Follow up on PR #1249.
  • Loading branch information
lpsaavedra authored Aug 20, 2024
1 parent f77ab97 commit f7e869a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/warnings-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
12 changes: 12 additions & 0 deletions prototypes/direct_gls_navier_stokes/direct_gls_navier_stokes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,13 @@ DirectSteadyGLSNavierStokes<dim>::refine_mesh()
triangulation.execute_coarsening_and_refinement();
setup_dofs();
BlockVector<double> 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;
Expand All @@ -550,7 +556,13 @@ DirectSteadyGLSNavierStokes<dim>::refine_mesh_uniform()
triangulation.refine_global(1);
setup_dofs();
BlockVector<double> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,13 @@ DirectSteadyNavierStokes<dim>::refine_mesh()
triangulation.execute_coarsening_and_refinement();
setup_dofs();
BlockVector<double> 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;
Expand All @@ -444,7 +450,13 @@ DirectSteadyNavierStokes<dim>::refine_mesh_uniform()
triangulation.refine_global(1);
setup_dofs();
BlockVector<double> 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;
Expand Down
3 changes: 3 additions & 0 deletions prototypes/kokkos_poisson/kokkos_poisson.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,13 @@ main(int argc, char **argv)

run<dim, fe_degree, 1, MemorySpace::Host>(n_refinements, table);
run<dim, fe_degree, 1, MemorySpace::Default>(n_refinements, table);

#if DEAL_II_VERSION_GTE(9, 7, 0)
run<dim, fe_degree, dim, MemorySpace::Host>(n_refinements, table);
run<dim, fe_degree, dim, MemorySpace::Default>(n_refinements, table);
run<dim, fe_degree, dim + 1, MemorySpace::Host>(n_refinements, table);
run<dim, fe_degree, dim + 1, MemorySpace::Default>(n_refinements, table);
#endif

table.write_text(std::cout);
}

0 comments on commit f7e869a

Please sign in to comment.