From: Wolfgang Bangerth Date: Wed, 23 May 2001 08:15:25 +0000 (+0000) Subject: Revert to the old style scheme of explicitely specializing X-Git-Tag: v8.0.0~19084 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ca4574c5149e53dd778f439279cdc067297baa2;p=dealii.git Revert to the old style scheme of explicitely specializing GeometryInfo for all dimensions. git-svn-id: https://svn.dealii.org/trunk@4710 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/geometry_info.h b/deal.II/deal.II/include/grid/geometry_info.h index 3c53ed37ab..dd4a99b61f 100644 --- a/deal.II/deal.II/include/grid/geometry_info.h +++ b/deal.II/deal.II/include/grid/geometry_info.h @@ -194,50 +194,69 @@ struct GeometryInfo<0> -/* -------------- declaration of explicit specializations ------------- */ - +//TODO:[WB] Document new classes, and reference in old one. +template <> +struct GeometryInfo<1> +{ + static const unsigned int dim = 1; + static const unsigned int children_per_cell = 2; + static const unsigned int faces_per_cell = 2; + static const unsigned int subfaces_per_face = 0; + static const unsigned int vertices_per_cell = 2; + static const unsigned int vertices_per_face = 1; + static const unsigned int lines_per_face = 0; + static const unsigned int quads_per_face = 0; + static const unsigned int lines_per_cell = 1; + static const unsigned int quads_per_cell = 0; + static const unsigned int hexes_per_cell = 0; + static const unsigned int opposite_face[faces_per_cell]; + static unsigned int child_cell_on_face (const unsigned int face, + const unsigned int subface); +}; -template <> const unsigned int GeometryInfo<1>::opposite_face[GeometryInfo<1>::faces_per_cell]; -template <> const unsigned int GeometryInfo<2>::opposite_face[GeometryInfo<2>::faces_per_cell]; -template <> const unsigned int GeometryInfo<3>::opposite_face[GeometryInfo<3>::faces_per_cell]; +template <> +struct GeometryInfo<2> +{ + static const unsigned int dim = 2; + static const unsigned int children_per_cell = 4; + static const unsigned int faces_per_cell = 4; + static const unsigned int subfaces_per_face = 2; + static const unsigned int vertices_per_cell = 4; + static const unsigned int vertices_per_face = 2; + static const unsigned int lines_per_face = 1; + static const unsigned int quads_per_face = 0; + static const unsigned int lines_per_cell = 4; + static const unsigned int quads_per_cell = 1; + static const unsigned int hexes_per_cell = 0; + static const unsigned int opposite_face[faces_per_cell]; + static unsigned int child_cell_on_face (const unsigned int face, + const unsigned int subface); +}; -/*---------------------------- Inline functions --------------------------------*/ -template<> -inline unsigned int -GeometryInfo<2>::child_cell_on_face (const unsigned int face, - const unsigned int subface) +template <> +struct GeometryInfo<3> { - Assert (face -inline -unsigned int GeometryInfo<3>::child_cell_on_face (const unsigned int face, - const unsigned int subface) -{ - Assert (face -template const unsigned int GeometryInfo::vertices_per_cell; -template const unsigned int GeometryInfo::lines_per_cell; -template const unsigned int GeometryInfo::quads_per_cell; -template const unsigned int GeometryInfo::hexes_per_cell; -template const unsigned int GeometryInfo::children_per_cell; +const unsigned int GeometryInfo<1>::dim; +const unsigned int GeometryInfo<1>::children_per_cell; +const unsigned int GeometryInfo<1>::faces_per_cell; +const unsigned int GeometryInfo<1>::subfaces_per_face; +const unsigned int GeometryInfo<1>::vertices_per_cell; +const unsigned int GeometryInfo<1>::vertices_per_face; +const unsigned int GeometryInfo<1>::lines_per_face; +const unsigned int GeometryInfo<1>::quads_per_face; +const unsigned int GeometryInfo<1>::lines_per_cell; +const unsigned int GeometryInfo<1>::quads_per_cell; +const unsigned int GeometryInfo<1>::hexes_per_cell; + +const unsigned int GeometryInfo<2>::dim; +const unsigned int GeometryInfo<2>::children_per_cell; +const unsigned int GeometryInfo<2>::faces_per_cell; +const unsigned int GeometryInfo<2>::subfaces_per_face; +const unsigned int GeometryInfo<2>::vertices_per_cell; +const unsigned int GeometryInfo<2>::vertices_per_face; +const unsigned int GeometryInfo<2>::lines_per_face; +const unsigned int GeometryInfo<2>::quads_per_face; +const unsigned int GeometryInfo<2>::lines_per_cell; +const unsigned int GeometryInfo<2>::quads_per_cell; +const unsigned int GeometryInfo<2>::hexes_per_cell; + +const unsigned int GeometryInfo<3>::dim; +const unsigned int GeometryInfo<3>::children_per_cell; +const unsigned int GeometryInfo<3>::faces_per_cell; +const unsigned int GeometryInfo<3>::subfaces_per_face; +const unsigned int GeometryInfo<3>::vertices_per_cell; +const unsigned int GeometryInfo<3>::vertices_per_face; +const unsigned int GeometryInfo<3>::lines_per_face; +const unsigned int GeometryInfo<3>::quads_per_face; +const unsigned int GeometryInfo<3>::lines_per_cell; +const unsigned int GeometryInfo<3>::quads_per_cell; +const unsigned int GeometryInfo<3>::hexes_per_cell; + -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 class GeometryInfo; + + +unsigned int +GeometryInfo<2>::child_cell_on_face (const unsigned int face, + const unsigned int subface) +{ + Assert (face::child_cell_on_face (const unsigned int face, + const unsigned int subface) +{ + Assert (face