Skip to content

Commit

Permalink
Add if guards to verify deal.II version
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsaavedra committed Aug 20, 2024
1 parent 0a75bfd commit d21a346
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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

0 comments on commit d21a346

Please sign in to comment.