From: Peter Munch Date: Wed, 20 May 2020 08:23:36 +0000 (+0200) Subject: Move implementation of CellData to the correct file X-Git-Tag: v9.3.0-rc1~1606^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=305366b24f9d9fbb28f48b04531baaaa5b3dbf3d;p=dealii.git Move implementation of CellData to the correct file --- diff --git a/source/grid/tria.cc b/source/grid/tria.cc index ff02597068..fcd430def4 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -44,54 +44,6 @@ DEAL_II_NAMESPACE_OPEN -template -CellData::CellData() - : material_id(0) - , manifold_id(numbers::flat_manifold_id) -{ - std::fill(std::begin(vertices), - std::end(vertices), - numbers::invalid_unsigned_int); -} - - - -template -bool -CellData::operator==(const CellData &other) const -{ - for (const unsigned int i : GeometryInfo::vertex_indices()) - if (vertices[i] != other.vertices[i]) - return false; - - if (material_id != other.material_id) - return false; - - if (boundary_id != other.boundary_id) - return false; - - if (manifold_id != other.manifold_id) - return false; - - return true; -} - - - -bool -SubCellData::check_consistency(const unsigned int dim) const -{ - switch (dim) - { - case 1: - return ((boundary_lines.size() == 0) && (boundary_quads.size() == 0)); - case 2: - return (boundary_quads.size() == 0); - } - return true; -} - - namespace internal { namespace TriangulationImplementation diff --git a/source/grid/tria.inst.in b/source/grid/tria.inst.in index 24b2fc08f3..9b2ca1349e 100644 --- a/source/grid/tria.inst.in +++ b/source/grid/tria.inst.in @@ -19,8 +19,5 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension template class Triangulation; -#endif -#if deal_II_dimension == deal_II_space_dimension - template struct CellData; #endif } diff --git a/source/grid/tria_description.cc b/source/grid/tria_description.cc index b4c6f5d713..9e015a8027 100644 --- a/source/grid/tria_description.cc +++ b/source/grid/tria_description.cc @@ -27,6 +27,54 @@ DEAL_II_NAMESPACE_OPEN + +template +CellData::CellData() + : material_id(0) + , manifold_id(numbers::flat_manifold_id) +{ + std::fill(std::begin(vertices), + std::end(vertices), + numbers::invalid_unsigned_int); +} + + + +template +bool +CellData::operator==(const CellData &other) const +{ + for (const unsigned int i : GeometryInfo::vertex_indices()) + if (vertices[i] != other.vertices[i]) + return false; + + if (material_id != other.material_id) + return false; + + if (boundary_id != other.boundary_id) + return false; + + if (manifold_id != other.manifold_id) + return false; + + return true; +} + + + +bool +SubCellData::check_consistency(const unsigned int dim) const +{ + switch (dim) + { + case 1: + return ((boundary_lines.size() == 0) && (boundary_quads.size() == 0)); + case 2: + return (boundary_quads.size() == 0); + } + return true; +} + namespace TriangulationDescription { namespace Utilities diff --git a/source/grid/tria_description.inst.in b/source/grid/tria_description.inst.in index edbe39372f..1bc17dcf55 100644 --- a/source/grid/tria_description.inst.in +++ b/source/grid/tria_description.inst.in @@ -49,3 +49,8 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS) \} \} } + +for (deal_II_dimension : DIMENSIONS) + { + template struct CellData; + }