From d78b1763597986d16066dec6ee7fd8bf7f4ec51e Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Thu, 2 Jul 2015 16:16:12 +0200 Subject: [PATCH] Add Elements.h header including all element types. --- Applications/Utils/MeshEdit/AddTopLayer.cpp | 7 +----- AssemblerLib/LocalDataInitializer.h | 4 +-- FileIO/FEFLOWInterface.cpp | 7 +----- FileIO/GMSHInterface.cpp | 8 +----- FileIO/Legacy/MeshIO.cpp | 8 +----- FileIO/MPI_IO/NodePartitionedMeshReader.cpp | 10 +------- MeshLib/Elements/Elements.h | 25 +++++++++++++++++++ .../MeshEditing/DuplicateMeshComponents.cpp | 9 +------ MeshLib/MeshEditing/MeshRevision.cpp | 9 +------ MeshLib/MeshGenerators/VtkMeshConverter.cpp | 8 +----- 10 files changed, 34 insertions(+), 61 deletions(-) create mode 100644 MeshLib/Elements/Elements.h diff --git a/Applications/Utils/MeshEdit/AddTopLayer.cpp b/Applications/Utils/MeshEdit/AddTopLayer.cpp index ccc21bc81a7..93e1ec03b8c 100644 --- a/Applications/Utils/MeshEdit/AddTopLayer.cpp +++ b/Applications/Utils/MeshEdit/AddTopLayer.cpp @@ -26,12 +26,7 @@ // MeshLib #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" -#include "MeshLib/Elements/Element.h" -#include "MeshLib/Elements/Prism.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tri.h" -#include "MeshLib/Elements/Line.h" +#include "MeshLib/Elements/Elements.h" MeshLib::Prism* extrudeElement(std::vector<MeshLib::Node*> const& subsfc_nodes, MeshLib::Tri const*const sfc_elem, diff --git a/AssemblerLib/LocalDataInitializer.h b/AssemblerLib/LocalDataInitializer.h index b9c6dd4586b..972ff3f3048 100644 --- a/AssemblerLib/LocalDataInitializer.h +++ b/AssemblerLib/LocalDataInitializer.h @@ -15,9 +15,7 @@ #include <typeinfo> #include <unordered_map> -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Hex.h" +#include "MeshLib/Elements/Elements.h" #include "NumLib/Fem/Integration/GaussIntegrationPolicy.h" diff --git a/FileIO/FEFLOWInterface.cpp b/FileIO/FEFLOWInterface.cpp index b0113da0a04..ad814b92bfc 100644 --- a/FileIO/FEFLOWInterface.cpp +++ b/FileIO/FEFLOWInterface.cpp @@ -20,12 +20,7 @@ #include "GeoLib/Point.h" #include "GeoLib/Polygon.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Prism.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Tri.h" +#include "MeshLib/Elements/Elements.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" diff --git a/FileIO/GMSHInterface.cpp b/FileIO/GMSHInterface.cpp index 2237d81a186..ecd23d2f863 100644 --- a/FileIO/GMSHInterface.cpp +++ b/FileIO/GMSHInterface.cpp @@ -36,13 +36,7 @@ #include "GeoLib/PolylineWithSegmentMarker.h" #include "GeoLib/QuadTree.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Prism.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Tri.h" +#include "MeshLib/Elements/Elements.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" diff --git a/FileIO/Legacy/MeshIO.cpp b/FileIO/Legacy/MeshIO.cpp index 1765bcf0a68..f40098436ad 100644 --- a/FileIO/Legacy/MeshIO.cpp +++ b/FileIO/Legacy/MeshIO.cpp @@ -28,13 +28,7 @@ #include "GeoLib/GEOObjects.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Prism.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Tri.h" +#include "MeshLib/Elements/Elements.h" #include "MeshLib/Node.h" #include "MeshLib/Location.h" diff --git a/FileIO/MPI_IO/NodePartitionedMeshReader.cpp b/FileIO/MPI_IO/NodePartitionedMeshReader.cpp index 275ffa1759a..3e27ac50c4f 100644 --- a/FileIO/MPI_IO/NodePartitionedMeshReader.cpp +++ b/FileIO/MPI_IO/NodePartitionedMeshReader.cpp @@ -19,15 +19,7 @@ #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" -#include "MeshLib/Elements/Element.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Prism.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Tri.h" - +#include "MeshLib/Elements/Elements.h" #include "MeshLib/Properties.h" // Check if the value can by converted to given type without overflow. diff --git a/MeshLib/Elements/Elements.h b/MeshLib/Elements/Elements.h new file mode 100644 index 00000000000..7e699cd0e3d --- /dev/null +++ b/MeshLib/Elements/Elements.h @@ -0,0 +1,25 @@ +/* + * \file Elements.h + * \brief Cumulative include for all available mesh element types. + * + * \copyright + * Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#ifndef MESHLIB_ELEMENTS_ELEMENTS_H_ +#define MESHLIB_ELEMENTS_ELEMENTS_H_ + +#include "MeshLib/Elements/Element.h" +#include "MeshLib/Elements/Line.h" +#include "MeshLib/Elements/Hex.h" +#include "MeshLib/Elements/Prism.h" +#include "MeshLib/Elements/Pyramid.h" +#include "MeshLib/Elements/Quad.h" +#include "MeshLib/Elements/Tet.h" +#include "MeshLib/Elements/Tri.h" + +#endif // MESHLIB_ELEMENTS_ELEMENTS_H_ diff --git a/MeshLib/MeshEditing/DuplicateMeshComponents.cpp b/MeshLib/MeshEditing/DuplicateMeshComponents.cpp index 7ebc258a7f6..61f67419dd4 100644 --- a/MeshLib/MeshEditing/DuplicateMeshComponents.cpp +++ b/MeshLib/MeshEditing/DuplicateMeshComponents.cpp @@ -15,14 +15,7 @@ #include "DuplicateMeshComponents.h" #include "MeshLib/Mesh.h" -#include "MeshLib/Elements/Element.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Tri.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Prism.h" +#include "MeshLib/Elements/Elements.h" namespace MeshLib { diff --git a/MeshLib/MeshEditing/MeshRevision.cpp b/MeshLib/MeshEditing/MeshRevision.cpp index 69a7575d568..d20b7eab051 100644 --- a/MeshLib/MeshEditing/MeshRevision.cpp +++ b/MeshLib/MeshEditing/MeshRevision.cpp @@ -22,15 +22,8 @@ #include "GeoLib/Grid.h" #include "GeoLib/AnalyticalGeometry.h" +#include "MeshLib/Elements/Elements.h" #include "MeshLib/Mesh.h" -#include "MeshLib/Elements/Element.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Tri.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Prism.h" #include "DuplicateMeshComponents.h" diff --git a/MeshLib/MeshGenerators/VtkMeshConverter.cpp b/MeshLib/MeshGenerators/VtkMeshConverter.cpp index 741a9048f6e..b049a8a6482 100644 --- a/MeshLib/MeshGenerators/VtkMeshConverter.cpp +++ b/MeshLib/MeshGenerators/VtkMeshConverter.cpp @@ -14,15 +14,9 @@ #include "VtkMeshConverter.h" +#include "MeshLib/Elements/Elements.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" -#include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Tri.h" -#include "MeshLib/Elements/Quad.h" -#include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Prism.h" // Conversion from Image to QuadMesh #include <vtkImageData.h> -- GitLab