From fa1494d709f9aef659ee9123d82565fb957e28d0 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 16 Jan 2020 12:04:47 -0700 Subject: [PATCH] Change all occurrences of CellAccessor::active() to CellAccessor::is_active(). --- examples/step-9/step-9.cc | 2 +- .../cell_data_transfer.templates.h | 2 +- include/deal.II/dofs/dof_accessor.templates.h | 2 +- .../fe/fe_tools_extrapolate.templates.h | 8 +-- include/deal.II/grid/filtered_iterator.h | 4 +- include/deal.II/grid/grid_tools.h | 4 +- .../deal.II/grid/tria_accessor.templates.h | 24 ++++----- .../matrix_free/cuda_hanging_nodes_internal.h | 2 +- .../deal.II/matrix_free/face_setup_internal.h | 4 +- .../matrix_free/mapping_info.templates.h | 2 +- .../matrix_free/matrix_free.templates.h | 2 +- include/deal.II/meshworker/loop.h | 2 +- include/deal.II/meshworker/mesh_loop.h | 2 +- .../numerics/cell_data_transfer.templates.h | 8 +-- .../deal.II/numerics/vector_tools.templates.h | 10 ++-- source/distributed/cell_weights.cc | 2 +- source/distributed/fully_distributed_tria.cc | 4 +- .../fully_distributed_tria_util.cc | 10 ++-- source/distributed/solution_transfer.cc | 2 +- source/distributed/tria.cc | 19 +++---- source/dofs/dof_tools_sparsity.cc | 8 +-- source/fe/mapping_fe_field.cc | 4 +- source/fe/mapping_q1_eulerian.cc | 2 +- source/fe/mapping_q_eulerian.cc | 2 +- source/grid/grid_out.cc | 13 ++--- source/grid/grid_tools.cc | 16 +++--- source/grid/grid_tools_dof_handlers.cc | 8 +-- source/grid/tria.cc | 54 ++++++++++--------- source/grid/tria_accessor.cc | 2 +- source/hp/dof_handler.cc | 8 +-- source/hp/refinement.cc | 4 +- source/numerics/data_out.cc | 2 +- source/numerics/data_out_faces.cc | 2 +- source/numerics/data_out_rotation.cc | 2 +- source/numerics/solution_transfer.cc | 6 +-- source/numerics/time_dependent.cc | 4 +- tests/aniso/up_and_down.cc | 6 +-- tests/fail/rt_6.cc | 6 +-- tests/fe/up_and_down.cc | 6 +-- tests/grid/intergrid_constraints.cc | 4 +- tests/grid/intergrid_map.cc | 4 +- tests/grid/mesh_smoothing_02.cc | 10 ++-- tests/hp/p_adaptivity_absolute_threshold.cc | 4 +- tests/hp/p_adaptivity_fixed_number.cc | 4 +- tests/hp/p_adaptivity_flags.cc | 4 +- tests/hp/p_adaptivity_full.cc | 4 +- tests/hp/p_adaptivity_reference.cc | 4 +- tests/hp/p_adaptivity_regularity.cc | 4 +- tests/hp/p_adaptivity_relative_threshold.cc | 4 +- tests/mpi/distribute_flux_sparsity_pattern.cc | 2 +- tests/mpi/p4est_2d_constraintmatrix_04.cc | 2 +- tests/mpi/p4est_3d_constraintmatrix_03.cc | 2 +- tests/mpi/step-40_cuthill_mckee.cc | 2 +- tests/mpi/step-40_cuthill_mckee_MPI-subset.cc | 2 +- tests/serialization/dof_handler_01.cc | 2 +- tests/serialization/hp_dof_handler_01.cc | 8 +-- tests/serialization/triangulation_01.cc | 4 +- tests/serialization/triangulation_02.cc | 4 +- tests/sharedtria/tria_custom_refine02.cc | 2 +- tests/trilinos/elide_zeros.cc | 2 +- 60 files changed, 176 insertions(+), 172 deletions(-) diff --git a/examples/step-9/step-9.cc b/examples/step-9/step-9.cc index 8832e46f0f..0bc4b4810c 100644 --- a/examples/step-9/step-9.cc +++ b/examples/step-9/step-9.cc @@ -1055,7 +1055,7 @@ namespace Step9 // Then check whether the neighbor is active. If it is, then it // is on the same level or one level coarser (if we are not in // 1D), and we are interested in it in any case. - if (neighbor->active()) + if (neighbor->is_active()) scratch_data.active_neighbors.push_back(neighbor); else { diff --git a/include/deal.II/distributed/cell_data_transfer.templates.h b/include/deal.II/distributed/cell_data_transfer.templates.h index a05a1d64d4..05e25e2234 100644 --- a/include/deal.II/distributed/cell_data_transfer.templates.h +++ b/include/deal.II/distributed/cell_data_transfer.templates.h @@ -314,7 +314,7 @@ namespace parallel ++child_index) { const auto child = cell->child(child_index); - Assert(child->active() && child->coarsen_flag_set(), + Assert(child->is_active() && child->coarsen_flag_set(), typename dealii::Triangulation< dim>::ExcInconsistentCoarseningFlags()); diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index aa9abaf262..e6872d77a5 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -3810,7 +3810,7 @@ inline void DoFCellAccessor::get_dof_indices( std::vector &dof_indices) const { - Assert(this->active(), + Assert(this->is_active(), ExcMessage("get_dof_indices() only works on active cells.")); Assert(this->is_artificial() == false, ExcMessage("Can't ask for DoF indices on artificial cells.")); diff --git a/include/deal.II/fe/fe_tools_extrapolate.templates.h b/include/deal.II/fe/fe_tools_extrapolate.templates.h index c7d63741cd..cf7a52468b 100644 --- a/include/deal.II/fe/fe_tools_extrapolate.templates.h +++ b/include/deal.II/fe/fe_tools_extrapolate.templates.h @@ -534,7 +534,7 @@ namespace FETools // check if at least one child is locally owned on our process for (unsigned int child_n = 0; child_n < dealii_cell->n_children(); ++child_n) - if (dealii_cell->child(child_n)->active()) + if (dealii_cell->child(child_n)->is_active()) if (dealii_cell->child(child_n)->is_locally_owned()) { locally_owned_children = true; @@ -880,7 +880,7 @@ namespace FETools for (unsigned int child_n = 0; child_n < dealii_cell->n_children(); ++child_n) - if (dealii_cell->child(child_n)->active()) + if (dealii_cell->child(child_n)->is_active()) if (dealii_cell->child(child_n)->is_locally_owned()) { locally_owned_children = true; @@ -1730,7 +1730,7 @@ namespace FETools dof2.end(level); for (; cell != endc; ++cell) - if (!cell->active()) + if (!cell->is_active()) { // check whether this // cell has active @@ -1738,7 +1738,7 @@ namespace FETools bool active_children = false; for (unsigned int child_n = 0; child_n < cell->n_children(); ++child_n) - if (cell->child(child_n)->active()) + if (cell->child(child_n)->is_active()) { active_children = true; break; diff --git a/include/deal.II/grid/filtered_iterator.h b/include/deal.II/grid/filtered_iterator.h index 654bfa0ec5..f076dbc8bc 100644 --- a/include/deal.II/grid/filtered_iterator.h +++ b/include/deal.II/grid/filtered_iterator.h @@ -402,7 +402,7 @@ namespace IteratorFilters * template * bool operator () (const Iterator &i) const * { - * return (i->active()); + * return (i->is_active()); * } * }; * @endcode @@ -1164,7 +1164,7 @@ namespace IteratorFilters inline bool Active::operator()(const Iterator &i) const { - return (i->active()); + return (i->is_active()); } diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 7c225bdbbb..5820941335 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -3259,7 +3259,7 @@ namespace GridTools // children bound to the present cell typename MeshType::cell_iterator neighbor_child = cell->neighbor(n); - if (!neighbor_child->active()) + if (!neighbor_child->is_active()) { while (neighbor_child->has_children()) neighbor_child = neighbor_child->child(n == 0 ? 1 : 0); @@ -3284,7 +3284,7 @@ namespace GridTools { // the neighbor must be active // himself - Assert(cell->neighbor(n)->active(), ExcInternalError()); + Assert(cell->neighbor(n)->is_active(), ExcInternalError()); active_neighbors.push_back(cell->neighbor(n)); } } diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 65f9afe04e..a9fd164534 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -3299,8 +3299,8 @@ CellAccessor::refine_flag_set() const // but activity may change when refinement is // executed and for some reason the refine // flag is not cleared). - Assert(this->active() || !this->tria->levels[this->present_level] - ->refine_flags[this->present_index], + Assert(this->is_active() || !this->tria->levels[this->present_level] + ->refine_flags[this->present_index], ExcRefineCellNotActive()); return RefinementCase( this->tria->levels[this->present_level]->refine_flags[this->present_index]); @@ -3313,7 +3313,7 @@ inline void CellAccessor::set_refine_flag( const RefinementCase refinement_case) const { - Assert(this->used() && this->active(), ExcRefineCellNotActive()); + Assert(this->used() && this->is_active(), ExcRefineCellNotActive()); Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening()); this->tria->levels[this->present_level]->refine_flags[this->present_index] = @@ -3326,7 +3326,7 @@ template inline void CellAccessor::clear_refine_flag() const { - Assert(this->used() && this->active(), ExcRefineCellNotActive()); + Assert(this->used() && this->is_active(), ExcRefineCellNotActive()); this->tria->levels[this->present_level]->refine_flags[this->present_index] = RefinementCase::no_refinement; } @@ -3523,8 +3523,8 @@ CellAccessor::coarsen_flag_set() const // but activity may change when refinement is // executed and for some reason the refine // flag is not cleared). - Assert(this->active() || !this->tria->levels[this->present_level] - ->coarsen_flags[this->present_index], + Assert(this->is_active() || !this->tria->levels[this->present_level] + ->coarsen_flags[this->present_index], ExcRefineCellNotActive()); return this->tria->levels[this->present_level] ->coarsen_flags[this->present_index]; @@ -3536,7 +3536,7 @@ template inline void CellAccessor::set_coarsen_flag() const { - Assert(this->used() && this->active(), ExcRefineCellNotActive()); + Assert(this->used() && this->is_active(), ExcRefineCellNotActive()); Assert(!refine_flag_set(), ExcCellFlaggedForRefinement()); this->tria->levels[this->present_level]->coarsen_flags[this->present_index] = @@ -3549,7 +3549,7 @@ template inline void CellAccessor::clear_coarsen_flag() const { - Assert(this->used() && this->active(), ExcRefineCellNotActive()); + Assert(this->used() && this->is_active(), ExcRefineCellNotActive()); this->tria->levels[this->present_level]->coarsen_flags[this->present_index] = false; } @@ -3594,7 +3594,7 @@ template inline bool CellAccessor::is_locally_owned() const { - Assert(this->active(), + Assert(this->is_active(), ExcMessage("is_locally_owned() can only be called on active cells!")); #ifndef DEAL_II_WITH_MPI return true; @@ -3636,7 +3636,7 @@ template inline bool CellAccessor::is_ghost() const { - Assert(this->active(), + Assert(this->is_active(), ExcMessage("is_ghost() can only be called on active cells!")); if (this->has_children()) return false; @@ -3664,7 +3664,7 @@ template inline bool CellAccessor::is_artificial() const { - Assert(this->active(), + Assert(this->is_active(), ExcMessage("is_artificial() can only be called on active cells!")); #ifndef DEAL_II_WITH_MPI return false; @@ -3687,7 +3687,7 @@ inline types::subdomain_id CellAccessor::subdomain_id() const { Assert(this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - Assert(this->active(), + Assert(this->is_active(), ExcMessage("subdomain_id() can only be called on active cells!")); return this->tria->levels[this->present_level] ->subdomain_ids[this->present_index]; diff --git a/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h b/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h index bb410b1d5f..7cc5d2c31c 100644 --- a/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h @@ -225,7 +225,7 @@ namespace CUDAWrappers ++line) { const unsigned int line_idx = cell->line(line)->index(); - if (cell->active()) + if (cell->is_active()) line_to_cells[line_idx].push_back(std::make_pair(cell, line)); else line_to_inactive_cells[line_idx].push_back( diff --git a/include/deal.II/matrix_free/face_setup_internal.h b/include/deal.II/matrix_free/face_setup_internal.h index 768f48695a..6147c731f5 100644 --- a/include/deal.II/matrix_free/face_setup_internal.h +++ b/include/deal.II/matrix_free/face_setup_internal.h @@ -182,7 +182,7 @@ namespace internal { typename dealii::Triangulation::cell_iterator dcell( &triangulation, cell_level.first, cell_level.second); - Assert(dcell->active(), ExcInternalError()); + Assert(dcell->is_active(), ExcInternalError()); } # endif @@ -578,7 +578,7 @@ namespace internal typename dealii::Triangulation::cell_iterator dcell( &triangulation, cell_levels[i].first, cell_levels[i].second); if (use_active_cells) - Assert(dcell->active(), ExcNotImplemented()); + Assert(dcell->is_active(), ExcNotImplemented()); for (unsigned int f = 0; f < GeometryInfo::faces_per_cell; ++f) { if (dcell->at_boundary(f) && !dcell->has_periodic_neighbor(f)) diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index 9d8d568229..b31ed2dcb0 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -2049,7 +2049,7 @@ namespace internal fe_val.reinit(cell_it, face); const bool is_local = - (cell_it->active() ? + (cell_it->is_active() ? cell_it->is_locally_owned() : cell_it->is_locally_owned_on_level()) && (!cell_it->at_boundary(face) || diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index b52d71be14..dcfa56aa04 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -697,7 +697,7 @@ namespace internal else if (subdomain_id == numbers::invalid_subdomain_id || cell->subdomain_id() == subdomain_id) { - Assert(cell->active(), ExcInternalError()); + Assert(cell->is_active(), ExcInternalError()); cell_its.emplace_back(cell->level(), cell->index()); } } diff --git a/include/deal.II/meshworker/loop.h b/include/deal.II/meshworker/loop.h index bf07441355..beded44f6c 100644 --- a/include/deal.II/meshworker/loop.h +++ b/include/deal.II/meshworker/loop.h @@ -275,7 +275,7 @@ namespace MeshWorker if (neighbor->is_level_cell()) neighbid = neighbor->level_subdomain_id(); // subdomain id is only valid for active cells - else if (neighbor->active()) + else if (neighbor->is_active()) neighbid = neighbor->subdomain_id(); const bool own_neighbor = diff --git a/include/deal.II/meshworker/mesh_loop.h b/include/deal.II/meshworker/mesh_loop.h index d301f6f665..35119a2884 100644 --- a/include/deal.II/meshworker/mesh_loop.h +++ b/include/deal.II/meshworker/mesh_loop.h @@ -316,7 +316,7 @@ namespace MeshWorker if (neighbor->is_level_cell()) neighbor_subdomain_id = neighbor->level_subdomain_id(); // subdomain id is only valid for active cells - else if (neighbor->active()) + else if (neighbor->is_active()) neighbor_subdomain_id = neighbor->subdomain_id(); const bool own_neighbor = diff --git a/include/deal.II/numerics/cell_data_transfer.templates.h b/include/deal.II/numerics/cell_data_transfer.templates.h index 6ed30befec..f8d5dca075 100644 --- a/include/deal.II/numerics/cell_data_transfer.templates.h +++ b/include/deal.II/numerics/cell_data_transfer.templates.h @@ -105,7 +105,7 @@ CellDataTransfer:: ++child_index) { const auto sibling = parent->child(child_index); - Assert(sibling->active() && sibling->coarsen_flag_set(), + Assert(sibling->is_active() && sibling->coarsen_flag_set(), typename dealii::Triangulation< dim>::ExcInconsistentCoarseningFlags()); @@ -150,7 +150,7 @@ CellDataTransfer::unpack(const VectorType &in, // Transfer data of persisting cells. for (const auto &persisting : persisting_cells_active_index) { - Assert(persisting.first->active(), ExcInternalError()); + Assert(persisting.first->is_active(), ExcInternalError()); out[persisting.first->active_cell_index()] = in[persisting.second]; } @@ -162,7 +162,7 @@ CellDataTransfer::unpack(const VectorType &in, ++child_index) { const auto child = refined.first->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); out[child->active_cell_index()] = in[refined.second]; } @@ -184,7 +184,7 @@ CellDataTransfer::unpack(const VectorType &in, const value_type parent_value = coarsening_strategy(children_values); // Set value for the parent cell. - Assert(coarsened.first->active(), ExcInternalError()); + Assert(coarsened.first->is_active(), ExcInternalError()); out[coarsened.first->active_cell_index()] = parent_value; } diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index cd8821d924..3a97314fa8 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -821,7 +821,7 @@ namespace VectorTools bool is_locally_owned(const cell_iterator &cell) { - if (cell->active()) + if (cell->is_active()) return cell->is_locally_owned(); for (unsigned int c = 0; c < cell->n_children(); ++c) @@ -881,7 +881,7 @@ namespace VectorTools if (cell1->level() != cell2->level()) continue; // .. or none of them is active. - if (!cell1->active() && !cell2->active()) + if (!cell1->is_active() && !cell2->is_active()) continue; Assert( @@ -891,14 +891,14 @@ namespace VectorTools "The two Triangulations are required to have the same parallel partitioning.")); // Skip foreign cells. - if (cell1->active() && !cell1->is_locally_owned()) + if (cell1->is_active() && !cell1->is_locally_owned()) continue; - if (cell2->active() && !cell2->is_locally_owned()) + if (cell2->is_active() && !cell2->is_locally_owned()) continue; // Get and set the corresponding // dof_values by interpolation. - if (cell1->active()) + if (cell1->is_active()) { cache.reinit(cell1->get_fe().dofs_per_cell); cell1->get_interpolated_dof_values(u1, diff --git a/source/distributed/cell_weights.cc b/source/distributed/cell_weights.cc index 2eb34fcaec..9f78643207 100644 --- a/source/distributed/cell_weights.cc +++ b/source/distributed/cell_weights.cc @@ -193,7 +193,7 @@ namespace parallel ++child_index) { const auto child = cell->child(child_index); - Assert(child->active() && child->coarsen_flag_set(), + Assert(child->is_active() && child->coarsen_flag_set(), typename dealii::Triangulation< dim>::ExcInconsistentCoarseningFlags()); diff --git a/source/distributed/fully_distributed_tria.cc b/source/distributed/fully_distributed_tria.cc index 726c4cf8c9..a86f588f1a 100644 --- a/source/distributed/fully_distributed_tria.cc +++ b/source/distributed/fully_distributed_tria.cc @@ -223,7 +223,7 @@ namespace parallel // (level_)subdomain_ids in the next step) for (auto cell = this->begin(); cell != this->end(); ++cell) { - if (cell->active()) + if (cell->is_active()) cell->set_subdomain_id( dealii::numbers::artificial_subdomain_id); @@ -243,7 +243,7 @@ namespace parallel ++cell; // subdomain id - if (cell->active()) + if (cell->is_active()) cell->set_subdomain_id(cell_info->subdomain_id); // level subdomain id diff --git a/source/distributed/fully_distributed_tria_util.cc b/source/distributed/fully_distributed_tria_util.cc index 8671453c29..675cc73ae2 100644 --- a/source/distributed/fully_distributed_tria_util.cc +++ b/source/distributed/fully_distributed_tria_util.cc @@ -199,7 +199,7 @@ namespace parallel std::vector vertices_owned_by_locally_owned_cells( tria.n_vertices()); for (auto cell : tria.cell_iterators()) - if (cell->active() && cell->subdomain_id() == my_rank) + if (cell->is_active() && cell->subdomain_id() == my_rank) add_vertices_of_cell_to_vertices_owned_by_locally_owned_cells( cell, vertices_owned_by_locally_owned_cells); @@ -224,7 +224,7 @@ namespace parallel construction_data.cell_infos.resize(1); for (auto cell : tria.cell_iterators()) - if (cell->active() && is_locally_relevant(cell)) + if (cell->is_active() && is_locally_relevant(cell)) { // to be filled CellData cell_info; @@ -343,7 +343,7 @@ namespace parallel tria.n_vertices()); for (auto cell : tria.cell_iterators_on_level(level)) if (cell->level_subdomain_id() == my_rank || - (cell->active() && cell->subdomain_id() == my_rank)) + (cell->is_active() && cell->subdomain_id() == my_rank)) add_vertices_of_cell_to_vertices_owned_by_locally_owned_cells( cell, vertices_owned_by_locally_owned_cells_on_level); @@ -439,7 +439,7 @@ namespace parallel // on active level auto is_locally_relevant_on_active_level = [&](TriaIterator> &cell) { - if (cell->active()) + if (cell->is_active()) for (unsigned int v = 0; v < GeometryInfo::vertices_per_cell; ++v) @@ -459,7 +459,7 @@ namespace parallel tria.n_vertices()); for (auto cell : tria.cell_iterators_on_level(level)) if (cell->level_subdomain_id() == my_rank || - (cell->active() && cell->subdomain_id() == my_rank)) + (cell->is_active() && cell->subdomain_id() == my_rank)) add_vertices_of_cell_to_vertices_owned_by_locally_owned_cells( cell, vertices_owned_by_locally_owned_cells_on_level); diff --git a/source/distributed/solution_transfer.cc b/source/distributed/solution_transfer.cc index fb45681fb8..5268ec5a7c 100644 --- a/source/distributed/solution_transfer.cc +++ b/source/distributed/solution_transfer.cc @@ -337,7 +337,7 @@ namespace parallel ++child_index) { const auto child = cell->child(child_index); - Assert(child->active() && child->coarsen_flag_set(), + Assert(child->is_active() && child->coarsen_flag_set(), typename dealii::Triangulation< dim>::ExcInconsistentCoarseningFlags()); diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 6e357df483..f7d4fb5d4d 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -371,7 +371,7 @@ namespace // *---*---* // | | M | // *---*---* - if (!used && dealii_cell->active() && + if (!used && dealii_cell->is_active() && dealii_cell->is_artificial() == false && dealii_cell->level() + 1 < static_cast(marked_vertices.size())) { @@ -388,7 +388,7 @@ namespace } // Like above, but now the other way around - if (!used && dealii_cell->active() && + if (!used && dealii_cell->is_active() && dealii_cell->is_artificial() == false && dealii_cell->level() > 0) { for (unsigned int v = 0; v < GeometryInfo::vertices_per_cell; @@ -1209,7 +1209,7 @@ namespace parallel CELL_REFINE: // double check the condition that we will only ever attach // data to active cells when we get here - Assert(dealii_cell->active(), ExcInternalError()); + Assert(dealii_cell->is_active(), ExcInternalError()); break; case parallel::distributed::Triangulation:: @@ -1218,11 +1218,12 @@ namespace parallel // data to cells with children when we get here. however, we // can only tolerate one level of coarsening at a time, so // check that the children are all active - Assert(dealii_cell->active() == false, ExcInternalError()); + Assert(dealii_cell->is_active() == false, ExcInternalError()); for (unsigned int c = 0; c < GeometryInfo::max_children_per_cell; ++c) - Assert(dealii_cell->child(c)->active(), ExcInternalError()); + Assert(dealii_cell->child(c)->is_active(), + ExcInternalError()); break; case parallel::distributed::Triangulation:: @@ -3385,13 +3386,13 @@ namespace parallel ++cell) { // nothing to do if we are already on the finest level - if (cell->active()) + if (cell->is_active()) continue; const unsigned int n_children = cell->n_children(); unsigned int flagged_children = 0; for (unsigned int child = 0; child < n_children; ++child) - if (cell->child(child)->active() && + if (cell->child(child)->is_active() && cell->child(child)->coarsen_flag_set()) ++flagged_children; @@ -3399,7 +3400,7 @@ namespace parallel // coarsen flags if (flagged_children < n_children) for (unsigned int child = 0; child < n_children; ++child) - if (cell->child(child)->active()) + if (cell->child(child)->is_active()) cell->child(child)->clear_coarsen_flag(); } } @@ -4029,7 +4030,7 @@ namespace parallel cell = this->begin(maybe_coarser_lvl), endc = this->end(lvl); for (; cell != endc; ++cell) - if (cell->level() == static_cast(lvl) || cell->active()) + if (cell->level() == static_cast(lvl) || cell->is_active()) { const bool is_level_artificial = (cell->level_subdomain_id() == diff --git a/source/dofs/dof_tools_sparsity.cc b/source/dofs/dof_tools_sparsity.cc index 8b3cdd7eb6..9ff7acd304 100644 --- a/source/dofs/dof_tools_sparsity.cc +++ b/source/dofs/dof_tools_sparsity.cc @@ -445,7 +445,7 @@ namespace DoFTools typename DoFHandlerType::level_cell_iterator cell = dof.begin(0); while (!cell->at_boundary(direction)) cell = cell->neighbor(direction); - while (!cell->active()) + while (!cell->is_active()) cell = cell->child(direction); const unsigned int dofs_per_vertex = cell->get_fe().dofs_per_vertex; @@ -665,7 +665,7 @@ namespace DoFTools // face twice and hence put the indices the other way // around if (!cell->neighbor_or_periodic_neighbor(face) - ->active() || + ->is_active() || (neighbor->subdomain_id() != cell->subdomain_id())) { constraints.add_entries_local_to_global( @@ -854,7 +854,7 @@ namespace DoFTools // the total ordering. if (neighbor->level() == cell->level() && neighbor->index() > cell->index() && - neighbor->active() && neighbor->is_locally_owned()) + neighbor->is_active() && neighbor->is_locally_owned()) continue; // If we are more refined then the neighbor, then we // will automatically find the active neighbor cell when @@ -1152,7 +1152,7 @@ namespace DoFTools // is 'greater' in the total ordering. if (neighbor->level() == cell->level() && neighbor->index() > cell->index() && - neighbor->active() && neighbor->is_locally_owned()) + neighbor->is_active() && neighbor->is_locally_owned()) continue; // Again, like the non-hp case: If we are more refined // then the neighbor, then we will automatically find diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 993894c380..d88b1a6367 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -367,7 +367,7 @@ MappingFEField::get_vertices( const typename DoFHandler::cell_iterator dof_cell( *cell, euler_dof_handler); - Assert(uses_level_dofs || dof_cell->active() == true, ExcInactiveCell()); + Assert(uses_level_dofs || dof_cell->is_active() == true, ExcInactiveCell()); AssertDimension(GeometryInfo::vertices_per_cell, fe_values.n_quadrature_points); AssertDimension(fe_to_real.size(), @@ -2429,7 +2429,7 @@ MappingFEField::update_internal_dofs( ExcMessage("euler_dof_handler is empty")); typename DoFHandlerType::cell_iterator dof_cell(*cell, euler_dof_handler); - Assert(uses_level_dofs || dof_cell->active() == true, ExcInactiveCell()); + Assert(uses_level_dofs || dof_cell->is_active() == true, ExcInactiveCell()); if (uses_level_dofs) { AssertIndexRange(cell->level(), euler_vector.size()); diff --git a/source/fe/mapping_q1_eulerian.cc b/source/fe/mapping_q1_eulerian.cc index 5cbb291960..7d7d381c20 100644 --- a/source/fe/mapping_q1_eulerian.cc +++ b/source/fe/mapping_q1_eulerian.cc @@ -74,7 +74,7 @@ MappingQ1Eulerian::get_vertices( // We require the cell to be active since we can only then get nodal // values for the shifts - Assert(dof_cell->active() == true, ExcInactiveCell()); + Assert(dof_cell->is_active() == true, ExcInactiveCell()); // now get the values of the shift vectors at the vertices Vector mapping_values( diff --git a/source/fe/mapping_q_eulerian.cc b/source/fe/mapping_q_eulerian.cc index e4bd088f83..c22770c625 100644 --- a/source/fe/mapping_q_eulerian.cc +++ b/source/fe/mapping_q_eulerian.cc @@ -193,7 +193,7 @@ MappingQEulerian::MappingQEulerianGeneric:: typename DoFHandler::cell_iterator dof_cell( *cell, mapping_q_eulerian.euler_dof_handler); - Assert(mg_vector || dof_cell->active() == true, ExcInactiveCell()); + Assert(mg_vector || dof_cell->is_active() == true, ExcInactiveCell()); // our quadrature rule is chosen so that each quadrature point corresponds // to a support point in the undeformed configuration. We can then query diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 51704290a3..e526770e4e 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -1386,7 +1386,7 @@ GridOut::write_xfig(const Triangulation<2> &tria, for (const auto &cell : tria.cell_iterators()) { // If depth is not encoded, write finest level only - if (!xfig_flags.level_depth && !cell->active()) + if (!xfig_flags.level_depth && !cell->is_active()) continue; // Code for polygon out << "2 3 " << xfig_flags.line_style << ' ' @@ -1633,7 +1633,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const materials.insert(cell->material_id()); levels.insert(cell->level()); - if (cell->active()) + if (cell->is_active()) subdomains.insert(cell->subdomain_id() + 2); level_subdomains.insert(cell->level_subdomain_id() + 2); } @@ -2106,7 +2106,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const { for (const auto &cell : tria.cell_iterators_on_level(level_index)) { - if (!svg_flags.convert_level_number_to_height && !cell->active()) + if (!svg_flags.convert_level_number_to_height && !cell->is_active()) continue; // draw the current cell @@ -2116,7 +2116,8 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const { out << " class=\"p"; - if (!cell->active() && svg_flags.convert_level_number_to_height) + if (!cell->is_active() && + svg_flags.convert_level_number_to_height) out << 's'; switch (svg_flags.coloring) @@ -2128,7 +2129,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const out << static_cast(cell->level()); break; case GridOutFlags::Svg::subdomain_id: - if (cell->active()) + if (cell->is_active()) out << cell->subdomain_id() + 2; else out << 'X'; @@ -2353,7 +2354,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const if (svg_flags.label_level_number || svg_flags.label_cell_index || svg_flags.label_material_id) out << ','; - if (cell->active()) + if (cell->is_active()) out << static_cast< std::make_signed::type>( cell->subdomain_id()); diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 1378bcaea0..30626d0aa2 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -1724,7 +1724,7 @@ namespace GridTools GeometryInfo::vertex_to_face[v][vface]; if (!cell->at_boundary(face) && - cell->neighbor(face)->active()) + cell->neighbor(face)->is_active()) { // there is a (possibly) coarser cell behind a // face to which the vertex belongs. the @@ -2048,7 +2048,7 @@ namespace GridTools bool has_predicate = false; // Start assuming there's no cells with predicate inside std::vector active_cells; - if (parent_cell->active()) + if (parent_cell->is_active()) active_cells = {parent_cell}; else // Finding all active cells descendants of the current one (or the @@ -2359,7 +2359,7 @@ namespace GridTools for (unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) { if ((cell->at_boundary(i) == false) && - (cell->neighbor(i)->active())) + (cell->neighbor(i)->is_active())) { typename Triangulation::active_cell_iterator adjacent_cell = cell->neighbor(i); @@ -2507,7 +2507,7 @@ namespace GridTools { if (cell->at_boundary(i) == false) { - if (cell->neighbor(i)->active()) + if (cell->neighbor(i)->is_active()) { typename Triangulation::active_cell_iterator @@ -3068,7 +3068,7 @@ namespace GridTools const unsigned int n_active_cells, const unsigned int n_partitions) { - if (cell->active()) + if (cell->is_active()) { while (current_cell_idx >= std::floor(static_cast(n_active_cells) * @@ -3163,12 +3163,12 @@ namespace GridTools endc = triangulation.end(); for (; cell != endc; ++cell) { - if (cell->active()) + if (cell->is_active()) continue; bool all_children_active = true; std::map map_cpu_n_cells; for (unsigned int n = 0; n < cell->n_children(); ++n) - if (!cell->child(n)->active()) + if (!cell->child(n)->is_active()) { all_children_active = false; break; @@ -3855,7 +3855,7 @@ namespace GridTools const typename Triangulation::cell_iterator cell = *cell_ptr; - Assert(!cell->active(), + Assert(!cell->is_active(), ExcMessage( "This function is only valid for a list of cells that " "have children (i.e., no cell in the list may be active).")); diff --git a/source/grid/grid_tools_dof_handlers.cc b/source/grid/grid_tools_dof_handlers.cc index c56a0bf095..1b6334018a 100644 --- a/source/grid/grid_tools_dof_handlers.cc +++ b/source/grid/grid_tools_dof_handlers.cc @@ -272,7 +272,7 @@ namespace GridTools GeometryInfo::vertex_to_face[v][vface]; if (!cell->at_boundary(face) && - cell->neighbor(face)->active()) + cell->neighbor(face)->is_active()) { // there is a (possibly) coarser cell behind a // face to which the vertex belongs. the @@ -1190,9 +1190,9 @@ namespace GridTools { // at least one cell is active if (remove_ghost_cells && - ((cell_pair->first->active() && + ((cell_pair->first->is_active() && !cell_pair->first->is_locally_owned()) || - (cell_pair->second->active() && + (cell_pair->second->is_active() && !cell_pair->second->is_locally_owned()))) { // we only exclude ghost cells for distributed Triangulations @@ -1209,7 +1209,7 @@ namespace GridTools // least one active iterator or have different refinement_cases for (cell_pair = cell_list.begin(); cell_pair != cell_list.end(); ++cell_pair) - Assert(cell_pair->first->active() || cell_pair->second->active() || + Assert(cell_pair->first->is_active() || cell_pair->second->is_active() || (cell_pair->first->refinement_case() != cell_pair->second->refinement_case()), ExcInternalError()); diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 166782322f..5bc2cb858e 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -173,11 +173,11 @@ namespace cell_is_patch_level_1( const TriaIterator> &cell) { - Assert(cell->active() == false, ExcInternalError()); + Assert(cell->is_active() == false, ExcInternalError()); unsigned int n_active_children = 0; for (unsigned int i = 0; i < cell->n_children(); ++i) - if (cell->child(i)->active()) + if (cell->child(i)->is_active()) ++n_active_children; return (n_active_children == 0) || @@ -205,13 +205,13 @@ namespace const unsigned int n_children = cell->n_children(); for (unsigned int c = 0; c < n_children; ++c) - if (cell->child(c)->active() && cell->child(c)->coarsen_flag_set()) + if (cell->child(c)->is_active() && cell->child(c)->coarsen_flag_set()) ++children_to_coarsen; if (children_to_coarsen == n_children) return true; else for (unsigned int c = 0; c < n_children; ++c) - if (cell->child(c)->active()) + if (cell->child(c)->is_active()) cell->child(c)->clear_coarsen_flag(); } // no children, so no coarsening @@ -874,7 +874,7 @@ namespace // the same. if (dim == 2) { - if (cell->active() && face->has_children()) + if (cell->is_active() && face->has_children()) { adjacent_cells[2 * face->child(0)->index() + offset] = cell; adjacent_cells[2 * face->child(1)->index() + offset] = cell; @@ -903,7 +903,7 @@ namespace // visit cells on finer levels, so no // harm will be done. if (face->has_children() && - (cell->active() || + (cell->is_active() || GeometryInfo::face_refinement_case( cell->refinement_case(), f) == RefinementCase::isotropic_refinement)) @@ -4866,7 +4866,7 @@ namespace internal first_child->set_neighbor(1, second_child); if (cell->neighbor(0).state() != IteratorState::valid) first_child->set_neighbor(0, cell->neighbor(0)); - else if (cell->neighbor(0)->active()) + else if (cell->neighbor(0)->is_active()) { // since the neighbors level is always <=level, // if the cell is active, then there are no @@ -4908,7 +4908,7 @@ namespace internal if (cell->neighbor(1).state() != IteratorState::valid) second_child->set_neighbor(1, cell->neighbor(1)); - else if (cell->neighbor(1)->active()) + else if (cell->neighbor(1)->is_active()) { Assert(cell->neighbor(1)->level() <= cell->level(), ExcInternalError()); @@ -11990,10 +11990,10 @@ Triangulation::last_active() const if (cell != end()) { // then move to the last active one - if (cell->active() == true) + if (cell->is_active() == true) return cell; while ((--cell).state() == IteratorState::valid) - if (cell->active() == true) + if (cell->is_active() == true) return cell; } return cell; @@ -13506,7 +13506,7 @@ Triangulation::execute_coarsening() cell_iterator cell = begin(), endc = end(); for (; cell != endc; ++cell) - if (!cell->active()) + if (!cell->is_active()) if (cell->child(0)->coarsen_flag_set()) { cell->set_user_flag(); @@ -13693,13 +13693,13 @@ Triangulation::fix_coarsen_flags() for (; cell != endc; ++cell) { // nothing to do if we are already on the finest level - if (cell->active()) + if (cell->is_active()) continue; const unsigned int n_children = cell->n_children(); unsigned int flagged_children = 0; for (unsigned int child = 0; child < n_children; ++child) - if (cell->child(child)->active() && + if (cell->child(child)->is_active() && cell->child(child)->coarsen_flag_set()) { ++flagged_children; @@ -13867,7 +13867,8 @@ namespace for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (!cell->at_boundary(face) && (!cell->neighbor(face)->active()) && + if (!cell->at_boundary(face) && + (!cell->neighbor(face)->is_active()) && (cell_will_be_coarsened(cell->neighbor(face)))) possibly_do_not_produce_unrefined_islands( cell->neighbor(face)); @@ -14141,7 +14142,7 @@ Triangulation::prepare_coarsening_and_refinement() { // only do something if this // cell will be coarsened - if (!cell->active() && cell_will_be_coarsened(cell)) + if (!cell->is_active() && cell_will_be_coarsened(cell)) possibly_do_not_produce_unrefined_islands(cell); } } @@ -14171,8 +14172,9 @@ Triangulation::prepare_coarsening_and_refinement() !(smooth_grid & patch_level_1)) { for (const auto &cell : cell_iterators()) - if (!cell->active() || (cell->active() && cell->refine_flag_set() && - cell->is_locally_owned())) + if (!cell->is_active() || + (cell->is_active() && cell->refine_flag_set() && + cell->is_locally_owned())) { // check whether all children are active, i.e. not // refined themselves. This is a precondition that the @@ -14180,9 +14182,9 @@ Triangulation::prepare_coarsening_and_refinement() // flagged for refinement, then all future children // will be active bool all_children_active = true; - if (!cell->active()) + if (!cell->is_active()) for (unsigned int c = 0; c < cell->n_children(); ++c) - if (!cell->child(c)->active() || + if (!cell->child(c)->is_active() || cell->child(c)->is_ghost() || cell->child(c)->is_artificial()) { @@ -14234,7 +14236,7 @@ Triangulation::prepare_coarsening_and_refinement() eliminate_refined_boundary_islands))) && (total_neighbors != 0)) { - if (!cell->active()) + if (!cell->is_active()) for (unsigned int c = 0; c < cell->n_children(); ++c) { cell->child(c)->clear_refine_flag(); @@ -14401,7 +14403,7 @@ Triangulation::prepare_coarsening_and_refinement() // children is set then set_refine_flag and // clear_coarsen_flag of all children. for (const auto &cell : cell_iterators()) - if (!cell->active()) + if (!cell->is_active()) { // ensure the invariant. we can then check whether all // of its children are further refined or not by @@ -14442,7 +14444,7 @@ Triangulation::prepare_coarsening_and_refinement() // that we know that it is patch_level_1, i.e. if one of // its children is active then so are all, and it isn't // going to have any grandchildren at all: - if (cell->active() || cell->child(0)->active()) + if (cell->is_active() || cell->child(0)->is_active()) continue; // cell is not active, and so are none of its @@ -14453,7 +14455,7 @@ Triangulation::prepare_coarsening_and_refinement() bool has_active_grandchildren = false; for (unsigned int i = 0; i < n_children; ++i) - if (cell->child(i)->child(0)->active()) + if (cell->child(i)->child(0)->is_active()) { has_active_grandchildren = true; break; @@ -14486,7 +14488,7 @@ Triangulation::prepare_coarsening_and_refinement() // if child is found to be a patch of active cells // itself, then add up how many of its children are // supposed to be coarsened - if (child->child(0)->active()) + if (child->child(0)->is_active()) for (unsigned int cc = 0; cc < nn_children; ++cc) if (child->child(cc)->coarsen_flag_set()) ++n_coarsen_flags; @@ -14507,7 +14509,7 @@ Triangulation::prepare_coarsening_and_refinement() for (unsigned int c = 0; c < n_children; ++c) { const cell_iterator child = cell->child(c); - if (child->child(0)->active()) + if (child->child(0)->is_active()) for (unsigned int cc = 0; cc < child->n_children(); ++cc) child->child(cc)->clear_coarsen_flag(); } @@ -14572,7 +14574,7 @@ Triangulation::prepare_coarsening_and_refinement() // coarsen flag of our neighbor, // fix_coarsen_flags() makes sure, that the // mother cell will not be coarsened - if (cell->neighbor_or_periodic_neighbor(i)->active()) + if (cell->neighbor_or_periodic_neighbor(i)->is_active()) { if ((!has_periodic_neighbor && cell->neighbor_is_coarser(i)) || diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index a9f117e936..53a56fc02e 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -1973,7 +1973,7 @@ CellAccessor::set_subdomain_id( const types::subdomain_id new_subdomain_id) const { Assert(this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - Assert(this->active(), + Assert(this->is_active(), ExcMessage("set_subdomain_id() can only be called on active cells!")); this->tria->levels[this->present_level]->subdomain_ids[this->present_index] = new_subdomain_id; diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 357e2b27b6..ac3512c104 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1139,7 +1139,7 @@ namespace internal ++child_index) { const auto sibling = parent->child(child_index); - Assert(sibling->active() && + Assert(sibling->is_active() && sibling->coarsen_flag_set(), typename dealii::Triangulation< dim>::ExcInconsistentCoarseningFlags()); @@ -1194,7 +1194,7 @@ namespace internal if (cell->is_locally_owned()) { - Assert(cell->active(), ExcInternalError()); + Assert(cell->is_active(), ExcInternalError()); cell->set_active_fe_index(persist.second); } } @@ -1210,7 +1210,7 @@ namespace internal ++child_index) { const auto &child = parent->child(child_index); - Assert(child->is_locally_owned() && child->active(), + Assert(child->is_locally_owned() && child->is_active(), ExcInternalError()); child->set_active_fe_index(refine.second); } @@ -1221,7 +1221,7 @@ namespace internal for (const auto &coarsen : fe_transfer->coarsened_cells_fe_index) { const auto &cell = coarsen.first; - Assert(cell->is_locally_owned() && cell->active(), + Assert(cell->is_locally_owned() && cell->is_active(), ExcInternalError()); cell->set_active_fe_index(coarsen.second); } diff --git a/source/hp/refinement.cc b/source/hp/refinement.cc index 5d0e02413d..43b3ec6613 100644 --- a/source/hp/refinement.cc +++ b/source/hp/refinement.cc @@ -602,7 +602,7 @@ namespace hp ++child_index) { const auto &child = parent->child(child_index); - if (child->active()) + if (child->is_active()) { if (child->coarsen_flag_set()) ++h_flagged_children; @@ -623,7 +623,7 @@ namespace hp // drop all h coarsening flags. for (unsigned int child_index = 0; child_index < n_children; ++child_index) - if (parent->child(child_index)->active()) + if (parent->child(child_index)->is_active()) parent->child(child_index)->clear_coarsen_flag(); } } diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index eac86627f2..d7870da589 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -918,7 +918,7 @@ DataOut::build_patches( { // move forward until active_cell points at the cell (cell) we are // looking at to compute the current active_index - while (active_cell != this->triangulation->end() && cell->active() && + while (active_cell != this->triangulation->end() && cell->is_active() && decltype(active_cell)(cell) != active_cell) { ++active_cell; diff --git a/source/numerics/data_out_faces.cc b/source/numerics/data_out_faces.cc index 473b7af5d3..376f30926e 100644 --- a/source/numerics/data_out_faces.cc +++ b/source/numerics/data_out_faces.cc @@ -295,7 +295,7 @@ DataOutFaces::build_one_patch( // belongs in order to access the cell data. this is not readily // available, so choose the following rather inefficient way: Assert( - cell_and_face->first->active(), + cell_and_face->first->is_active(), ExcMessage( "The current function is trying to generate cell-data output " "for a face that does not belong to an active cell. This is " diff --git a/source/numerics/data_out_rotation.cc b/source/numerics/data_out_rotation.cc index c366af2289..6db2d3448c 100644 --- a/source/numerics/data_out_rotation.cc +++ b/source/numerics/data_out_rotation.cc @@ -413,7 +413,7 @@ DataOutRotation::build_one_patch( // we need to get at the number of the cell to which this face // belongs in order to access the cell data. this is not readily // available, so choose the following rather inefficient way: - Assert((*cell)->active(), + Assert((*cell)->is_active(), ExcMessage("Cell must be active for cell data")); const unsigned int cell_number = std::distance( this->triangulation->begin_active(), diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 403a4b1b01..5e453f04cb 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -308,7 +308,7 @@ SolutionTransfer:: for (typename DoFHandlerType::cell_iterator cell = dof_handler->begin(); cell != dof_handler->end(); ++cell) - if (!cell->active() && cell->child(0)->coarsen_flag_set()) + if (!cell->is_active() && cell->child(0)->coarsen_flag_set()) ++n_coarsen_fathers; Assert(n_cells_to_coarsen >= 2 * n_coarsen_fathers, ExcInternalError()); @@ -339,7 +339,7 @@ SolutionTransfer:: ++cell) { // CASE 1: active cell that remains as it is - if (cell->active() && !cell->coarsen_flag_set()) + if (cell->is_active() && !cell->coarsen_flag_set()) { const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell; indices_on_cell[n_sr].resize(dofs_per_cell); @@ -367,7 +367,7 @@ SolutionTransfer:: ++child_index) { const auto child = cell->child(child_index); - Assert(child->active() && child->coarsen_flag_set(), + Assert(child->is_active() && child->coarsen_flag_set(), typename dealii::Triangulation< dim>::ExcInconsistentCoarseningFlags()); diff --git a/source/numerics/time_dependent.cc b/source/numerics/time_dependent.cc index 99ff0ae1c0..d58f5e8e72 100644 --- a/source/numerics/time_dependent.cc +++ b/source/numerics/time_dependent.cc @@ -581,9 +581,9 @@ namespace // no problem at all, if it is on a lower // level than the present one, then it // will be refined below anyway. - if (new_cell->active()) + if (new_cell->is_active()) { - if (new_cell->refine_flag_set() && old_cell->active()) + if (new_cell->refine_flag_set() && old_cell->is_active()) { if (old_cell->coarsen_flag_set()) old_cell->clear_coarsen_flag(); diff --git a/tests/aniso/up_and_down.cc b/tests/aniso/up_and_down.cc index 0e9143e11a..d6e65be3c7 100644 --- a/tests/aniso/up_and_down.cc +++ b/tests/aniso/up_and_down.cc @@ -90,7 +90,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end(); ++cell) - if (cell->has_children() && cell->child(0)->active()) + if (cell->has_children() && cell->child(0)->is_active()) { // first make sure that what // we do is reasonable. for @@ -98,7 +98,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) // to be active, not only // some of them for (unsigned int c = 0; c < cell->n_children(); ++c) - AssertThrow(cell->child(c)->active(), ExcInternalError()); + AssertThrow(cell->child(c)->is_active(), ExcInternalError()); // then restrict and prolongate cell->get_interpolated_dof_values(tmp, v); @@ -114,7 +114,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end(); ++cell) - if (cell->has_children() && cell->child(0)->active()) + if (cell->has_children() && cell->child(0)->is_active()) { cell->get_interpolated_dof_values(x, v); cell->set_dof_values_by_interpolation(v, x2); diff --git a/tests/fail/rt_6.cc b/tests/fail/rt_6.cc index eca863ffbd..5c53397700 100644 --- a/tests/fail/rt_6.cc +++ b/tests/fail/rt_6.cc @@ -83,7 +83,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end(); ++cell) - if (cell->has_children() && cell->child(0)->active()) + if (cell->has_children() && cell->child(0)->is_active()) { // first make sure that what // we do is reasonable. for @@ -92,7 +92,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) // some of them for (unsigned int c = 0; c < GeometryInfo::max_children_per_cell; ++c) - Assert(cell->child(c)->active(), ExcInternalError()); + Assert(cell->child(c)->is_active(), ExcInternalError()); // then restrict and prolongate cell->get_interpolated_dof_values(tmp, v); @@ -108,7 +108,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end(); ++cell) - if (cell->has_children() && cell->child(0)->active()) + if (cell->has_children() && cell->child(0)->is_active()) { cell->get_interpolated_dof_values(x, v); cell->set_dof_values_by_interpolation(v, x2); diff --git a/tests/fe/up_and_down.cc b/tests/fe/up_and_down.cc index 63c84571e5..d355603e9a 100644 --- a/tests/fe/up_and_down.cc +++ b/tests/fe/up_and_down.cc @@ -84,7 +84,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end(); ++cell) - if (cell->has_children() && cell->child(0)->active()) + if (cell->has_children() && cell->child(0)->is_active()) { // first make sure that what // we do is reasonable. for @@ -93,7 +93,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) // some of them for (unsigned int c = 0; c < GeometryInfo::max_children_per_cell; ++c) - AssertThrow(cell->child(c)->active(), ExcInternalError()); + AssertThrow(cell->child(c)->is_active(), ExcInternalError()); // then restrict and prolongate cell->get_interpolated_dof_values(tmp, v); @@ -109,7 +109,7 @@ check_element(const Triangulation &tr, const FiniteElement &fe) for (typename DoFHandler::cell_iterator cell = dof_handler.begin(); cell != dof_handler.end(); ++cell) - if (cell->has_children() && cell->child(0)->active()) + if (cell->has_children() && cell->child(0)->is_active()) { cell->get_interpolated_dof_values(x, v); cell->set_dof_values_by_interpolation(v, x2); diff --git a/tests/grid/intergrid_constraints.cc b/tests/grid/intergrid_constraints.cc index 06878ea106..652c457312 100644 --- a/tests/grid/intergrid_constraints.cc +++ b/tests/grid/intergrid_constraints.cc @@ -158,7 +158,7 @@ check() cell = dof_1.begin(); endc = dof_1.end(); for (unsigned int index = 0; cell != endc; ++cell) - if (cell->active()) + if (cell->is_active()) { ++index; if (index % (2 * dim) == 0) @@ -187,7 +187,7 @@ check() cell = dof_2.begin(); endc = dof_2.end(); for (unsigned int index = 0; cell != endc; ++cell) - if (cell->active()) + if (cell->is_active()) { ++index; if (index % (2 * dim) == 1) diff --git a/tests/grid/intergrid_map.cc b/tests/grid/intergrid_map.cc index 34895af8d0..ce2d7c7cf1 100644 --- a/tests/grid/intergrid_map.cc +++ b/tests/grid/intergrid_map.cc @@ -87,7 +87,7 @@ check() // produces quite random grids cell = dof_1.begin(); for (unsigned int index = 0; cell != endc; ++cell) - if (cell->active()) + if (cell->is_active()) { ++index; if (index % 3 == 0) @@ -97,7 +97,7 @@ check() cell = dof_2.begin(); endc = dof_2.end(); for (unsigned int index = 0; cell != endc; ++cell) - if (cell->active()) + if (cell->is_active()) { ++index; if (index % 3 == 1) diff --git a/tests/grid/mesh_smoothing_02.cc b/tests/grid/mesh_smoothing_02.cc index 4059db508d..53c7f7d448 100644 --- a/tests/grid/mesh_smoothing_02.cc +++ b/tests/grid/mesh_smoothing_02.cc @@ -58,11 +58,11 @@ template bool cell_is_patch_level_1(const typename Triangulation::cell_iterator &cell) { - Assert(cell->active() == false, ExcInternalError()); + Assert(cell->is_active() == false, ExcInternalError()); unsigned int n_active_children = 0; for (unsigned int i = 0; i < cell->n_children(); ++i) - if (cell->child(i)->active()) + if (cell->child(i)->is_active()) ++n_active_children; return (n_active_children == 0) || (n_active_children == cell->n_children()); @@ -90,8 +90,8 @@ test() ++cell) { deallog << "Cell = " << cell - << (cell->active() ? " is active " : " is not active "); - if (!cell->active()) + << (cell->is_active() ? " is active " : " is not active "); + if (!cell->is_active()) { deallog << "and has children: "; for (unsigned int i = 0; i < 4; ++i) @@ -118,7 +118,7 @@ test() AssertThrow((cell->refine_flag_set() == false) && (cell->coarsen_flag_set() == false), ExcInternalError()); - if (!cell->active()) + if (!cell->is_active()) AssertThrow(cell_is_patch_level_1<2>(cell), ExcInternalError()); } diff --git a/tests/hp/p_adaptivity_absolute_threshold.cc b/tests/hp/p_adaptivity_absolute_threshold.cc index e6bdac9bab..60d2f855c7 100644 --- a/tests/hp/p_adaptivity_absolute_threshold.cc +++ b/tests/hp/p_adaptivity_absolute_threshold.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/hp/p_adaptivity_fixed_number.cc b/tests/hp/p_adaptivity_fixed_number.cc index 324fbed0f8..30a493e7df 100644 --- a/tests/hp/p_adaptivity_fixed_number.cc +++ b/tests/hp/p_adaptivity_fixed_number.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/hp/p_adaptivity_flags.cc b/tests/hp/p_adaptivity_flags.cc index 8e14db60e6..36683b9f73 100644 --- a/tests/hp/p_adaptivity_flags.cc +++ b/tests/hp/p_adaptivity_flags.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/hp/p_adaptivity_full.cc b/tests/hp/p_adaptivity_full.cc index a9c65d5a45..0419389b5d 100644 --- a/tests/hp/p_adaptivity_full.cc +++ b/tests/hp/p_adaptivity_full.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/hp/p_adaptivity_reference.cc b/tests/hp/p_adaptivity_reference.cc index ecb0f89080..3e2d08f6c5 100644 --- a/tests/hp/p_adaptivity_reference.cc +++ b/tests/hp/p_adaptivity_reference.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/hp/p_adaptivity_regularity.cc b/tests/hp/p_adaptivity_regularity.cc index 9a75e20fb6..f0ef94f610 100644 --- a/tests/hp/p_adaptivity_regularity.cc +++ b/tests/hp/p_adaptivity_regularity.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/hp/p_adaptivity_relative_threshold.cc b/tests/hp/p_adaptivity_relative_threshold.cc index 63897637fa..06891b6bd0 100644 --- a/tests/hp/p_adaptivity_relative_threshold.cc +++ b/tests/hp/p_adaptivity_relative_threshold.cc @@ -65,12 +65,12 @@ setup(Triangulation & tria, endc = dh.end(1); for (unsigned int counter = 0; cell != endc; ++counter, ++cell) { - Assert(!cell->active(), ExcInternalError()); + Assert(!cell->is_active(), ExcInternalError()); for (unsigned int child_index = 0; child_index < cell->n_children(); ++child_index) { const auto &child = cell->child(child_index); - Assert(child->active(), ExcInternalError()); + Assert(child->is_active(), ExcInternalError()); child->set_active_fe_index(1); diff --git a/tests/mpi/distribute_flux_sparsity_pattern.cc b/tests/mpi/distribute_flux_sparsity_pattern.cc index bee6f5d62f..7cc23d4f1a 100644 --- a/tests/mpi/distribute_flux_sparsity_pattern.cc +++ b/tests/mpi/distribute_flux_sparsity_pattern.cc @@ -268,7 +268,7 @@ namespace LinearAdvectionTest } // If the neighbor is not active, then it is at a higher // refinement level (so we do not need to integrate now) - if (neighbor_cell->active()) + if (neighbor_cell->is_active()) { if (neighbor_cell->is_locally_owned()) { diff --git a/tests/mpi/p4est_2d_constraintmatrix_04.cc b/tests/mpi/p4est_2d_constraintmatrix_04.cc index e708e5cf66..869dbc6d44 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_04.cc +++ b/tests/mpi/p4est_2d_constraintmatrix_04.cc @@ -216,7 +216,7 @@ test() if (coarsen_me) for (unsigned int i = 0; i < cell->n_children(); ++i) { - if (cell->child(i)->active() && + if (cell->child(i)->is_active() && cell->child(i)->is_locally_owned()) { cell->child(i)->clear_refine_flag(); diff --git a/tests/mpi/p4est_3d_constraintmatrix_03.cc b/tests/mpi/p4est_3d_constraintmatrix_03.cc index 0e206e2f03..4a8d99d516 100644 --- a/tests/mpi/p4est_3d_constraintmatrix_03.cc +++ b/tests/mpi/p4est_3d_constraintmatrix_03.cc @@ -217,7 +217,7 @@ test() if (coarsen_me) for (unsigned int i = 0; i < cell->n_children(); ++i) { - if (cell->child(i)->active() && + if (cell->child(i)->is_active() && cell->child(i)->is_locally_owned()) { cell->child(i)->clear_refine_flag(); diff --git a/tests/mpi/step-40_cuthill_mckee.cc b/tests/mpi/step-40_cuthill_mckee.cc index 65a0289b10..6eb7b4918f 100644 --- a/tests/mpi/step-40_cuthill_mckee.cc +++ b/tests/mpi/step-40_cuthill_mckee.cc @@ -166,7 +166,7 @@ namespace Step40 ++face) { if ((cell->face(face)->at_boundary()) || - (cell->neighbor(face)->active() && + (cell->neighbor(face)->is_active() && cell->neighbor(face)->is_ghost())) { fe_face_values.reinit(cell, face); diff --git a/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc b/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc index 7516e42d80..d5c26c9bc2 100644 --- a/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc +++ b/tests/mpi/step-40_cuthill_mckee_MPI-subset.cc @@ -167,7 +167,7 @@ namespace Step40 ++face) { if ((cell->face(face)->at_boundary()) || - (cell->neighbor(face)->active() && + (cell->neighbor(face)->is_active() && cell->neighbor(face)->is_ghost())) { fe_face_values.reinit(cell, face); diff --git a/tests/serialization/dof_handler_01.cc b/tests/serialization/dof_handler_01.cc index 1a6ff582da..88820d9518 100644 --- a/tests/serialization/dof_handler_01.cc +++ b/tests/serialization/dof_handler_01.cc @@ -70,7 +70,7 @@ namespace dealii } } - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && (c1->subdomain_id() != c2->subdomain_id())) return false; diff --git a/tests/serialization/hp_dof_handler_01.cc b/tests/serialization/hp_dof_handler_01.cc index 8b9a86029a..bf34814090 100644 --- a/tests/serialization/hp_dof_handler_01.cc +++ b/tests/serialization/hp_dof_handler_01.cc @@ -71,7 +71,7 @@ namespace dealii } } - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && (c1->subdomain_id() != c2->subdomain_id())) return false; @@ -84,15 +84,15 @@ namespace dealii if (c1->user_flag_set() != c2->user_flag_set()) return false; - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && c1->get_fe().get_name() != c2->get_fe().get_name()) return false; - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && c1->active_fe_index() != c2->active_fe_index()) return false; - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && c1->future_fe_index() != c2->future_fe_index()) return false; diff --git a/tests/serialization/triangulation_01.cc b/tests/serialization/triangulation_01.cc index e05328f29d..73b5d53e75 100644 --- a/tests/serialization/triangulation_01.cc +++ b/tests/serialization/triangulation_01.cc @@ -75,7 +75,7 @@ namespace dealii } } - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && (c1->subdomain_id() != c2->subdomain_id())) return false; @@ -94,7 +94,7 @@ namespace dealii if (c1->manifold_id() != c2->manifold_id()) return false; - if (c1->active() && c2->active()) + if (c1->is_active() && c2->is_active()) if (c1->active_cell_index() != c2->active_cell_index()) return false; diff --git a/tests/serialization/triangulation_02.cc b/tests/serialization/triangulation_02.cc index 239f4d95fe..fbda19ba30 100644 --- a/tests/serialization/triangulation_02.cc +++ b/tests/serialization/triangulation_02.cc @@ -77,7 +77,7 @@ namespace dealii } } - if (c1->active() && c2->active() && + if (c1->is_active() && c2->is_active() && (c1->subdomain_id() != c2->subdomain_id())) return false; @@ -96,7 +96,7 @@ namespace dealii if (c1->manifold_id() != c2->manifold_id()) return false; - if (c1->active() && c2->active()) + if (c1->is_active() && c2->is_active()) if (c1->active_cell_index() != c2->active_cell_index()) return false; diff --git a/tests/sharedtria/tria_custom_refine02.cc b/tests/sharedtria/tria_custom_refine02.cc index 05549406a6..8e392586fd 100644 --- a/tests/sharedtria/tria_custom_refine02.cc +++ b/tests/sharedtria/tria_custom_refine02.cc @@ -55,7 +55,7 @@ mypartition(parallel::shared::Triangulation &tria) lvl); for (; cell != endc; ++cell) { - if (cell->active()) + if (cell->is_active()) cell->set_level_subdomain_id(cell->subdomain_id()); else cell->set_level_subdomain_id(cell->child(0)->level_subdomain_id()); diff --git a/tests/trilinos/elide_zeros.cc b/tests/trilinos/elide_zeros.cc index b1f84bee96..c0ec5c07ea 100644 --- a/tests/trilinos/elide_zeros.cc +++ b/tests/trilinos/elide_zeros.cc @@ -263,7 +263,7 @@ namespace LinearAdvectionTest } // If the neighbor is not active, then it is at a higher // refinement level (so we do not need to integrate now) - if (neighbor_cell->active()) + if (neighbor_cell->is_active()) { if (neighbor_cell->is_locally_owned()) { -- 2.39.5