119template <
int dim,
int spacedim>
120std::unique_ptr<Mapping<dim, spacedim>>
126 return std::make_unique<MappingQ<dim, spacedim>>(degree);
131 return std::make_unique<MappingFE<dim, spacedim>>(
134 return std::make_unique<MappingFE<dim, spacedim>>(
141 return std::make_unique<MappingQ<dim, spacedim>>(degree);
146template <
int dim,
int spacedim>
215 const auto create_quadrature = [](
const ReferenceCell &reference_cell) {
216 std::vector<Point<dim>> vertices(reference_cell.n_vertices());
217 for (
const unsigned int v : reference_cell.vertex_indices())
218 vertices[v] = reference_cell.vertex<dim>(v);
264 constexpr std::array<unsigned int, 4>
exodus_to_deal{{0, 1, 3, 2}};
272 {0, 1, 3, 2, 4, 5, 7, 6}};
283 constexpr std::array<unsigned int, 5>
exodus_to_deal{{0, 1, 3, 2, 4}};
309 constexpr std::array<unsigned int, 4>
exodus_to_deal{{2, 1, 3, 0}};
314 constexpr std::array<unsigned int, 4>
exodus_to_deal{{1, 3, 2, 0}};
325 constexpr std::array<unsigned int, 6>
exodus_to_deal{{3, 4, 2, 0, 1}};
330 constexpr std::array<unsigned int, 5>
exodus_to_deal{{3, 2, 4, 1, 0}};
361 constexpr std::array<unsigned int, 4>
unv_to_deal{{1, 0, 2, 3}};
367 {6, 7, 5, 4, 2, 3, 1, 0}};
384 return VTKCellType::VTK_VERTEX;
386 return VTKCellType::VTK_LINE;
388 return VTKCellType::VTK_TRIANGLE;
390 return VTKCellType::VTK_QUAD;
392 return VTKCellType::VTK_TETRA;
394 return VTKCellType::VTK_PYRAMID;
396 return VTKCellType::VTK_WEDGE;
398 return VTKCellType::VTK_HEXAHEDRON;
400 return VTKCellType::VTK_INVALID;
405 return VTKCellType::VTK_INVALID;
416 return VTKCellType::VTK_VERTEX;
418 return VTKCellType::VTK_QUADRATIC_EDGE;
420 return VTKCellType::VTK_QUADRATIC_TRIANGLE;
422 return VTKCellType::VTK_QUADRATIC_QUAD;
424 return VTKCellType::VTK_QUADRATIC_TETRA;
426 return VTKCellType::VTK_QUADRATIC_PYRAMID;
428 return VTKCellType::VTK_QUADRATIC_WEDGE;
430 return VTKCellType::VTK_QUADRATIC_HEXAHEDRON;
432 return VTKCellType::VTK_INVALID;
437 return VTKCellType::VTK_INVALID;
448 return VTKCellType::VTK_VERTEX;
450 return VTKCellType::VTK_LAGRANGE_CURVE;
452 return VTKCellType::VTK_LAGRANGE_TRIANGLE;
454 return VTKCellType::VTK_LAGRANGE_QUADRILATERAL;
456 return VTKCellType::VTK_LAGRANGE_TETRAHEDRON;
458 return VTKCellType::VTK_LAGRANGE_PYRAMID;
460 return VTKCellType::VTK_LAGRANGE_WEDGE;
462 return VTKCellType::VTK_LAGRANGE_HEXAHEDRON;
464 return VTKCellType::VTK_INVALID;
469 return VTKCellType::VTK_INVALID;
476ReferenceCell::vtk_lexicographic_to_node_index<0>(
477 const std::array<unsigned, 0> &,
478 const std::array<unsigned, 0> &,
489ReferenceCell::vtk_lexicographic_to_node_index<1>(
490 const std::array<unsigned, 1> &,
491 const std::array<unsigned, 1> &,
506ReferenceCell::vtk_lexicographic_to_node_index<2>(
523 return (i != 0
u ? (
j != 0
u ? 2 : 1) : (
j != 0
u ? 3 : 0));
567ReferenceCell::vtk_lexicographic_to_node_index<3>(
586 return (i != 0
u ? (
j != 0
u ? 2 : 1) : (
j != 0
u ? 3 : 0)) +
621 (i != 0
u ? (
j != 0
u ? 3 : 1) : (
j != 0
u ? 2 : 0)) +
626 (i != 0
u ? (
j != 0
u ? 2 : 1) : (
j != 0
u ? 3 : 0)) +
664 return offset + (i - 1) +
709 {{0, 1, 3, 2, 4, 5, 7, 6}};
815 std::pair<Point<dim>,
double>
826 const double t = ((
x1 -
x0) * (p -
x0)) / ((
x1 -
x0).norm_square());
830 return std::make_pair(
x0,
x0.distance_square(p));
834 return std::make_pair(
p2,
p2.distance_square(p));
837 return std::make_pair(
x1,
x1.distance_square(p));
842 std::pair<Point<dim>,
double>
849 std::numeric_limits<double>::signaling_NaN());
870 std::pair<Point<3>,
double>
924 for (
unsigned int i = 0; i < 3; ++i)
929 for (
unsigned int i = 0; i < 3; ++i)
942 return std::make_pair(
Point<3>(), std::numeric_limits<double>::max());
967 for (
unsigned int i = 1; i <
n_vertices(); ++i)
981 for (
const unsigned int face_no :
987 auto pair = project_to_line(
v0,
v1, p);
1012 for (
const unsigned int face_no : faces)
1017 std::array<Point<dim>, 3> vertices;
1030 for (
const unsigned int face_no :
1044 auto pair = project_to_line(
v0,
v1, p);
1063 constexpr unsigned int x_index = 0;
1064 constexpr unsigned int y_index = (dim >= 2 ? 1 : 0);
1065 constexpr unsigned int z_index = (dim >= 3 ? 2 : 0);
1076 for (
unsigned int d = 0; d < dim; ++d)
1152 reference_cell.kind =
static_cast<decltype(reference_cell.kind)
>(value);
1166 "The reference cell kind just read does not correspond to one of the "
1167 "valid choices. There must be an error."));
1179#include "grid/reference_cell.inst"
ArrayView< const unsigned int > faces_for_given_vertex(const unsigned int vertex_index) const
unsigned int n_vertices() const
Quadrature< dim > get_gauss_type_quadrature(const unsigned n_points_1d) const
bool is_hyper_cube() const
unsigned int vtk_linear_type() const
const Quadrature< dim > & get_nodal_type_quadrature() const
unsigned int face_to_cell_lines(const unsigned int face, const unsigned int line, const types::geometric_orientation face_orientation) const
static constexpr ndarray< unsigned int, 2, 2 > line_vertex_permutations
bool contains_point(const Point< dim > &p, const double tolerance=0) const
unsigned int gmsh_element_type() const
static constexpr ndarray< unsigned int, 8, 4 > quadrilateral_vertex_permutations
unsigned int n_faces() const
unsigned int line_to_cell_vertices(const unsigned int line, const unsigned int vertex) const
unsigned int exodusii_vertex_to_deal_vertex(const unsigned int vertex_n) const
unsigned int unv_vertex_to_deal_vertex(const unsigned int vertex_n) const
unsigned int vtk_vertex_to_deal_vertex(const unsigned int vertex_index) const
unsigned int face_to_cell_vertices(const unsigned int face, const unsigned int vertex, const types::geometric_orientation face_orientation) const
std::unique_ptr< Mapping< dim, spacedim > > get_default_mapping(const unsigned int degree) const
unsigned int vtk_quadratic_type() const
unsigned int vtk_lagrange_type() const
unsigned int get_dimension() const
ReferenceCell face_reference_cell(const unsigned int face_no) const
unsigned int exodusii_face_to_deal_face(const unsigned int face_n) const
const Mapping< dim, spacedim > & get_default_linear_mapping() const
std::string to_string() const
friend std::ostream & operator<<(std::ostream &out, const ReferenceCell &reference_cell)
Point< dim > closest_point(const Point< dim > &p) const
static constexpr ndarray< unsigned int, 6, 3 > triangle_vertex_permutations
constexpr numbers::NumberTraits< Number >::real_type norm_square() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
constexpr const ReferenceCell Tetrahedron
constexpr const ReferenceCell Quadrilateral
constexpr const ReferenceCell Wedge
constexpr const ReferenceCell Pyramid
constexpr const ReferenceCell Invalid
constexpr const ReferenceCell Triangle
constexpr const ReferenceCell Hexahedron
constexpr const ReferenceCell Vertex
constexpr const ReferenceCell Line
constexpr unsigned int invalid_unsigned_int
constexpr types::geometric_orientation default_geometric_orientation
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
std::istream & operator>>(std::istream &in, ReferenceCell &reference_cell)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)