renumber_dofs(renumbering, IndexSet(0), dof_handler, check_validity);
- update_all_active_cell_dof_indices_caches(dof_handler);
-
return n_dofs;
}
tasks.join_all();
}
-
- update_all_active_cell_dof_indices_caches(dof_handler);
}
{
dof_indices.resize(cell->get_fe().n_dofs_per_cell());
- // circumvent cache
internal::DoFAccessorImplementation::Implementation::
get_dof_indices(*cell,
dof_indices,
cell->set_dof_indices(dof_indices);
}
- update_all_active_cell_dof_indices_caches(dof_handler);
-
return next_free_dof;
}
// previously assigned a number to (i.e. the ones on
// the interface)
local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
- cell->get_dof_indices(local_dof_indices);
+ internal::DoFAccessorImplementation::Implementation::
+ get_dof_indices(*cell,
+ local_dof_indices,
+ cell->active_fe_index());
for (const auto &local_dof_index : local_dof_indices)
if (local_dof_index != numbers::invalid_dof_index)
renumbering[local_dof_index] = numbers::invalid_dof_index;
renumber_dofs(const std::vector<types::global_dof_index> &new_numbers,
const IndexSet & indices_we_care_about,
const DoFHandler<dim, space_dim> &dof_handler,
- const bool check_validity)
+ const bool check_validity,
+ const bool update_cache = true)
{
if (dim == 1)
Assert(indices_we_care_about == IndexSet(0), ExcNotImplemented());
});
tasks.join_all();
- // update the cache used for cell dof indices
- update_all_active_cell_dof_indices_caches(
- const_cast<DoFHandler<dim, space_dim> &>(dof_handler));
+ if (update_cache)
+ update_all_active_cell_dof_indices_caches(dof_handler);
}
n_initial_dofs,
/*check_validity=*/true);
+ update_all_active_cell_dof_indices_caches(*dof_handler);
+
// return a sequential, complete index set
return NumberCache(n_dofs);
}
const unsigned int dofs_per_cell =
cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
- cell->get_dof_indices(local_dof_indices);
+ internal::DoFAccessorImplementation::Implementation::
+ get_dof_indices(*cell,
+ local_dof_indices,
+ cell->active_fe_index());
// set subdomain ids. if dofs already have their values set then
// they must be on partition interfaces. In that case assign them
std::vector<dealii::types::global_dof_index> data(
cell->get_fe().n_dofs_per_cell());
- cell->get_dof_indices(data);
+ internal::DoFAccessorImplementation::Implementation::
+ get_dof_indices(*cell, data, cell->active_fe_index());
return data;
};
std::vector<dealii::types::global_dof_index> dof_indices(
cell->get_fe().n_dofs_per_cell());
- cell->update_cell_dof_indices_cache();
- cell->get_dof_indices(dof_indices);
+ internal::DoFAccessorImplementation::Implementation::
+ get_dof_indices(*cell, dof_indices, cell->active_fe_index());
bool complete = true;
for (unsigned int i = 0; i < dof_indices.size(); ++i)
std::vector<types::global_dof_index>,
DoFHandler<dim, spacedim>>(dof_handler, pack, unpack, filter);
- // finally update the cell DoF indices caches to make sure
- // our internal data structures are consistent
- update_all_active_cell_dof_indices_caches(dof_handler);
-
-
// have a barrier so that sends between two calls to this
// function are not mixed up.
//
Implementation::renumber_dofs(renumbering,
IndexSet(0),
*dof_handler,
- /*check_validity=*/false);
+ /*check_validity=*/false,
+ /*update_cache=*/false);
// now a little bit of housekeeping
const dealii::types::global_dof_index n_global_dofs =
triangulation->load_user_flags(user_flags);
}
+ update_all_active_cell_dof_indices_caches(*this->dof_handler);
+
# ifdef DEBUG
// check that we are really done
{
Implementation::renumber_dofs(new_numbers,
dof_handler->locally_owned_dofs(),
*dof_handler,
- /*check_validity=*/false);
+ /*check_validity=*/false,
+ /*update_cache=*/false);
// Communicate newly assigned DoF indices to other processors
// and get the same information for our own ghost cells.
communicate_dof_indices_on_marked_cells(*dof_handler);
triangulation->load_user_flags(user_flags);
+ update_all_active_cell_dof_indices_caches(*this->dof_handler);
}
NumberCache number_cache;