Skip to content

Commit

Permalink
Merge pull request #14590 from peterrum/connectivity_refactoring
Browse files Browse the repository at this point in the history
Some refactoring in connectivity.h
  • Loading branch information
peterrum committed Dec 20, 2022
2 parents 540f0a7 + 30f8e67 commit 2d05656
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions include/deal.II/grid/connectivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ namespace internal
/**
* Implementation for triangles.
*/
struct CellTypeTri : public CellTypeBase
struct CellTypeTriangle : public CellTypeBase
{
dealii::ArrayView<const unsigned int>
vertices_of_entity(const unsigned int d,
Expand Down Expand Up @@ -234,7 +234,7 @@ namespace internal
/**
* Implementation for quadrilaterals.
*/
struct CellTypeQuad : public CellTypeBase
struct CellTypeQuadrilateral : public CellTypeBase
{
dealii::ArrayView<const unsigned int>
vertices_of_entity(const unsigned int d,
Expand Down Expand Up @@ -291,7 +291,7 @@ namespace internal
/**
* Implementation for tetrahedrons.
*/
struct CellTypeTet : public CellTypeBase
struct CellTypeTetrahedron : public CellTypeBase
{
dealii::ArrayView<const unsigned int>
vertices_of_entity(const unsigned int d,
Expand Down Expand Up @@ -639,7 +639,7 @@ namespace internal
/**
* Implementation for hexahedra.
*/
struct CellTypeHex : public CellTypeBase
struct CellTypeHexahedron : public CellTypeBase
{
dealii::ArrayView<const unsigned int>
vertices_of_entity(const unsigned int d,
Expand Down Expand Up @@ -1450,26 +1450,23 @@ namespace internal
std::vector<std::shared_ptr<CellTypeBase>> cell_types_impl(8);

cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Line)]
.reset(new CellTypeLine());
dealii::ReferenceCells::Line)] = std::make_shared<CellTypeLine>();
cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Triangle)]
.reset(new CellTypeTri());
dealii::ReferenceCells::Triangle)] =
std::make_shared<CellTypeTriangle>();
cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Quadrilateral)]
.reset(new CellTypeQuad());
dealii::ReferenceCells::Quadrilateral)] =
std::make_shared<CellTypeQuadrilateral>();
cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Tetrahedron)]
.reset(new CellTypeTet());
dealii::ReferenceCells::Tetrahedron)] =
std::make_shared<CellTypeTetrahedron>();
cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Pyramid)]
.reset(new CellTypePyramid());
dealii::ReferenceCells::Pyramid)] = std::make_shared<CellTypePyramid>();
cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Wedge)]
.reset(new CellTypeWedge());
dealii::ReferenceCells::Wedge)] = std::make_shared<CellTypeWedge>();
cell_types_impl[static_cast<types::geometric_entity_type>(
dealii::ReferenceCells::Hexahedron)]
.reset(new CellTypeHex());
dealii::ReferenceCells::Hexahedron)] =
std::make_shared<CellTypeHexahedron>();

// determine cell types and process vertices
std::vector<T> cell_vertices;
Expand Down

0 comments on commit 2d05656

Please sign in to comment.