16 #ifndef dealii__geometry_info_h 17 #define dealii__geometry_info_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/point.h> 24 DEAL_II_NAMESPACE_OPEN
90 operator unsigned int ()
const;
299 cut_xy = cut_x | cut_y,
375 cut_xy = cut_x | cut_y,
383 cut_xz = cut_x | cut_z,
387 cut_yz = cut_y | cut_z,
391 cut_xyz = cut_x | cut_y | cut_z,
446 operator unsigned char ()
const;
487 template <
class Archive>
489 const unsigned int version);
496 <<
"The refinement flags given (" << arg1 <<
") contain set bits that do not " 497 <<
"make sense for the space dimension of the object to which they are applied.");
504 unsigned char value :
810 operator unsigned char ()
const;
822 <<
"The subface case given (" << arg1 <<
") does not make sense " 823 <<
"for the space dimension of the object to which they are applied.");
830 unsigned char value :
1615 const unsigned int subface_no);
1625 const unsigned int face_no,
1626 const bool face_orientation =
true,
1627 const bool face_flip =
false,
1628 const bool face_rotation =
false);
1639 const unsigned int face_no,
1640 const bool face_orientation =
true,
1641 const bool face_flip =
false,
1642 const bool face_rotation =
false);
1651 const unsigned int line_no);
1710 const unsigned int face,
1711 const unsigned int subface,
1712 const bool face_orientation =
true,
1713 const bool face_flip =
false,
1714 const bool face_rotation =
false,
1734 const unsigned int vertex);
1759 const unsigned int vertex,
1760 const bool face_orientation =
true,
1761 const bool face_flip =
false,
1762 const bool face_rotation =
false);
1778 const unsigned int line,
1779 const bool face_orientation =
true,
1780 const bool face_flip =
false,
1781 const bool face_rotation =
false);
1795 const bool face_orientation =
true,
1796 const bool face_flip =
false,
1797 const bool face_rotation =
false);
1811 const bool face_orientation =
true,
1812 const bool face_flip =
false,
1813 const bool face_rotation =
false);
1827 const bool face_orientation =
true,
1828 const bool face_flip =
false,
1829 const bool face_rotation =
false);
1843 const bool face_orientation =
true,
1844 const bool face_flip =
false,
1845 const bool face_rotation =
false);
1879 const unsigned int child_index,
1891 const unsigned int child_index,
1943 const unsigned int i);
1952 const unsigned int i);
2005 template <
int spacedim>
2008 #ifndef DEAL_II_CONSTEXPR_BUG 2013 Tensor<spacedim-dim,spacedim> *forms);
2058 <<
"The coordinates must satisfy 0 <= x_i <= 1, " 2059 <<
"but here we have x_i=" << arg1);
2066 <<
"RefinementCase<dim> " << arg1 <<
": face " << arg2
2067 <<
" has no subface " << arg3);
2078 #ifndef DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG 2112 const unsigned int i);
2117 const unsigned int i);
2122 const unsigned int i);
2141 object (static_cast<Object>(object_dimension))
2146 GeometryPrimitive::operator
unsigned int ()
const 2148 return static_cast<unsigned int>(object);
2160 value (subface_possibility)
2166 SubfaceCase<dim>::operator
unsigned char ()
const 2181 return static_cast<unsigned char>(-1);
2190 const unsigned int dim = 1;
2204 const unsigned int dim = 2;
2220 const unsigned int dim = 3;
2246 value (refinement_case)
2254 ExcInvalidRefinementCase (refinement_case));
2263 value (refinement_case)
2271 ExcInvalidRefinementCase (refinement_case));
2328 template <
class Archive>
2334 unsigned char uchar_value = value;
2336 value = uchar_value;
2347 Assert (vertex < vertices_per_cell,
2350 return Point<1>(
static_cast<double>(vertex));
2360 Assert (vertex < vertices_per_cell,
2363 return Point<2>(vertex%2, vertex/2);
2373 Assert (vertex < vertices_per_cell,
2376 return Point<3>(vertex%2, vertex/2%2, vertex/4);
2398 Assert ((p[0] >= 0) && (p[0] <= 1), ExcInvalidCoordinate(p[0]));
2400 return (p[0] <= 0.5 ? 0 : 1);
2410 Assert ((p[0] >= 0) && (p[0] <= 1), ExcInvalidCoordinate(p[0]));
2411 Assert ((p[1] >= 0) && (p[1] <= 1), ExcInvalidCoordinate(p[1]));
2413 return (p[0] <= 0.5 ?
2414 (p[1] <= 0.5 ? 0 : 2) :
2415 (p[1] <= 0.5 ? 1 : 3));
2425 Assert ((p[0] >= 0) && (p[0] <= 1), ExcInvalidCoordinate(p[0]));
2426 Assert ((p[1] >= 0) && (p[1] <= 1), ExcInvalidCoordinate(p[1]));
2427 Assert ((p[2] >= 0) && (p[2] <= 1), ExcInvalidCoordinate(p[2]));
2429 return (p[0] <= 0.5 ?
2431 (p[2] <= 0.5 ? 0 : 4) :
2432 (p[2] <= 0.5 ? 2 : 6)) :
2434 (p[2] <= 0.5 ? 1 : 5) :
2435 (p[2] <= 0.5 ? 3 : 7)));
2455 const unsigned int child_index,
2465 return Point<1>(p*2.0-unit_cell_vertex(child_index));
2474 const unsigned int child_index,
2482 switch (refine_case)
2496 point-=unit_cell_vertex(child_index);
2511 const unsigned int child_index,
2524 switch (refine_case)
2544 if (child_index%2==1)
2546 if (child_index/2==1)
2556 if (child_index/2==1)
2558 if (child_index%2==1)
2564 if (child_index%2==1)
2566 if (child_index/2==1)
2571 point-=unit_cell_vertex(child_index);
2586 const unsigned int ,
2600 const unsigned int child_index,
2610 return (p+unit_cell_vertex(child_index))*0.5;
2619 const unsigned int child_index,
2632 switch (refine_case)
2650 if (child_index%2==1)
2652 if (child_index/2==1)
2662 if (child_index/2==1)
2664 if (child_index%2==1)
2670 if (child_index%2==1)
2672 if (child_index/2==1)
2678 point+=unit_cell_vertex(child_index);
2694 const unsigned int child_index,
2701 switch (refine_case)
2714 point+=unit_cell_vertex(child_index);
2730 const unsigned int ,
2744 return (p[0] >= 0.) && (p[0] <= 1.);
2754 return (p[0] >= 0.) && (p[0] <= 1.) &&
2755 (p[1] >= 0.) && (p[1] <= 1.);
2765 return (p[0] >= 0.) && (p[0] <= 1.) &&
2766 (p[1] >= 0.) && (p[1] <= 1.) &&
2767 (p[2] >= 0.) && (p[2] <= 1.);
2776 return (p[0] >= -eps) && (p[0] <= 1.+
eps);
2787 const double l = -
eps, u = 1+
eps;
2788 return (p[0] >= l) && (p[0] <= u) &&
2789 (p[1] >= l) && (p[1] <= u);
2800 const double l = -
eps, u = 1.0+
eps;
2801 return (p[0] >= l) && (p[0] <= u) &&
2802 (p[1] >= l) && (p[1] <= u) &&
2803 (p[2] >= l) && (p[2] <= u);
2808 DEAL_II_NAMESPACE_CLOSE
static Point< dim > child_to_cell_coordinates(const Point< dim > &p, const unsigned int child_index, const RefinementCase< dim > refine_case=RefinementCase< dim >::isotropic_refinement)
static const unsigned int unit_normal_direction[faces_per_cell]
static unsigned int standard_to_real_face_vertex(const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static std::size_t memory_consumption()
static const unsigned int hexes_per_cell
static unsigned int child_cell_from_point(const Point< dim > &p)
static RefinementCase< 1 > line_refinement_case(const RefinementCase< dim > &cell_refinement_case, const unsigned int line_no)
static unsigned int real_to_standard_face_line(const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static bool is_inside_unit_cell(const Point< dim > &p)
GeometryPrimitive(const Object object)
static unsigned int face_to_cell_vertices(const unsigned int face, const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static const unsigned int quads_per_face
void serialize(Archive &ar, const unsigned int version)
static unsigned int line_to_cell_vertices(const unsigned int line, const unsigned int vertex)
static const unsigned int max_children_per_face
static Point< dim > cell_to_child_coordinates(const Point< dim > &p, const unsigned int child_index, const RefinementCase< dim > refine_case=RefinementCase< dim >::isotropic_refinement)
static RefinementCase< dim-1 > face_refinement_case(const RefinementCase< dim > &cell_refinement_case, const unsigned int face_no, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static Point< dim > unit_cell_vertex(const unsigned int vertex)
#define AssertThrow(cond, exc)
static const unsigned int opposite_face[faces_per_cell]
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcInvalidSubfaceCase(int arg1)
static const unsigned int vertices_per_cell
RefinementCase operator~() const
static const unsigned int max_children_per_cell
static const unsigned int quads_per_cell
static const unsigned int lines_per_cell
static ::ExceptionBase & ExcInvalidSubface(int arg1, int arg2, int arg3)
RefinementCase operator|(const RefinementCase &r) const
static const unsigned int vertex_to_face[vertices_per_cell][dim]
static unsigned int n_children(const RefinementCase< dim > &refinement_case)
static const unsigned int vertices_per_face
#define DeclException1(Exception1, type1, outsequence)
static unsigned int face_to_cell_lines(const unsigned int face, const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static unsigned int child_cell_on_face(const RefinementCase< dim > &ref_case, const unsigned int face, const unsigned int subface, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false, const RefinementCase< dim-1 > &face_refinement_case=RefinementCase< dim-1 >::isotropic_refinement)
static const unsigned int ucd_to_deal[vertices_per_cell]
#define Assert(cond, exc)
static double distance_to_unit_cell(const Point< dim > &p)
static ::ExceptionBase & ExcInvalidCoordinate(double arg1)
RefinementCase operator&(const RefinementCase &r) const
static const unsigned int lines_per_face
static std::size_t memory_consumption()
static unsigned int standard_to_real_face_line(const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static const int unit_normal_orientation[faces_per_cell]
static RefinementCase< dim > min_cell_refinement_case_for_line_refinement(const unsigned int line_no)
static void alternating_form_at_vertices(const Point< spacedim >(&vertices)[vertices_per_cell], Tensor< spacedim-dim, spacedim >(&forms)[vertices_per_cell])
SubfaceCase(const typename SubfacePossibilities< dim >::Possibilities subface_possibility)
static unsigned int n_subfaces(const internal::SubfaceCase< dim > &subface_case)
static unsigned int real_to_standard_face_vertex(const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static Point< dim > project_to_unit_cell(const Point< dim > &p)
static const unsigned int dx_to_deal[vertices_per_cell]
static ::ExceptionBase & ExcNotImplemented()
static const unsigned int faces_per_cell
#define DeclException3(Exception3, type1, type2, type3, outsequence)
static ::ExceptionBase & ExcInvalidRefinementCase(int arg1)
Point< 3 > point(const gp_Pnt &p)
static Tensor< 1, dim > d_linear_shape_function_gradient(const Point< dim > &xi, const unsigned int i)
static double subface_ratio(const internal::SubfaceCase< dim > &subface_case, const unsigned int subface_no)
static RefinementCase< dim > min_cell_refinement_case_for_face_refinement(const RefinementCase< dim-1 > &face_refinement_case, const unsigned int face_no, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static RefinementCase cut_axis(const unsigned int i)
static double d_linear_shape_function(const Point< dim > &xi, const unsigned int i)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
static ::ExceptionBase & ExcInternalError()