Skip to content

Commit

Permalink
Merge pull request #4150 from gassmoeller/remove_outdated_deal_ii_ver…
Browse files Browse the repository at this point in the history
…sions

Remove deal.II compatibility code
  • Loading branch information
bangerth committed Jul 8, 2021
2 parents 2d42077 + e94179b commit ea1c999
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 94 deletions.
8 changes: 1 addition & 7 deletions include/aspect/mesh_deformation/interface.h
Expand Up @@ -29,13 +29,7 @@

#include <deal.II/fe/fe_system.h>
#include <deal.II/dofs/dof_handler.h>

#if DEAL_II_VERSION_GTE(9,1,0)
# include <deal.II/lac/affine_constraints.h>
#else
# include <deal.II/lac/constraint_matrix.h>
#endif

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/base/index_set.h>


Expand Down
10 changes: 0 additions & 10 deletions include/aspect/postprocess/particles.h
Expand Up @@ -77,17 +77,12 @@ namespace aspect
/**
* Implementation of the corresponding function of the base class.
*/
#if DEAL_II_VERSION_GTE(9,1,0)
std::vector<
std::tuple<unsigned int,
unsigned int,
std::string,
DataComponentInterpretation::DataComponentInterpretation> >
get_nonscalar_data_ranges () const override;
#else
std::vector<std::tuple<unsigned int, unsigned int, std::string> >
get_vector_data_ranges() const override;
#endif

/**
* Output information that is filled by build_patches() and
Expand All @@ -103,17 +98,12 @@ namespace aspect
/**
* Store which of the data fields are vectors.
*/
#if DEAL_II_VERSION_GTE(9,1,0)
std::vector<
std::tuple<unsigned int,
unsigned int,
std::string,
DataComponentInterpretation::DataComponentInterpretation> >
vector_datasets;
#else
std::vector<std::tuple<unsigned int, unsigned int, std::string> >
vector_datasets;
#endif
};
}

Expand Down
7 changes: 1 addition & 6 deletions include/aspect/simulator_access.h
Expand Up @@ -33,12 +33,7 @@
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/fe/fe.h>
#include <deal.II/fe/mapping_q.h>

#if !DEAL_II_VERSION_GTE(9,1,0)
# include <deal.II/lac/constraint_matrix.h>
#else
# include <deal.II/lac/affine_constraints.h>
#endif
#include <deal.II/lac/affine_constraints.h>

namespace WorldBuilder
{
Expand Down
14 changes: 0 additions & 14 deletions include/aspect/utilities.h
Expand Up @@ -188,20 +188,6 @@ namespace aspect
std::vector<std::string>
expand_dimensional_variable_names (const std::vector<std::string> &var_declarations);


#if !DEAL_II_VERSION_GTE(9,2,0)
/**
* Split the set of DoFs (typically locally owned or relevant) in @p whole_set into blocks
* given by the @p dofs_per_block structure.
*
* The numbers of dofs per block need to add up to the size of the index space described
* by @p whole_set.
*/
void split_by_block (const std::vector<types::global_dof_index> &dofs_per_block,
const IndexSet &whole_set,
std::vector<IndexSet> &partitioned);
#endif

/**
* Returns an IndexSet that contains all locally active DoFs that belong to
* the given component_mask.
Expand Down
4 changes: 0 additions & 4 deletions source/global.cc
Expand Up @@ -55,11 +55,7 @@ void print_aspect_header(Stream &stream)
#endif
<< " bit indices and vectorization level ";
const unsigned int n_vect_bits =
#if DEAL_II_VERSION_GTE(9,2,0)
dealii::VectorizedArray<double>::size() * 8 * sizeof(double);
#else
dealii::VectorizedArray<double>::n_array_elements * 8 * sizeof(double);
#endif

stream << DEAL_II_COMPILER_VECTORIZATION_LEVEL
<< " (" << n_vect_bits << " bits)\n";
Expand Down
20 changes: 0 additions & 20 deletions source/mesh_refinement/volume_of_fluid_interface.cc
Expand Up @@ -128,17 +128,9 @@ namespace aspect
||
(face->at_boundary() && cell->periodic_neighbor_is_coarser(f))
||
#if DEAL_II_VERSION_GTE(9,2,0)
(face->at_boundary() && neighbor->level() == cell->level() && neighbor->is_active()))
#else
(face->at_boundary() && neighbor->level() == cell->level() && neighbor->active()))
#endif
{
#if DEAL_II_VERSION_GTE(9,2,0)
if (neighbor->is_active() && !neighbor->is_artificial())
#else
if (neighbor->active() && !neighbor->is_artificial())
#endif
{
fe_values.reinit(neighbor);
fe_values[volume_of_fluid_field].get_function_values(this->get_solution(),
Expand Down Expand Up @@ -253,11 +245,7 @@ namespace aspect
for (; neighbor_cell!=end_neighbor_cell_index; ++neighbor_cell)
{
typename Triangulation<dim>::active_cell_iterator itr_tmp = *neighbor_cell;
#if DEAL_II_VERSION_GTE(9,2,0)
if (itr_tmp->is_active() && itr_tmp->is_locally_owned())
#else
if (itr_tmp->active() && itr_tmp->is_locally_owned())
#endif
{
itr_tmp->clear_coarsen_flag ();
itr_tmp->set_refine_flag ();
Expand All @@ -273,11 +261,7 @@ namespace aspect
{
typename Triangulation<dim>::cell_iterator itr_tmp = mcell->periodic_neighbor(f);

#if DEAL_II_VERSION_GTE(9,2,0)
if (itr_tmp->is_active() && itr_tmp->is_locally_owned())
#else
if (itr_tmp->active() && itr_tmp->is_locally_owned())
#endif
{
itr_tmp->clear_coarsen_flag ();
itr_tmp->set_refine_flag ();
Expand All @@ -298,11 +282,7 @@ namespace aspect
}
else
{
#if DEAL_II_VERSION_GTE(9,2,0)
if (cell->is_active())
#else
if (cell->active())
#endif
{
cell->set_coarsen_flag();
cell->clear_refine_flag();
Expand Down
4 changes: 0 additions & 4 deletions source/particle/generator/quadrature_points.cc
Expand Up @@ -43,11 +43,7 @@ namespace aspect
quadrature_formula,
update_quadrature_points);

#if DEAL_II_VERSION_GTE(9,1,0)
const int ierr = MPI_Scan(&n_particles_to_generate, &prefix_sum, 1, DEAL_II_PARTICLE_INDEX_MPI_TYPE, MPI_SUM, this->get_mpi_communicator());
#else
const int ierr = MPI_Scan(&n_particles_to_generate, &prefix_sum, 1, PARTICLE_INDEX_MPI_TYPE, MPI_SUM, this->get_mpi_communicator());
#endif
AssertThrowMPI(ierr);

particle_index = prefix_sum - n_particles_to_generate;
Expand Down
4 changes: 0 additions & 4 deletions source/particle/generator/reference_cell.cc
Expand Up @@ -37,11 +37,7 @@ namespace aspect
types::particle_index n_particles_to_generate = this->get_triangulation().n_locally_owned_active_cells() * particles_in_unit_cell.size();
types::particle_index prefix_sum = 0;

#if DEAL_II_VERSION_GTE(9,1,0)
const int ierr = MPI_Scan(&n_particles_to_generate, &prefix_sum, 1, DEAL_II_PARTICLE_INDEX_MPI_TYPE, MPI_SUM, this->get_mpi_communicator());
#else
const int ierr = MPI_Scan(&n_particles_to_generate, &prefix_sum, 1, PARTICLE_INDEX_MPI_TYPE, MPI_SUM, this->get_mpi_communicator());
#endif
AssertThrowMPI(ierr);

types::particle_index particle_index = prefix_sum - n_particles_to_generate;
Expand Down
4 changes: 0 additions & 4 deletions source/simulator/assemblers/advection.cc
Expand Up @@ -732,11 +732,7 @@ namespace aspect
if (!neighbor->has_children())
{
if (neighbor->level () == cell->level () &&
#if DEAL_II_VERSION_GTE(9,2,0)
neighbor->is_active() &&
#else
neighbor->active() &&
#endif
(((neighbor->is_locally_owned()) && (cell->index() < neighbor->index()))
||
((!neighbor->is_locally_owned()) && (cell->subdomain_id() < neighbor->subdomain_id()))))
Expand Down
21 changes: 0 additions & 21 deletions source/utilities.cc
Expand Up @@ -321,27 +321,6 @@ namespace aspect
}


#if !DEAL_II_VERSION_GTE(9,2,0)
/**
* Split the set of DoFs (typically locally owned or relevant) in @p whole_set into blocks
* given by the @p dofs_per_block structure.
*/
void split_by_block (const std::vector<types::global_dof_index> &dofs_per_block,
const IndexSet &whole_set,
std::vector<IndexSet> &partitioned)
{
const unsigned int n_blocks = dofs_per_block.size();
partitioned.clear();

partitioned.resize(n_blocks);
types::global_dof_index start = 0;
for (unsigned int i=0; i<n_blocks; ++i)
{
partitioned[i] = whole_set.get_view(start, start + dofs_per_block[i]);
start += dofs_per_block[i];
}
}
#endif

template <int dim>
std::vector<std::string>
Expand Down

0 comments on commit ea1c999

Please sign in to comment.