DoDHandler
class, but it uses a separate enumeration of the degrees of freedom on each level. For example, a vertex has several DoF numbers, one for each level of the triangulation on which it exists.At present, multilevel algorithms are not fully functional, so this documentation is still very brief.
This class has not yet been implemented for the use in the codimension one case (spacedim != dim
).
TODO:[WB] Extend MGDoFHandler doc
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::raw_line_iterator MGDoFHandler< dim, spacedim >::raw_line_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::line_iterator MGDoFHandler< dim, spacedim >::line_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::active_line_iterator MGDoFHandler< dim, spacedim >::active_line_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::raw_quad_iterator MGDoFHandler< dim, spacedim >::raw_quad_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::quad_iterator MGDoFHandler< dim, spacedim >::quad_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::active_quad_iterator MGDoFHandler< dim, spacedim >::active_quad_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::raw_hex_iterator MGDoFHandler< dim, spacedim >::raw_hex_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::hex_iterator MGDoFHandler< dim, spacedim >::hex_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::active_hex_iterator MGDoFHandler< dim, spacedim >::active_hex_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::raw_cell_iterator MGDoFHandler< dim, spacedim >::raw_cell_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::cell_iterator MGDoFHandler< dim, spacedim >::cell_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::active_cell_iterator MGDoFHandler< dim, spacedim >::active_cell_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::raw_face_iterator MGDoFHandler< dim, spacedim >::raw_face_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::face_iterator MGDoFHandler< dim, spacedim >::face_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
typedef internal::MGDoFHandler::Iterators<dim,spacedim>::active_face_iterator MGDoFHandler< dim, spacedim >::active_face_iterator |
Reimplemented from DoFHandler< dim, spacedim >.
MGDoFHandler< dim, spacedim >::MGDoFHandler | ( | const Triangulation< dim, spacedim > & | tria | ) |
Constructor. Take tria
as the triangulation to work on.
virtual MGDoFHandler< dim, spacedim >::~MGDoFHandler | ( | ) | [virtual] |
Destructor
virtual void MGDoFHandler< dim, spacedim >::distribute_dofs | ( | const FiniteElement< dim, spacedim > & | , | |
const unsigned int | offset = 0 | |||
) | [virtual] |
Go through the triangulation and distribute the degrees of freedoms needed for the given finite element according to the given distribution method. We first call the DoFHandler's function and then distribute the levelwise numbers.
A copy of the transferred finite element is stored.
Reimplemented from DoFHandler< dim, spacedim >.
virtual void MGDoFHandler< dim, spacedim >::clear | ( | ) | [virtual] |
Clear all data of this object and call the respective function of the base class.
Reimplemented from DoFHandler< dim, spacedim >.
void MGDoFHandler< dim, spacedim >::renumber_dofs | ( | const unsigned int | level, | |
const std::vector< unsigned int > & | new_numbers | |||
) |
Actually do the renumbering based on a list of new dof numbers for all the dofs.
new_numbers
is an array of integers with size equal to the number of dofs on the present level. It stores the new indices after renumbering in the order of the old indices.
Referenced by MGDoFHandler< dim, spacedim >::renumber_dofs().
void MGDoFHandler< dim, spacedim >::renumber_dofs | ( | const std::vector< unsigned int > & | new_numbers | ) | [inline] |
Redeclare this function of the DoFHandler basis class as otherwise it is hidden from the function with the same name, see above.
Reimplemented from DoFHandler< dim, spacedim >.
References MGDoFHandler< dim, spacedim >::renumber_dofs().
raw_cell_iterator MGDoFHandler< dim, spacedim >::begin_raw | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first cell, used or not, on level level
. If a level has no cells, a past-the-end iterator is returned.
This function calls begin_raw_line
in 1D and begin_raw_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
cell_iterator MGDoFHandler< dim, spacedim >::begin | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first used cell on level level
.
This function calls begin_line
in 1D and begin_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
active_cell_iterator MGDoFHandler< dim, spacedim >::begin_active | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first active cell on level level
.
This function calls begin_active_line
in 1D and begin_active_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
raw_cell_iterator MGDoFHandler< dim, spacedim >::end | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
This function calls end_line
in 1D and end_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
cell_iterator MGDoFHandler< dim, spacedim >::end | ( | const unsigned int | level | ) | const |
Return an iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_cell_iterator MGDoFHandler< dim, spacedim >::end_raw | ( | const unsigned int | level | ) | const |
Return a raw iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
active_cell_iterator MGDoFHandler< dim, spacedim >::end_active | ( | const unsigned int | level | ) | const |
Return an active iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_cell_iterator MGDoFHandler< dim, spacedim >::last_raw | ( | ) | const |
Return an iterator pointing to the last cell, used or not.
This function calls last_raw_line
in 1D and last_raw_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
raw_cell_iterator MGDoFHandler< dim, spacedim >::last_raw | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last cell of the level level
, used or not.
This function calls last_raw_line
in 1D and last_raw_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
cell_iterator MGDoFHandler< dim, spacedim >::last | ( | ) | const |
Return an iterator pointing to the last used cell.
This function calls last_line
in 1D and last_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
cell_iterator MGDoFHandler< dim, spacedim >::last | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last used cell on level level
.
This function calls last_line
in 1D and last_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
active_cell_iterator MGDoFHandler< dim, spacedim >::last_active | ( | ) | const |
Return an iterator pointing to the last active cell.
This function calls last_active_line
in 1D and last_active_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
active_cell_iterator MGDoFHandler< dim, spacedim >::last_active | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last active cell on level level
.
This function calls last_active_line
in 1D and last_active_quad
in 2D.
Reimplemented from DoFHandler< dim, spacedim >.
raw_face_iterator MGDoFHandler< dim, spacedim >::begin_raw_face | ( | ) | const |
Iterator to the first face, used or not.
This function calls begin_raw_line
in 2D and begin_raw_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
face_iterator MGDoFHandler< dim, spacedim >::begin_face | ( | ) | const |
Iterator to the first used face.
This function calls begin_line
in 2D and begin_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
active_face_iterator MGDoFHandler< dim, spacedim >::begin_active_face | ( | ) | const |
Iterator to the first active face.
This function calls begin_active_line
in 2D and begin_active_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
raw_face_iterator MGDoFHandler< dim, spacedim >::end_face | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
This function calls end_line
in 2D and end_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
raw_face_iterator MGDoFHandler< dim, spacedim >::end_raw_face | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
This is the same as end_face()
.
Reimplemented from DoFHandler< dim, spacedim >.
active_face_iterator MGDoFHandler< dim, spacedim >::end_active_face | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
This is the same as end_face()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_face_iterator MGDoFHandler< dim, spacedim >::last_raw_face | ( | ) | const |
Return an iterator pointing to the last face, used or not.
This function calls last_raw_line
in 2D and last_raw_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
face_iterator MGDoFHandler< dim, spacedim >::last_face | ( | ) | const |
Return an iterator pointing to the last used face.
This function calls last_line
in 2D and last_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
active_face_iterator MGDoFHandler< dim, spacedim >::last_active_face | ( | ) | const |
Return an iterator pointing to the last active face.
This function calls last_active_line
in 2D and last_active_quad
in 3D.
Reimplemented from DoFHandler< dim, spacedim >.
raw_line_iterator MGDoFHandler< dim, spacedim >::begin_raw_line | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first line, used or not, on level level
. If a level has no lines, a past-the-end iterator is returned.
Reimplemented from DoFHandler< dim, spacedim >.
line_iterator MGDoFHandler< dim, spacedim >::begin_line | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first used line on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
active_line_iterator MGDoFHandler< dim, spacedim >::begin_active_line | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first active line on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_line_iterator MGDoFHandler< dim, spacedim >::end_line | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
Reimplemented from DoFHandler< dim, spacedim >.
line_iterator MGDoFHandler< dim, spacedim >::end_line | ( | const unsigned int | level | ) | const |
Return an iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_line_iterator MGDoFHandler< dim, spacedim >::end_raw_line | ( | const unsigned int | level | ) | const |
Return a raw iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
active_line_iterator MGDoFHandler< dim, spacedim >::end_active_line | ( | const unsigned int | level | ) | const |
Return an active iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_line_iterator MGDoFHandler< dim, spacedim >::last_raw_line | ( | ) | const |
Return an iterator pointing to the last line, used or not.
Reimplemented from DoFHandler< dim, spacedim >.
raw_line_iterator MGDoFHandler< dim, spacedim >::last_raw_line | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last line of the level level
, used or not.
Reimplemented from DoFHandler< dim, spacedim >.
line_iterator MGDoFHandler< dim, spacedim >::last_line | ( | ) | const |
Return an iterator pointing to the last used line.
Reimplemented from DoFHandler< dim, spacedim >.
line_iterator MGDoFHandler< dim, spacedim >::last_line | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last used line on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
active_line_iterator MGDoFHandler< dim, spacedim >::last_active_line | ( | ) | const |
Return an iterator pointing to the last active line.
Reimplemented from DoFHandler< dim, spacedim >.
active_line_iterator MGDoFHandler< dim, spacedim >::last_active_line | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last active line on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_quad_iterator MGDoFHandler< dim, spacedim >::begin_raw_quad | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first quad, used or not, on level level
. If a level has no quads, a past-the-end iterator is returned.
Reimplemented from DoFHandler< dim, spacedim >.
quad_iterator MGDoFHandler< dim, spacedim >::begin_quad | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first used quad on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
active_quad_iterator MGDoFHandler< dim, spacedim >::begin_active_quad | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first active quad on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_quad_iterator MGDoFHandler< dim, spacedim >::end_quad | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
Reimplemented from DoFHandler< dim, spacedim >.
quad_iterator MGDoFHandler< dim, spacedim >::end_quad | ( | const unsigned int | level | ) | const |
Return an iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_quad_iterator MGDoFHandler< dim, spacedim >::end_raw_quad | ( | const unsigned int | level | ) | const |
Return a raw iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
active_quad_iterator MGDoFHandler< dim, spacedim >::end_active_quad | ( | const unsigned int | level | ) | const |
Return an active iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_quad_iterator MGDoFHandler< dim, spacedim >::last_raw_quad | ( | ) | const |
Return an iterator pointing to the last quad, used or not.
Reimplemented from DoFHandler< dim, spacedim >.
raw_quad_iterator MGDoFHandler< dim, spacedim >::last_raw_quad | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last quad of the level level
, used or not.
Reimplemented from DoFHandler< dim, spacedim >.
quad_iterator MGDoFHandler< dim, spacedim >::last_quad | ( | ) | const |
Return an iterator pointing to the last used quad.
Reimplemented from DoFHandler< dim, spacedim >.
quad_iterator MGDoFHandler< dim, spacedim >::last_quad | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last used quad on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
active_quad_iterator MGDoFHandler< dim, spacedim >::last_active_quad | ( | ) | const |
Return an iterator pointing to the last active quad.
Reimplemented from DoFHandler< dim, spacedim >.
active_quad_iterator MGDoFHandler< dim, spacedim >::last_active_quad | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last active quad on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_hex_iterator MGDoFHandler< dim, spacedim >::begin_raw_hex | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first hex, used or not, on level level
. If a level has no hexs, a past-the-end iterator is returned.
Reimplemented from DoFHandler< dim, spacedim >.
hex_iterator MGDoFHandler< dim, spacedim >::begin_hex | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first used hex on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
active_hex_iterator MGDoFHandler< dim, spacedim >::begin_active_hex | ( | const unsigned int | level = 0 |
) | const |
Iterator to the first active hex on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_hex_iterator MGDoFHandler< dim, spacedim >::end_hex | ( | ) | const |
Iterator past the end; this iterator serves for comparisons of iterators with past-the-end or before-the-beginning states.
Reimplemented from DoFHandler< dim, spacedim >.
hex_iterator MGDoFHandler< dim, spacedim >::end_hex | ( | const unsigned int | level | ) | const |
Return an iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_hex_iterator MGDoFHandler< dim, spacedim >::end_raw_hex | ( | const unsigned int | level | ) | const |
Return a raw iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
active_hex_iterator MGDoFHandler< dim, spacedim >::end_active_hex | ( | const unsigned int | level | ) | const |
Return an active iterator which is the first iterator not on level. If level
is the last level, then this returns end()
.
Reimplemented from DoFHandler< dim, spacedim >.
raw_hex_iterator MGDoFHandler< dim, spacedim >::last_raw_hex | ( | ) | const |
Return an iterator pointing to the last hex, used or not.
Reimplemented from DoFHandler< dim, spacedim >.
raw_hex_iterator MGDoFHandler< dim, spacedim >::last_raw_hex | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last hex of the level level
, used or not.
Reimplemented from DoFHandler< dim, spacedim >.
hex_iterator MGDoFHandler< dim, spacedim >::last_hex | ( | ) | const |
Return an iterator pointing to the last used hex.
Reimplemented from DoFHandler< dim, spacedim >.
hex_iterator MGDoFHandler< dim, spacedim >::last_hex | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last used hex on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
active_hex_iterator MGDoFHandler< dim, spacedim >::last_active_hex | ( | ) | const |
Return an iterator pointing to the last active hex.
Reimplemented from DoFHandler< dim, spacedim >.
active_hex_iterator MGDoFHandler< dim, spacedim >::last_active_hex | ( | const unsigned int | level | ) | const |
Return an iterator pointing to the last active hex on level level
.
Reimplemented from DoFHandler< dim, spacedim >.
unsigned int MGDoFHandler< dim, spacedim >::n_dofs | ( | const unsigned int | level | ) | const |
Return the number of degrees of freedom on the specified level. Included in this number are those DoFs which are constrained by hanging nodes.
unsigned int MGDoFHandler< dim, spacedim >::n_dofs | ( | ) | const [inline] |
Redeclare this function of the DoFHandler basis class as otherwise it is hidden from the function with the same name, see above.
Reimplemented from DoFHandler< dim, spacedim >.
virtual unsigned int MGDoFHandler< dim, spacedim >::memory_consumption | ( | ) | const [virtual] |
Determine an estimate for the memory consumption (in bytes) of this object.
This function is made virtual, since a dof handler object might be accessed through a pointers to thisr base class, although the actual object might be a derived class.
Reimplemented from DoFHandler< dim, spacedim >.
unsigned int MGDoFHandler< dim, spacedim >::distribute_dofs_on_cell | ( | cell_iterator & | cell, | |
unsigned int | next_free_dof | |||
) | [private] |
Distribute dofs on the given cell, with new dofs starting with index next_free_dof
. Return the next unused index number. The finite element used is the one given to distribute_dofs
, which is copied to selected_fe
.
This function is excluded from the distribute_dofs
function since it can not be implemented dimension independent.
Note that unlike for the usual dofs, here all cells and not only active ones are allowed.
unsigned int MGDoFHandler< dim, spacedim >::get_dof_index | ( | const unsigned int | obj_level, | |
const unsigned int | obj_index, | |||
const unsigned int | fe_index, | |||
const unsigned int | local_index | |||
) | const [inline, private] |
Return the i-th
dof-index. This function calls the respective function of DoFObjects.
void MGDoFHandler< dim, spacedim >::set_dof_index | ( | const unsigned int | obj_level, | |
const unsigned int | obj_index, | |||
const unsigned int | fe_index, | |||
const unsigned int | local_index, | |||
const unsigned int | global_index | |||
) | const [inline, private] |
Set the i-th
dof-index. This function calls the respective function of DoFObjects.
void MGDoFHandler< dim, spacedim >::reserve_space | ( | ) | [private] |
Reserve enough space for the MG dof indices for a given triangulation.
void MGDoFHandler< dim, spacedim >::clear_space | ( | ) | [private] |
Free all used memory.
Reimplemented from DoFHandler< dim, spacedim >.
void MGDoFHandler< 1 >::renumber_dofs | ( | const unsigned int | level, | |
const std::vector< unsigned int > & | new_numbers | |||
) | [inline] |
void MGDoFHandler< 2 >::renumber_dofs | ( | const unsigned int | level, | |
const std::vector< unsigned int > & | new_numbers | |||
) | [inline] |
void MGDoFHandler< 3 >::renumber_dofs | ( | const unsigned int | level, | |
const std::vector< unsigned int > & | new_numbers | |||
) | [inline] |
friend class MGDoFAccessor [friend] |
Make accessor objects friends.
const unsigned int MGDoFHandler< dim, spacedim >::dimension = dim [static] |
Make the dimension and the space_dimension available in function templates.
Reimplemented from DoFHandler< dim, spacedim >.
const unsigned int MGDoFHandler< dim, spacedim >::space_dimension = spacedim [static] |
Make the space dimension available in function templates.
Reimplemented from DoFHandler< dim, spacedim >.
std::vector<internal::DoFHandler::DoFLevel<dim>*> MGDoFHandler< dim, spacedim >::mg_levels [private] |
Space to store the DoF numbers for the different levels. Unlike the levels
object in the DoFHandler, these are not global numbers but rather are numbers which start from zero on each level.
internal::DoFHandler::DoFFaces<dim>* MGDoFHandler< dim, spacedim >::mg_faces [private] |
Space to store the DoF numbers for the faces.
std::vector<MGVertexDoFs> MGDoFHandler< dim, spacedim >::mg_vertex_dofs [private] |
For each vertex there is a list of indices of the degrees of freedom indices on the different levels it lives on and which are these levels.
std::vector<unsigned int> MGDoFHandler< dim, spacedim >::mg_used_dofs [private] |
Vectors storing the number of degrees of freedom on each level.