|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_tria_accessor_h
17 #define dealii_tria_accessor_h
38 template <
int dim,
int spacedim>
40 template <
typename Accessor>
42 template <
typename Accessor>
44 template <
typename Accessor>
47 template <
int dim,
int spacedim>
53 namespace TriangulationImplementation
62 namespace TriaAccessorImplementation
64 struct Implementation;
71 template <
int structdim,
int dim>
126 template <
int structdim,
int dim,
int spacedim>
128 template <
int dim,
int spacedim>
130 template <
int spacedim>
148 "The operation you are attempting can only be performed for "
149 "(cell, face, or edge) iterators that point to valid "
150 "objects. These objects need not necessarily be active, "
151 "i.e., have no children, but they need to be part of a "
152 "triangulation. (The objects pointed to by an iterator "
153 "may -- after coarsening -- also be objects that used "
154 "to be part of a triangulation, but are now no longer "
155 "used. Their memory location may have been retained "
156 "for re-use upon the next mesh refinement, but is "
157 "currently unused.)");
168 "The operation you are attempting can only be performed for "
169 "(cell, face, or edge) iterators that point to 'active' "
170 "objects. 'Active' objects are those that do not have "
171 "children (in the case of cells), or that are part of "
172 "an active cell (in the case of faces or edges). However, "
173 "the object on which you are trying the current "
174 "operation is not 'active' in this sense.");
181 "The operation you are attempting can only be performed for "
182 "(cell, face, or edge) iterators that have children, "
183 "but the object on which you are trying the current "
184 "operation does not have any.");
192 "The operation you are attempting can only be performed for "
193 "(cell, face, or edge) iterators that have a parent object, "
194 "but the object on which you are trying the current "
195 "operation does not have one -- i.e., it is on the "
196 "coarsest level of the triangulation.");
202 <<
"You can only set the child index if the cell does not "
203 <<
"currently have children registered; or you can clear it. "
204 <<
"The given index was " << arg1
205 <<
" (-1 means: clear children).");
209 template <
typename AccessorType>
212 <<
"You tried to dereference an iterator for which this "
213 <<
"is not possible. More information on this iterator: "
214 <<
"index=" << arg1.index() <<
", state="
224 "Iterators can only be compared if they point to the same "
225 "triangulation, or if neither of them are associated "
226 "with a triangulation.");
259 <<
"You can only set the child index of an even numbered child."
260 <<
"The number of the child given was " << arg1 <<
".");
290 template <
int structdim,
int dim,
int spacedim = dim>
339 const int level = -1,
340 const int index = -1,
511 typename ::internal::TriaAccessorImplementation::
526 template <
typename Accessor>
528 template <
typename Accessor>
530 template <
typename Accessor>
557 template <
int structdim,
int dim,
int spacedim = dim>
575 const int level = -1,
576 const int index = -1,
592 template <
typename OtherAccessor>
659 vertex(
const unsigned int i)
const;
665 typename ::internal::TriangulationImplementation::
666 Iterators<dim, spacedim>::line_iterator
667 line(
const unsigned int i)
const;
673 typename ::internal::TriangulationImplementation::
674 Iterators<dim, spacedim>::quad_iterator
675 quad(
const unsigned int i)
const;
698 template <
int structdim,
int dim,
int spacedim>
712 const int level = -1,
713 const int index = -1,
728 template <
int structdim2,
int dim2,
int spacedim2>
735 template <
int structdim2,
int dim2,
int spacedim2>
829 vertex(
const unsigned int i)
const;
834 typename ::internal::TriangulationImplementation::
835 Iterators<dim, spacedim>::line_iterator
836 line(
const unsigned int i)
const;
850 typename ::internal::TriangulationImplementation::
851 Iterators<dim, spacedim>::quad_iterator
852 quad(
const unsigned int i)
const;
897 face_flip(
const unsigned int face)
const;
983 child(
const unsigned int i)
const;
1438 std::pair<Point<spacedim>,
double>
1546 center(
const bool respect_manifold =
false,
1547 const bool interpolate_from_surrounding =
false)
const;
1633 set(const ::internal::TriangulationImplementation::TriaObject<structdim>
1666 set_face_flip(
const unsigned int face,
const bool flip)
const;
1717 set_children(
const unsigned int i,
const int index)
const;
1730 friend struct ::internal::TriangulationImplementation::Implementation;
1731 friend struct ::internal::TriaAccessorImplementation::Implementation;
1755 template <
int dim,
int spacedim>
1764 static const unsigned int space_dimension = spacedim;
1771 static const unsigned int dimension = dim;
1778 static const unsigned int structure_dimension = 0;
1798 const int level = 0,
1799 const int index = 0,
1805 template <
int structdim2,
int dim2,
int spacedim2>
1811 template <
int structdim2,
int dim2,
int spacedim2>
1839 get_triangulation()
const;
1906 vertex(
const unsigned int i = 0)
const;
1912 typename ::internal::TriangulationImplementation::
1913 Iterators<dim, spacedim>::line_iterator
static line(
const unsigned int);
1924 static typename ::internal::TriangulationImplementation::
1925 Iterators<dim, spacedim>::quad_iterator
1926 quad(
const unsigned int i);
1970 center(
const bool respect_manifold =
false,
1971 const bool interpolate_from_surrounding =
false)
const;
2065 child(
const unsigned int);
2133 template <
typename Accessor>
2135 template <
typename Accessor>
2137 template <
typename Accessor>
2160 template <
int spacedim>
2169 static const unsigned int space_dimension = spacedim;
2176 static const unsigned int dimension = 1;
2183 static const unsigned int structure_dimension = 0;
2222 const VertexKind vertex_kind,
2238 template <
int structdim2,
int dim2,
int spacedim2>
2244 template <
int structdim2,
int dim2,
int spacedim2>
2281 get_triangulation()
const;
2360 vertex(
const unsigned int i = 0)
const;
2373 typename ::internal::TriangulationImplementation::
2374 Iterators<1, spacedim>::line_iterator
static line(
const unsigned int);
2388 static typename ::internal::TriangulationImplementation::
2389 Iterators<1, spacedim>::quad_iterator
2390 quad(
const unsigned int i);
2524 child(
const unsigned int);
2666 template <
int dim,
int spacedim = dim>
2691 const int level = -1,
2692 const int index = -1,
2712 template <
int structdim2,
int dim2,
int spacedim2>
2719 template <
int structdim2,
int dim2,
int spacedim2>
2750 child(
const unsigned int i)
const;
2756 face(
const unsigned int i)
const;
2834 const unsigned int subface_no)
const;
2858 neighbor(
const unsigned int i)
const;
2915 std::pair<unsigned int, unsigned int>
2994 const unsigned int subface_no)
const;
3006 std::pair<unsigned int, unsigned int>
3162 const unsigned int face_no,
3611 template <
int dim_,
int spacedim_>
3643 friend struct ::internal::TriangulationImplementation::Implementation;
3651 template <
int structdim,
int dim,
int spacedim>
3652 template <
typename OtherAccessor>
3654 const OtherAccessor &)
3657 ExcMessage(
"You are attempting an illegal conversion between "
3658 "iterator/accessor types. The constructor you call "
3659 "only exists to make certain template constructs "
3660 "easier to write as dimension independent code but "
3661 "the conversion is not valid in the current context."));
3666 template <
int structdim,
int dim,
int spacedim>
3667 template <
int structdim2,
int dim2,
int spacedim2>
3672 ExcMessage(
"You are attempting an illegal conversion between "
3673 "iterator/accessor types. The constructor you call "
3674 "only exists to make certain template constructs "
3675 "easier to write as dimension independent code but "
3676 "the conversion is not valid in the current context."));
3681 template <
int dim,
int spacedim>
3682 template <
int structdim2,
int dim2,
int spacedim2>
3687 ExcMessage(
"You are attempting an illegal conversion between "
3688 "iterator/accessor types. The constructor you call "
3689 "only exists to make certain template constructs "
3690 "easier to write as dimension independent code but "
3691 "the conversion is not valid in the current context."));
3696 template <
int structdim,
int dim,
int spacedim>
3697 template <
int structdim2,
int dim2,
int spacedim2>
3702 ExcMessage(
"You are attempting an illegal conversion between "
3703 "iterator/accessor types. The constructor you call "
3704 "only exists to make certain template constructs "
3705 "easier to write as dimension independent code but "
3706 "the conversion is not valid in the current context."));
3711 template <
int dim,
int spacedim>
3712 template <
int structdim2,
int dim2,
int spacedim2>
3717 ExcMessage(
"You are attempting an illegal conversion between "
3718 "iterator/accessor types. The constructor you call "
3719 "only exists to make certain template constructs "
3720 "easier to write as dimension independent code but "
3721 "the conversion is not valid in the current context."));
3756 #include "tria_accessor.templates.h"
TriaIterator< TriaAccessor< structdim, dim, spacedim > > isotropic_child(const unsigned int i) const
void set_face_orientation(const unsigned int face, const bool orientation) const
unsigned int neighbor_face_no(const unsigned int neighbor) const
static ::ExceptionBase & ExcCellNotUsed()
static ::ExceptionBase & ExcCellHasNoChildren()
#define DeclExceptionMsg(Exception, defaulttext)
void set_user_flag() const
bool operator!=(const AlignedVector< T > &lhs, const AlignedVector< T > &rhs)
void set_face_flip(const unsigned int face, const bool flip) const
::internal::SubfaceCase< dim > subface_case(const unsigned int face_no) const
void recursively_clear_user_index() const
SynchronousIterators< Iterators > operator++(SynchronousIterators< Iterators > &a)
void set_coarsen_flag() const
static ::ExceptionBase & ExcCantSetChildren(int arg1)
unsigned int face_index(const unsigned int i) const
bool operator<(const SynchronousIterators< Iterators > &a, const SynchronousIterators< Iterators > &b)
static ::ExceptionBase & ExcRefineCellNotActive()
Point< spacedim > center(const bool respect_manifold=false, const bool interpolate_from_surrounding=false) const
int periodic_neighbor_index(const unsigned int i) const
typename TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
static const unsigned int dimension
bool has_children() const
void set_user_index(const unsigned int p) const
static ::ExceptionBase & ExcDereferenceInvalidObject(AccessorType arg1)
bool is_translation_of(const TriaIterator< TriaAccessor< structdim, dim, spacedim >> &o) const
TriaIterator< CellAccessor< dim, spacedim > > parent() const
unsigned int user_index() const
types::boundary_id boundary_id() const
double minimum_vertex_distance() const
static const unsigned int space_dimension
static ::ExceptionBase & ExcCellHasNoParent()
bool operator==(const AlignedVector< T > &lhs, const AlignedVector< T > &rhs)
std::pair< unsigned int, unsigned int > periodic_neighbor_of_coarser_periodic_neighbor(const unsigned face_no) const
void recursively_clear_user_flag() const
TriaIterator< CellAccessor< dim, spacedim > > neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
void clear_children() const
Point< structdim > real_to_unit_cell_affine_approximation(const Point< spacedim > &point) const
const Triangulation< dim, spacedim > * tria
void clear_user_data() const
std::pair< Point< spacedim >, double > enclosing_ball() const
unsigned int number_of_children() const
void set_user_pointer(void *p) const
TriaIterator< CellAccessor< dim, spacedim > > child(const unsigned int i) const
void operator=(const CellAccessor< dim, spacedim > &)=delete
void set_face_rotation(const unsigned int face, const bool rotation) const
static ::ExceptionBase & ExcCellFlaggedForCoarsening()
bool neighbor_is_coarser(const unsigned int neighbor) const
Point< spacedim > barycenter() const
void set_all_manifold_ids(const types::manifold_id) const
@ valid
Iterator points to a valid object.
void set_boundary_id(const types::boundary_id) const
TriaAccessor(const Triangulation< dim, spacedim > *parent=nullptr, const int level=-1, const int index=-1, const AccessorData *local_data=nullptr)
bool is_artificial() const
bool has_periodic_neighbor(const unsigned int i) const
void set_refine_flag(const RefinementCase< dim > ref_case=RefinementCase< dim >::isotropic_refinement) const
RefinementCase< dim > refine_flag_set() const
bool operator==(const TriaAccessorBase &) const
int isotropic_child_index(const unsigned int i) const
int child_index(const unsigned int i) const
void set_material_id(const types::material_id new_material_id) const
const Manifold< dim, spacedim > & get_manifold() const
Point< spacedim > & vertex(const unsigned int i) const
TriaIterator< TriaAccessor< structdim, dim, spacedim > > child(const unsigned int i) const
bool face_orientation(const unsigned int face) const
Point< spacedim > intermediate_point(const Point< structdim > &coordinates) const
static ::ExceptionBase & ExcNeighborIsCoarser()
bool point_inside_codim(const Point< spacedim_ > &p) const
bool user_flag_set() const
void copy_from(const TriaAccessorBase &)
void recursively_set_subdomain_id(const types::subdomain_id new_subdomain_id) const
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
unsigned int user_index() const
void clear_refinement_case() const
unsigned int neighbor_of_neighbor(const unsigned int neighbor) const
void set_active_cell_index(const unsigned int active_cell_index)
void recursively_set_user_index(const unsigned int p) const
static bool is_level_cell()
static ::ExceptionBase & ExcNeighborIsNotCoarser()
void clear_coarsen_flag() const
std::pair< unsigned int, unsigned int > neighbor_of_coarser_neighbor(const unsigned int neighbor) const
types::material_id material_id() const
static ::ExceptionBase & ExcNoPeriodicNeighbor()
@ past_the_end
Iterator reached end of container.
unsigned int max_refinement_depth() const
void set_manifold_id(const types::manifold_id) const
unsigned int line_index(const unsigned int i) const
bool has_boundary_lines() const
static ::ExceptionBase & ExcMessage(std::string arg1)
void set_refinement_case(const RefinementCase< structdim > &ref_case) const
void set_direction_flag(const bool new_direction_flag) const
void set_neighbor(const unsigned int i, const TriaIterator< CellAccessor< dim, spacedim >> &pointer) const
void set_used_flag() const
static ::ExceptionBase & ExcCantCompareIterators()
void clear_user_pointer() const
types::subdomain_id subdomain_id() const
void set_all_boundary_ids(const types::boundary_id) const
#define DEAL_II_NAMESPACE_OPEN
static const unsigned int structure_dimension
void recursively_set_material_id(const types::material_id new_material_id) const
int neighbor_index(const unsigned int i) const
const Triangulation< dim, spacedim > * tria
bool point_inside(const Point< spacedim > &p) const
unsigned int global_vertex_index
bool is_locally_owned_on_level() const
bool periodic_neighbor_is_coarser(const unsigned int i) const
void set_subdomain_id(const types::subdomain_id new_subdomain_id) const
types::manifold_id manifold_id() const
unsigned int periodic_neighbor_face_no(const unsigned int i) const
void clear_used_flag() const
int periodic_neighbor_level(const unsigned int i) const
typename ::internal::TriangulationImplementation::Iterators< dim, spacedim >::quad_iterator quad(const unsigned int i) const
bool direction_flag() const
#define DEAL_II_DEPRECATED
#define DeclException1(Exception1, type1, outsequence)
typename ::internal::TriangulationImplementation::Iterators< dim, spacedim >::line_iterator line(const unsigned int i) const
void set_parent(const unsigned int parent_index)
unsigned int child_iterator_to_index(const TriaIterator< TriaAccessor< structdim, dim, spacedim >> &child) const
void operator=(const TriaAccessorBase *)=delete
void set(const ::internal::TriangulationImplementation::TriaObject< structdim > &o) const
typename ::internal::TriaAccessorImplementation::PresentLevelType< structdim, dim >::type present_level
TriaIterator< TriaAccessor< dim - 1, dim, spacedim > > face(const unsigned int i) const
IteratorState::IteratorStates state() const
unsigned int face_iterator_to_index(const TriaIterator< TriaAccessor< dim - 1, dim, spacedim >> &face) const
TriaIterator< CellAccessor< dim, spacedim > > neighbor(const unsigned int i) const
types::subdomain_id level_subdomain_id() const
unsigned int neighbor_of_neighbor_internal(const unsigned int neighbor) const
bool flag_for_line_refinement(const unsigned int line_no) const
void recursively_clear_user_pointer() const
static ::ExceptionBase & ExcInternalError()
bool line_orientation(const unsigned int line) const
static ::ExceptionBase & ExcCellNotActive()
bool coarsen_flag_set() const
unsigned int periodic_neighbor_of_periodic_neighbor(const unsigned int i) const
RefinementCase< structdim > refinement_case() const
void set_line_orientation(const unsigned int line, const bool orientation) const
#define Assert(cond, exc)
void operator=(const TriaAccessor &)=delete
void * user_pointer() const
unsigned int quad_index(const unsigned int i) const
bool operator!=(const InvalidAccessor &) const
#define DeclException0(Exception0)
void set_manifold_id(const types::manifold_id) const
std::array< TriaIterator< TriaAccessor< dim - 1, dim, spacedim > >, GeometryInfo< dim >::faces_per_cell > face_iterators() const
bool operator==(const InvalidAccessor &) const
bool face_rotation(const unsigned int face) const
void set_children(const unsigned int i, const int index) const
static ::ExceptionBase & ExcSetOnlyEvenChildren(int arg1)
bool has_children() const
bool flag_for_face_refinement(const unsigned int face_no, const RefinementCase< dim - 1 > &face_refinement_case=RefinementCase< dim - 1 >::isotropic_refinement) const
InvalidAccessor(const Triangulation< dim, spacedim > *parent=nullptr, const int level=-1, const int index=-1, const AccessorData *local_data=nullptr)
double extent_in_direction(const unsigned int axis) const
unsigned int n_children() const
unsigned int vertex_index(const unsigned int i) const
TriaAccessorBase(const Triangulation< dim, spacedim > *parent=nullptr, const int level=-1, const int index=-1, const AccessorData *=nullptr)
::internal::TriangulationImplementation::TriaObjects< ::internal::TriangulationImplementation::TriaObject< structdim > > & objects() const
void clear_user_index() const
types::manifold_id manifold_id() const
TriaIterator< CellAccessor< dim, spacedim > > neighbor_or_periodic_neighbor(const unsigned int i) const
void recursively_set_user_pointer(void *p) const
void clear_refine_flag() const
typename ::internal::TriangulationImplementation::Iterators< dim, spacedim >::quad_iterator quad(const unsigned int i) const
typename ::internal::TriangulationImplementation::Iterators< dim, spacedim >::line_iterator line(const unsigned int i) const
#define DEAL_II_NAMESPACE_CLOSE
Point< spacedim > & vertex(const unsigned int i) const
unsigned int global_vertex_index
TriaIterator< CellAccessor< dim, spacedim > > periodic_neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
void clear_user_flag() const
const Triangulation< dim, spacedim > & get_triangulation() const
static ::ExceptionBase & ExcCellFlaggedForRefinement()
void set_level_subdomain_id(const types::subdomain_id new_level_subdomain_id) const
typename TriaAccessor< dim, dim, spacedim >::AccessorData AccessorData
CellAccessor(const Triangulation< dim, spacedim > *parent=nullptr, const int level=-1, const int index=-1, const AccessorData *local_data=nullptr)
typename TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
bool face_flip(const unsigned int face) const
void set_boundary_id_internal(const types::boundary_id id) const
const Triangulation< 1, spacedim > * tria
BoundingBox< spacedim > bounding_box() const
bool is_locally_owned() const
TriaIterator< TriaAccessor< 0, dim, spacedim > > vertex_iterator(const unsigned int i) const
int neighbor_level(const unsigned int i) const
unsigned int active_cell_index() const
void set_user_index(const unsigned int p) const
bool operator!=(const TriaAccessorBase &) const
void copy_from(const InvalidAccessor &)
static ::ExceptionBase & ExcFacesHaveNoLevel()
void recursively_set_user_flag() const
TriaIterator< CellAccessor< dim, spacedim > > periodic_neighbor(const unsigned int i) const
bool operator<(const TriaAccessorBase &other) const