Public Types | |
typedef MGDoFAccessor< dim, dim, spacedim > | BaseClass |
typedef TriaIterator < MGDoFAccessor< dim-1, dim, spacedim > > | face_iterator |
typedef MGDoFAccessor< dim, dim, spacedim >::AccessorData | AccessorData |
Public Member Functions | |
Constructors | |
MGDoFCellAccessor (const Triangulation< dim, spacedim > *tria, const int level, const int index, const AccessorData *local_data) | |
template<int structdim2, int dim2, int spacedim2> | |
MGDoFCellAccessor (const InvalidAccessor< structdim2, dim2, spacedim2 > &) | |
template<int dim2, class DH2 > | |
MGDoFCellAccessor (const DoFAccessor< dim2, DH2 > &) | |
Accessing the DoF indices of this object | |
void | get_mg_dof_indices (std::vector< unsigned int > &dof_indices) const |
template<typename number > | |
void | get_mg_dof_values (const Vector< number > &values, Vector< number > &dof_values) const |
Accessing sub-objects and neighbors | |
TriaIterator < MGDoFCellAccessor< dim, spacedim > > | neighbor (const unsigned int) const |
TriaIterator < MGDoFCellAccessor< dim, spacedim > > | child (const unsigned int) const |
internal::MGDoFHandler::Iterators < dim, spacedim > ::face_iterator | face (const unsigned int i) const |
internal::MGDoFHandler::Iterators < dim, spacedim > ::cell_iterator | neighbor_child_on_subface (const unsigned int face_no, const unsigned int subface_no) const |
Grant access to the degrees of freedom on cells, as far as this isn't already covered by the MGDoFAccessor and MGDoFAccessor classes from which the present class is derived. In particular, this function overloads functions from CellAccessor and DoFCellAccessor that return iterators to other objects, such as the face() or neighbor() function. Since the functions in CellAccessor and DoFCellAccessor return iterators into Triangulations and DoFHandlers only, we need to reimplement the functions in this class to make sure we get iterators into MGDoFHandlers instead.
typedef MGDoFAccessor<dim,dim,spacedim> MGDoFCellAccessor< dim, spacedim >::BaseClass |
Declare a typedef to the base class to make accessing some of the exception classes simpler.
Reimplemented from MGDoFAccessor< dim, dim, spacedim >.
typedef TriaIterator< MGDoFAccessor<dim-1,dim,spacedim> > MGDoFCellAccessor< dim, spacedim >::face_iterator |
Type of faces.
typedef MGDoFAccessor<dim,dim,spacedim>::AccessorData MGDoFCellAccessor< dim, spacedim >::AccessorData |
Declare the data type that this accessor class expects to get passed from the iterator classes.
Reimplemented from MGDoFAccessor< dim, dim, spacedim >.
MGDoFCellAccessor< dim, spacedim >::MGDoFCellAccessor | ( | const Triangulation< dim, spacedim > * | tria, | |
const int | level, | |||
const int | index, | |||
const AccessorData * | local_data | |||
) |
Constructor
MGDoFCellAccessor< dim, spacedim >::MGDoFCellAccessor | ( | const InvalidAccessor< structdim2, dim2, spacedim2 > & | ) | [inline] |
Conversion constructor. This constructor exists to make certain constructs simpler to write in dimension independent code. For example, it allows assigning a face iterator to a line iterator, an operation that is useful in 2d but doesn't make any sense in 3d. The constructor here exists for the purpose of making the code conform to C++ but it will unconditionally abort; in other words, assigning a face iterator to a line iterator is better put into an if-statement that checks that the dimension is two, and assign to a quad iterator in 3d (an operator that, without this constructor would be illegal if we happen to compile for 2d).
MGDoFCellAccessor< dim, spacedim >::MGDoFCellAccessor | ( | const DoFAccessor< dim2, DH2 > & | ) | [inline] |
Another conversion operator between objects that don't make sense, just like the previous one.
void MGDoFCellAccessor< dim, spacedim >::get_mg_dof_indices | ( | std::vector< unsigned int > & | dof_indices | ) | const |
Return the indices of the dofs of this hex in the standard ordering: dofs on vertex 0, dofs on vertex 1, etc, dofs on line 0, dofs on line 1, etc, dofs on quad 0, etc.
It is assumed that the vector already has the right size beforehand. The indices refer to the local numbering for the level this hex lives on.
void MGDoFCellAccessor< dim, spacedim >::get_mg_dof_values | ( | const Vector< number > & | values, | |
Vector< number > & | dof_values | |||
) | const [inline] |
Return the value of the given vector restricted to the dofs of this cell in the standard ordering: dofs on vertex 0, dofs on vertex 1, etc, dofs on line 0, dofs on line 1, etc, dofs on quad 0, etc.
It is assumed that the vector already has the right size beforehand. The indices refer to the multilevel numbering local to the present level of this cell. The vector shall therefore have the same number of entries as there are degrees of freedom on this level.
TriaIterator<MGDoFCellAccessor<dim,spacedim> > MGDoFCellAccessor< dim, spacedim >::neighbor | ( | const unsigned | int | ) | const |
Return the ith
neighbor as a MGDoF cell iterator. This function is needed since the neighbor function of the base class returns a cell accessor without access to the MGDoF data.
TriaIterator<MGDoFCellAccessor<dim,spacedim> > MGDoFCellAccessor< dim, spacedim >::child | ( | const unsigned | int | ) | const |
Return the ith
child as a MGDoF cell iterator. This function is needed since the child function of the base class returns a cell accessor without access to the DoF data.
Reimplemented from MGDoFAccessor< dim, dim, spacedim >.
internal::MGDoFHandler::Iterators<dim,spacedim>::face_iterator MGDoFCellAccessor< dim, spacedim >::face | ( | const unsigned int | i | ) | const |
Return an iterator to the ith
face of this cell.
This function is not implemented in 1D, and maps to MGDoFAccessor<2, dim>::line in 2D.
internal::MGDoFHandler::Iterators<dim,spacedim>::cell_iterator MGDoFCellAccessor< dim, spacedim >::neighbor_child_on_subface | ( | const unsigned int | face_no, | |
const unsigned int | subface_no | |||
) | const |
Return the result of the neighbor_child_on_subface
function of the base class, but convert it so that one can also access the MGDoF data (the function in the base class only returns an iterator with access to the triangulation data).