
dim space dimensions. There is a derived class for lines in one space dimension, in which case a line is also a cell and thus has much more functionality than in other dimensions.
| typedef TriaAccessor<1,dim>::AccessorData TriaObjectAccessor< 1, dim >::AccessorData |
Propagate typedef from base class to this class.
Reimplemented from TriaAccessor< 1, dim >.
| TriaObjectAccessor< 1, dim >::TriaObjectAccessor | ( | const Triangulation< dim > * | parent = 0, |
|
| const int | level = -1, |
|||
| const int | index = -1, |
|||
| const AccessorData * | local_data = 0 | |||
| ) |
Constructor.
| void TriaObjectAccessor< 1, dim >::set | ( | const internal::Triangulation::TriaObject< 1 > & | l | ) | const |
Copy the data of the given line.
| unsigned int TriaObjectAccessor< 1, dim >::vertex_index | ( | const unsigned int | i | ) | const |
Return the index of vertex i=0,1 of a line.
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< 1, dim >::vertex | ( | const unsigned int | i | ) | const |
Return a reference to the ith vertex.
| bool TriaObjectAccessor< 1, 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< 1, dim >::set_used_flag | ( | ) | const |
Set the used flag. Only for internal use in the library.
| void TriaObjectAccessor< 1, dim >::clear_used_flag | ( | ) | const |
Clear the used flag. Only for internal use in the library.
| bool TriaObjectAccessor< 1, dim >::user_flag_set | ( | ) | const |
Return whether the user flag is set or not.
| void TriaObjectAccessor< 1, dim >::set_user_flag | ( | ) | const |
Flag the user flag for this cell.
| void TriaObjectAccessor< 1, dim >::clear_user_flag | ( | ) | const |
Clear the user flag.
| void TriaObjectAccessor< 1, dim >::recursively_set_user_flag | ( | ) | const |
Set the user flag of this object and of all its children and their children, etc.
| void TriaObjectAccessor< 1, dim >::recursively_clear_user_flag | ( | ) | const |
Clear the user flag of this object and of all its children and their children, etc.
| void TriaObjectAccessor< 1, dim >::clear_user_data | ( | ) | const |
Reset the user data to zero, independent if pointer or index.
| void TriaObjectAccessor< 1, dim >::set_user_pointer | ( | void * | p | ) | const |
Set the user pointer of this line to p.
| void TriaObjectAccessor< 1, 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< 1, 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< 1, dim >::clear_user_pointer | ( | ) | const |
Reset the user pointer of this line to a NULL pointer.
| void* TriaObjectAccessor< 1, dim >::user_pointer | ( | ) | const |
Access the value of the user pointer of this line. 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());.
| RefinementCase<1> TriaObjectAccessor< 1, dim >::refinement_case | ( | ) | const |
Return the RefinementCase<dim> of this cell.
| void TriaObjectAccessor< 1, dim >::set_user_index | ( | const unsigned int | p | ) | const |
Set the user index to p.
| void TriaObjectAccessor< 1, dim >::clear_user_index | ( | ) | const |
Reset the user index to 0.
| unsigned int TriaObjectAccessor< 1, dim >::user_index | ( | ) | const |
Access the value of the user index.
| void TriaObjectAccessor< 1, 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< 1, 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.
| TriaIterator<dim,TriaObjectAccessor<1, dim> > TriaObjectAccessor< 1, dim >::child | ( | const unsigned int | i | ) | const |
Return a pointer to the ith child.
| TriaIterator<dim,TriaObjectAccessor<1,dim> > TriaObjectAccessor< 1, dim >::isotropic_child | ( | const unsigned int | i | ) | const |
Pointer to the object, which is identical to the ith child for isotropic refinement. For lines this does exactly the same as child(i).
| int TriaObjectAccessor< 1, dim >::child_index | ( | const unsigned int | i | ) | const |
Return the index of the ith child. The level of the child is one higher than that of the present cell if dim=1 and lines are cells. Otherwise the line and its children have no level. If the child does not exist, -1 is returned.
| int TriaObjectAccessor< 1, 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< 1, 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. The level of the child is one level up of the level of the cell to which this iterator points if dim=1 and lines are cells. Otherwise the line and its children have no level.
| void TriaObjectAccessor< 1, 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< 1, dim >::has_children | ( | ) | const |
Test whether the line has children.
| unsigned int TriaObjectAccessor< 1, dim >::n_children | ( | ) | const |
Return the number of immediate children of this object.
| unsigned int TriaObjectAccessor< 1, 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< 1, dim >::max_refinement_depth | ( | ) | const |
Return the number of times that this cell 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< 1, dim >::boundary_indicator | ( | ) | const |
Return the boundary indicator of this line. Since boundary data is only useful for structures with a dimension less than the dimension of a cell, this function issues an error if dim<2.
If the return value is 255, then this line is in the interior of the domain.
| void TriaObjectAccessor< 1, dim >::set_boundary_indicator | ( | const unsigned | char | ) | const |
Set the boundary indicator of this line. The same applies as for the boundary_indicator() function.
You should be careful with this function and especially never try to set the boundary indicator to 255, unless you exactly know what you are doing, since 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< 1, 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< 1, dim >::at_boundary | ( | ) | const |
Return whether this line is at the boundary. This is checked via the the boundary indicator field, which is always 255 if the line is in the interior of the domain. Obviously, this is only possible for dim>1; however, for dim==1, a line is a cell and the CellAccessor class offers another possibility to determine whether a cell is at the boundary or not.
| double TriaObjectAccessor< 1, dim >::diameter | ( | ) | const |
Return the length of the line. If the line describes part of the boundary (e.g. if it is face to a cell in 2D) and is not a straight one, ask the finite element class for the correct length!
| Point<dim> TriaObjectAccessor< 1, dim >::center | ( | ) | const |
Return the center of the line. This is the average of the two vertices, which is the obvious definition for straight lines. However, if you use higher order mappings from the unit cell to the real cell (in more than one space dimension), the bounding lines may not necessarily be straight. In that case ask the finite element class for the correct place of the midpoint of the line in real space.
| Point<dim> TriaObjectAccessor< 1, dim >::barycenter | ( | ) | const |
Return the barycenter of the line, which is the midpoint. The same applies as for the center function with regard to lines at the boundary.
| double TriaObjectAccessor< 1, dim >::measure | ( | ) | const |
Return the length of the line. The same applies as for the center function with regard to lines at the boundary.
| unsigned int TriaObjectAccessor< 1, dim >::number_of_children | ( | ) | const |
Compute and return the number of children of this line. Actually, this function only counts the number of active children, i.e. the number if lines which are not further refined. Thus, if both of the two children of a line are further refined exactly once, the returned number will be four, not six.
If the present cell is not refined, one is returned.
| bool TriaObjectAccessor< 1, 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< 1, 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< 1, 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< 1, 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 class.
This function is really only for internal use in the library unless you absolutely know what this is all about.
| void TriaObjectAccessor< 1, 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< 1, dim >::operator= | ( | const TriaObjectAccessor< 1, 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< 1, dim >::operator++ | ( | ) | [protected] |
This operator advances the iterator to the next element.
For dim=1 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< 1, dim >::operator-- | ( | ) | [protected] |
This operator moves the iterator to the previous element.
For dim=1 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.
| internal::Triangulation::TriaObjects<internal::Triangulation::TriaObject<1> >& TriaObjectAccessor< 1, dim >::objects | ( | ) | const [protected] |
Access to the other objects of a Triangulation with same dimension. This function is specialized for dim==1 because lines are stored in TriaLevel<1> for dim==1 but in TriaFace<dim> for dim!=1. All accessor functions using this function can be implemented for all dim without specialization.
friend class TriaRawIterator [friend] |
Declare some friends.
Reimplemented from TriaAccessor< 1, dim >.
const unsigned int TriaObjectAccessor< 1, dim >::objectdim = 1 [static, private] |
Dimension of the TriaObject this accessor gives access to.
Reimplemented from TriaAccessor< 1, dim >.
documentation generated on Thu Nov 20 07:13:39 2008 by
doxygen
1.5.6