56 VTK_QUADRATIC_EDGE = 21,
57 VTK_QUADRATIC_TRIANGLE = 22,
58 VTK_QUADRATIC_QUAD = 23,
59 VTK_QUADRATIC_TETRA = 24,
60 VTK_QUADRATIC_HEXAHEDRON = 25,
61 VTK_QUADRATIC_WEDGE = 26,
62 VTK_QUADRATIC_PYRAMID = 27,
64 VTK_LAGRANGE_CURVE = 68,
65 VTK_LAGRANGE_TRIANGLE = 69,
66 VTK_LAGRANGE_QUADRILATERAL = 70,
67 VTK_LAGRANGE_TETRAHEDRON = 71,
68 VTK_LAGRANGE_HEXAHEDRON = 72,
69 VTK_LAGRANGE_WEDGE = 73,
70 VTK_LAGRANGE_PYRAMID = 74,
119 template <
int dim,
int spacedim>
120 std::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);
146 template <
int dim,
int spacedim>
264 constexpr std::array<unsigned int, 4> exodus_to_deal{{0, 1, 3, 2}};
265 return exodus_to_deal[vertex_n];
271 constexpr std::array<unsigned int, 8> exodus_to_deal{
272 {0, 1, 3, 2, 4, 5, 7, 6}};
273 return exodus_to_deal[vertex_n];
277 constexpr std::array<unsigned int, 6> exodus_to_deal{
279 return exodus_to_deal[vertex_n];
283 constexpr std::array<unsigned int, 5> exodus_to_deal{{0, 1, 3, 2, 4}};
284 return exodus_to_deal[vertex_n];
309 constexpr std::array<unsigned int, 4> exodus_to_deal{{2, 1, 3, 0}};
310 return exodus_to_deal[face_n];
314 constexpr std::array<unsigned int, 4> exodus_to_deal{{1, 3, 2, 0}};
315 return exodus_to_deal[face_n];
319 constexpr std::array<unsigned int, 6> exodus_to_deal{
321 return exodus_to_deal[face_n];
325 constexpr std::array<unsigned int, 6> exodus_to_deal{{3, 4, 2, 0, 1}};
326 return exodus_to_deal[face_n];
330 constexpr std::array<unsigned int, 5> exodus_to_deal{{3, 2, 4, 1, 0}};
331 return exodus_to_deal[face_n];
361 constexpr std::array<unsigned int, 4> unv_to_deal{{1, 0, 2, 3}};
362 return unv_to_deal[vertex_n];
366 constexpr std::array<unsigned int, 8> unv_to_deal{
367 {6, 7, 5, 4, 2, 3, 1, 0}};
368 return unv_to_deal[vertex_n];
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;
476 ReferenceCell::vtk_lexicographic_to_node_index<0>(
477 const std::array<unsigned, 0> &,
478 const std::array<unsigned, 0> &,
489 ReferenceCell::vtk_lexicographic_to_node_index<1>(
490 const std::array<unsigned, 1> &,
491 const std::array<unsigned, 1> &,
506 ReferenceCell::vtk_lexicographic_to_node_index<2>(
507 const std::array<unsigned, 2> &node_indices,
508 const std::array<unsigned, 2> &nodes_per_direction,
513 const unsigned int i = node_indices[0];
514 const unsigned int j = node_indices[1];
516 const bool ibdy = (i == 0 || i == nodes_per_direction[0]);
517 const bool jbdy = (j == 0 || j == nodes_per_direction[1]);
519 const int nbdy = (ibdy ? 1 : 0) + (jbdy ? 1 : 0);
523 return (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0));
533 nodes_per_direction[0] - 1 + nodes_per_direction[1] - 1 :
541 (i != 0u ? nodes_per_direction[0] - 1 :
542 2 * (nodes_per_direction[0] - 1) +
543 nodes_per_direction[1] - 1) +
548 offset += 2 * (nodes_per_direction[0] - 1 + nodes_per_direction[1] - 1);
550 return offset + (i - 1) + (nodes_per_direction[0] - 1) * ((j - 1));
567 ReferenceCell::vtk_lexicographic_to_node_index<3>(
568 const std::array<unsigned, 3> &node_indices,
569 const std::array<unsigned, 3> &nodes_per_direction,
570 const bool legacy_format)
const
574 const unsigned int i = node_indices[0];
575 const unsigned int j = node_indices[1];
576 const unsigned int k = node_indices[2];
578 const bool ibdy = (i == 0 || i == nodes_per_direction[0]);
579 const bool jbdy = (j == 0 || j == nodes_per_direction[1]);
580 const bool kbdy = (k == 0 || k == nodes_per_direction[2]);
582 const int nbdy = (ibdy ? 1 : 0) + (jbdy ? 1 : 0) + (kbdy ? 1 : 0);
586 return (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0)) +
597 nodes_per_direction[0] - 1 + nodes_per_direction[1] - 1 :
599 (k != 0u ? 2 * (nodes_per_direction[0] - 1 +
600 nodes_per_direction[1] - 1) :
607 (i != 0u ? nodes_per_direction[0] - 1 :
608 2 * (nodes_per_direction[0] - 1) +
609 nodes_per_direction[1] - 1) +
610 (k != 0u ? 2 * (nodes_per_direction[0] - 1 +
611 nodes_per_direction[1] - 1) :
617 4 * (nodes_per_direction[0] - 1) + 4 * (nodes_per_direction[1] - 1);
620 (nodes_per_direction[2] - 1) *
621 (i != 0u ? (j != 0u ? 3 : 1) : (j != 0u ? 2 : 0)) +
625 (nodes_per_direction[2] - 1) *
626 (i != 0u ? (j != 0u ? 2 : 1) : (j != 0u ? 3 : 0)) +
630 offset += 4 * (nodes_per_direction[0] - 1 + nodes_per_direction[1] - 1 +
631 nodes_per_direction[2] - 1);
636 return (j - 1) + ((nodes_per_direction[1] - 1) * (k - 1)) +
637 (i != 0u ? (nodes_per_direction[1] - 1) *
638 (nodes_per_direction[2] - 1) :
642 offset += 2 * (nodes_per_direction[1] - 1) * (nodes_per_direction[2] - 1);
645 return (i - 1) + ((nodes_per_direction[0] - 1) * (k - 1)) +
646 (j != 0u ? (nodes_per_direction[2] - 1) *
647 (nodes_per_direction[0] - 1) :
651 offset += 2 * (nodes_per_direction[2] - 1) * (nodes_per_direction[0] - 1);
653 return (i - 1) + ((nodes_per_direction[0] - 1) * (j - 1)) +
655 (nodes_per_direction[0] - 1) * (nodes_per_direction[1] - 1) :
661 offset += 2 * ((nodes_per_direction[1] - 1) * (nodes_per_direction[2] - 1) +
662 (nodes_per_direction[2] - 1) * (nodes_per_direction[0] - 1) +
663 (nodes_per_direction[0] - 1) * (nodes_per_direction[1] - 1));
664 return offset + (i - 1) +
665 (nodes_per_direction[0] - 1) *
666 ((j - 1) + (nodes_per_direction[1] - 1) * ((k - 1)));
692 static constexpr std::array<unsigned int, 4> index_translation_table =
694 return index_translation_table[vertex_index];
700 static constexpr std::array<unsigned int, 5> index_translation_table =
702 return index_translation_table[vertex_index];
708 static constexpr std::array<unsigned int, 8> index_translation_table =
709 {{0, 1, 3, 2, 4, 5, 7, 6}};
710 return index_translation_table[vertex_index];
845 "The reference cell kind just read does not correspond to one of the "
846 "valid choices. There must be an error."));
853 #include "reference_cell.inst"
OutputOperator< VectorType > & operator<<(OutputOperator< VectorType > &out, unsigned int step)
std::istream & operator>>(std::istream &in, Point< dim, Number > &p)
unsigned int n_vertices() const
bool is_hyper_cube() const
unsigned int vtk_linear_type() const
Quadrature< dim > get_gauss_type_quadrature(const unsigned n_points_1d) const
static constexpr ndarray< unsigned int, 2, 2 > line_vertex_permutations
unsigned int gmsh_element_type() const
static constexpr ndarray< unsigned int, 8, 4 > quadrilateral_vertex_permutations
unsigned int n_faces() 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
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
const Quadrature< dim > & get_nodal_type_quadrature() const
static constexpr ndarray< unsigned int, 6, 3 > triangle_vertex_permutations
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotImplemented()
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
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
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray