Skip to content

Commit 2905cb5

Browse files
committed
Make sure dof index containers sized even when not active on block
We need to make sure that we properly size dof index containers to be inclusive of variables that are not defined on the current subdomain ID. So for a given element we can index into the container at that variable number and then obviously the associated vector of indices will be of zero length since there are no dof indices
1 parent ffdcb0a commit 2905cb5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/numerics/static_condensation_dof_map.C

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,12 @@ void StaticCondensationDofMap::reinit()
215215
for (const auto vg : make_range(_dof_map.n_variable_groups()))
216216
{
217217
const auto & var_group = _dof_map.variable_group(vg);
218-
if (!var_group.active_on_subdomain(sub_id))
219-
continue;
220-
221218
for (const auto v : make_range(var_group.n_variables()))
222219
{
223220
const auto var_num = var_group.number(v);
224221
dof_data.reduced_space_indices.resize(var_num + 1);
222+
if (!var_group.active_on_subdomain(sub_id))
223+
continue;
225224
elem_uncondensed_dofs.clear();
226225
_dof_map.dof_indices(elem,
227226
elem_dofs,

0 commit comments

Comments
 (0)