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
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);
309 <<
"The container " << arg1 <<
" contains " 310 << arg2 <<
" elements, but it`s capacity is " 318 <<
"The containers have sizes " << arg1 <<
" and " 319 << arg2 <<
", which is not as expected.");
326 <<
"You asked for the next free " << arg1 <<
"_iterator, " 327 "but you can only ask for " << arg2 <<
"_iterators.");
381 template <
class Archive>
382 void serialize (Archive &ar,
const unsigned int version);
429 bool face_orientation(
const unsigned int cell,
const unsigned int face)
const;
494 template <
class Archive>
496 const unsigned int version);
516 bool face_orientation(
const unsigned int cell,
const unsigned int face)
const;
533 const unsigned int new_quads_single = 0);
557 template <
class Archive>
559 const unsigned int version);
565 template <
typename G>
574 template <
typename G>
583 template <
typename G>
584 template <
class Archive>
597 if (
sizeof(material_id) >
sizeof(boundary_id))
666 template <
typename G>
681 Assert(user_data_type == data_unknown || user_data_type == data_index,
682 ExcPointerIndexClash());
683 user_data_type = data_index;
686 return user_data[i].i;
694 user_data_type = data_unknown;
695 for (
unsigned int i=0; i<user_data.size(); ++i)
704 user_flags.assign(user_flags.size(),
false);
709 template <
class Archive>
720 template <
typename G>
721 template <
class Archive>
726 ar &refinement_cases;
729 ar &boundary_or_material_id;
731 ar &next_free_single &next_free_pair &reverse_order_next_free_single;
732 ar &user_data &user_data_type;
736 template <
class Archive>
737 void TriaObjectsHex::serialize(Archive &ar,
738 const unsigned int version)
742 ar &face_orientations &face_flips &face_rotations;
746 template <
class Archive>
747 void TriaObjectsQuad3D::serialize(Archive &ar,
748 const unsigned int version)
752 ar &line_orientations;
760 TriaObjectsHex::face_orientation(
const unsigned int cell,
761 const unsigned int face)
const 776 TriaObjectsQuad3D::face_orientation(
const unsigned int cell,
const unsigned int face)
const 786 template <
int dim,
int spacedim>
792 int pos=next_free_single,
794 if (!reverse_order_next_free_single)
798 for (; pos<last; ++pos)
808 reverse_order_next_free_single=
true;
809 next_free_single=used.size()-1;
813 next_free_single=pos+1;
816 if (reverse_order_next_free_single)
820 for (; pos>=0; --pos)
824 next_free_single=pos-1;
827 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, -1, -1);
830 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, 0, pos);
836 template <
int dim,
int spacedim>
838 TriaObjects<G>::next_free_pair_object (const ::Triangulation<dim,spacedim> &tria)
842 int pos=next_free_pair,
844 for (; pos<last; ++pos)
854 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, -1, -1);
856 next_free_pair=pos+2;
858 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, 0, pos);
867 TriaObjects<TriaObject<2> >::monitor_memory (
const unsigned int)
const;
874 DEAL_II_NAMESPACE_CLOSE
UserData contains pointers.
#define DeclException2(Exception2, type1, type2, outsequence)
std::vector< UserData > user_data
std::size_t memory_consumption() const
bool face_orientation(const unsigned int cell, const unsigned int face) const
static ::ExceptionBase & ExcMemoryInexact(int arg1, int arg2)
unsigned char material_id
void serialize(Archive &ar, const unsigned int version)
void reserve_space(const unsigned int new_quads_in_pairs, const unsigned int new_quads_single=0)
UserData contains indices.
std::vector< bool > line_orientations
bool face_orientation(const unsigned int cell, const unsigned int face) const
unsigned int next_free_single
static ::ExceptionBase & ExcPointerIndexClash()
UserDataType user_data_type
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
unsigned int & user_index(const unsigned int i)
static ::ExceptionBase & ExcWrongIterator(char *arg1, char *arg2)
static std::size_t memory_consumption()
unsigned int next_free_pair
void serialize(Archive &ar, const unsigned int version)
std::vector< int > children
std::vector< bool > face_flips
bool face_orientation(const unsigned int cell, const unsigned int face) const
void monitor_memory(const unsigned int true_dimension) const
void serialize(Archive &ar, const unsigned int version)
#define Assert(cond, exc)
void *& user_pointer(const unsigned int i)
std::vector< RefinementCase< G::dimension > > refinement_cases
#define DeclException0(Exception0)
bool reverse_order_next_free_single
void reserve_space(const unsigned int new_objs)
void monitor_memory(const unsigned int true_dimension) const
std::vector< bool > face_orientations
std::vector< BoundaryOrMaterialId > boundary_or_material_id
void monitor_memory(const unsigned int true_dimension) const
std::size_t memory_consumption() const
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_single_object(const ::Triangulation< dim, spacedim > &tria)
std::size_t memory_consumption() const
typename ::Triangulation< dim, spacedim >::raw_hex_iterator next_free_hex(const ::Triangulation< dim, spacedim > &tria, const unsigned int level)
std::vector< types::manifold_id > manifold_id
unsigned char boundary_id
#define DeclException3(Exception3, type1, type2, type3, outsequence)
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_pair_object(const ::Triangulation< dim, spacedim > &tria)
void serialize(Archive &ar, const unsigned int version)
static ::ExceptionBase & ExcMemoryWasted(char *arg1, int arg2, int arg3)
void serialize(Archive &ar, const unsigned int version)
std::vector< bool > user_flags
void reserve_space(const unsigned int new_objs_in_pairs, const unsigned int new_objs_single=0)
const types::material_id invalid_material_id
std::vector< bool > face_rotations