Assert (dof_handler.finite_elements != nullptr,
ExcMessage ("No finite element collection is associated with "
"this DoFHandler"));
- Assert (local_index < (*dof_handler.finite_elements)[fe_index].dofs_per_vertex,
+ Assert (local_index < dof_handler.get_fe(fe_index).dofs_per_vertex,
ExcIndexRange(local_index, 0,
- (*dof_handler.finite_elements)[fe_index].dofs_per_vertex));
+ dof_handler.get_fe(fe_index).dofs_per_vertex));
Assert (fe_index < dof_handler.finite_elements->size(),
ExcInternalError());
Assert (dof_handler.vertex_dof_offsets[vertex_index] !=
}
else
pointer += static_cast<types::global_dof_index>(
- (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1);
+ dof_handler.get_fe(this_fe_index).dofs_per_vertex + 1);
}
}
Assert (dof_handler.finite_elements != nullptr,
ExcMessage ("No finite element collection is associated with "
"this DoFHandler"));
- Assert (local_index < (*dof_handler.finite_elements)[fe_index].dofs_per_vertex,
+ Assert (local_index < dof_handler.get_fe(fe_index).dofs_per_vertex,
ExcIndexRange(local_index, 0,
- (*dof_handler.finite_elements)[fe_index].dofs_per_vertex));
+ dof_handler.get_fe(fe_index).dofs_per_vertex));
Assert (vertex_index < dof_handler.vertex_dof_offsets.size(),
ExcIndexRange (vertex_index, 0,
dof_handler.vertex_dof_offsets.size()));
return *(pointer + 1 + local_index);
else
pointer += static_cast<types::global_dof_index>(
- (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1);
+ dof_handler.get_fe(this_fe_index).dofs_per_vertex + 1);
}
}
else
{
pointer += static_cast<types::global_dof_index>(
- (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1);
+ dof_handler.get_fe(this_fe_index).dofs_per_vertex + 1);
++counter;
}
}
ExcInternalError());
pointer += static_cast<types::global_dof_index>(
- (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1);
+ dof_handler.get_fe(this_fe_index).dofs_per_vertex + 1);
++counter;
}
}
else if (this_fe_index == fe_index)
return true;
else
- pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1;
+ pointer += dof_handler.get_fe(this_fe_index).dofs_per_vertex + 1;
}
}
// do a first loop over all sets of dofs and do identity
// uniquification
- for (unsigned int f=0; f<line->n_active_fe_indices(); ++f)
- for (unsigned int g=f+1; g<line->n_active_fe_indices(); ++g)
+ const unsigned int n_active_fe_indices = line->n_active_fe_indices();
+ for (unsigned int f=0; f<n_active_fe_indices; ++f)
+ for (unsigned int g=f+1; g<n_active_fe_indices; ++g)
{
const unsigned int fe_index_1 = line->nth_active_fe_index (f),
fe_index_2 = line->nth_active_fe_index (g);
- if (((*dof_handler.finite_elements)[fe_index_1].dofs_per_line
+ if ((dof_handler.get_fe(fe_index_1).dofs_per_line
==
- (*dof_handler.finite_elements)[fe_index_2].dofs_per_line)
+ dof_handler.get_fe(fe_index_2).dofs_per_line)
&&
- ((*dof_handler.finite_elements)[fe_index_1].dofs_per_line > 0))
+ (dof_handler.get_fe(fe_index_1).dofs_per_line > 0))
{
ensure_existence_of_dof_identities<1>
- ((*dof_handler.finite_elements)[fe_index_1],
- (*dof_handler.finite_elements)[fe_index_2],
+ (dof_handler.get_fe(fe_index_1),
+ dof_handler.get_fe(fe_index_2),
line_dof_identities[fe_index_1][fe_index_2]);
// see if these sets of dofs are identical. the first
// condition for this is that indeed there are n identities
if (line_dof_identities[fe_index_1][fe_index_2]->size()
==
- (*dof_handler.finite_elements)[fe_index_1].dofs_per_line)
+ dof_handler.get_fe(fe_index_1).dofs_per_line)
{
unsigned int i=0;
- for (; i<(*dof_handler.finite_elements)[fe_index_1].dofs_per_line; ++i)
+ for (; i<dof_handler.get_fe(fe_index_1).dofs_per_line; ++i)
if (((*(line_dof_identities[fe_index_1][fe_index_2]))[i].first != i)
&&
((*(line_dof_identities[fe_index_1][fe_index_2]))[i].second != i))
// not an identity
break;
- if (i == (*dof_handler.finite_elements)[fe_index_1].dofs_per_line)
+ if (i == dof_handler.get_fe(fe_index_1).dofs_per_line)
{
// The line dofs (i.e., the ones interior to a line) of these two finite elements are identical.
// Note that there could be situations when one element still dominates another, e.g.:
--unique_sets_of_dofs;
- for (unsigned int j=0; j<(*dof_handler.finite_elements)[fe_index_1].dofs_per_line; ++j)
+ for (unsigned int j=0; j<dof_handler.get_fe(fe_index_1).dofs_per_line; ++j)
{
const types::global_dof_index master_dof_index
= line->dof_index (j, fe_index_1);
other_fe_index = line->nth_active_fe_index (f);
ensure_existence_of_dof_identities<1>
- ((*dof_handler.finite_elements)[most_dominating_fe_index],
- (*dof_handler.finite_elements)[other_fe_index],
+ (dof_handler.get_fe(most_dominating_fe_index),
+ dof_handler.get_fe(other_fe_index),
line_dof_identities[most_dominating_fe_index][other_fe_index]);
DoFIdentities &identities
other_fe_index = quad->nth_active_fe_index (f);
ensure_existence_of_dof_identities<2>
- ((*dof_handler.finite_elements)[most_dominating_fe_index],
- (*dof_handler.finite_elements)[other_fe_index],
+ (dof_handler.get_fe(most_dominating_fe_index),
+ dof_handler.get_fe(other_fe_index),
quad_dof_identities[most_dominating_fe_index][other_fe_index]);
DoFIdentities &identities
for (unsigned int fe=0; fe<dof_handler.finite_elements->size(); ++fe)
if (vertex_fe_association[fe][v] == true)
- vertex_slots_needed += (*dof_handler.finite_elements)[fe].dofs_per_vertex + 1;
+ vertex_slots_needed += dof_handler.get_fe(fe).dofs_per_vertex + 1;
// don't forget the end_marker:
++vertex_slots_needed;
// if this vertex uses this fe, then set the
// fe_index and move the pointer ahead
dof_handler.vertex_dofs[current_index] = fe;
- current_index += (*dof_handler.finite_elements)[fe].dofs_per_vertex + 1;
+ current_index += dof_handler.get_fe(fe).dofs_per_vertex + 1;
}
// finally place the end marker
dof_handler.vertex_dofs[current_index] = numbers::invalid_dof_index;
// ok, one set of dofs. that makes one active_fe_index, 1
// times dofs_per_face dofs, and one stop index
n_face_slots
- += 1 + (*dof_handler.finite_elements)[cell->active_fe_index()].template n_dofs_per_object<dim-1>() + 1;
+ += 1 + dof_handler.get_fe(cell->active_fe_index()).template n_dofs_per_object<dim-1>() + 1;
// otherwise we do indeed need two sets, i.e. two
// active_fe_indices, two sets of dofs, and one stop index:
n_face_slots
+= (2
+
- (*dof_handler.finite_elements)[cell->active_fe_index()].template n_dofs_per_object<dim-1>()
+ dof_handler.get_fe(cell->active_fe_index()).template n_dofs_per_object<dim-1>()
+
- (*dof_handler.finite_elements)[cell->neighbor(face)->active_fe_index()]
+ dof_handler.get_fe(cell->neighbor(face)->active_fe_index())
.template n_dofs_per_object<dim-1>()
+
1);
// finally, mark those slots as used
next_free_face_slot
- += (*dof_handler.finite_elements)[cell->active_fe_index()].template n_dofs_per_object<dim-1>() + 2;
+ += dof_handler.get_fe(cell->active_fe_index()).template n_dofs_per_object<dim-1>() + 2;
}
else
{
// cell:
face_dof_indices[next_free_face_slot
+
- (*dof_handler.finite_elements)[cell->active_fe_index()].template n_dofs_per_object<dim-1>()
+ dof_handler.get_fe(cell->active_fe_index()).template n_dofs_per_object<dim-1>()
+
1]
= cell->neighbor(face)->active_fe_index();
// finally, mark those slots as used
next_free_face_slot
- += ((*dof_handler.finite_elements)[cell->active_fe_index()].template n_dofs_per_object<dim-1>()
+ += (dof_handler.get_fe(cell->active_fe_index()).template n_dofs_per_object<dim-1>()
+
- (*dof_handler.finite_elements)[cell->neighbor(face)->active_fe_index()]
+ dof_handler.get_fe(cell->neighbor(face)->active_fe_index())
.template n_dofs_per_object<dim-1>()
+
3);
for (unsigned int fe=0; fe<dof_handler.finite_elements->size(); ++fe)
if (line_fe_association[fe][line] == true)
- line_slots_needed += (*dof_handler.finite_elements)[fe].dofs_per_line + 1;
+ line_slots_needed += dof_handler.get_fe(fe).dofs_per_line + 1;
++line_slots_needed;
}
// if this line uses this fe, then set the
// fe_index and move the pointer ahead
dof_handler.faces->lines.dofs[pointer] = fe;
- pointer += (*dof_handler.finite_elements)[fe].dofs_per_line + 1;
+ pointer += dof_handler.get_fe(fe).dofs_per_line + 1;
}
// finally place the end marker
dof_handler.faces->lines.dofs[pointer] = numbers::invalid_dof_index;