Skip to content

Commit

Permalink
revert settings enum conversion in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Simon committed Sep 26, 2021
1 parent 2205527 commit 7952529
Showing 1 changed file with 34 additions and 12 deletions.
46 changes: 34 additions & 12 deletions source/distributed/tria.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1710,15 +1710,7 @@ namespace parallel
Triangulation<dim, spacedim>::limit_level_difference_at_vertices) :
smooth_grid,
false)
, settings(
settings
# ifdef DEBUG
| typename parallel::distributed::Triangulation<dim>::Settings(
parallel::distributed::Triangulation<dim>::
communicate_vertices_to_p4est) // Always communicate vertices
// to p4est in debug mode
# endif
)
, settings(settings)
, triangulation_has_content(false)
, connectivity(nullptr)
, parallel_forest(nullptr)
Expand Down Expand Up @@ -2309,7 +2301,17 @@ namespace parallel
// now create a connectivity object with the right sizes for all
// arrays. set vertex information only in debug mode (saves a few bytes
// in optimized mode)
const bool set_vertex_info = this->are_vertices_communicated_to_p4est();
const bool set_vertex_info
# ifdef DEBUG
= true
# else
# ifndef DEAL_II_WITH_P4EST_SEARCH_LOCAL
= false
# else
= this->are_vertices_communicated_to_p4est()
# endif
# endif
;

connectivity = dealii::internal::p4est::functions<2>::connectivity_new(
(set_vertex_info == true ? this->n_vertices() : 0),
Expand Down Expand Up @@ -2369,7 +2371,17 @@ namespace parallel
// now create a connectivity object with the right sizes for all
// arrays. set vertex information only in debug mode (saves a few bytes
// in optimized mode)
const bool set_vertex_info = this->are_vertices_communicated_to_p4est();
const bool set_vertex_info
# ifdef DEBUG
= true
# else
# ifndef DEAL_II_WITH_P4EST_SEARCH_LOCAL
= false
# else
= this->are_vertices_communicated_to_p4est()
# endif
# endif
;

connectivity = dealii::internal::p4est::functions<2>::connectivity_new(
(set_vertex_info == true ? this->n_vertices() : 0),
Expand Down Expand Up @@ -2432,7 +2444,17 @@ namespace parallel
std::accumulate(edge_touch_count.begin(), edge_touch_count.end(), 0u);

// now create a connectivity object with the right sizes for all arrays
const bool set_vertex_info = this->are_vertices_communicated_to_p4est();
const bool set_vertex_info
# ifdef DEBUG
= true
# else
# ifndef DEAL_II_WITH_P4EST_SEARCH_LOCAL
= false
# else
= this->are_vertices_communicated_to_p4est()
# endif
# endif
;

connectivity = dealii::internal::p4est::functions<3>::connectivity_new(
(set_vertex_info == true ? this->n_vertices() : 0),
Expand Down

0 comments on commit 7952529

Please sign in to comment.