120template <
int dim,
int spacedim>
121std::unique_ptr<Mapping<dim, spacedim>>
127 return std::make_unique<MappingQ<dim, spacedim>>(degree);
132 return std::make_unique<MappingFE<dim, spacedim>>(
135 return std::make_unique<MappingFE<dim, spacedim>>(
142 return std::make_unique<MappingQ<dim, spacedim>>(degree);
147template <
int dim,
int spacedim>
216 const auto create_quadrature = [](
const ReferenceCell &reference_cell) {
217 std::vector<Point<dim>>
vertices(reference_cell.n_vertices());
218 for (
const unsigned int v : reference_cell.vertex_indices())
219 vertices[v] = reference_cell.vertex<dim>(v);
265 constexpr std::array<unsigned int, 4>
exodus_to_deal{{0, 1, 3, 2}};
273 {0, 1, 3, 2, 4, 5, 7, 6}};
284 constexpr std::array<unsigned int, 5>
exodus_to_deal{{0, 1, 3, 2, 4}};
310 constexpr std::array<unsigned int, 4>
exodus_to_deal{{2, 1, 3, 0}};
315 constexpr std::array<unsigned int, 4>
exodus_to_deal{{1, 3, 2, 0}};
326 constexpr std::array<unsigned int, 6>
exodus_to_deal{{3, 4, 2, 0, 1}};
331 constexpr std::array<unsigned int, 5>
exodus_to_deal{{3, 2, 4, 1, 0}};
362 constexpr std::array<unsigned int, 4>
unv_to_deal{{1, 0, 2, 3}};
368 {6, 7, 5, 4, 2, 3, 1, 0}};
385 return VTKCellType::VTK_VERTEX;
387 return VTKCellType::VTK_LINE;
389 return VTKCellType::VTK_TRIANGLE;
391 return VTKCellType::VTK_QUAD;
393 return VTKCellType::VTK_TETRA;
395 return VTKCellType::VTK_PYRAMID;
397 return VTKCellType::VTK_WEDGE;
399 return VTKCellType::VTK_HEXAHEDRON;
401 return VTKCellType::VTK_INVALID;
406 return VTKCellType::VTK_INVALID;
417 return VTKCellType::VTK_VERTEX;
419 return VTKCellType::VTK_QUADRATIC_EDGE;
421 return VTKCellType::VTK_QUADRATIC_TRIANGLE;
423 return VTKCellType::VTK_QUADRATIC_QUAD;
425 return VTKCellType::VTK_QUADRATIC_TETRA;
427 return VTKCellType::VTK_QUADRATIC_PYRAMID;
429 return VTKCellType::VTK_QUADRATIC_WEDGE;
431 return VTKCellType::VTK_QUADRATIC_HEXAHEDRON;
433 return VTKCellType::VTK_INVALID;
438 return VTKCellType::VTK_INVALID;
449 return VTKCellType::VTK_VERTEX;
451 return VTKCellType::VTK_LAGRANGE_CURVE;
453 return VTKCellType::VTK_LAGRANGE_TRIANGLE;
455 return VTKCellType::VTK_LAGRANGE_QUADRILATERAL;
457 return VTKCellType::VTK_LAGRANGE_TETRAHEDRON;
459 return VTKCellType::VTK_LAGRANGE_PYRAMID;
461 return VTKCellType::VTK_LAGRANGE_WEDGE;
463 return VTKCellType::VTK_LAGRANGE_HEXAHEDRON;
465 return VTKCellType::VTK_INVALID;
470 return VTKCellType::VTK_INVALID;
477ReferenceCell::vtk_lexicographic_to_node_index<0>(
478 const std::array<unsigned, 0> &,
479 const std::array<unsigned, 0> &,
490ReferenceCell::vtk_lexicographic_to_node_index<1>(
491 const std::array<unsigned, 1> &,
492 const std::array<unsigned, 1> &,
507ReferenceCell::vtk_lexicographic_to_node_index<2>(
524 return (i != 0
u ? (
j != 0
u ? 2 : 1) : (
j != 0
u ? 3 : 0));
568ReferenceCell::vtk_lexicographic_to_node_index<3>(
587 return (i != 0
u ? (
j != 0
u ? 2 : 1) : (
j != 0
u ? 3 : 0)) +
622 (i != 0
u ? (
j != 0
u ? 3 : 1) : (
j != 0
u ? 2 : 0)) +
627 (i != 0
u ? (
j != 0
u ? 2 : 1) : (
j != 0
u ? 3 : 0)) +
665 return offset + (i - 1) +
710 {{0, 1, 3, 2, 4, 5, 7, 6}};
816 std::pair<Point<dim>,
double>
827 const double t = ((
x1 -
x0) * (p -
x0)) / ((
x1 -
x0).norm_square());
831 return std::make_pair(
x0,
x0.distance_square(p));
835 return std::make_pair(
p2,
p2.distance_square(p));
838 return std::make_pair(
x1,
x1.distance_square(p));
843 std::pair<Point<dim>,
double>
850 std::numeric_limits<double>::signaling_NaN());
871 std::pair<Point<3>,
double>
925 for (
unsigned int i = 0; i < 3; ++i)
930 for (
unsigned int i = 0; i < 3; ++i)
943 return std::make_pair(
Point<3>(), std::numeric_limits<double>::max());
968 for (
unsigned int i = 1; i <
n_vertices(); ++i)
982 for (
const unsigned int face_no :
988 auto pair = project_to_line(
v0,
v1, p);
1013 for (
const unsigned int face_no : faces)
1018 std::array<Point<dim>, 3>
vertices;
1031 for (
const unsigned int face_no :
1045 auto pair = project_to_line(
v0,
v1, p);
1064 constexpr unsigned int x_index = 0;
1065 constexpr unsigned int y_index = (dim >= 2 ? 1 : 0);
1066 constexpr unsigned int z_index = (dim >= 3 ? 2 : 0);
1077 for (
unsigned int d = 0; d < dim; ++d)
1155 reference_cell.kind =
static_cast<decltype(reference_cell.kind)
>(value);
1169 "The reference cell kind just read does not correspond to one of the "
1170 "valid choices. There must be an error."));
1182#include "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
unsigned int face_to_cell_vertices(const unsigned int face, const unsigned int vertex, const unsigned char face_orientation) const
static constexpr unsigned char default_combined_face_orientation()
const Quadrature< dim > & get_nodal_type_quadrature() 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
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
unsigned int face_to_cell_lines(const unsigned int face, const unsigned int line, const unsigned char face_orientation) const
Point< dim > closest_point(const Point< dim > &p) const
static constexpr ndarray< unsigned int, 6, 3 > triangle_vertex_permutations
#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)
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
static const unsigned int invalid_unsigned_int
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
std::istream & operator>>(std::istream &in, ReferenceCell &reference_cell)
std::ostream & operator<<(std::ostream &out, const ReferenceCell &reference_cell)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)