16 #include <deal.II/base/geometry_info.h> 17 #include <deal.II/base/tensor.h> 19 DEAL_II_NAMESPACE_OPEN
57 = { 0, 0, 1, 1, 2, 2 };
62 = { 0, 0, 1, 1, 2, 2, 3, 3 };
79 = { -1, 1, -1, 1, -1, 1 };
84 = { -1, 1, -1, 1, -1, 1, -1, 1 };
101 = { 1, 0, 3, 2, 5, 4 };
106 = { 1, 0, 3, 2, 5, 4, 7, 6 };
120 = { 0, 1, 5, 4, 2, 3, 7, 6};
153 = { 0, 4, 2, 6, 1, 5, 3, 7};
231 {0, 2, 2, 4, 2, 4, 4, 8};
233 return n_children[ref_case];
261 {0, 2, 3, 3, 4, 2, 3, 3, 4, 4};
262 return nsubs[subface_case];
280 const unsigned int dim=2;
283 switch (subface_case)
320 const unsigned int subface_no)
322 const unsigned int dim=3;
325 switch (subface_case)
394 const unsigned int face_no,
399 const unsigned int dim=2;
429 return ref_cases[cell_refinement_case][face_no/2];
436 const unsigned int face_no,
437 const bool face_orientation,
439 const bool face_rotation)
441 const unsigned int dim=3;
499 const RefinementCase<dim-1> ref_case=ref_cases[cell_refinement_case][face_no/2];
521 return (face_orientation==face_rotation) ? flip[ref_case] : ref_case;
529 const unsigned int line_no)
532 const unsigned int dim = 1;
539 return cell_refinement_case;
546 const unsigned int line_no)
549 return face_refinement_case(cell_refinement_case, line_no);
556 const unsigned int line_no)
558 const unsigned int dim=3;
580 static const unsigned int direction[lines_per_cell]=
581 {1,1,0,0,1,1,0,0,2,2,2,2};
583 return ((cell_refinement_case & cut_one[direction[line_no]]) ?
597 const unsigned int dim = 1;
607 const unsigned int face_no,
612 const unsigned int dim = 2;
628 const unsigned int face_no,
629 const bool face_orientation,
631 const bool face_rotation)
633 const unsigned int dim=3;
660 const RefinementCase<dim-1> std_face_ref = (face_orientation==face_rotation) ? flip[face_refinement_case] : face_refinement_case;
686 return face_to_cell[face_no/2][std_face_ref];
706 const unsigned int dim = 2;
719 const unsigned int dim=3;
733 return ref_cases[line_no/2];
741 const bool face_orientation,
742 const bool face_flip,
743 const bool face_rotation)
766 static const unsigned int vertex_translation[4][2][2][2] =
801 return vertex_translation[vertex][face_orientation][face_flip][face_rotation];
824 const bool face_orientation,
825 const bool face_flip,
826 const bool face_rotation)
849 static const unsigned int vertex_translation[4][2][2][2] =
884 return vertex_translation[vertex][face_orientation][face_flip][face_rotation];
907 const bool face_orientation,
908 const bool face_flip,
909 const bool face_rotation)
932 static const unsigned int line_translation[4][2][2][2] =
967 return line_translation[line][face_orientation][face_flip][face_rotation];
988 const bool face_orientation,
989 const bool face_flip,
990 const bool face_rotation)
1013 static const unsigned int line_translation[4][2][2][2] =
1048 return line_translation[line][face_orientation][face_flip][face_rotation];
1069 const unsigned int face,
1070 const unsigned int subface,
1071 const bool,
const bool,
const bool,
1076 Assert (subface<max_children_per_face,
1087 const unsigned int face,
1088 const unsigned int subface,
1090 const bool face_flip,
1095 Assert (subface<max_children_per_face,
1105 static const unsigned int 1110 {{0,0},{1,1},{0,1},{0,1}},
1111 {{0,1},{0,1},{0,0},{1,1}},
1112 {{0,2},{1,3},{0,1},{2,3}}
1116 {{0,0},{1,1},{1,0},{1,0}},
1117 {{1,0},{1,0},{0,0},{1,1}},
1118 {{2,0},{3,1},{1,0},{3,2}}
1122 return subcells[face_flip][ref_case-1][face][subface];
1130 const unsigned int face,
1131 const unsigned int subface,
1132 const bool face_orientation,
1133 const bool face_flip,
1134 const bool face_rotation,
1137 const unsigned int dim = 3;
1177 const RefinementCase<dim-1> std_face_ref = (face_orientation==face_rotation) ? flip[face_ref_case] : face_ref_case;
1189 static const unsigned int subface_exchange[4][2][2][2][4]=
1274 const unsigned int std_subface=subface_exchange
1289 static const unsigned int 1361 if ((std_face_ref & face_refinement_case(ref_case, face))
1362 == face_refinement_case(ref_case, face))
1371 static const unsigned int equivalent_iso_subface[4][4]=
1379 const unsigned int equ_std_subface
1380 =equivalent_iso_subface[std_face_ref][std_subface];
1383 return iso_children[ref_case-1][face][equ_std_subface];
1390 ExcMessage(
"The face RefineCase is too coarse " 1391 "for the given cell RefineCase."));
1404 const bool,
const bool,
const bool,
1416 const unsigned int vertex)
1429 const unsigned int vertex)
1439 const unsigned int vertex)
1444 static const unsigned 1445 vertices[lines_per_cell][2] = {{0, 2},
1458 return vertices[line][vertex];
1475 const unsigned int line,
1476 const bool,
const bool,
const bool)
1493 const unsigned int line,
1494 const bool,
const bool,
const bool)
1509 const unsigned int line,
1510 const bool face_orientation,
1511 const bool face_flip,
1512 const bool face_rotation)
1517 static const unsigned 1518 lines[faces_per_cell][lines_per_face] = {{8,10, 0, 4},
1525 return lines[face][real_to_standard_face_line(line,
1537 const bool,
const bool,
const bool)
1548 const unsigned int vertex,
1549 const bool face_orientation,
1550 const bool face_flip,
1551 const bool face_rotation)
1554 face_orientation, face_flip, face_rotation);
1564 for (
unsigned int i=0; i<dim; i++)
1565 if (p[i] < 0.) p[i] = 0.;
1566 else if (p[i] > 1.) p[i] = 1.;
1577 double result = 0.0;
1579 for (
unsigned int i=0; i<dim; i++)
1580 if ((-p[i]) > result)
1582 else if ((p[i]-1.) > result)
1583 result = (p[i] - 1.);
1594 const unsigned int i)
1603 const double x = xi[0];
1615 const double x = xi[0];
1616 const double y = xi[1];
1632 const double x = xi[0];
1633 const double y = xi[1];
1634 const double z = xi[2];
1638 return (1-x)*(1-y)*(1-z);
1640 return x*(1-y)*(1-z);
1642 return (1-x)*y*(1-z);
1646 return (1-x)*(1-y)*z;
1668 const unsigned int i)
1690 const unsigned int i)
1695 const double x = xi[0];
1696 const double y = xi[1];
1717 const unsigned int i)
1722 const double x = xi[0];
1723 const double y = xi[1];
1724 const double z = xi[2];
1759 return Point<3> (-1e9, -1e9, -1e9);
1788 wedge_product (
const Tensor<1,2> (&derivative)[1])
1791 result[0] = derivative[0][1];
1792 result[1] = -derivative[0][0];
1802 wedge_product (
const Tensor<1,3> (&derivative)[2])
1804 return cross_product_3d (derivative[0], derivative[1]);
1817 for (
unsigned int i=0; i<dim; ++i)
1818 jacobian[i] = derivative[i];
1820 return determinant (jacobian);
1827 template <
int spacedim>
1830 alternating_form_at_vertices
1831 #ifndef DEAL_II_CONSTEXPR_BUG 1868 for (
unsigned int i=0; i<vertices_per_cell; ++i)
1872 for (
unsigned int j=0; j<vertices_per_cell; ++j)
1875 = d_linear_shape_function_gradient (unit_cell_vertex(i),
1877 for (
unsigned int l=0; l<dim; ++l)
1878 derivatives[l] += vertices[j] * grad_phi_j[l];
1881 forms[i] = internal::GeometryInfo::wedge_product (derivatives);
1894 alternating_form_at_vertices
1895 #ifndef DEAL_II_CONSTEXPR_BUG 1896 (
const Point<1> (&)[vertices_per_cell],
1906 alternating_form_at_vertices
1907 #ifndef DEAL_II_CONSTEXPR_BUG 1908 (
const Point<2> (&)[vertices_per_cell],
1918 alternating_form_at_vertices
1919 #ifndef DEAL_II_CONSTEXPR_BUG 1920 (
const Point<2> (&vertices)[vertices_per_cell],
1930 alternating_form_at_vertices
1931 #ifndef DEAL_II_CONSTEXPR_BUG 1932 (
const Point<3> (&vertices)[vertices_per_cell],
1943 alternating_form_at_vertices
1944 #ifndef DEAL_II_CONSTEXPR_BUG 1945 (
const Point<3> (&vertices)[vertices_per_cell],
1953 DEAL_II_NAMESPACE_CLOSE
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 const unsigned int invalid_unsigned_int
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)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
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 unsigned int line_to_cell_vertices(const unsigned int line, const unsigned int vertex)
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 ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
static unsigned int n_children(const RefinementCase< dim > &refinement_case)
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)
#define Assert(cond, exc)
static double distance_to_unit_cell(const Point< dim > &p)
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 RefinementCase< dim > min_cell_refinement_case_for_line_refinement(const unsigned int line_no)
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 ::ExceptionBase & ExcNotImplemented()
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 double d_linear_shape_function(const Point< dim > &xi, const unsigned int i)
static ::ExceptionBase & ExcInternalError()