
celldim, objects of this class represent lines, quadrilaterals, or hexahedra in dim space dimensions. Concrete implementations are done for specialized celldim template parameter. For easier access, we nevertheless document all functions of the specialized classes here as well. However, they are not implemented.
| typedef TriaAccessor<celldim,dim>::AccessorData TriaObjectAccessor< celldim, dim >::AccessorData |
Propagate typedef from base class to this class.
Reimplemented from TriaAccessor< celldim, dim >.
Reimplemented in DoFAccessor< structdim, DH >, DoFObjectAccessor< 0, DH >, DoFObjectAccessor< 1, DH >, DoFObjectAccessor< 2, DH >, DoFObjectAccessor< 3, DH >, CellAccessor< dim >, DoFAccessor< 1, DH >, DoFAccessor< 2, DH >, DoFAccessor< 3, DH >, and DoFAccessor< 0, DH >.
| TriaObjectAccessor< celldim, dim >::TriaObjectAccessor | ( | const Triangulation< dim > * | parent = 0, |
|
| const int | level = -1, |
|||
| const int | index = -1, |
|||
| const AccessorData * | local_data = 0 | |||
| ) |
Constructor. By default, an illegal accessor is constructed.
| void TriaObjectAccessor< celldim, dim >::set | ( | const internal::Triangulation::TriaObject< 1 > & | ) | const |
Copy the data of a line. Only implemented for celldim==1.
| void TriaObjectAccessor< celldim, dim >::set | ( | const internal::Triangulation::TriaObject< 2 > & | ) | const |
Copy the data of the given quad. Only implemented for celldim==2.
| void TriaObjectAccessor< celldim, dim >::set | ( | const internal::Triangulation::TriaObject< 3 > & | ) | const |
Copy the data of the given hex. Only implemented for celldim==3.
| unsigned int TriaObjectAccessor< celldim, dim >::vertex_index | ( | const unsigned int | i | ) | const |
Index of vertex. The convention regarding the numbering of vertices is laid down in the documentation of the GeometryInfo class.
Note that the returned value is only the index of the geometrical vertex. It has nothing to do with possible degrees of freedom associated with it. For this, see the DoFAccessor::vertex_dof_index functions.
| Point<dim>& TriaObjectAccessor< celldim, dim >::vertex | ( | const unsigned int | i | ) | const |
Return a reference to the ith vertex.
| TriaIterator<dim,TriaObjectAccessor<1, dim> > TriaObjectAccessor< celldim, dim >::line | ( | const unsigned int | i | ) | const |
Pointer to the ith line bounding this object.
Implemented only for celldim>1.
Reimplemented in DoFObjectAccessor< 2, DH >, and DoFObjectAccessor< 3, DH >.
| unsigned int TriaObjectAccessor< celldim, dim >::line_index | ( | const unsigned int | i | ) | const |
Line index of the ith line. The level is naturally the same as that of the object.
Implemented only for celldim>1.
| TriaIterator<dim,TriaObjectAccessor<2, dim> > TriaObjectAccessor< celldim, dim >::quad | ( | const unsigned int | i | ) | const |
Pointer to the ith quad bounding this object.
Implemented only for celldim>2.
Reimplemented in DoFObjectAccessor< 3, DH >.
| unsigned int TriaObjectAccessor< celldim, dim >::quad_index | ( | const unsigned int | i | ) | const |
Quad index of the ith quad. The level is naturally the same as that of the object.
Implemented only for celldim>2.
| bool TriaObjectAccessor< celldim, dim >::used | ( | ) | const |
Test for the element being used or not. The return value is true for all iterators that are either normal iterators or active iterators, only raw iterators can return false. Since raw iterators are only used in the interiors of the library, you will not usually need this function.
| void TriaObjectAccessor< celldim, dim >::set_used_flag | ( | ) | const |
Set the used flag. You should know quite exactly what you are doing of you touch this function. It is exclusively for internal use in the library.
| void TriaObjectAccessor< celldim, dim >::clear_used_flag | ( | ) | const |
Clear the used flag. You should know quite exactly what you are doing of you touch this function. It is exclusively for internal use in the library.
| bool TriaObjectAccessor< celldim, dim >::user_flag_set | ( | ) | const |
Read the user flag.
| void TriaObjectAccessor< celldim, dim >::set_user_flag | ( | ) | const |
Set the user flag.
| void TriaObjectAccessor< celldim, dim >::clear_user_flag | ( | ) | const |
Clear the user flag.
| void TriaObjectAccessor< celldim, dim >::recursively_set_user_flag | ( | ) | const |
Set the user flag for this and all descendants.
| void TriaObjectAccessor< celldim, dim >::recursively_clear_user_flag | ( | ) | const |
Clear the user flag for this and all descendants.
| void TriaObjectAccessor< celldim, dim >::clear_user_data | ( | ) | const |
Reset the user data to zero, independent if pointer or index.
| void TriaObjectAccessor< celldim, dim >::set_user_pointer | ( | void * | p | ) | const |
Set the user pointer to p.
| void TriaObjectAccessor< celldim, dim >::clear_user_pointer | ( | ) | const |
Reset the user pointer to a NULL pointer.
| void* TriaObjectAccessor< celldim, dim >::user_pointer | ( | ) | const |
Access the value of the user pointer. It is in the responsibility of the user to make sure that the pointer points to something useful. You should use the new style cast operator to maintain a minimum of typesafety, e.g. A *a=static_cast<A*>(cell->user_pointer());.
| void TriaObjectAccessor< celldim, dim >::recursively_set_user_pointer | ( | void * | p | ) | const |
Set the user pointer of this object and all its children to the given value. This is useful for example if all cells of a certain subdomain, or all faces of a certain part of the boundary should have user pointers pointing to objects describing this part of the domain or boundary.
Note that the user pointer is not inherited under mesh refinement, so after mesh refinement there might be cells or faces that don't have user pointers pointing to the describing object. In this case, simply loop over all the elements of the coarsest level that has this information, and use this function to recursively set the user pointer of all finer levels of the triangulation.
| void TriaObjectAccessor< celldim, dim >::recursively_clear_user_pointer | ( | ) | const |
Clear the user pointer of this object and all of its descendants. The same holds as said for the recursively_set_user_pointer() function.
| void TriaObjectAccessor< celldim, dim >::set_user_index | ( | const unsigned int | p | ) | const |
Set the user index to p.
| void TriaObjectAccessor< celldim, dim >::clear_user_index | ( | ) | const |
Reset the user index to 0.
| unsigned int TriaObjectAccessor< celldim, dim >::user_index | ( | ) | const |
Access the value of the user index.
| void TriaObjectAccessor< celldim, dim >::recursively_set_user_index | ( | const unsigned int | p | ) | const |
Set the user index of this object and all its children.
Note that the user index is not inherited under mesh refinement, so after mesh refinement there might be cells or faces that don't have the expected user indices. In this case, simply loop over all the elements of the coarsest level that has this information, and use this function to recursively set the user index of all finer levels of the triangulation.
| void TriaObjectAccessor< celldim, dim >::recursively_clear_user_index | ( | ) | const |
Clear the user index of this object and all of its descendants. The same holds as said for the recursively_set_user_index() function.
| RefinementCase<celldim> TriaObjectAccessor< celldim, dim >::refinement_case | ( | ) | const |
Return the RefinementCase<dim> of this cell.
| void TriaObjectAccessor< celldim, dim >::set_refinement_case | ( | const RefinementCase< celldim > & | ref_case | ) | const |
Set the RefinementCase<dim> this TriaObject is refined with. Not defined for celldim=1 as lines are always refined resulting in 2 children lines (isotropic refinement).
You should know quite exactly what you are doing if you touch this function. It is exclusively for internal use in the library.
| void TriaObjectAccessor< celldim, dim >::clear_refinement_case | ( | ) | const |
Clear the RefinementCase<dim> of this TriaObject, i.e. reset it to RefinementCase<dim>::no_refinement.
You should know quite exactly what you are doing if you touch this function. It is exclusively for internal use in the library.
| TriaIterator<dim,TriaObjectAccessor<celldim,dim> > TriaObjectAccessor< celldim, dim >::child | ( | const unsigned int | i | ) | const |
Pointer to the ith child.
Reimplemented in DoFAccessor< structdim, DH >, CellAccessor< dim >, DoFAccessor< 1, DH >, DoFAccessor< 2, DH >, DoFAccessor< 3, DH >, and DoFAccessor< 0, DH >.
| TriaIterator<dim,TriaObjectAccessor<celldim,dim> > TriaObjectAccessor< celldim, dim >::isotropic_child | ( | const unsigned int | i | ) | const |
Pointer to the object, which is identical to the ith child for isotropic refinement. If the object is refined anisotropically, the returned child will in fact be a grandchild of the object.
| int TriaObjectAccessor< celldim, dim >::child_index | ( | const unsigned int | i | ) | const |
Index of the ith child. The level of the child is one higher than that of the present cell, if the children of a cell are accessed. The children of faces have no level. If the child does not exist, -1 is returned.
| int TriaObjectAccessor< celldim, dim >::isotropic_child_index | ( | const unsigned int | i | ) | const |
Index of the ith isotropic_child. The level of the (grand-)child is higher than that of the present cell, if the children of a cell are accessed. The children of faces have no level. If the child does not exist, -1 is returned.
| void TriaObjectAccessor< celldim, dim >::set_children | ( | const unsigned int | i, | |
| const int | index | |||
| ) | const |
Set the index of the ith child. Since the children come at least in pairs, we need to store the index of only every second child, i.e. of the even numbered children. Make sure, that the index of child i=0 is set first. Calling this function for odd numbered children is not allowed.
| void TriaObjectAccessor< celldim, dim >::clear_children | ( | ) | const |
Clear the child field, i.e. set it to a value which indicates that this cell has no children.
| bool TriaObjectAccessor< celldim, dim >::has_children | ( | ) | const |
Test whether the object has children.
| unsigned int TriaObjectAccessor< celldim, dim >::n_children | ( | ) | const |
Return the number of immediate children of this object. The number of children of an unrefined cell is zero.
| unsigned int TriaObjectAccessor< celldim, dim >::middle_vertex_index | ( | ) | const |
Return the index of the vertex in the middle of this object, if it exists. In order to exist, the object needs to be refined - for 2D and 3D it needs to be refined isotropically or else the anisotropic children have to be refined again. If the middle vertex does not exist, return numbers::invalid_unsigned_int.
| unsigned int TriaObjectAccessor< celldim, dim >::max_refinement_depth | ( | ) | const |
Number of times that this object is refined. Note that not all its children are refined that often (which is why we prepend max_), the returned number is rather the maximum number of refinement in any branch of children of this object.
For example, if this object is refined, and one of its children is refined exactly one more time, then max_refinement_depth should return 2.
If this object is not refined (i.e. it is active), then the return value is zero.
| unsigned char TriaObjectAccessor< celldim, dim >::boundary_indicator | ( | ) | const |
Boundary indicator of this object. If the return value is 255, then this line is in the interior of the domain.
| void TriaObjectAccessor< celldim, dim >::set_boundary_indicator | ( | const unsigned | char | ) | const |
Set the boundary indicator. The same applies as for the boundary_indicator() function.
Note that it only sets the boundary object of the current object itself, not the indicators of the ones that bound it. For example, in 3d, if this function is called on a face, then the boundary indicator of the 4 edges that bound the face remain unchanged. If you want to set the boundary indicators of face and edges at the same time, use the set_all_boundary_indicators() function.
Caution: Never set the boundary indicator to 255, unless you exactly know what you are doing! This value is reserved for another purpose and algorithms may not work if boundary cells have this boundary indicator or if interior cells have boundary indicators other than 255.
| void TriaObjectAccessor< celldim, dim >::set_all_boundary_indicators | ( | const unsigned | char | ) | const |
Do as set_boundary_indicator() but also set the boundary indicators of the objects that bound the current object. For example, in 3d, if set_boundary_indicator() is called on a face, then the boundary indicator of the 4 edges that bound the face remain unchanged. On the other hand, the boundary indicators of face and edges are all set at the same time using the current function.
| bool TriaObjectAccessor< celldim, dim >::at_boundary | ( | ) | const |
Return whether this object is at the boundary. This is checked via the boundary indicator field, which is always 255 if the object is in the interior of the domain. Obviously, the use of this function is only possible for dim>celldim; however, for dim==celldim, an object is a cell and the CellAccessor class offers another possibility to determine whether a cell is at the boundary or not.
Reimplemented in CellAccessor< dim >.
| double TriaObjectAccessor< celldim, dim >::diameter | ( | ) | const |
Diameter of the object.
The diameter of an object is computed to be the largest diagonal. This is not necessarily the true diameter, but completely sufficient for computations.
| Point<dim> TriaObjectAccessor< celldim, dim >::center | ( | ) | const |
Center of the object. The center of an object is defined to be the average of the vertices, which is also where the (dim-)linear mapping places the midpoint of the unit cell in real space. However, this may not be the barycenter of the object.
| Point<dim> TriaObjectAccessor< celldim, dim >::barycenter | ( | ) | const |
Barycenter of the object.
| double TriaObjectAccessor< celldim, dim >::measure | ( | ) | const |
Volume of the object. Here, the volume is defined to be confined by the (dim-)linear mapping of the unit cell. No information about the boundary is used. If a more sophisticated computation is needed, try the volume of an appropriate finite element class.
| unsigned int TriaObjectAccessor< celldim, dim >::number_of_children | ( | ) | const |
Number of active descendants. This function only counts the number of active descendants, i.e. the number of descendants which are not further refined. Thus, if all of the eight children of a hex are further refined isotropically exactly once, the returned number will be 64, not 80.
If the present cell is not refined, one is returned.
| bool TriaObjectAccessor< celldim, dim >::face_orientation | ( | const unsigned int | face | ) | const |
Return whether the face with index face has its normal pointing in the standard direction (true) or whether it is the opposite (false). Which is the standard direction is documented with the GeometryInfo class. In 1d and 2d, this is always true, but in 3d it may be different, see the respective discussion in the documentation of the GeometryInfo class.
This function is really only for internal use in the library unless you absolutely know what this is all about.
| bool TriaObjectAccessor< celldim, dim >::face_flip | ( | const unsigned int | face | ) | const |
Return whether the face with index face is rotated by 180 degrees (true) or or not (false). In 1d and 2d, this is always false, but in 3d it may be different, see the respective discussion in the documentation of the GeometryInfo class.
This function is really only for internal use in the library unless you absolutely know what this is all about.
| bool TriaObjectAccessor< celldim, dim >::face_rotation | ( | const unsigned int | face | ) | const |
Return whether the face with index face is rotated by 90 degrees (true) or or not (false). In 1d and 2d, this is always false, but in 3d it may be different, see the respective discussion in the documentation of the GeometryInfo class.
This function is really only for internal use in the library unless you absolutely know what this is all about.
| bool TriaObjectAccessor< celldim, dim >::line_orientation | ( | const unsigned int | line | ) | const |
Return whether the line with index line is oriented in standard direction. true indicates, that the line is oriented from vertex 0 to vertex 1, whereas it is the other way around otherwise. In 1d and 2d, this is always true, but in 3d it may be different, see the respective discussion in the documentation of the GeometryInfo classe.
This function is really only for internal use in the library unless you absolutely know what this is all about.
| void TriaObjectAccessor< celldim, dim >::set_face_orientation | ( | const unsigned int | face, | |
| const bool | orientation | |||
| ) | const |
Set whether the quad with index face has its normal pointing in the standard direction (true) or whether it is the opposite (false). Which is the standard direction is documented with the GeometryInfo class.
This function is only for internal use in the library. Setting this flag to any other value than the one that the triangulation has already set is bound to bring you desaster.
It is only possible to set the face_orientation of cells in 3d (i.e. celldim==3 && dim==3).
| void TriaObjectAccessor< celldim, dim >::set_face_flip | ( | const unsigned int | face, | |
| const bool | flip | |||
| ) | const |
Set the flag indicating, what face_flip() will return.
It is only possible to set the face_flip of cells in 3d (i.e. celldim==3 && dim==3).
| void TriaObjectAccessor< celldim, dim >::set_face_rotation | ( | const unsigned int | face, | |
| const bool | rotation | |||
| ) | const |
Set the flag indicating, what face_rotation() will return.
It is only possible to set the face_rotation of cells in 3d (i.e. celldim==3 && dim==3).
| void TriaObjectAccessor< celldim, dim >::set_line_orientation | ( | const unsigned int | line, | |
| const bool | orientation | |||
| ) | const |
Set the flag indicating, what line_orientation() will return.
It is only possible to set the line_orientation of faces in 3d (i.e. celldim==2 && dim==3).
| void TriaObjectAccessor< celldim, dim >::operator= | ( | const TriaObjectAccessor< celldim, dim > & | ) | [private] |
Copy operator. This is normally used in a context like iterator a,b; *a=*b;. Since the meaning is to copy the object pointed to by b to the object pointed to by a and since accessors are not real but virtual objects, this operation is not useful for iterators on triangulations. We declare this function here private, thus it may not be used from outside. Furthermore it is not implemented and will give a linker error if used anyway.
| void TriaObjectAccessor< celldim, dim >::operator++ | ( | ) | [protected] |
This operator advances the iterator to the next element.
For cells only: The next element is next on this level if there are more. If the present element is the last on this level, the first on the next level is accessed.
| void TriaObjectAccessor< celldim, dim >::operator-- | ( | ) | [protected] |
This operator moves the iterator to the previous element.
For cells only: The previous element is previous on this level if index>0. If the present element is the first on this level, the last on the previous level is accessed.
friend class TriaRawIterator [friend] |
Declare some friends.
Reimplemented from TriaAccessor< celldim, dim >.
Reimplemented in DoFAccessor< structdim, DH >, DoFAccessor< 1, DH >, DoFAccessor< 2, DH >, DoFAccessor< 3, DH >, and DoFAccessor< 0, DH >.
const unsigned int TriaObjectAccessor< celldim, dim >::objectdim = celldim [static, private] |
Dimension of the TriaObject this accessor gives access to.
Reimplemented from TriaAccessor< celldim, dim >.
documentation generated on Wed Aug 27 19:12:03 2008 by
doxygen
1.5.6