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))
620 ExcPointerIndexClash());
634 ExcPointerIndexClash());
648 ExcPointerIndexClash());
666 template <
typename G>
679 Assert(user_data_type == data_unknown || user_data_type == data_index,
680 ExcPointerIndexClash());
681 user_data_type = data_index;
683 Assert(i<user_data.size(), ExcIndexRange(i,0,user_data.size()));
684 return user_data[i].i;
692 user_data_type = data_unknown;
693 for (
unsigned int i=0; i<user_data.size(); ++i)
702 user_flags.assign(user_flags.size(),
false);
707 template <
class Archive>
718 template <
typename G>
719 template <
class Archive>
724 ar &refinement_cases;
727 ar &boundary_or_material_id;
729 ar &next_free_single &next_free_pair &reverse_order_next_free_single;
730 ar &user_data &user_data_type;
734 template <
class Archive>
735 void TriaObjectsHex::serialize(Archive &ar,
736 const unsigned int version)
740 ar &face_orientations &face_flips &face_rotations;
744 template <
class Archive>
745 void TriaObjectsQuad3D::serialize(Archive &ar,
746 const unsigned int version)
750 ar &line_orientations;
758 TriaObjectsHex::face_orientation(
const unsigned int cell,
759 const unsigned int face)
const 774 TriaObjectsQuad3D::face_orientation(
const unsigned int cell,
const unsigned int face)
const 784 template <
int dim,
int spacedim>
790 int pos=next_free_single,
792 if (!reverse_order_next_free_single)
796 for (; pos<last; ++pos)
806 reverse_order_next_free_single=
true;
807 next_free_single=used.size()-1;
811 next_free_single=pos+1;
814 if (reverse_order_next_free_single)
818 for (; pos>=0; --pos)
822 next_free_single=pos-1;
825 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, -1, -1);
828 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, 0, pos);
834 template <
int dim,
int spacedim>
840 int pos=next_free_pair,
842 for (; pos<last; ++pos)
852 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, -1, -1);
854 next_free_pair=pos+2;
856 return ::TriaRawIterator<::TriaAccessor<G::dimension,dim,spacedim> >(&tria, 0, pos);
872 DEAL_II_NAMESPACE_CLOSE
UserData contains pointers.
std::vector< UserData > user_data
DeclException3(ExcMemoryWasted, char *, int, int,<< "The container "<< arg1<< " contains "<< arg2<< " elements, but it`s capacity is "<< arg3<< ".")
DeclException0(ExcPointerIndexClash)
unsigned char material_id
void serialize(Archive &ar, const unsigned int version)
UserData contains indices.
std::vector< bool > line_orientations
unsigned int next_free_single
UserDataType user_data_type
unsigned int & user_index(const unsigned int i)
static std::size_t memory_consumption()
unsigned int next_free_pair
DeclException2(ExcMemoryInexact, int, int,<< "The containers have sizes "<< arg1<< " and "<< arg2<< ", which is not as expected.")
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
#define Assert(cond, exc)
void *& user_pointer(const unsigned int i)
std::vector< RefinementCase< G::dimension > > refinement_cases
bool reverse_order_next_free_single
std::vector< bool > face_orientations
std::vector< BoundaryOrMaterialId > boundary_or_material_id
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_single_object(const ::Triangulation< dim, spacedim > &tria)
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
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > next_free_pair_object(const ::Triangulation< dim, spacedim > &tria)
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