From 2492281a98c9806ff24d9d7d77431e0919e08073 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Fri, 16 Jul 2021 19:19:52 +0200 Subject: [PATCH] Add documentation about cache --- source/dofs/dof_handler_policy.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 538c6c0519..7bc03dc63f 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -1708,6 +1708,7 @@ namespace internal { dof_indices.resize(cell->get_fe().n_dofs_per_cell()); + // the cache is not assigned yet, so we must bypass it internal::DoFAccessorImplementation::Implementation:: get_dof_indices(*cell, dof_indices, @@ -1755,7 +1756,7 @@ namespace internal // delete all dofs that live there and that we have // previously assigned a number to (i.e. the ones on - // the interface) + // the interface); make sure to not use the cache local_dof_indices.resize(cell->get_fe().n_dofs_per_cell()); internal::DoFAccessorImplementation::Implementation:: get_dof_indices(*cell, @@ -2905,7 +2906,8 @@ namespace internal { // get the owner of the cell; note that we have made sure above // that all cells are either locally owned or ghosts (not - // artificial), so this call will always yield the true owner + // artificial), so this call will always yield the true owner; + // note that the cache is not assigned yet, so we must bypass it const types::subdomain_id subdomain_id = cell->subdomain_id(); const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell(); @@ -3632,6 +3634,8 @@ namespace internal std::vector data( cell->get_fe().n_dofs_per_cell()); + + // bypass the cache which is not filled yet internal::DoFAccessorImplementation::Implementation:: get_dof_indices(*cell, data, cell->active_fe_index()); -- 2.39.5