16 #ifndef dealii_tria_objects_h 17 #define dealii_tria_objects_h 19 #include <deal.II/base/config.h> 20 #include <deal.II/base/exceptions.h> 21 #include <deal.II/base/geometry_info.h> 22 #include <deal.II/grid/tria_object.h> 26 DEAL_II_NAMESPACE_OPEN
46 namespace TriangulationImplementation
146 template <
class Archive>
148 const unsigned int version);
184 const unsigned int new_objs_single = 0);
197 template <
int dim,
int spacedim>
212 template <
int dim,
int spacedim>
220 template <
int dim,
int spacedim>
221 typename ::Triangulation<dim,spacedim>::raw_hex_iterator
223 const unsigned int level);
244 bool face_orientation(
const unsigned int cell,
const unsigned int face)
const;
260 unsigned int &
user_index(
const unsigned int i);
265 unsigned int user_index(
const unsigned int i)
const;
300 template <
class Archive>
302 const unsigned int version);
310 <<
"The containers have sizes " << arg1 <<
" and " 311 << arg2 <<
", which is not as expected.");
365 template <
class Archive>
366 void serialize (Archive &ar,
const unsigned int version);
413 bool face_orientation(
const unsigned int cell,
const unsigned int face)
const;
480 template <
class Archive>
482 const unsigned int version);
502 bool face_orientation(
const unsigned int cell,
const unsigned int face)
const;
519 const unsigned int new_quads_single = 0);
543 template <
class Archive>
545 const unsigned int version);
551 template <
typename G>
560 template <
typename G>
569 template <
typename G>
570 template <
class Archive>
583 if (
sizeof(material_id) >
sizeof(boundary_id))
590 template <
typename G>
600 template <
typename G>
614 template <
typename G>
628 template <
typename G>
642 template <
typename G>
652 template <
typename G>
663 template <
typename G>
667 Assert(user_data_type == data_unknown || user_data_type == data_index,
668 ExcPointerIndexClash());
669 user_data_type = data_index;
672 return user_data[i].i;
676 template <
typename G>
680 user_data_type = data_unknown;
681 for (
unsigned int i=0; i<user_data.size(); ++i)
682 user_data[i].p =
nullptr;
686 template <
typename G>
690 user_flags.assign(user_flags.size(),
false);
694 template <
typename G>
695 template <
class Archive>
706 template <
typename G>
707 template <
class Archive>
712 ar &refinement_cases;
715 ar &boundary_or_material_id;
717 ar &next_free_single &next_free_pair &reverse_order_next_free_single;
718 ar &user_data &user_data_type;
722 template <
class Archive>
723 void TriaObjectsHex::serialize(Archive &ar,
724 const unsigned int version)
728 ar &face_orientations &face_flips &face_rotations;
732 template <
class Archive>
733 void TriaObjectsQuad3D::serialize(Archive &ar,
734 const unsigned int version)
738 ar &line_orientations;
746 TriaObjectsHex::face_orientation(
const unsigned int cell,
747 const unsigned int face)
const 762 TriaObjectsQuad3D::face_orientation(
const unsigned int cell,
const unsigned int face)
const 772 template <
int dim,
int spacedim>
778 int pos=next_free_single,
780 if (!reverse_order_next_free_single)
784 for (; pos<last; ++pos)
794 reverse_order_next_free_single=
true;
795 next_free_single=used.size()-1;
799 next_free_single=pos+1;
802 if (reverse_order_next_free_single)
806 for (; pos>=0; --pos)
810 next_free_single=pos-1;
813 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, -1, -1);
816 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, 0, pos);
822 template <
int dim,
int spacedim>
824 TriaObjects<G>::next_free_pair_object (const ::Triangulation<dim,spacedim> &tria)
828 int pos=next_free_pair,
830 for (; pos<last; ++pos)
840 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, -1, -1);
842 next_free_pair=pos+2;
844 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, 0, pos);
853 TriaObjects<TriaObject<2> >::monitor_memory (
const unsigned int)
const;
860 DEAL_II_NAMESPACE_CLOSE
void reserve_space(const unsigned int new_objs)
std::vector< bool > line_orientations
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcMemoryInexact(int arg1, int arg2)
std::size_t memory_consumption() const
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)
typename ::Triangulation< dim, spacedim >::raw_hex_iterator next_free_hex(const ::Triangulation< dim, spacedim > &tria, const unsigned int level)
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)
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_single_object(const ::Triangulation< dim, spacedim > &tria)
const types::material_id invalid_material_id
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_pair_object(const ::Triangulation< dim, spacedim > &tria)
UserDataType user_data_type
void serialize(Archive &ar, const unsigned int version)