16 #ifndef dealii__tria_accessor_h 17 #define dealii__tria_accessor_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/geometry_info.h> 23 #include <deal.II/base/point.h> 24 #include <deal.II/grid/tria_iterator_base.h> 25 #include <deal.II/grid/tria_iterator_selector.h> 26 #include <deal.II/grid/cell_id.h> 31 DEAL_II_NAMESPACE_OPEN
38 template <
int dim,
int spacedim>
class Boundary;
39 template <
int dim,
int spacedim>
class Manifold;
73 type (
const int level)
87 void operator ++ ()
const 92 void operator -- ()
const 112 template <
int structdim,
int dim,
int spacedim>
class TriaAccessor;
113 template <
int dim,
int spacedim>
class TriaAccessor<0, dim, spacedim>;
114 template <
int spacedim>
class TriaAccessor<0, 1, spacedim>;
166 <<
"You can only set the child index if the cell has no " 167 <<
"children, or clear it. The given " 168 <<
"index was " << arg1 <<
" (-1 means: clear children)");
220 <<
"You can only set the child index of an even numbered child." 221 <<
"The number of the child given was " << arg1 <<
".");
251 template <
int structdim,
int dim,
int spacedim=dim>
288 const int level = -1,
289 const int index = -1,
455 typename ::internal::TriaAccessor::PresentLevelType<structdim,dim>::type
present_level;
497 template <
int structdim,
int dim,
int spacedim=dim>
514 const int level = -1,
515 const int index = -1,
531 template <
typename OtherAccessor>
549 void operator -- ()
const;
581 template <
int structdim,
int dim,
int spacedim>
596 const int level = -1,
597 const int index = -1,
612 template <
int structdim2,
int dim2,
int spacedim2>
619 template <
int structdim2,
int dim2,
int spacedim2>
641 typename ::internal::Triangulation::Iterators<dim,spacedim>::vertex_iterator
703 typename ::internal::Triangulation::Iterators<dim,spacedim>::line_iterator
704 line (
const unsigned int i)
const;
712 unsigned int line_index (
const unsigned int i)
const;
717 typename ::internal::Triangulation::Iterators<dim,spacedim>::quad_iterator
718 quad (
const unsigned int i)
const;
726 unsigned int quad_index (
const unsigned int i)
const;
760 bool face_flip (
const unsigned int face)
const;
840 child (
const unsigned int i)
const;
1290 const bool use_laplace_transformation=
false)
const;
1356 void set (const ::internal::Triangulation::TriaObject<structdim> &o)
const;
1366 const bool orientation)
const;
1379 const bool orientation)
const;
1388 const bool flip)
const;
1397 const bool rotation)
const;
1457 friend struct ::internal::Triangulation::Implementation;
1458 friend struct ::internal::TriaAccessor::Implementation;
1479 template<
int dim,
int spacedim>
1522 const int level = 0,
1523 const int index = 0,
1529 template <
int structdim2,
int dim2,
int spacedim2>
1535 template <
int structdim2,
int dim2,
int spacedim2>
1547 static int level ();
1607 unsigned int vertex_index (
const unsigned int i = 0)
const;
1620 typename ::internal::Triangulation::Iterators<dim,spacedim>::line_iterator
1621 static line (
const unsigned int);
1626 static unsigned int line_index (
const unsigned int i);
1632 typename ::internal::Triangulation::Iterators<dim,spacedim>::quad_iterator
1633 quad (
const unsigned int i);
1638 static unsigned int quad_index (
const unsigned int i);
1674 const bool use_laplace_transformation=
false)
const;
1704 static bool face_flip (
const unsigned int face);
1754 child (
const unsigned int);
1812 template <
typename Accessor>
friend class TriaIterator;
1827 template <
int spacedim>
1889 const VertexKind vertex_kind,
1905 template <
int structdim2,
int dim2,
int spacedim2>
1911 template <
int structdim2,
int dim2,
int spacedim2>
1931 static int level ();
1992 unsigned int vertex_index (
const unsigned int i = 0)
const;
2011 typename ::internal::Triangulation::Iterators<1,spacedim>::line_iterator
2012 static line (
const unsigned int);
2020 static unsigned int line_index (
const unsigned int i);
2026 typename ::internal::Triangulation::Iterators<1,spacedim>::quad_iterator
2027 quad (
const unsigned int i);
2035 static unsigned int quad_index (
const unsigned int i);
2088 static bool face_flip (
const unsigned int face);
2138 child (
const unsigned int);
2281 template <
int dim,
int spacedim=dim>
2306 const int level = -1,
2307 const int index = -1,
2327 template <
int structdim2,
int dim2,
int spacedim2>
2334 template <
int structdim2,
int dim2,
int spacedim2>
2353 child (
const unsigned int i)
const;
2359 face (
const unsigned int i)
const;
2422 const unsigned int subface_no)
const;
2446 neighbor (
const unsigned int i)
const;
2499 std::pair<unsigned int, unsigned int>
2570 const unsigned int subface_no)
const;
2581 std::pair<unsigned int, unsigned int>
3128 template<
int dim_,
int spacedim_ >
3165 friend struct ::internal::Triangulation::Implementation;
3174 template <
int structdim,
int dim,
int spacedim>
3175 template <
typename OtherAccessor>
3180 ExcMessage (
"You are attempting an illegal conversion between " 3181 "iterator/accessor types. The constructor you call " 3182 "only exists to make certain template constructs " 3183 "easier to write as dimension independent code but " 3184 "the conversion is not valid in the current context."));
3189 template <
int structdim,
int dim,
int spacedim>
3190 template <
int structdim2,
int dim2,
int spacedim2>
3195 ExcMessage (
"You are attempting an illegal conversion between " 3196 "iterator/accessor types. The constructor you call " 3197 "only exists to make certain template constructs " 3198 "easier to write as dimension independent code but " 3199 "the conversion is not valid in the current context."));
3204 template <
int dim,
int spacedim>
3205 template <
int structdim2,
int dim2,
int spacedim2>
3210 ExcMessage (
"You are attempting an illegal conversion between " 3211 "iterator/accessor types. The constructor you call " 3212 "only exists to make certain template constructs " 3213 "easier to write as dimension independent code but " 3214 "the conversion is not valid in the current context."));
3219 template <
int structdim,
int dim,
int spacedim>
3220 template <
int structdim2,
int dim2,
int spacedim2>
3225 ExcMessage (
"You are attempting an illegal conversion between " 3226 "iterator/accessor types. The constructor you call " 3227 "only exists to make certain template constructs " 3228 "easier to write as dimension independent code but " 3229 "the conversion is not valid in the current context."));
3234 template <
int dim,
int spacedim>
3235 template <
int structdim2,
int dim2,
int spacedim2>
3240 ExcMessage (
"You are attempting an illegal conversion between " 3241 "iterator/accessor types. The constructor you call " 3242 "only exists to make certain template constructs " 3243 "easier to write as dimension independent code but " 3244 "the conversion is not valid in the current context."));
3262 DEAL_II_NAMESPACE_CLOSE
3265 # include "tria_accessor.templates.h"
unsigned int periodic_neighbor_of_periodic_neighbor(const unsigned int i) const
void clear_used_flag() const
TriaAccessor< dim, dim, spacedim >::AccessorData AccessorData
static ::ExceptionBase & ExcUnusedCellAsChild()
static ::ExceptionBase & ExcCellHasNoChildren()
bool point_inside_codim(const Point< spacedim_ > &p) const
void set_face_rotation(const unsigned int face, const bool rotation) const
TriaIterator< CellAccessor< dim, spacedim > > neighbor_or_periodic_neighbor(const unsigned int i) const
static ::ExceptionBase & ExcNeighborIsNotCoarser()
static ::ExceptionBase & ExcUnusedCellAsNeighbor()
unsigned int global_vertex_index
void set_active_cell_index(const unsigned int active_cell_index)
void recursively_clear_user_pointer() const
unsigned int active_cell_index() const
bool operator==(const InvalidAccessor &) const
static ::ExceptionBase & ExcNeighborIsCoarser()
static ::ExceptionBase & ExcRefineCellNotActive()
unsigned int neighbor_of_neighbor_internal(const unsigned int neighbor) const
void set_neighbor(const unsigned int i, const TriaIterator< CellAccessor< dim, spacedim > > &pointer) const
unsigned int user_index() const
unsigned char material_id
int isotropic_child_index(const unsigned int i) const
const Triangulation< dim, spacedim > * tria
void * user_pointer() const
types::material_id material_id() const
TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
bool flag_for_line_refinement(const unsigned int line_no) const
void set_line_orientation(const unsigned int line, const bool orientation) const
TriaIterator< TriaAccessor< dim-1, dim, spacedim > > face(const unsigned int i) const
void copy_from(const TriaAccessorBase &)
double extent_in_direction(const unsigned int axis) const
bool operator!=(const TriaAccessorBase &) const
unsigned int n_children() const
const Boundary< dim, spacedim > & get_boundary() const
void set_all_manifold_ids(const types::manifold_id) const
const Triangulation< 1, spacedim > * tria
void set_children(const unsigned int i, const int index) const
void clear_user_pointer() const
unsigned int line_index(const unsigned int i) const
static ::ExceptionBase & ExcFacesHaveNoLevel()
unsigned int face_index(const unsigned int i) const
TriaIterator< CellAccessor< dim, spacedim > > neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
bool neighbor_is_coarser(const unsigned int neighbor) const
bool has_children() const
unsigned int vertex_index(const unsigned int i) const
typename ::internal::Triangulation::Iterators< dim, spacedim >::vertex_iterator vertex_iterator(const unsigned int i) const
types::manifold_id manifold_id() const
bool is_locally_owned() const
bool is_translation_of(const TriaIterator< TriaAccessor< structdim, dim, spacedim > > &o) const
bool face_rotation(const unsigned int face) const
static ::ExceptionBase & ExcCellNotUsed()
void copy_from(const InvalidAccessor &)
void clear_user_data() const
TriaIterator< CellAccessor< dim, spacedim > > parent() const
static const unsigned int space_dimension
void set_user_pointer(void *p) const
void set_boundary_id_internal(const types::boundary_id id) const
bool coarsen_flag_set() const
TriaIterator< CellAccessor< dim, spacedim > > neighbor(const unsigned int i) const
::internal::Triangulation::TriaObjects<::internal::Triangulation::TriaObject< structdim > > & objects() const
TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
static ::ExceptionBase & ExcMessage(std::string arg1)
bool has_periodic_neighbor(const unsigned int i) const
void recursively_set_user_flag() const
bool operator==(const TriaAccessorBase &) const
typename ::internal::Triangulation::Iterators< dim, spacedim >::quad_iterator quad(const unsigned int i) const
void set_coarsen_flag() const
void operator=(const CellAccessor< dim, spacedim > &)
#define DeclException1(Exception1, type1, outsequence)
void clear_user_flag() const
bool is_locally_owned_on_level() const
bool periodic_neighbor_is_coarser(const unsigned int i) const
static ::ExceptionBase & ExcCellFlaggedForCoarsening()
static ::ExceptionBase & ExcSetOnlyEvenChildren(int arg1)
#define Assert(cond, exc)
std::pair< unsigned int, unsigned int > periodic_neighbor_of_coarser_periodic_neighbor(const unsigned face_no) const
Point< spacedim > & vertex(const unsigned int i) const
bool line_orientation(const unsigned int line) const
void set_material_id(const types::material_id new_material_id) const
TriaAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
static ::ExceptionBase & ExcUncaughtCase()
const Triangulation< dim, spacedim > * tria
#define DeclException0(Exception0)
void set_face_orientation(const unsigned int face, const bool orientation) const
unsigned int quad_index(const unsigned int i) const
TriaAccessorBase & operator=(const TriaAccessorBase &)
bool operator<(const TriaAccessorBase &other) const
RefinementCase< dim > refine_flag_set() const
static ::ExceptionBase & ExcCellNotActive()
IteratorState::IteratorStates state() const
void set_refine_flag(const RefinementCase< dim > ref_case=RefinementCase< dim >::isotropic_refinement) const
typename ::internal::TriaAccessor::PresentLevelType< structdim, dim >::type present_level
static ::ExceptionBase & ExcNoPeriodicNeighbor()
static ::ExceptionBase & ExcCantSetChildren(int arg1)
void clear_refine_flag() const
Point< spacedim > center(const bool respect_manifold=false, const bool use_laplace_transformation=false) const
void recursively_set_material_id(const types::material_id new_material_id) const
unsigned int subdomain_id
void clear_children() const
void recursively_clear_user_index() const
TriaIterator< CellAccessor< dim, spacedim > > periodic_neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
void set_user_index(const unsigned int p) const
double minimum_vertex_distance() const
void clear_user_index() const
bool has_children() const
void recursively_clear_user_flag() const
static ::ExceptionBase & ExcCellHasNoParent()
void set_all_boundary_ids(const types::boundary_id) const
bool is_artificial() const
types::boundary_id boundary_id() const
int periodic_neighbor_level(const unsigned int i) const
void recursively_set_user_pointer(void *p) const
std::pair< unsigned int, unsigned int > neighbor_of_coarser_neighbor(const unsigned int neighbor) const
bool flag_for_face_refinement(const unsigned int face_no, const RefinementCase< dim-1 > &face_refinement_case=RefinementCase< dim-1 >::isotropic_refinement) const
void set_manifold_id(const types::manifold_id) const
void recursively_set_subdomain_id(const types::subdomain_id new_subdomain_id) const
void set_boundary_id(const types::boundary_id) const
bool face_flip(const unsigned int face) const
::internal::SubfaceCase< dim > subface_case(const unsigned int face_no) const
int neighbor_level(const unsigned int i) const
bool point_inside(const Point< spacedim > &p) const
Point< spacedim > barycenter() const
void set_direction_flag(const bool new_direction_flag) const
static const unsigned int structure_dimension
unsigned int periodic_neighbor_face_no(const unsigned int i) const
CellAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
int periodic_neighbor_index(const unsigned int i) const
TriaIterator< CellAccessor< dim, spacedim > > periodic_neighbor(const unsigned int i) const
unsigned int number_of_children() const
Triangulation< dim, spacedim > Container
void clear_refinement_case() const
int child_index(const unsigned int i) const
void set_parent(const unsigned int parent_index)
void clear_coarsen_flag() const
bool face_orientation(const unsigned int face) const
Point< spacedim > intermediate_point(const Point< structdim > &coordinates) const
bool direction_flag() const
InvalidAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
int neighbor_index(const unsigned int i) const
const Triangulation< dim, spacedim > & get_triangulation() const
void set_level_subdomain_id(const types::subdomain_id new_level_subdomain_id) const
void recursively_set_user_index(const unsigned int p) const
TriaIterator< TriaAccessor< structdim, dim, spacedim > > isotropic_child(const unsigned int i) const
void set_subdomain_id(const types::subdomain_id new_subdomain_id) const
unsigned char boundary_id
types::subdomain_id level_subdomain_id() const
void set_user_flag() const
bool user_flag_set() const
void set_face_flip(const unsigned int face, const bool flip) const
unsigned int neighbor_face_no(const unsigned int neighbor) const
types::subdomain_id subdomain_id() const
static ::ExceptionBase & ExcCellFlaggedForRefinement()
static const unsigned int dimension
unsigned int global_vertex_index
const Manifold< dim, spacedim > & get_manifold() const
void set_refinement_case(const RefinementCase< structdim > &ref_case) const
TriaAccessorBase(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *=0)
RefinementCase< structdim > refinement_case() const
void operator=(const TriaAccessor &)
typename ::internal::Triangulation::Iterators< dim, spacedim >::line_iterator line(const unsigned int i) const
unsigned int max_refinement_depth() const
static ::ExceptionBase & ExcDereferenceInvalidObject()
unsigned int neighbor_of_neighbor(const unsigned int neighbor) const
void set_used_flag() const
TriaIterator< CellAccessor< dim, spacedim > > child(const unsigned int i) const
bool has_boundary_lines() const
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcCantCompareIterators()
TriaIterator< TriaAccessor< structdim, dim, spacedim > > child(const unsigned int i) const