DoFHandler<1>::distribute_dofs_on_cell (active_cell_iterator &cell,
unsigned int next_free_dof)
{
+//TODO[WB]: this may be completely bogus -- look through it
// get the fe for this cell
const FiniteElement<1> &fe = cell->get_fe();
if (v==0)
for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
cell->set_vertex_dof_index (0, d,
- neighbor->vertex_dof_index (1, d));
+ neighbor->vertex_dof_index (1, d),
+ cell->active_fe_index());
else
for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
cell->set_vertex_dof_index (1, d,
- neighbor->vertex_dof_index (0, d));
+ neighbor->vertex_dof_index (0, d),
+ cell->active_fe_index());
// next neighbor
continue;
// otherwise: create dofs newly
for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
- cell->set_vertex_dof_index (v, d, next_free_dof++);
+ cell->set_vertex_dof_index (v, d, next_free_dof++,
+ cell->active_fe_index());
};
// dofs of line
for (unsigned int d=0; d<fe.dofs_per_line; ++d)
- cell->set_dof_index (d, next_free_dof++);
+ cell->set_dof_index (d, next_free_dof++,
+ cell->active_fe_index());
// note that this cell has been processed
cell->set_user_flag ();
DoFHandler<2>::distribute_dofs_on_cell (active_cell_iterator &cell,
unsigned int next_free_dof)
{
+//TODO[WB]: Check for correctness
// get the fe for this cell
const FiniteElement<2> &fe = cell->get_fe();
// check whether dofs for this
// vertex have been distributed
// (only check the first dof)
- if (cell->vertex_dof_index(vertex, 0) == invalid_dof_index)
+ if (cell->vertex_dof_index(vertex, 0, cell->active_fe_index())
+ == invalid_dof_index)
for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
- cell->set_vertex_dof_index (vertex, d, next_free_dof++);
+ cell->set_vertex_dof_index (vertex, d, next_free_dof++,
+ cell->active_fe_index());
// for the four sides
//TODO[?] Does not work for continuous FEs
// distribute dofs if necessary:
// check whether line dof is already
// numbered (check only first dof)
- if (line->dof_index(0) == invalid_dof_index)
+ if (line->dof_index(0,cell->active_fe_index()) == invalid_dof_index)
// if not: distribute dofs
for (unsigned int d=0; d<fe.dofs_per_line; ++d)
- line->set_dof_index (d, next_free_dof++);
+ line->set_dof_index (d, next_free_dof++,
+ cell->active_fe_index());
};
// dofs of quad
if (fe.dofs_per_quad > 0)
for (unsigned int d=0; d<fe.dofs_per_quad; ++d)
- cell->set_dof_index (d, next_free_dof++);
+ cell->set_dof_index (d, next_free_dof++,
+ cell->active_fe_index());
// note that this cell has been processed
DoFHandler<3>::distribute_dofs_on_cell (active_cell_iterator &cell,
unsigned int next_free_dof)
{
+//TODO[WB]: check for correctness
// get the fe for this cell
const FiniteElement<3> &fe = cell->get_fe();
// check whether dofs for this
// vertex have been distributed
// (only check the first dof)
- if (cell->vertex_dof_index(vertex, 0) == invalid_dof_index)
+ if (cell->vertex_dof_index(vertex, 0,cell->active_fe_index())
+ == invalid_dof_index)
for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
- cell->set_vertex_dof_index (vertex, d, next_free_dof++);
+ cell->set_vertex_dof_index (vertex, d, next_free_dof++,
+ cell->active_fe_index());
// for the lines
if (fe.dofs_per_line > 0)
// distribute dofs if necessary:
// check whether line dof is already
// numbered (check only first dof)
- if (line->dof_index(0) == invalid_dof_index)
+ if (line->dof_index(0, cell->active_fe_index()) == invalid_dof_index)
// if not: distribute dofs
for (unsigned int d=0; d<fe.dofs_per_line; ++d)
- line->set_dof_index (d, next_free_dof++);
+ line->set_dof_index (d, next_free_dof++,
+ cell->active_fe_index());
};
// for the quads
// distribute dofs if necessary:
// check whether quad dof is already
// numbered (check only first dof)
- if (quad->dof_index(0) == invalid_dof_index)
+ if (quad->dof_index(0, cell->active_fe_index()) == invalid_dof_index)
// if not: distribute dofs
for (unsigned int d=0; d<fe.dofs_per_quad; ++d)
- quad->set_dof_index (d, next_free_dof++);
+ quad->set_dof_index (d, next_free_dof++,
+ cell->active_fe_index());
};
// dofs of hex
if (fe.dofs_per_hex > 0)
for (unsigned int d=0; d<fe.dofs_per_hex; ++d)
- cell->set_dof_index (d, next_free_dof++);
+ cell->set_dof_index (d, next_free_dof++,
+ cell->active_fe_index());
// note that this cell has been processed