<commit_before>//---------------------------------------------------------------------------
//    $Id$
//    Version: $Name$
//
//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//---------------------------------------------------------------------------


#include <grid/geometry_info.h>



template <int dim> const unsigned int GeometryInfo<dim>::children_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::faces_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::subfaces_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::vertices_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::vertices_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::lines_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::quads_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::lines_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::quads_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::hexes_per_cell;

// make sure that also the icc compiler defines (and not only declares) 
// these variables
namespace internal
{
  void foo (const unsigned int *) {}

  template <int dim>
  void define_variables () 
  { 
    foo(&GeometryInfo<dim>::vertices_per_cell);
  }

  template void define_variables<2> ();
  template void define_variables<3> ();
}




template <>
const unsigned int GeometryInfo<1>::opposite_face[GeometryInfo<1>::faces_per_cell]
= { 0, 1 };


template <>
const unsigned int GeometryInfo<2>::opposite_face[GeometryInfo<2>::faces_per_cell]
= { 2, 3, 0, 1 };


template <>
const unsigned int GeometryInfo<3>::opposite_face[GeometryInfo<3>::faces_per_cell]
= { 1, 0, 4, 5, 2, 3 };



template <>
const unsigned int GeometryInfo<1>::dx_to_deal[GeometryInfo<1>::vertices_per_cell]
= { 0, 1};


template <>
const unsigned int GeometryInfo<2>::dx_to_deal[GeometryInfo<2>::vertices_per_cell]
= { 0, 3, 1, 2};


template <>
const unsigned int GeometryInfo<3>::dx_to_deal[GeometryInfo<3>::vertices_per_cell]
= { 0, 3, 4, 7, 1, 2, 5, 6};

//TODO: Use these values in mappings.
template <>
const unsigned int
GeometryInfo<1>::unit_normal_direction[GeometryInfo<1>::faces_per_cell]
= { 0, 0 };
template <>
const int
GeometryInfo<1>::unit_normal_orientation[GeometryInfo<1>::faces_per_cell]
= { -1, 1 };

template <>
const unsigned int
GeometryInfo<2>::unit_normal_direction[GeometryInfo<2>::faces_per_cell]
= { 1, 0, 1, 0 };
template <>
const int
GeometryInfo<2>::unit_normal_orientation[GeometryInfo<2>::faces_per_cell]
= { -1, 1, 1, -1 };

template <>
const unsigned int
GeometryInfo<3>::unit_normal_direction[GeometryInfo<3>::faces_per_cell]
= { 1, 1, 2, 0, 2, 0 };
template <>
const int
GeometryInfo<3>::unit_normal_orientation[GeometryInfo<3>::faces_per_cell]
= { -1, 1, -1, 1, 1, -1 };



template <>
unsigned int
GeometryInfo<1>::child_cell_on_face (const unsigned int face,
                                     const unsigned int subface,
				     const bool)
{
  Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
  Assert (subface==subfaces_per_face, ExcIndexRange(subface, 0, 1));

  return face;
}



template <>
unsigned int
GeometryInfo<2>::child_cell_on_face (const unsigned int face,
                                     const unsigned int subface,
				     const bool)
{
  Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
  Assert (subface<subfaces_per_face, ExcIndexRange(subface, 0, subfaces_per_face));
  
  static const unsigned
    subcells[faces_per_cell][subfaces_per_face] = {{0,1},
                                                   {1,2},
                                                   {3,2},
                                                   {0,3}};
  return subcells[face][subface];
}



template <>
unsigned int
GeometryInfo<3>::child_cell_on_face (const unsigned int face,
				     const unsigned int subface,
				     const bool face_orientation)
{
  Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
  Assert (subface<subfaces_per_face, ExcIndexRange(subface, 0, subfaces_per_face));
  static const unsigned int
    flip[GeometryInfo<3>::subfaces_per_face] = { 0, 3, 2, 1 };
  static const unsigned
    subcells[faces_per_cell][subfaces_per_face] = {{0, 1, 2, 3},
                                                   {4, 5, 6, 7},
                                                   {0, 1, 5, 4},
                                                   {1, 5, 6, 2},
                                                   {3, 2, 6, 7},
                                                   {0, 4, 7, 3}};
  return face_orientation ? subcells[face][subface] : subcells[face][flip[subface]];
}



template <>
unsigned int
GeometryInfo<1>::line_to_cell_vertices (const unsigned int line,
					const unsigned int vertex)
{
  Assert (line<lines_per_cell, ExcIndexRange(line, 0, lines_per_cell));
  Assert (vertex<2, ExcIndexRange(vertex, 0, 2));

  return vertex;
}


template <>
unsigned int
GeometryInfo<2>::line_to_cell_vertices (const unsigned int line,<commit_msg>clean up<commit_after>//---------------------------------------------------------------------------
//    $Id$
//    Version: $Name$
//
//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//---------------------------------------------------------------------------


#include <grid/geometry_info.h>



template <int dim> const unsigned int GeometryInfo<dim>::children_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::faces_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::subfaces_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::vertices_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::vertices_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::lines_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::quads_per_face;
template <int dim> const unsigned int GeometryInfo<dim>::lines_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::quads_per_cell;
template <int dim> const unsigned int GeometryInfo<dim>::hexes_per_cell;

// make sure that also the icc compiler defines (and not only declares) 
// these variables
namespace internal
{
  void foo (const unsigned int *) {}

  template <int dim>
  void define_variables () 
  { 
    foo(&GeometryInfo<dim>::vertices_per_cell);
  }

  template void define_variables<2> ();
  template void define_variables<3> ();
}




template <>
const unsigned int GeometryInfo<1>::opposite_face[GeometryInfo<1>::faces_per_cell]
= { 0, 1 };


template <>
const unsigned int GeometryInfo<2>::opposite_face[GeometryInfo<2>::faces_per_cell]
= { 2, 3, 0, 1 };


template <>
const unsigned int GeometryInfo<3>::opposite_face[GeometryInfo<3>::faces_per_cell]
= { 1, 0, 4, 5, 2, 3 };



template <>
const unsigned int GeometryInfo<1>::dx_to_deal[GeometryInfo<1>::vertices_per_cell]
= { 0, 1};


template <>
const unsigned int GeometryInfo<2>::dx_to_deal[GeometryInfo<2>::vertices_per_cell]
= { 0, 3, 1, 2};


template <>
const unsigned int GeometryInfo<3>::dx_to_deal[GeometryInfo<3>::vertices_per_cell]
= { 0, 3, 4, 7, 1, 2, 5, 6};

//TODO: Use these values in mappings.
template <>
const unsigned int
GeometryInfo<1>::unit_normal_direction[GeometryInfo<1>::faces_per_cell]
= { 0, 0 };
template <>
const int
GeometryInfo<1>::unit_normal_orientation[GeometryInfo<1>::faces_per_cell]
= { -1, 1 };

template <>
const unsigned int
GeometryInfo<2>::unit_normal_direction[GeometryInfo<2>::faces_per_cell]
= { 1, 0, 1, 0 };
template <>
const int
GeometryInfo<2>::unit_normal_orientation[GeometryInfo<2>::faces_per_cell]
= { -1, 1, 1, -1 };

template <>
const unsigned int
GeometryInfo<3>::unit_normal_direction[GeometryInfo<3>::faces_per_cell]
= { 1, 1, 2, 0, 2, 0 };
template <>
const int
GeometryInfo<3>::unit_normal_orientation[GeometryInfo<3>::faces_per_cell]
= { -1, 1, -1, 1, 1, -1 };



template <>
unsigned int
GeometryInfo<1>::child_cell_on_face (const unsigned int face,
                                     const unsigned int subface,
				     const bool)
{
  Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
  Assert (subface==subfaces_per_face, ExcIndexRange(subface, 0, 1));

  return face;
}



template <>
unsigned int
GeometryInfo<2>::child_cell_on_face (const unsigned int face,
                                     const unsigned int subface,
				     const bool)
{
  Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
  Assert (subface<subfaces_per_face, ExcIndexRange(subface, 0, subfaces_per_face));
  
  static const unsigned
    subcells[faces_per_cell][subfaces_per_face] = {{0,1},
                                                   {1,2},
                                                   {3,2},
                                                   {0,3}};
  return subcells[face][subface];
}



template <>
unsigned int
GeometryInfo<3>::child_cell_on_face (const unsigned int face,
				     const unsigned int subface,
				     const bool face_orientation)
{
  Assert (face<faces_per_cell, ExcIndexRange(face, 0, faces_per_cell));
  Assert (subface<subfaces_per_face, ExcIndexRange(subface, 0, subfaces_per_face));

  static const unsigned int flip[subfaces_per_face] = { 0, 3, 2, 1 };

  static const unsigned
    subcells[faces_per_cell][subfaces_per_face] = {{0, 1, 2, 3},
                                                   {4, 5, 6, 7},
                                                   {0, 1, 5, 4},
                                                   {1, 5, 6, 2},
                                                   {3, 2, 6, 7},
                                                   {0, 4, 7, 3}};
  return face_orientation ? subcells[face][subface] : subcells[face][flip[subface]];
}



template <>
unsigned int
GeometryInfo<1>::line_to_cell_vertices (const unsigned int line,
					const unsigned int vertex)
{
  Assert (line<lines_per_cell, ExcIndexRange(line, 0, lines_per_cell));
  Assert (vertex<2, ExcIndexRange(vertex, 0, 2));

  return vertex;
}


template <>
unsigned int
GeometryInfo<2>::line_to_cell_vertices (const unsigned int line,
{'fraction_non_alphanumeric': 0.14502529510961215, 'fraction_numerical': 0.0293235900318531, 'mean_word_length': 2.9217487141807497, 'pattern_counts': {'":': 0, '<': 160, '<?xml version=': 0, '>': 146, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5516479', 'n_tokens_mistral': 3551, 'n_tokens_neox': 3142, 'n_words': 848}