Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some refactoring in connectivity.h #14590

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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