16 #ifndef dealii_tria_objects_h 17 #define dealii_tria_objects_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/geometry_info.h> 24 #include <deal.II/grid/tria_object.h> 28 DEAL_II_NAMESPACE_OPEN
42 template <
int dim,
int spacedim>
44 template <
class Accessor>
46 template <
int,
int,
int>
51 namespace TriangulationImplementation
150 template <
class Archive>
152 serialize(Archive &ar,
const unsigned int version);
189 const unsigned int new_objs_single = 0);
202 template <
int dim,
int spacedim>
217 template <
int dim,
int spacedim>
225 template <
int dim,
int spacedim>
226 typename ::Triangulation<dim, spacedim>::raw_hex_iterator
228 const unsigned int level);
316 template <
class Archive>
318 serialize(Archive &ar,
const unsigned int version);
327 <<
"The containers have sizes " << arg1 <<
" and " << arg2
328 <<
", which is not as expected.");
382 template <
class Archive>
384 serialize(Archive &ar,
const unsigned int version);
503 template <
class Archive>
505 serialize(Archive &ar,
const unsigned int version);
544 const unsigned int new_quads_single = 0);
571 template <
class Archive>
573 serialize(Archive &ar,
const unsigned int version);
579 template <
typename G>
587 template <
typename G>
596 template <
typename G>
597 template <
class Archive>
611 if (
sizeof(material_id) >
sizeof(boundary_id))
618 template <
typename G>
621 const unsigned int)
const 627 template <
typename G>
640 template <
typename G>
653 template <
typename G>
654 inline unsigned int &
666 template <
typename G>
675 template <
typename G>
684 template <
typename G>
688 Assert(user_data_type == data_unknown || user_data_type == data_index,
689 ExcPointerIndexClash());
690 user_data_type = data_index;
693 return user_data[i].i;
697 template <
typename G>
701 user_data_type = data_unknown;
702 for (
unsigned int i = 0; i < user_data.size(); ++i)
703 user_data[i].p =
nullptr;
707 template <
typename G>
711 user_flags.assign(user_flags.size(),
false);
715 template <
typename G>
716 template <
class Archive>
726 template <
typename G>
727 template <
class Archive>
732 ar & refinement_cases;
735 ar & boundary_or_material_id;
737 ar &next_free_single &next_free_pair &reverse_order_next_free_single;
738 ar &user_data &user_data_type;
742 template <
class Archive>
744 TriaObjectsHex::serialize(Archive &ar,
const unsigned int version)
748 ar &face_orientations &face_flips &face_rotations;
752 template <
class Archive>
754 TriaObjectsQuad3D::serialize(Archive &ar,
const unsigned int version)
758 ar &line_orientations;
765 TriaObjectsHex::face_orientation(
const unsigned int cell,
766 const unsigned int face)
const 771 face_orientations.size() /
782 TriaObjectsQuad3D::face_orientation(
const unsigned int cell,
783 const unsigned int face)
const 792 template <
int dim,
int spacedim>
795 const ::Triangulation<dim, spacedim> &tria)
800 int pos = next_free_single, last = used.size() - 1;
801 if (!reverse_order_next_free_single)
805 for (; pos < last; ++pos)
815 reverse_order_next_free_single =
true;
816 next_free_single = used.size() - 1;
817 pos = used.size() - 1;
820 next_free_single = pos + 1;
823 if (reverse_order_next_free_single)
827 for (; pos >= 0; --pos)
831 next_free_single = pos - 1;
834 return ::TriaRawIterator<
838 return ::TriaRawIterator<
845 template <
int dim,
int spacedim>
847 TriaObjects<G>::next_free_pair_object(
848 const ::Triangulation<dim, spacedim> &tria)
853 int pos = next_free_pair, last = used.size() - 1;
854 for (; pos < last; ++pos)
864 return ::TriaRawIterator<
867 next_free_pair = pos + 2;
869 return ::TriaRawIterator<
879 TriaObjects<TriaObject<2>>::monitor_memory(
const unsigned int)
const;
886 DEAL_II_NAMESPACE_CLOSE
void reserve_space(const unsigned int new_objs)
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_pair_object(const ::Triangulation< dim, spacedim > &tria)
std::vector< bool > line_orientations
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcMemoryInexact(int arg1, int arg2)
std::size_t memory_consumption() const
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_single_object(const ::Triangulation< dim, spacedim > &tria)
unsigned int next_free_single
void serialize(Archive &ar, const unsigned int version)
unsigned int next_free_pair
bool face_orientation(const unsigned int cell, const unsigned int face) const
void serialize(Archive &ar, const unsigned int version)
std::size_t memory_consumption() const
void monitor_memory(const unsigned int true_dimension) const
std::vector< bool > face_rotations
std::size_t memory_consumption() const
bool reverse_order_next_free_single
void serialize(Archive &ar, const unsigned int version)
std::vector< int > children
bool face_orientation(const unsigned int cell, const unsigned int face) const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
unsigned int & user_index(const unsigned int i)
void monitor_memory(const unsigned int true_dimension) const
std::vector< BoundaryOrMaterialId > boundary_or_material_id
void monitor_memory(const unsigned int true_dimension) const
std::vector< bool > user_flags
std::vector< UserData > user_data
#define Assert(cond, exc)
static ::ExceptionBase & ExcPointerIndexClash()
std::vector< bool > face_orientations
#define DeclException0(Exception0)
void reserve_space(const unsigned int new_objs_in_pairs, const unsigned int new_objs_single=0)
std::vector< RefinementCase< G::dimension > > refinement_cases
std::vector< bool > face_flips
void reserve_space(const unsigned int new_quads_in_pairs, const unsigned int new_quads_single=0)
bool face_orientation(const unsigned int cell, const unsigned int face) const
UserData contains indices.
std::vector< types::manifold_id > manifold_id
void serialize(Archive &ar, const unsigned int version)
UserData contains pointers.
static std::size_t memory_consumption()
void *& user_pointer(const unsigned int i)
typename ::Triangulation< dim, spacedim >::raw_hex_iterator next_free_hex(const ::Triangulation< dim, spacedim > &tria, const unsigned int level)
const types::material_id invalid_material_id
UserDataType user_data_type
void serialize(Archive &ar, const unsigned int version)