From e79a6de541aae72ad28ee3ce82c265a0f79df611 Mon Sep 17 00:00:00 2001 From: kayser-herold Date: Thu, 27 Jul 2006 19:36:55 +0000 Subject: [PATCH] Simply return 0 in n_active_fe_indices for objects that are unused git-svn-id: https://svn.dealii.org/trunk@13456 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/hp_dof_objects.cc | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/deal.II/deal.II/source/dofs/hp_dof_objects.cc b/deal.II/deal.II/source/dofs/hp_dof_objects.cc index c3bf9c0ac1..39ab7eb8c4 100644 --- a/deal.II/deal.II/source/dofs/hp_dof_objects.cc +++ b/deal.II/deal.II/source/dofs/hp_dof_objects.cc @@ -148,10 +148,8 @@ namespace internal // make sure we are on an // object for which DoFs have // been allocated at all - Assert (dof_offsets[obj_index] != deal_II_numbers::invalid_unsigned_int, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); + if (dof_offsets[obj_index] == deal_II_numbers::invalid_unsigned_int) + return 0; // if we are in 1d, then the // only set of indices we store @@ -385,10 +383,8 @@ namespace internal // make sure we are on an // object for which DoFs have // been allocated at all - Assert (dof_offsets[obj_index] != deal_II_numbers::invalid_unsigned_int, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); + if (dof_offsets[obj_index] == deal_II_numbers::invalid_unsigned_int) + return 0; // we are in higher space // dimensions, so there may @@ -687,10 +683,8 @@ namespace internal // make sure we are on an // object for which DoFs have // been allocated at all - Assert (dof_offsets[obj_index] != deal_II_numbers::invalid_unsigned_int, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); + if (dof_offsets[obj_index] == deal_II_numbers::invalid_unsigned_int) + return 0; // we are in higher space // dimensions, so there may @@ -1192,10 +1186,8 @@ namespace internal // make sure we are on an // object for which DoFs have // been allocated at all - Assert (dof_offsets[obj_index] != deal_II_numbers::invalid_unsigned_int, - ExcMessage ("You are trying to access degree of freedom " - "information for an object on which no such " - "information is available")); + if (dof_offsets[obj_index] == deal_II_numbers::invalid_unsigned_int) + return 0; // we are in higher space // dimensions, so there may -- 2.39.5