From 0066e5ebed6e24820ee6eba979f5f1a4aefff9d4 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Sat, 15 Apr 2017 20:43:45 +0200 Subject: [PATCH] Use 'using' keyword instead of typedef. --- .../PartitionMesh/NodeWiseMeshPartitioner.h | 2 +- BaseLib/Histogram.h | 3 +- BaseLib/TMPUtil.h | 4 +- GeoLib/PolylineVec.h | 2 +- GeoLib/Raster.h | 4 +- GeoLib/SurfaceVec.h | 2 +- GeoLib/TemplateVec.h | 5 +- .../Fluid/FluidProperties/FluidProperties.h | 2 +- MaterialLib/Fluid/FluidProperty.h | 2 +- MathLib/GeometricBasics.h | 2 +- MathLib/LinAlg/Dense/DenseMatrix.h | 4 +- MathLib/LinAlg/RowColumnIndices.h | 2 +- MathLib/LinAlg/Solvers/GaussAlgorithm.h | 4 +- MathLib/LinAlg/Solvers/TriangularSolve-impl.h | 6 +- MathLib/Point3d.h | 2 +- MathLib/TemplatePoint.h | 2 +- MathLib/TemplateWeightedPoint.h | 6 +- MathLib/Vector3.h | 2 +- MeshGeoToolsLib/AppendLinesAlongPolyline.h | 2 +- MeshLib/ElementCoordinatesMappingLocal.h | 2 +- MeshLib/Elements/Hex.h | 4 +- MeshLib/Elements/HexRule20.h | 2 +- MeshLib/Elements/HexRule8.h | 2 +- MeshLib/Elements/Line.h | 6 +- MeshLib/Elements/LineRule2.h | 2 +- MeshLib/Elements/LineRule3.h | 2 +- MeshLib/Elements/PointRule1.h | 2 +- MeshLib/Elements/Prism.h | 6 +- MeshLib/Elements/PrismRule15.h | 2 +- MeshLib/Elements/PrismRule6.h | 2 +- MeshLib/Elements/Pyramid.h | 6 +- MeshLib/Elements/PyramidRule13.h | 2 +- MeshLib/Elements/PyramidRule5.h | 2 +- MeshLib/Elements/Quad.h | 8 +- MeshLib/Elements/QuadRule4.h | 2 +- MeshLib/Elements/QuadRule8.h | 2 +- MeshLib/Elements/Tet.h | 6 +- MeshLib/Elements/TetRule10.h | 2 +- MeshLib/Elements/TetRule4.h | 2 +- MeshLib/Elements/Tri.h | 6 +- MeshLib/Elements/TriRule3.h | 2 +- MeshLib/Elements/TriRule6.h | 2 +- NumLib/DOF/ComponentGlobalIndexDict.h | 45 ++--- NumLib/DOF/LocalToGlobalIndexMap.h | 4 +- NumLib/DOF/MeshComponentMap.cpp | 2 +- NumLib/DOF/MeshComponentMap.h | 3 +- NumLib/Fem/CoordinatesMapping/ShapeMatrices.h | 8 +- .../FiniteElement/C0IsoparametricElements.h | 49 +++-- .../Fem/Integration/IntegrationGaussPrism.h | 4 +- .../Fem/Integration/IntegrationGaussPyramid.h | 4 +- .../Fem/Integration/IntegrationGaussRegular.h | 5 +- NumLib/Fem/Integration/IntegrationGaussTet.h | 4 +- NumLib/Fem/Integration/IntegrationGaussTri.h | 4 +- NumLib/Fem/Integration/IntegrationPoint.h | 2 +- NumLib/Function/SpatialFunctionLinear.h | 4 +- NumLib/NamedFunction.cpp | 6 +- .../LiquidFlow/LiquidFlowMaterialProperties.h | 2 +- ProcessLib/Parameter/GroupBasedParameter.cpp | 4 +- ProcessLib/VariableTransformation.h | 3 +- Tests/BaseLib/TestQuicksort.cpp | 2 +- Tests/GeoLib/TestOctTree.cpp | 2 +- Tests/GeoLib/TestPointVec.cpp | 2 +- Tests/MeshLib/TestCoordinatesMappingLocal.cpp | 43 ++--- Tests/MeshLib/TestQuadMesh.cpp | 2 +- .../CoordinatesMappingTestData/TestHex8.h | 66 +++---- .../CoordinatesMappingTestData/TestLine2.h | 4 +- .../CoordinatesMappingTestData/TestLine3.h | 4 +- .../CoordinatesMappingTestData/TestQuad4.h | 58 +++--- .../CoordinatesMappingTestData/TestTri3.h | 56 +++--- Tests/NumLib/FeTestData/TestFeHEX8.h | 2 +- Tests/NumLib/FeTestData/TestFeLINE2.h | 2 +- Tests/NumLib/FeTestData/TestFeLINE2Y.h | 2 +- Tests/NumLib/FeTestData/TestFeLINE3.h | 2 +- Tests/NumLib/FeTestData/TestFePRISM6.h | 2 +- Tests/NumLib/FeTestData/TestFePYRA5.h | 2 +- Tests/NumLib/FeTestData/TestFeQUAD4.h | 2 +- Tests/NumLib/FeTestData/TestFeTET4.h | 2 +- Tests/NumLib/FeTestData/TestFeTRI3.h | 2 +- Tests/NumLib/TestCoordinatesMapping.cpp | 109 ++++++----- Tests/NumLib/TestFe.cpp | 174 +++++++++--------- Tests/NumLib/TestMeshComponentMap.cpp | 6 +- Tests/NumLib/TestODEInt.cpp | 2 +- Tests/NumLib/TestSerialExecutor.cpp | 2 +- Tests/NumLib/TestShapeMatrices.cpp | 10 +- Tests/ProcessLib/TestJacobianAssembler.cpp | 5 +- 85 files changed, 422 insertions(+), 428 deletions(-) diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h index db7fb985b15..42c995ad3c9 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h +++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h @@ -42,7 +42,7 @@ struct Partition class NodeWiseMeshPartitioner { public: - typedef long IntegerType; + using IntegerType = long; public: /*! diff --git a/BaseLib/Histogram.h b/BaseLib/Histogram.h index 6d4aa8783c8..4a86f9bdaf0 100644 --- a/BaseLib/Histogram.h +++ b/BaseLib/Histogram.h @@ -33,7 +33,8 @@ template <typename T> class Histogram { public: - typedef typename std::vector<T> Data; /// Underlying input data vector type. + using Data = + typename std::vector<double>; /// Underlying input data vector type. public: /** Creates histogram of the given element in the range \c [first, last). diff --git a/BaseLib/TMPUtil.h b/BaseLib/TMPUtil.h index 1b0d8fdb0a3..1e916d79ee5 100644 --- a/BaseLib/TMPUtil.h +++ b/BaseLib/TMPUtil.h @@ -22,12 +22,12 @@ struct IntegerSequence { template <int N, int... S> struct GenerateIntegerSequence { // effectively pushes N-1 from the left to the list int... S of integers. - typedef typename GenerateIntegerSequence<N - 1, N - 1, S...>::type type; + using type = typename GenerateIntegerSequence<N - 1, N - 1, S...>::type; }; template <int... S> struct GenerateIntegerSequence<0, S...> { - typedef IntegerSequence<S...> type; + using type = IntegerSequence<S...>; }; /* The template metaprogram proceeds in the following way: * diff --git a/GeoLib/PolylineVec.h b/GeoLib/PolylineVec.h index cd09252f3ae..bbd9732e92e 100644 --- a/GeoLib/PolylineVec.h +++ b/GeoLib/PolylineVec.h @@ -26,6 +26,6 @@ namespace GeoLib { * additional one can give the vector of polylines a name * */ -typedef TemplateVec<Polyline> PolylineVec; +using PolylineVec = TemplateVec<GeoLib::Polyline>; } // end namespace diff --git a/GeoLib/Raster.h b/GeoLib/Raster.h index beb70ec56c3..07a5914c199 100644 --- a/GeoLib/Raster.h +++ b/GeoLib/Raster.h @@ -39,8 +39,8 @@ struct RasterHeader */ class Raster { public: - typedef double const* const_iterator; - typedef double* iterator; + using const_iterator = const double*; + using iterator = double*; /** * @brief Constructor for an object of class Raster. The raster data have diff --git a/GeoLib/SurfaceVec.h b/GeoLib/SurfaceVec.h index abd452a3a83..b1f5a21589d 100644 --- a/GeoLib/SurfaceVec.h +++ b/GeoLib/SurfaceVec.h @@ -24,6 +24,6 @@ namespace GeoLib { * and a name. * */ -typedef TemplateVec<Surface> SurfaceVec; +using SurfaceVec = TemplateVec<GeoLib::Surface>; } // end namespace diff --git a/GeoLib/TemplateVec.h b/GeoLib/TemplateVec.h index 81cd5ea02d2..4faf27f4fdc 100644 --- a/GeoLib/TemplateVec.h +++ b/GeoLib/TemplateVec.h @@ -40,8 +40,9 @@ namespace GeoLib template <class T> class TemplateVec { protected: - typedef std::pair<std::string, std::size_t> NameIdPair; - typedef std::map<std::string, std::size_t> NameIdMap; + using NameIdPair = std::pair<std::string, std::size_t>; + using NameIdMap = std::map<std::string, std::size_t>; + public: /** * Constructor of class TemlateVec. diff --git a/MaterialLib/Fluid/FluidProperties/FluidProperties.h b/MaterialLib/Fluid/FluidProperties/FluidProperties.h index 72192805b6d..339afb6ae7c 100644 --- a/MaterialLib/Fluid/FluidProperties/FluidProperties.h +++ b/MaterialLib/Fluid/FluidProperties/FluidProperties.h @@ -40,7 +40,7 @@ const unsigned FluidPropertyTypeNumber = class FluidProperties { public: - typedef std::array<double, PropertyVariableNumber> ArrayType; + using ArrayType = std::array<double, PropertyVariableNumber>; FluidProperties( std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& density, diff --git a/MaterialLib/Fluid/FluidProperty.h b/MaterialLib/Fluid/FluidProperty.h index 13b8a5dd779..3633597714c 100644 --- a/MaterialLib/Fluid/FluidProperty.h +++ b/MaterialLib/Fluid/FluidProperty.h @@ -25,7 +25,7 @@ namespace Fluid class FluidProperty { public: - typedef std::array<double, PropertyVariableNumber> ArrayType; + using ArrayType = std::array<double, PropertyVariableNumber>; virtual ~FluidProperty() = default; /// Get model name. diff --git a/MathLib/GeometricBasics.h b/MathLib/GeometricBasics.h index 52d66619b6d..e153d029f82 100644 --- a/MathLib/GeometricBasics.h +++ b/MathLib/GeometricBasics.h @@ -17,7 +17,7 @@ namespace MathLib { template <typename T, std::size_t DIM> class TemplatePoint; -typedef MathLib::TemplatePoint<double,3> Point3d; +using Point3d = MathLib::TemplatePoint<double, 3>; enum TriangleTest { diff --git a/MathLib/LinAlg/Dense/DenseMatrix.h b/MathLib/LinAlg/Dense/DenseMatrix.h index dd63ba7fdee..3bd5a543259 100644 --- a/MathLib/LinAlg/Dense/DenseMatrix.h +++ b/MathLib/LinAlg/Dense/DenseMatrix.h @@ -24,8 +24,8 @@ namespace MathLib { template <typename FP_TYPE, typename IDX_TYPE = std::size_t> class DenseMatrix { public: - typedef FP_TYPE FP_T; - typedef IDX_TYPE IDX_T; + using FP_T = FP_TYPE; + using IDX_T = IDX_TYPE; public: /// Dense square matrix constructor. diff --git a/MathLib/LinAlg/RowColumnIndices.h b/MathLib/LinAlg/RowColumnIndices.h index f75587cf00a..3c9ccf73430 100644 --- a/MathLib/LinAlg/RowColumnIndices.h +++ b/MathLib/LinAlg/RowColumnIndices.h @@ -17,7 +17,7 @@ namespace MathLib template <typename IDX_TYPE> struct RowColumnIndices { - typedef typename std::vector<IDX_TYPE> LineIndex; + using LineIndex = typename std::vector<IDX_TYPE>; RowColumnIndices(LineIndex const& rows_, LineIndex const& columns_) : rows(rows_), columns(columns_) { } diff --git a/MathLib/LinAlg/Solvers/GaussAlgorithm.h b/MathLib/LinAlg/Solvers/GaussAlgorithm.h index dbe67099bad..068b7494d7d 100644 --- a/MathLib/LinAlg/Solvers/GaussAlgorithm.h +++ b/MathLib/LinAlg/Solvers/GaussAlgorithm.h @@ -35,8 +35,8 @@ template <typename MAT_T, typename VEC_T = typename MAT_T::FP_T*> class GaussAlgorithm { public: - typedef typename MAT_T::FP_T FP_T; - typedef typename MAT_T::IDX_T IDX_T; + using FP_T = typename MAT_T::FP_T; + using IDX_T = typename MAT_T::IDX_T; public: /** diff --git a/MathLib/LinAlg/Solvers/TriangularSolve-impl.h b/MathLib/LinAlg/Solvers/TriangularSolve-impl.h index 62867221e18..0836ce16e65 100644 --- a/MathLib/LinAlg/Solvers/TriangularSolve-impl.h +++ b/MathLib/LinAlg/Solvers/TriangularSolve-impl.h @@ -17,7 +17,7 @@ namespace MathLib { template <typename FP_T, typename VEC_T> void forwardSolve (const DenseMatrix <FP_T> &L, VEC_T& b) { - typedef typename DenseMatrix<FP_T>::IDX_T IDX_T; + using IDX_T = typename DenseMatrix<double>::IDX_T; IDX_T m (L.getNumberOfRows()); FP_T t; @@ -34,7 +34,7 @@ template <typename FP_T, typename VEC_T> void backwardSolve (const DenseMatrix <FP_T> &mat, VEC_T& b) { FP_T t; - typedef typename DenseMatrix<FP_T>::IDX_T IDX_T; + using IDX_T = typename DenseMatrix<double>::IDX_T; IDX_T m (mat.getNumberOfRows()), n(mat.getNumberOfColumns()); for (int r=m-1; r>=0; r--) { t = 0.0; @@ -48,7 +48,7 @@ void backwardSolve (const DenseMatrix <FP_T> &mat, VEC_T& b) template <typename FP_T, typename VEC_T> void backwardSolve ( DenseMatrix<FP_T> const& mat, VEC_T& x, VEC_T const& b) { - typedef typename DenseMatrix<FP_T>::IDX_T IDX_T; + using IDX_T = typename DenseMatrix<FP_T>::IDX_T; IDX_T n_cols (mat.getNumberOfColumns()); for (int r = (n_cols - 1); r >= 0; r--) { FP_T t = 0.0; diff --git a/MathLib/Point3d.h b/MathLib/Point3d.h index f8a4cda77e2..9fea8f5fc53 100644 --- a/MathLib/Point3d.h +++ b/MathLib/Point3d.h @@ -20,7 +20,7 @@ namespace MathLib { -typedef MathLib::TemplatePoint<double,3> Point3d; +using Point3d = MathLib::TemplatePoint<double, 3>; extern const Point3d ORIGIN; /** diff --git a/MathLib/TemplatePoint.h b/MathLib/TemplatePoint.h index 9b3656164cb..7dd7b457858 100644 --- a/MathLib/TemplatePoint.h +++ b/MathLib/TemplatePoint.h @@ -34,7 +34,7 @@ namespace MathLib template <typename T, std::size_t DIM = 3> class TemplatePoint { public: - typedef T FP_T; + using FP_T = T; /** default constructor with zero coordinates */ TemplatePoint(); diff --git a/MathLib/TemplateWeightedPoint.h b/MathLib/TemplateWeightedPoint.h index 318566c1980..05bf9ca0fdc 100644 --- a/MathLib/TemplateWeightedPoint.h +++ b/MathLib/TemplateWeightedPoint.h @@ -34,8 +34,8 @@ private: W_T const _weight; }; -typedef TemplateWeightedPoint<double, double, 1> WeightedPoint1D; -typedef TemplateWeightedPoint<double, double, 2> WeightedPoint2D; -typedef TemplateWeightedPoint<double, double, 3> WeightedPoint3D; +using WeightedPoint1D = TemplateWeightedPoint<double, double, 1>; +using WeightedPoint2D = TemplateWeightedPoint<double, double, 2>; +using WeightedPoint3D = TemplateWeightedPoint<double, double, 3>; } // end namespace MathLib diff --git a/MathLib/Vector3.h b/MathLib/Vector3.h index e880b55a6a6..f5361c6f9e5 100644 --- a/MathLib/Vector3.h +++ b/MathLib/Vector3.h @@ -185,7 +185,7 @@ template <typename T1> TemplateVector3<T1> operator*( return v * s; } -typedef TemplateVector3<double> Vector3; +using Vector3 = TemplateVector3<double>; /// Calculates the scalar triple (u x v) . w double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v, diff --git a/MeshGeoToolsLib/AppendLinesAlongPolyline.h b/MeshGeoToolsLib/AppendLinesAlongPolyline.h index 0940c886af3..078ecb0ce96 100644 --- a/MeshGeoToolsLib/AppendLinesAlongPolyline.h +++ b/MeshGeoToolsLib/AppendLinesAlongPolyline.h @@ -14,7 +14,7 @@ namespace GeoLib { class Polyline; template <typename T> class TemplateVec; -typedef TemplateVec<Polyline> PolylineVec; +using PolylineVec = TemplateVec<GeoLib::Polyline>; } namespace MeshLib diff --git a/MeshLib/ElementCoordinatesMappingLocal.h b/MeshLib/ElementCoordinatesMappingLocal.h index 3185b911f3c..ff4e6c68dda 100644 --- a/MeshLib/ElementCoordinatesMappingLocal.h +++ b/MeshLib/ElementCoordinatesMappingLocal.h @@ -19,7 +19,7 @@ namespace MeshLib namespace MeshLib { -typedef Eigen::Matrix<double, 3u, 3u, Eigen::RowMajor> RotationMatrix; +using RotationMatrix = Eigen::Matrix<double, 3u, 3u, Eigen::RowMajor>; /** * This class maps node coordinates on intrinsic coordinates of the given element. diff --git a/MeshLib/Elements/Hex.h b/MeshLib/Elements/Hex.h index 9bb14dc6ab0..91fa5997977 100644 --- a/MeshLib/Elements/Hex.h +++ b/MeshLib/Elements/Hex.h @@ -22,6 +22,6 @@ extern template class MeshLib::TemplateElement<MeshLib::HexRule20>; extern template class MeshLib::TemplateElement<MeshLib::HexRule8>; namespace MeshLib { -typedef TemplateElement<HexRule8> Hex; -typedef TemplateElement<HexRule20> Hex20; +using Hex = TemplateElement<MeshLib::HexRule8>; +using Hex20 = TemplateElement<MeshLib::HexRule20>; } diff --git a/MeshLib/Elements/HexRule20.h b/MeshLib/Elements/HexRule20.h index efc53b437e4..6d8f19b561f 100644 --- a/MeshLib/Elements/HexRule20.h +++ b/MeshLib/Elements/HexRule20.h @@ -58,7 +58,7 @@ public: static const unsigned edge_nodes[12][3]; /// Returns the i-th edge of the element. - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/HexRule8.h b/MeshLib/Elements/HexRule8.h index b1de7ac5556..0aba7560175 100644 --- a/MeshLib/Elements/HexRule8.h +++ b/MeshLib/Elements/HexRule8.h @@ -73,7 +73,7 @@ public: static const unsigned edge_nodes[12][2]; /// Returns the i-th edge of the element. - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/Line.h b/MeshLib/Elements/Line.h index c4ef9440fa2..f9e7892305e 100644 --- a/MeshLib/Elements/Line.h +++ b/MeshLib/Elements/Line.h @@ -22,8 +22,6 @@ extern template class MeshLib::TemplateElement<MeshLib::LineRule2>; extern template class MeshLib::TemplateElement<MeshLib::LineRule3>; namespace MeshLib { - -typedef TemplateElement<LineRule2> Line; -typedef TemplateElement<LineRule3> Line3; - +using Line = TemplateElement<MeshLib::LineRule2>; +using Line3 = TemplateElement<MeshLib::LineRule3>; } diff --git a/MeshLib/Elements/LineRule2.h b/MeshLib/Elements/LineRule2.h index 52b6b494ede..9f0fe8b5f25 100644 --- a/MeshLib/Elements/LineRule2.h +++ b/MeshLib/Elements/LineRule2.h @@ -45,7 +45,7 @@ public: static const unsigned edge_nodes[1][2]; /// Edge rule - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /** * \copydoc MeshLib::Element::isPntInElement() diff --git a/MeshLib/Elements/LineRule3.h b/MeshLib/Elements/LineRule3.h index 8489a8167fa..e4c4e9d381e 100644 --- a/MeshLib/Elements/LineRule3.h +++ b/MeshLib/Elements/LineRule3.h @@ -31,7 +31,7 @@ public: static const CellType cell_type = CellType::LINE3; /// Edge rule - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; }; /* class */ } /* namespace */ diff --git a/MeshLib/Elements/PointRule1.h b/MeshLib/Elements/PointRule1.h index 59f89ec3e27..bb1d368b4b2 100644 --- a/MeshLib/Elements/PointRule1.h +++ b/MeshLib/Elements/PointRule1.h @@ -40,7 +40,7 @@ public: static const unsigned edge_nodes[1][1]; /// Edge rule - typedef NoEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::NoEdgeReturn; /// \copydoc MeshLib::Element::isPntInElement() /// diff --git a/MeshLib/Elements/Prism.h b/MeshLib/Elements/Prism.h index 7176cfd7997..f9324becb6f 100644 --- a/MeshLib/Elements/Prism.h +++ b/MeshLib/Elements/Prism.h @@ -22,8 +22,6 @@ extern template class MeshLib::TemplateElement<MeshLib::PrismRule15>; extern template class MeshLib::TemplateElement<MeshLib::PrismRule6>; namespace MeshLib { - -typedef TemplateElement<PrismRule6> Prism; -typedef TemplateElement<PrismRule15> Prism15; - +using Prism = TemplateElement<MeshLib::PrismRule6>; +using Prism15 = TemplateElement<MeshLib::PrismRule15>; } diff --git a/MeshLib/Elements/PrismRule15.h b/MeshLib/Elements/PrismRule15.h index 4f6bb721b12..a8eb9561fe8 100644 --- a/MeshLib/Elements/PrismRule15.h +++ b/MeshLib/Elements/PrismRule15.h @@ -59,7 +59,7 @@ public: static const unsigned n_face_nodes[5]; /// Returns the i-th edge of the element. - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/PrismRule6.h b/MeshLib/Elements/PrismRule6.h index aecd28b2159..0d3d1319de5 100644 --- a/MeshLib/Elements/PrismRule6.h +++ b/MeshLib/Elements/PrismRule6.h @@ -74,7 +74,7 @@ public: static const unsigned n_face_nodes[5]; /// Returns the i-th edge of the element. - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/Pyramid.h b/MeshLib/Elements/Pyramid.h index 3ae5204c4cc..4bfc6387e60 100644 --- a/MeshLib/Elements/Pyramid.h +++ b/MeshLib/Elements/Pyramid.h @@ -22,8 +22,6 @@ extern template class MeshLib::TemplateElement<MeshLib::PyramidRule13>; extern template class MeshLib::TemplateElement<MeshLib::PyramidRule5>; namespace MeshLib { - -typedef TemplateElement<PyramidRule5> Pyramid; -typedef TemplateElement<PyramidRule13> Pyramid13; - +using Pyramid = TemplateElement<MeshLib::PyramidRule5>; +using Pyramid13 = TemplateElement<MeshLib::PyramidRule13>; } diff --git a/MeshLib/Elements/PyramidRule13.h b/MeshLib/Elements/PyramidRule13.h index 987a6fc17e7..b0fee0b7854 100644 --- a/MeshLib/Elements/PyramidRule13.h +++ b/MeshLib/Elements/PyramidRule13.h @@ -58,7 +58,7 @@ public: static const unsigned n_face_nodes[5]; /// Returns the i-th edge of the element. - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/PyramidRule5.h b/MeshLib/Elements/PyramidRule5.h index f1864743898..42a9c51bd2e 100644 --- a/MeshLib/Elements/PyramidRule5.h +++ b/MeshLib/Elements/PyramidRule5.h @@ -73,7 +73,7 @@ public: static const unsigned n_face_nodes[5]; /// Returns the i-th edge of the element. - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/Quad.h b/MeshLib/Elements/Quad.h index ad1cd724d03..4315590bc88 100644 --- a/MeshLib/Elements/Quad.h +++ b/MeshLib/Elements/Quad.h @@ -25,9 +25,7 @@ extern template class MeshLib::TemplateElement<MeshLib::QuadRule9>; namespace MeshLib { - -typedef TemplateElement<QuadRule4> Quad; -typedef TemplateElement<QuadRule8> Quad8; -typedef TemplateElement<QuadRule9> Quad9; - +using Quad = TemplateElement<MeshLib::QuadRule4>; +using Quad8 = TemplateElement<MeshLib::QuadRule8>; +using Quad9 = TemplateElement<MeshLib::QuadRule9>; } diff --git a/MeshLib/Elements/QuadRule4.h b/MeshLib/Elements/QuadRule4.h index 31af81dfe9c..3a2a272dad0 100644 --- a/MeshLib/Elements/QuadRule4.h +++ b/MeshLib/Elements/QuadRule4.h @@ -58,7 +58,7 @@ public: static const unsigned edge_nodes[4][2]; /// Returns the i-th edge of the element. - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /** * \copydoc MeshLib::Element::isPntInElement() diff --git a/MeshLib/Elements/QuadRule8.h b/MeshLib/Elements/QuadRule8.h index e29b2d2fb6a..a2e9e6fe52d 100644 --- a/MeshLib/Elements/QuadRule8.h +++ b/MeshLib/Elements/QuadRule8.h @@ -45,7 +45,7 @@ public: static const unsigned edge_nodes[4][3]; /// Returns the i-th edge of the element. - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; }; /* class */ diff --git a/MeshLib/Elements/Tet.h b/MeshLib/Elements/Tet.h index ba4546c281e..1e1f497af87 100644 --- a/MeshLib/Elements/Tet.h +++ b/MeshLib/Elements/Tet.h @@ -22,8 +22,6 @@ extern template class MeshLib::TemplateElement<MeshLib::TetRule10>; extern template class MeshLib::TemplateElement<MeshLib::TetRule4>; namespace MeshLib { - -typedef TemplateElement<TetRule4> Tet; -typedef TemplateElement<TetRule10> Tet10; - +using Tet = TemplateElement<MeshLib::TetRule4>; +using Tet10 = TemplateElement<MeshLib::TetRule10>; } diff --git a/MeshLib/Elements/TetRule10.h b/MeshLib/Elements/TetRule10.h index cbb57b58a72..f1a15b2fe79 100644 --- a/MeshLib/Elements/TetRule10.h +++ b/MeshLib/Elements/TetRule10.h @@ -53,7 +53,7 @@ public: static const unsigned edge_nodes[6][3]; /// Returns the i-th edge of the element. - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/TetRule4.h b/MeshLib/Elements/TetRule4.h index 745b9326b54..ebc0d9da600 100644 --- a/MeshLib/Elements/TetRule4.h +++ b/MeshLib/Elements/TetRule4.h @@ -68,7 +68,7 @@ public: static const unsigned edge_nodes[6][2]; /// Returns the i-th edge of the element. - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /// Returns the i-th face of the element. static const Element* getFace(const Element* e, unsigned i); diff --git a/MeshLib/Elements/Tri.h b/MeshLib/Elements/Tri.h index ab67c611084..29fed76029b 100644 --- a/MeshLib/Elements/Tri.h +++ b/MeshLib/Elements/Tri.h @@ -23,8 +23,6 @@ extern template class MeshLib::TemplateElement<MeshLib::TriRule3>; extern template class MeshLib::TemplateElement<MeshLib::TriRule6>; namespace MeshLib { - -typedef TemplateElement<TriRule3> Tri; -typedef TemplateElement<TriRule6> Tri6; - +using Tri = TemplateElement<MeshLib::TriRule3>; +using Tri6 = TemplateElement<MeshLib::TriRule6>; } diff --git a/MeshLib/Elements/TriRule3.h b/MeshLib/Elements/TriRule3.h index f7f3c14c6c2..157f8538d0a 100644 --- a/MeshLib/Elements/TriRule3.h +++ b/MeshLib/Elements/TriRule3.h @@ -59,7 +59,7 @@ public: static const unsigned edge_nodes[3][2]; /// Returns the i-th edge of the element. - typedef LinearEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::LinearEdgeReturn; /** * \copydoc MeshLib::Element::isPntInElement() diff --git a/MeshLib/Elements/TriRule6.h b/MeshLib/Elements/TriRule6.h index d2b234cd0d2..c34372bc900 100644 --- a/MeshLib/Elements/TriRule6.h +++ b/MeshLib/Elements/TriRule6.h @@ -48,7 +48,7 @@ public: static const unsigned edge_nodes[3][3]; /// Returns the i-th edge of the element. - typedef QuadraticEdgeReturn EdgeReturn; + using EdgeReturn = MeshLib::QuadraticEdgeReturn; }; /* class */ diff --git a/NumLib/DOF/ComponentGlobalIndexDict.h b/NumLib/DOF/ComponentGlobalIndexDict.h index ba7644b7adc..f67d1adaa94 100644 --- a/NumLib/DOF/ComponentGlobalIndexDict.h +++ b/NumLib/DOF/ComponentGlobalIndexDict.h @@ -89,34 +89,23 @@ struct ByLocationAndComponent {}; struct ByComponent {}; struct ByGlobalIndex {}; -typedef boost::multi_index::multi_index_container< - Line, - boost::multi_index::indexed_by - < - boost::multi_index::ordered_unique - < - boost::multi_index::tag<ByLocationAndComponent>, - boost::multi_index::identity<Line>, - LineByLocationAndComponentComparator - >, - boost::multi_index::ordered_non_unique - < - boost::multi_index::tag<ByLocation>, - boost::multi_index::identity<Line>, - LineByLocationComparator - >, - boost::multi_index::ordered_non_unique - < - boost::multi_index::tag<ByComponent>, - boost::multi_index::member<Line, std::size_t, &Line::comp_id> - >, - boost::multi_index::ordered_non_unique - < - boost::multi_index::tag<ByGlobalIndex>, - boost::multi_index::member<Line, GlobalIndexType, &Line::global_index> - > - > - > ComponentGlobalIndexDict; +using ComponentGlobalIndexDict = boost::multi_index::multi_index_container< + Line, + boost::multi_index::indexed_by< + boost::multi_index::ordered_unique< + boost::multi_index::tag<ByLocationAndComponent>, + boost::multi_index::identity<Line>, + LineByLocationAndComponentComparator>, + boost::multi_index::ordered_non_unique< + boost::multi_index::tag<ByLocation>, + boost::multi_index::identity<Line>, LineByLocationComparator>, + boost::multi_index::ordered_non_unique< + boost::multi_index::tag<ByComponent>, + boost::multi_index::member<Line, std::size_t, &Line::comp_id>>, + boost::multi_index::ordered_non_unique< + boost::multi_index::tag<ByGlobalIndex>, + boost::multi_index::member<Line, GlobalIndexType, + &Line::global_index>>>>; } // namespace detail } // namespace NumLib diff --git a/NumLib/DOF/LocalToGlobalIndexMap.h b/NumLib/DOF/LocalToGlobalIndexMap.h index a5357bbb668..8bfadc2191e 100644 --- a/NumLib/DOF/LocalToGlobalIndexMap.h +++ b/NumLib/DOF/LocalToGlobalIndexMap.h @@ -37,8 +37,8 @@ namespace NumLib class LocalToGlobalIndexMap final { public: - typedef MathLib::RowColumnIndices<GlobalIndexType> RowColumnIndices; - typedef RowColumnIndices::LineIndex LineIndex; + using RowColumnIndices = MathLib::RowColumnIndices<GlobalIndexType>; + using LineIndex = RowColumnIndices::LineIndex; public: /// Creates a MeshComponentMap internally and stores the global indices for diff --git a/NumLib/DOF/MeshComponentMap.cpp b/NumLib/DOF/MeshComponentMap.cpp index 629e5698428..70076735937 100644 --- a/NumLib/DOF/MeshComponentMap.cpp +++ b/NumLib/DOF/MeshComponentMap.cpp @@ -248,7 +248,7 @@ std::vector<GlobalIndexType> MeshComponentMap::getGlobalIndicesByComponent( std::vector<Location> const& ls) const { // vector of (Component, global Index) pairs. - typedef std::pair<std::size_t, GlobalIndexType> CIPair; + using CIPair = std::pair<std::size_t, GlobalIndexType>; std::vector<CIPair> pairs; pairs.reserve(ls.size()); diff --git a/NumLib/DOF/MeshComponentMap.h b/NumLib/DOF/MeshComponentMap.h index 9248a746158..e4402cc7813 100644 --- a/NumLib/DOF/MeshComponentMap.h +++ b/NumLib/DOF/MeshComponentMap.h @@ -33,7 +33,8 @@ enum class ComponentOrder class MeshComponentMap final { public: - typedef MeshLib::Location Location; + using Location = MeshLib::Location; + public: /// \param components a vector of components /// \param order type of ordering values in a vector diff --git a/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h b/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h index a74020f8259..486665226de 100644 --- a/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h +++ b/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h @@ -42,10 +42,10 @@ enum class ShapeMatrixType template <class T_N, class T_DNDR, class T_J, class T_DNDX> struct ShapeMatrices { - typedef T_N ShapeType; - typedef T_DNDR DrShapeType; - typedef T_J JacobianType; - typedef T_DNDX DxShapeType; + using ShapeType = T_N; + using DrShapeType = T_DNDR; + using JacobianType = T_J; + using DxShapeType = T_DNDX; ShapeType N; ///< Vector of shape functions, N(r) DrShapeType dNdr; ///< Matrix of gradient of shape functions in natural coordinates, dN(r)/dr diff --git a/NumLib/Fem/FiniteElement/C0IsoparametricElements.h b/NumLib/Fem/FiniteElement/C0IsoparametricElements.h index 52b865bcec0..e10608059f2 100644 --- a/NumLib/Fem/FiniteElement/C0IsoparametricElements.h +++ b/NumLib/Fem/FiniteElement/C0IsoparametricElements.h @@ -33,101 +33,116 @@ namespace NumLib { - template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FePOINT1 { - typedef TemplateIsoparametric<ShapePoint1, T_SHAPE_MATRIX_POLICY<ShapePoint1>> type; + using type = + TemplateIsoparametric<ShapePoint1, T_SHAPE_MATRIX_POLICY<ShapePoint1>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeLINE2 { - typedef TemplateIsoparametric<ShapeLine2, T_SHAPE_MATRIX_POLICY<ShapeLine2>> type; + using type = + TemplateIsoparametric<ShapeLine2, T_SHAPE_MATRIX_POLICY<ShapeLine2>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeLINE3 { - typedef TemplateIsoparametric<ShapeLine3, T_SHAPE_MATRIX_POLICY<ShapeLine3>> type; + using type = + TemplateIsoparametric<ShapeLine3, T_SHAPE_MATRIX_POLICY<ShapeLine3>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeTRI3 { - typedef TemplateIsoparametric<ShapeTri3, T_SHAPE_MATRIX_POLICY<ShapeTri3>> type; + using type = + TemplateIsoparametric<ShapeTri3, T_SHAPE_MATRIX_POLICY<ShapeTri3>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeTRI6 { - typedef TemplateIsoparametric<ShapeTri6, T_SHAPE_MATRIX_POLICY<ShapeTri6>> type; + using type = + TemplateIsoparametric<ShapeTri6, T_SHAPE_MATRIX_POLICY<ShapeTri6>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeQUAD4 { - typedef TemplateIsoparametric<ShapeQuad4, T_SHAPE_MATRIX_POLICY<ShapeQuad4>> type; + using type = + TemplateIsoparametric<ShapeQuad4, T_SHAPE_MATRIX_POLICY<ShapeQuad4>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeQUAD8 { - typedef TemplateIsoparametric<ShapeQuad8, T_SHAPE_MATRIX_POLICY<ShapeQuad8>> type; + using type = + TemplateIsoparametric<ShapeQuad8, T_SHAPE_MATRIX_POLICY<ShapeQuad8>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeQUAD9 { - typedef TemplateIsoparametric<ShapeQuad9, T_SHAPE_MATRIX_POLICY<ShapeQuad9>> type; + using type = + TemplateIsoparametric<ShapeQuad9, T_SHAPE_MATRIX_POLICY<ShapeQuad9>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeHEX8 { - typedef TemplateIsoparametric<ShapeHex8, T_SHAPE_MATRIX_POLICY<ShapeHex8>> type; + using type = + TemplateIsoparametric<ShapeHex8, T_SHAPE_MATRIX_POLICY<ShapeHex8>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeHEX20 { - typedef TemplateIsoparametric<ShapeHex20, T_SHAPE_MATRIX_POLICY<ShapeHex20>> type; + using type = + TemplateIsoparametric<ShapeHex20, T_SHAPE_MATRIX_POLICY<ShapeHex20>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeTET4 { - typedef TemplateIsoparametric<ShapeTet4, T_SHAPE_MATRIX_POLICY<ShapeTet4>> type; + using type = + TemplateIsoparametric<ShapeTet4, T_SHAPE_MATRIX_POLICY<ShapeTet4>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FeTET10 { - typedef TemplateIsoparametric<ShapeTet10, T_SHAPE_MATRIX_POLICY<ShapeTet10>> type; + using type = + TemplateIsoparametric<ShapeTet10, T_SHAPE_MATRIX_POLICY<ShapeTet10>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FePRISM6 { - typedef TemplateIsoparametric<ShapePrism6, T_SHAPE_MATRIX_POLICY<ShapePrism6>> type; + using type = + TemplateIsoparametric<ShapePrism6, T_SHAPE_MATRIX_POLICY<ShapePrism6>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FePRISM15 { - typedef TemplateIsoparametric<ShapePrism15, T_SHAPE_MATRIX_POLICY<ShapePrism15>> type; + using type = TemplateIsoparametric<ShapePrism15, + T_SHAPE_MATRIX_POLICY<ShapePrism15>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FePYRA5 { - typedef TemplateIsoparametric<ShapePyra5, T_SHAPE_MATRIX_POLICY<ShapePyra5>> type; + using type = + TemplateIsoparametric<ShapePyra5, T_SHAPE_MATRIX_POLICY<ShapePyra5>>; }; template <template <typename> class T_SHAPE_MATRIX_POLICY> struct FePYRA13 { - typedef TemplateIsoparametric<ShapePyra13, T_SHAPE_MATRIX_POLICY<ShapePyra13>> type; + using type = + TemplateIsoparametric<ShapePyra13, T_SHAPE_MATRIX_POLICY<ShapePyra13>>; }; } // NumLib diff --git a/NumLib/Fem/Integration/IntegrationGaussPrism.h b/NumLib/Fem/Integration/IntegrationGaussPrism.h index 087a53d652c..0e0b6d32f9f 100644 --- a/NumLib/Fem/Integration/IntegrationGaussPrism.h +++ b/NumLib/Fem/Integration/IntegrationGaussPrism.h @@ -20,8 +20,8 @@ namespace NumLib */ class IntegrationGaussPrism { - typedef MathLib::TemplateWeightedPoint<double, double, 3> - WeightedPoint; + using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 3>; + public: /** * Construct this object with the given integration order diff --git a/NumLib/Fem/Integration/IntegrationGaussPyramid.h b/NumLib/Fem/Integration/IntegrationGaussPyramid.h index d8e0707f47c..850c2bb3dd7 100644 --- a/NumLib/Fem/Integration/IntegrationGaussPyramid.h +++ b/NumLib/Fem/Integration/IntegrationGaussPyramid.h @@ -19,8 +19,8 @@ namespace NumLib */ class IntegrationGaussPyramid { - typedef MathLib::TemplateWeightedPoint<double, double, 3> - WeightedPoint; + using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 3>; + public: /** * Construct this object with the given integration order diff --git a/NumLib/Fem/Integration/IntegrationGaussRegular.h b/NumLib/Fem/Integration/IntegrationGaussRegular.h index 750ccf06dd6..507374ed3d8 100644 --- a/NumLib/Fem/Integration/IntegrationGaussRegular.h +++ b/NumLib/Fem/Integration/IntegrationGaussRegular.h @@ -28,8 +28,9 @@ namespace NumLib template <unsigned N_DIM> class IntegrationGaussRegular { - typedef typename MathLib::TemplateWeightedPoint<double, double, N_DIM> - WeightedPoint; + using WeightedPoint = + typename MathLib::TemplateWeightedPoint<double, double, N_DIM>; + public: /// Create IntegrationGaussRegular of the given Gauss-Legendre integration /// order. diff --git a/NumLib/Fem/Integration/IntegrationGaussTet.h b/NumLib/Fem/Integration/IntegrationGaussTet.h index 29e93014463..8b50c038477 100644 --- a/NumLib/Fem/Integration/IntegrationGaussTet.h +++ b/NumLib/Fem/Integration/IntegrationGaussTet.h @@ -19,8 +19,8 @@ namespace NumLib */ class IntegrationGaussTet { - typedef MathLib::TemplateWeightedPoint<double, double, 3> - WeightedPoint; + using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 3>; + public: /** * Construct this object with the given integration order diff --git a/NumLib/Fem/Integration/IntegrationGaussTri.h b/NumLib/Fem/Integration/IntegrationGaussTri.h index 6d66790dd88..d9a66480655 100644 --- a/NumLib/Fem/Integration/IntegrationGaussTri.h +++ b/NumLib/Fem/Integration/IntegrationGaussTri.h @@ -35,8 +35,8 @@ namespace NumLib */ class IntegrationGaussTri { - typedef MathLib::TemplateWeightedPoint<double, double, 2> - WeightedPoint; + using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 2>; + public: /** * Construct this object with the given integration order diff --git a/NumLib/Fem/Integration/IntegrationPoint.h b/NumLib/Fem/Integration/IntegrationPoint.h index eaaee68924b..fcc2bb81606 100644 --- a/NumLib/Fem/Integration/IntegrationPoint.h +++ b/NumLib/Fem/Integration/IntegrationPoint.h @@ -17,7 +17,7 @@ namespace NumLib /// It is only needed to satisfy the common integration rule concepts. class IntegrationPoint { - typedef MathLib::TemplateWeightedPoint<double, double, 1> WeightedPoint; + using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 1>; public: /// IntegrationPoint constructor for given order. diff --git a/NumLib/Function/SpatialFunctionLinear.h b/NumLib/Function/SpatialFunctionLinear.h index d8975b58b97..780cf791647 100644 --- a/NumLib/Function/SpatialFunctionLinear.h +++ b/NumLib/Function/SpatialFunctionLinear.h @@ -19,6 +19,6 @@ namespace NumLib { /// Representation of linear functions f: R^3 -> R; f({x, y, z}) = a + bx + cy + dz -typedef TemplateSpatialFunction<MathLib::LinearFunction<double, 3> > SpatialFunctionLinear; - +using SpatialFunctionLinear = + TemplateSpatialFunction<MathLib::LinearFunction<double, 3>>; } diff --git a/NumLib/NamedFunction.cpp b/NumLib/NamedFunction.cpp index 36e952cc375..b0111828cb7 100644 --- a/NumLib/NamedFunction.cpp +++ b/NumLib/NamedFunction.cpp @@ -33,7 +33,7 @@ double call_(void* function, std::vector<double> const& arguments) return (*fct)(args[Indices]...); } -typedef double (*CallerFunction) (void*, std::vector<double> const&); +using CallerFunction = double (*)(void*, const std::vector<double>&); //! Helps instantiating the call_() function. template <int... Indices> @@ -82,7 +82,7 @@ void delete_(void* function) delete fct; } -typedef void (*DeleterFunction) (void*); +using DeleterFunction = void (*)(void*); //! Helps instantiating the delete_() function. template <int... Indices> @@ -131,7 +131,7 @@ void* copy_(void* function) return new std::function<double(typename Double<Indices>::type...)>(*fct); } -typedef void* (*CopierFunction) (void*); +using CopierFunction = void* (*)(void*); //! Helps instantiating the copy_() function. template <int... Indices> diff --git a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h index 90f5557e835..0230ec5b632 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h +++ b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h @@ -57,7 +57,7 @@ namespace LiquidFlow class LiquidFlowMaterialProperties { public: - typedef MaterialLib::Fluid::FluidProperty::ArrayType ArrayType; + using ArrayType = MaterialLib::Fluid::FluidProperty::ArrayType; LiquidFlowMaterialProperties( std::unique_ptr<MaterialLib::Fluid::FluidProperties>&& fluid_properties, diff --git a/ProcessLib/Parameter/GroupBasedParameter.cpp b/ProcessLib/Parameter/GroupBasedParameter.cpp index e79ad326bef..df03fba721a 100644 --- a/ProcessLib/Parameter/GroupBasedParameter.cpp +++ b/ProcessLib/Parameter/GroupBasedParameter.cpp @@ -31,8 +31,8 @@ std::unique_ptr<ParameterBase> createGroupBasedParameter( mesh.getProperties().getPropertyVector<int>(group_id_property_name); // parse mapping data - typedef std::vector<double> Values; - typedef std::pair<int, Values> Index_Values; + using Values = std::vector<double>; + using Index_Values = std::pair<int, Values>; std::vector<Index_Values> vec_index_values; //! \ogs_file_param{prj__parameters__parameter__Group__index_values} for (auto p : config.getConfigSubtreeList("index_values")) diff --git a/ProcessLib/VariableTransformation.h b/ProcessLib/VariableTransformation.h index 8c82fc497ab..372db194bcd 100644 --- a/ProcessLib/VariableTransformation.h +++ b/ProcessLib/VariableTransformation.h @@ -80,6 +80,5 @@ private: double _factor; }; -typedef TrafoScale Trafo; - +using Trafo = ProcessLib::TrafoScale; } diff --git a/Tests/BaseLib/TestQuicksort.cpp b/Tests/BaseLib/TestQuicksort.cpp index f41a4d2133c..87e1947766a 100644 --- a/Tests/BaseLib/TestQuicksort.cpp +++ b/Tests/BaseLib/TestQuicksort.cpp @@ -73,7 +73,7 @@ template <typename T> struct OrderedUniqueListGen { ac::generator<std::vector<T>> source; - typedef std::vector<T> result_type; + using result_type = std::vector<T>; std::vector<T> operator()(std::size_t size) { diff --git a/Tests/GeoLib/TestOctTree.cpp b/Tests/GeoLib/TestOctTree.cpp index 560fdd6d6eb..816862ea272 100644 --- a/Tests/GeoLib/TestOctTree.cpp +++ b/Tests/GeoLib/TestOctTree.cpp @@ -18,7 +18,7 @@ class GeoLibOctTree : public testing::Test { public: - typedef std::vector<GeoLib::Point*> VectorOfPoints; + using VectorOfPoints = std::vector<GeoLib::Point*>; GeoLibOctTree() = default; ~GeoLibOctTree() diff --git a/Tests/GeoLib/TestPointVec.cpp b/Tests/GeoLib/TestPointVec.cpp index 9bed724baea..cf6792dcc15 100644 --- a/Tests/GeoLib/TestPointVec.cpp +++ b/Tests/GeoLib/TestPointVec.cpp @@ -15,7 +15,7 @@ class PointVecTest : public testing::Test { public: - typedef std::vector<GeoLib::Point*> VectorOfPoints; + using VectorOfPoints = std::vector<GeoLib::Point*>; PointVecTest() : gen(std::random_device() ()), name("JustAName") diff --git a/Tests/MeshLib/TestCoordinatesMappingLocal.cpp b/Tests/MeshLib/TestCoordinatesMappingLocal.cpp index 5e85d62174e..87be1d7fa3d 100644 --- a/Tests/MeshLib/TestCoordinatesMappingLocal.cpp +++ b/Tests/MeshLib/TestCoordinatesMappingLocal.cpp @@ -34,16 +34,16 @@ namespace namespace TestLine2 { - typedef MeshLib::Line ElementType; - const unsigned e_nnodes = ElementType::n_all_nodes; +using ElementType = MeshLib::Line; +const unsigned e_nnodes = ElementType::n_all_nodes; - std::unique_ptr<MeshLib::Line> createLine( - std::array<double, 3> const& a, std::array<double, 3> const& b) - { - auto** nodes = new MeshLib::Node*[e_nnodes]; - nodes[0] = new MeshLib::Node(a); - nodes[1] = new MeshLib::Node(b); - return std::unique_ptr<MeshLib::Line>{new MeshLib::Line(nodes)}; +std::unique_ptr<MeshLib::Line> createLine(std::array<double, 3> const& a, + std::array<double, 3> const& b) +{ + auto** nodes = new MeshLib::Node*[e_nnodes]; + nodes[0] = new MeshLib::Node(a); + nodes[1] = new MeshLib::Node(b); + return std::unique_ptr<MeshLib::Line>{new MeshLib::Line(nodes)}; } std::unique_ptr<MeshLib::Line> createY() @@ -72,19 +72,20 @@ namespace TestLine2 namespace TestQuad4 { // Element information - typedef MeshLib::Quad ElementType; - const unsigned e_nnodes = ElementType::n_all_nodes; +using ElementType = MeshLib::Quad; +const unsigned e_nnodes = ElementType::n_all_nodes; - std::unique_ptr<MeshLib::Quad> createQuad( - std::array<double, 3> const& a, std::array<double, 3> const& b, - std::array<double, 3> const& c, std::array<double, 3> const& d) - { - auto** nodes = new MeshLib::Node*[e_nnodes]; - nodes[0] = new MeshLib::Node(a); - nodes[1] = new MeshLib::Node(b); - nodes[2] = new MeshLib::Node(c); - nodes[3] = new MeshLib::Node(d); - return std::unique_ptr<MeshLib::Quad>{new MeshLib::Quad(nodes)}; +std::unique_ptr<MeshLib::Quad> createQuad(std::array<double, 3> const& a, + std::array<double, 3> const& b, + std::array<double, 3> const& c, + std::array<double, 3> const& d) +{ + auto** nodes = new MeshLib::Node*[e_nnodes]; + nodes[0] = new MeshLib::Node(a); + nodes[1] = new MeshLib::Node(b); + nodes[2] = new MeshLib::Node(c); + nodes[3] = new MeshLib::Node(d); + return std::unique_ptr<MeshLib::Quad>{new MeshLib::Quad(nodes)}; } // 2.5D case: inclined diff --git a/Tests/MeshLib/TestQuadMesh.cpp b/Tests/MeshLib/TestQuadMesh.cpp index f7802cf6149..c64042441d4 100644 --- a/Tests/MeshLib/TestQuadMesh.cpp +++ b/Tests/MeshLib/TestQuadMesh.cpp @@ -48,7 +48,7 @@ class MeshLibQuadMesh : public ::testing::Test return mesh->getNodes()[i * n_nodes + j]; } - typedef std::list<std::size_t> Indices; + using Indices = std::list<std::size_t>; Indices getNeighbor(std::size_t const i) const { std::list<std::size_t> result; diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h b/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h index b1a5f8ec7cd..726ab2713ab 100644 --- a/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h +++ b/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h @@ -18,40 +18,40 @@ class TestHex8 { public: // Element information - typedef MeshLib::Hex ElementType; - typedef NumLib::ShapeHex8 ShapeFunctionType; - static const unsigned global_dim = ElementType::dimension; - static const unsigned dim = 3; //ElementType::dimension; - static const unsigned e_nnodes = ElementType::n_all_nodes; - // Coordinates where shape functions are evaluated - static const double r[dim]; - // Expected results for natural shape - static const double nat_exp_N[e_nnodes]; - static const double nat_exp_dNdr[e_nnodes*dim]; - // Expected results for irregular shape - static const double ir_exp_J[dim*dim]; - static const double ir_exp_invJ[dim*dim]; - static const double ir_exp_detJ; - static const double ir_exp_dNdx[e_nnodes*dim]; - // Expected results for clock-wise node ordering - static const double cl_exp_J[dim*dim]; - // Expected results for zero volume - static const double cl_exp_detJ; - static const double ze_exp_J[dim*dim]; + using ElementType = MeshLib::Hex; + using ShapeFunctionType = NumLib::ShapeHex8; + static const unsigned global_dim = ElementType::dimension; + static const unsigned dim = 3; // ElementType::dimension; + static const unsigned e_nnodes = ElementType::n_all_nodes; + // Coordinates where shape functions are evaluated + static const double r[dim]; + // Expected results for natural shape + static const double nat_exp_N[e_nnodes]; + static const double nat_exp_dNdr[e_nnodes * dim]; + // Expected results for irregular shape + static const double ir_exp_J[dim * dim]; + static const double ir_exp_invJ[dim * dim]; + static const double ir_exp_detJ; + static const double ir_exp_dNdx[e_nnodes * dim]; + // Expected results for clock-wise node ordering + static const double cl_exp_J[dim * dim]; + // Expected results for zero volume + static const double cl_exp_detJ; + static const double ze_exp_J[dim * dim]; - // element shape identical to that in natural coordinates (see ShapeHex8.h) - MeshLib::Hex* createNaturalShape() - { - auto** nodes = new MeshLib::Node*[e_nnodes]; - nodes[0] = new MeshLib::Node(-1.0, -1.0, -1.0); - nodes[1] = new MeshLib::Node( 1.0, -1.0, -1.0); - nodes[2] = new MeshLib::Node( 1.0, 1.0, -1.0); - nodes[3] = new MeshLib::Node(-1.0, 1.0, -1.0); - nodes[4] = new MeshLib::Node(-1.0, -1.0, 1.0); - nodes[5] = new MeshLib::Node( 1.0, -1.0, 1.0); - nodes[6] = new MeshLib::Node( 1.0, 1.0, 1.0); - nodes[7] = new MeshLib::Node(-1.0, 1.0, 1.0); - return new MeshLib::Hex(nodes); + // element shape identical to that in natural coordinates (see ShapeHex8.h) + MeshLib::Hex* createNaturalShape() + { + auto** nodes = new MeshLib::Node*[e_nnodes]; + nodes[0] = new MeshLib::Node(-1.0, -1.0, -1.0); + nodes[1] = new MeshLib::Node(1.0, -1.0, -1.0); + nodes[2] = new MeshLib::Node(1.0, 1.0, -1.0); + nodes[3] = new MeshLib::Node(-1.0, 1.0, -1.0); + nodes[4] = new MeshLib::Node(-1.0, -1.0, 1.0); + nodes[5] = new MeshLib::Node(1.0, -1.0, 1.0); + nodes[6] = new MeshLib::Node(1.0, 1.0, 1.0); + nodes[7] = new MeshLib::Node(-1.0, 1.0, 1.0); + return new MeshLib::Hex(nodes); } // element having irregular or skew shape diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h b/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h index 3d9ad76710c..83e073ee7fc 100644 --- a/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h +++ b/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h @@ -18,8 +18,8 @@ class TestLine2 { public: // Element information - typedef MeshLib::Line ElementType; - typedef NumLib::ShapeLine2 ShapeFunctionType; + using ElementType = MeshLib::Line; + using ShapeFunctionType = NumLib::ShapeLine2; static const unsigned global_dim = ElementType::dimension; static const unsigned dim = ElementType::dimension; static const unsigned e_nnodes = ElementType::n_all_nodes; diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h b/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h index a94106e5438..60dc84a34f1 100644 --- a/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h +++ b/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h @@ -17,8 +17,8 @@ class TestLine3 { public: // Element information - typedef MeshLib::Line3 ElementType; - typedef NumLib::ShapeLine3 ShapeFunctionType; + using ElementType = MeshLib::Line3; + using ShapeFunctionType = NumLib::ShapeLine3; static const unsigned global_dim = ElementType::dimension; static const unsigned dim = ElementType::dimension; static const unsigned e_nnodes = ElementType::n_all_nodes; diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h b/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h index 7b6a989688a..dfefceeb425 100644 --- a/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h +++ b/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h @@ -18,36 +18,36 @@ class TestQuad4 { public: // Element information - typedef MeshLib::Quad ElementType; - typedef NumLib::ShapeQuad4 ShapeFunctionType; - static const unsigned global_dim = ElementType::dimension; - static const unsigned dim = 2; //ElementType::dimension; - static const unsigned e_nnodes = ElementType::n_all_nodes; - // Coordinates where shape functions are evaluated - static const double r[dim]; - // Expected results for natural shape - static const double nat_exp_N[e_nnodes]; - static const double nat_exp_dNdr[e_nnodes*dim]; - // Expected results for irregular shape - static const double ir_exp_J[dim*dim]; - static const double ir_exp_invJ[dim*dim]; - static const double ir_exp_detJ; - static const double ir_exp_dNdx[e_nnodes*dim]; - // Expected results for clock-wise node ordering - static const double cl_exp_J[dim*dim]; - // Expected results for zero volume - static const double cl_exp_detJ; - static const double ze_exp_J[dim*dim]; + using ElementType = MeshLib::Quad; + using ShapeFunctionType = NumLib::ShapeQuad4; + static const unsigned global_dim = ElementType::dimension; + static const unsigned dim = 2; // ElementType::dimension; + static const unsigned e_nnodes = ElementType::n_all_nodes; + // Coordinates where shape functions are evaluated + static const double r[dim]; + // Expected results for natural shape + static const double nat_exp_N[e_nnodes]; + static const double nat_exp_dNdr[e_nnodes * dim]; + // Expected results for irregular shape + static const double ir_exp_J[dim * dim]; + static const double ir_exp_invJ[dim * dim]; + static const double ir_exp_detJ; + static const double ir_exp_dNdx[e_nnodes * dim]; + // Expected results for clock-wise node ordering + static const double cl_exp_J[dim * dim]; + // Expected results for zero volume + static const double cl_exp_detJ; + static const double ze_exp_J[dim * dim]; - // element shape identical to that in natural coordinates - MeshLib::Quad* createNaturalShape() - { - auto** nodes = new MeshLib::Node*[e_nnodes]; - nodes[0] = new MeshLib::Node( 1.0, 1.0, 0.0); - nodes[1] = new MeshLib::Node(-1.0, 1.0, 0.0); - nodes[2] = new MeshLib::Node(-1.0, -1.0, 0.0); - nodes[3] = new MeshLib::Node( 1.0, -1.0, 0.0); - return new MeshLib::Quad(nodes); + // element shape identical to that in natural coordinates + MeshLib::Quad* createNaturalShape() + { + auto** nodes = new MeshLib::Node*[e_nnodes]; + nodes[0] = new MeshLib::Node(1.0, 1.0, 0.0); + nodes[1] = new MeshLib::Node(-1.0, 1.0, 0.0); + nodes[2] = new MeshLib::Node(-1.0, -1.0, 0.0); + nodes[3] = new MeshLib::Node(1.0, -1.0, 0.0); + return new MeshLib::Quad(nodes); } // element having irregular or skew shape diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h b/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h index 2bf74cef8e5..78fa102d20c 100644 --- a/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h +++ b/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h @@ -18,35 +18,35 @@ class TestTri3 { public: // Element information - typedef MeshLib::Tri ElementType; - typedef NumLib::ShapeTri3 ShapeFunctionType; - static const unsigned global_dim = ElementType::dimension; - static const unsigned dim = 2; //ElementType::dimension; - static const unsigned e_nnodes = ElementType::n_all_nodes; - // Coordinates where shape functions are evaluated - static const double r[dim]; - // Expected results for natural shape - static const double nat_exp_N[e_nnodes]; - static const double nat_exp_dNdr[e_nnodes*dim]; - // Expected results for irregular shape - static const double ir_exp_J[dim*dim]; - static const double ir_exp_invJ[dim*dim]; - static const double ir_exp_detJ; - static const double ir_exp_dNdx[e_nnodes*dim]; - // Expected results for clock-wise node ordering - static const double cl_exp_J[dim*dim]; - // Expected results for zero volume - static const double cl_exp_detJ; - static const double ze_exp_J[dim*dim]; + using ElementType = MeshLib::Tri; + using ShapeFunctionType = NumLib::ShapeTri3; + static const unsigned global_dim = ElementType::dimension; + static const unsigned dim = 2; // ElementType::dimension; + static const unsigned e_nnodes = ElementType::n_all_nodes; + // Coordinates where shape functions are evaluated + static const double r[dim]; + // Expected results for natural shape + static const double nat_exp_N[e_nnodes]; + static const double nat_exp_dNdr[e_nnodes * dim]; + // Expected results for irregular shape + static const double ir_exp_J[dim * dim]; + static const double ir_exp_invJ[dim * dim]; + static const double ir_exp_detJ; + static const double ir_exp_dNdx[e_nnodes * dim]; + // Expected results for clock-wise node ordering + static const double cl_exp_J[dim * dim]; + // Expected results for zero volume + static const double cl_exp_detJ; + static const double ze_exp_J[dim * dim]; - // element having shape identical to that in natural coordinates - MeshLib::Tri* createNaturalShape() - { - auto** nodes = new MeshLib::Node*[e_nnodes]; - nodes[0] = new MeshLib::Node( 0.0, 0.0, 0.0); - nodes[1] = new MeshLib::Node( 1.0, 0.0, 0.0); - nodes[2] = new MeshLib::Node( 0.0, 1.0, 0.0); - return new MeshLib::Tri(nodes); + // element having shape identical to that in natural coordinates + MeshLib::Tri* createNaturalShape() + { + auto** nodes = new MeshLib::Node*[e_nnodes]; + nodes[0] = new MeshLib::Node(0.0, 0.0, 0.0); + nodes[1] = new MeshLib::Node(1.0, 0.0, 0.0); + nodes[2] = new MeshLib::Node(0.0, 1.0, 0.0); + return new MeshLib::Tri(nodes); } // element having irregular or skew shape diff --git a/Tests/NumLib/FeTestData/TestFeHEX8.h b/Tests/NumLib/FeTestData/TestFeHEX8.h index 6a854418ad3..571d5070c52 100644 --- a/Tests/NumLib/FeTestData/TestFeHEX8.h +++ b/Tests/NumLib/FeTestData/TestFeHEX8.h @@ -27,7 +27,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeHEX8<ShapeMatrixPolicy_>; - typedef MeshLib::Hex MeshElementType; + using MeshElementType = MeshLib::Hex; static const unsigned dim = 3; //MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 2*2*2; diff --git a/Tests/NumLib/FeTestData/TestFeLINE2.h b/Tests/NumLib/FeTestData/TestFeLINE2.h index 43303648ad7..16a2041aa90 100644 --- a/Tests/NumLib/FeTestData/TestFeLINE2.h +++ b/Tests/NumLib/FeTestData/TestFeLINE2.h @@ -27,7 +27,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeLINE2<ShapeMatrixPolicy_>; - typedef MeshLib::Line MeshElementType; + using MeshElementType = MeshLib::Line; static const unsigned dim = MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 2; diff --git a/Tests/NumLib/FeTestData/TestFeLINE2Y.h b/Tests/NumLib/FeTestData/TestFeLINE2Y.h index a82edca2e70..469081c9bf0 100644 --- a/Tests/NumLib/FeTestData/TestFeLINE2Y.h +++ b/Tests/NumLib/FeTestData/TestFeLINE2Y.h @@ -26,7 +26,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeLINE2<ShapeMatrixPolicy_>; - typedef MeshLib::Line MeshElementType; + using MeshElementType = MeshLib::Line; static const unsigned dim = MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 2; diff --git a/Tests/NumLib/FeTestData/TestFeLINE3.h b/Tests/NumLib/FeTestData/TestFeLINE3.h index 68ebe39e125..09458a62fb6 100644 --- a/Tests/NumLib/FeTestData/TestFeLINE3.h +++ b/Tests/NumLib/FeTestData/TestFeLINE3.h @@ -26,7 +26,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeLINE3<ShapeMatrixPolicy_>; - typedef MeshLib::Line3 MeshElementType; + using MeshElementType = MeshLib::Line3; static const unsigned dim = MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 2; diff --git a/Tests/NumLib/FeTestData/TestFePRISM6.h b/Tests/NumLib/FeTestData/TestFePRISM6.h index 838d5b6fd5d..af0c7f25e08 100644 --- a/Tests/NumLib/FeTestData/TestFePRISM6.h +++ b/Tests/NumLib/FeTestData/TestFePRISM6.h @@ -26,7 +26,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FePRISM6<ShapeMatrixPolicy_>; - typedef MeshLib::Prism MeshElementType; + using MeshElementType = MeshLib::Prism; static const unsigned dim = 3; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 6; diff --git a/Tests/NumLib/FeTestData/TestFePYRA5.h b/Tests/NumLib/FeTestData/TestFePYRA5.h index 92851ec0b55..fec171e0a08 100644 --- a/Tests/NumLib/FeTestData/TestFePYRA5.h +++ b/Tests/NumLib/FeTestData/TestFePYRA5.h @@ -26,7 +26,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FePYRA5<ShapeMatrixPolicy_>; - typedef MeshLib::Pyramid MeshElementType; + using MeshElementType = MeshLib::Pyramid; static const unsigned dim = 3; //MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 5; diff --git a/Tests/NumLib/FeTestData/TestFeQUAD4.h b/Tests/NumLib/FeTestData/TestFeQUAD4.h index 40ce1863e52..77bd09f50e3 100644 --- a/Tests/NumLib/FeTestData/TestFeQUAD4.h +++ b/Tests/NumLib/FeTestData/TestFeQUAD4.h @@ -27,7 +27,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeQUAD4<ShapeMatrixPolicy_>; - typedef MeshLib::Quad MeshElementType; + using MeshElementType = MeshLib::Quad; static const unsigned dim = 2; //MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 2*2; diff --git a/Tests/NumLib/FeTestData/TestFeTET4.h b/Tests/NumLib/FeTestData/TestFeTET4.h index 79d0b397c1c..bee0537a9de 100644 --- a/Tests/NumLib/FeTestData/TestFeTET4.h +++ b/Tests/NumLib/FeTestData/TestFeTET4.h @@ -26,7 +26,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeTET4<ShapeMatrixPolicy_>; - typedef MeshLib::Tet MeshElementType; + using MeshElementType = MeshLib::Tet; static const unsigned dim = 3; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 5; diff --git a/Tests/NumLib/FeTestData/TestFeTRI3.h b/Tests/NumLib/FeTestData/TestFeTRI3.h index 1e39f9a30e0..cbfd192084b 100644 --- a/Tests/NumLib/FeTestData/TestFeTRI3.h +++ b/Tests/NumLib/FeTestData/TestFeTRI3.h @@ -27,7 +27,7 @@ public: template <template <typename> class ShapeMatrixPolicy_> using FeType = NumLib::FeTRI3<ShapeMatrixPolicy_>; - typedef MeshLib::Tri MeshElementType; + using MeshElementType = MeshLib::Tri; static const unsigned dim = 2; //MeshElementType::dimension; static const unsigned e_nnodes = MeshElementType::n_all_nodes; static const unsigned n_sample_pt_order2 = 3; diff --git a/Tests/NumLib/TestCoordinatesMapping.cpp b/Tests/NumLib/TestCoordinatesMapping.cpp index bd71fd8e2e7..679552adab4 100644 --- a/Tests/NumLib/TestCoordinatesMapping.cpp +++ b/Tests/NumLib/TestCoordinatesMapping.cpp @@ -32,8 +32,8 @@ using namespace CoordinatesMappingTestData; namespace { // Element types to be tested -typedef ::testing::Types<TestLine2, TestLine3, TestTri3, TestQuad4, TestHex8> - TestTypes; +using TestTypes = + ::testing::Types<TestLine2, TestLine3, TestTri3, TestQuad4, TestHex8>; } template <class T_TEST> @@ -41,26 +41,25 @@ class NumLibFemNaturalCoordinatesMappingTest : public ::testing::Test, public T_TEST { public: - typedef typename T_TEST::ElementType ElementType; - typedef typename T_TEST::ShapeFunctionType ShapeFunctionType; + using ElementType = typename T_TEST::ElementType; + using ShapeFunctionType = typename T_TEST::ShapeFunctionType; static const unsigned dim = T_TEST::dim; static const unsigned e_nnodes = T_TEST::e_nnodes; static const unsigned global_dim = T_TEST::global_dim; // Matrix types - typedef typename ::detail::EigenMatrixType<1, e_nnodes>::type NodalVector; - typedef - typename ::detail::EigenMatrixType<dim, e_nnodes>::type DimNodalMatrix; - typedef typename ::detail::EigenMatrixType<dim, dim>::type DimMatrix; - typedef typename ::detail::EigenMatrixType<global_dim, e_nnodes>::type - GlobalDimNodalMatrix; + using NodalVector = typename ::detail::EigenMatrixType<1, e_nnodes>::type; + using DimNodalMatrix = + typename ::detail::EigenMatrixType<dim, e_nnodes>::type; + using DimMatrix = typename ::detail::EigenMatrixType<dim, dim>::type; + using GlobalDimNodalMatrix = + typename ::detail::EigenMatrixType<global_dim, e_nnodes>::type; // Shape data type - typedef ShapeMatrices<NodalVector, DimNodalMatrix, DimMatrix, - GlobalDimNodalMatrix> - ShapeMatricesType; + using ShapeMatricesType = ShapeMatrices<NodalVector, DimNodalMatrix, + DimMatrix, GlobalDimNodalMatrix>; // Natural coordinates mapping type - typedef NaturalCoordinatesMapping<ElementType, ShapeFunctionType, - ShapeMatricesType> - NaturalCoordsMappingType; + using NaturalCoordsMappingType = + NaturalCoordinatesMapping<ElementType, ShapeFunctionType, + ShapeMatricesType>; public: NumLibFemNaturalCoordinatesMappingTest() @@ -103,9 +102,9 @@ TYPED_TEST_CASE(NumLibFemNaturalCoordinatesMappingTest, TestTypes); TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_N) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); // only N @@ -121,9 +120,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_N) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_DNDR) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); // dNdr @@ -140,9 +139,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_DNDR) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_N_J) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); // N_J @@ -161,9 +160,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_N_J) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_DNDR_J) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); // dNdr, J @@ -180,9 +179,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_DNDX) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); // DNDX @@ -199,9 +198,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_DNDX) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_ALL) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); // ALL @@ -218,9 +217,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckFieldSpecification_ALL) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckNaturalShape) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; // identical to natural coordinates ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); @@ -243,9 +242,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckNaturalShape) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckIrregularShape) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; // irregular shape ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); @@ -268,9 +267,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckIrregularShape) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckClockwise) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; // clockwise node ordering, which is invalid) ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); @@ -281,9 +280,9 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckClockwise) TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckZeroVolume) { - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; - typedef - typename TestFixture::NaturalCoordsMappingType NaturalCoordsMappingType; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; + using NaturalCoordsMappingType = + typename TestFixture::NaturalCoordsMappingType; ShapeMatricesType shape(this->dim, this->global_dim, this->e_nnodes); @@ -293,17 +292,15 @@ TYPED_TEST(NumLibFemNaturalCoordinatesMappingTest, CheckZeroVolume) TEST(NumLib, FemNaturalCoordinatesMappingLineY) { - typedef ::detail::EigenMatrixType<1, 2>::type NodalVector; - typedef ::detail::EigenMatrixType<1, 2>::type DimNodalMatrix; - typedef ::detail::EigenMatrixType<1, 1>::type DimMatrix; - typedef ::detail::EigenMatrixType<2, 2>::type GlobalDimNodalMatrix; + using NodalVector = ::detail::EigenMatrixType<1, 2>::type; + using DimNodalMatrix = ::detail::EigenMatrixType<1, 2>::type; + using DimMatrix = ::detail::EigenMatrixType<1, 1>::type; + using GlobalDimNodalMatrix = ::detail::EigenMatrixType<2, 2>::type; // Shape data type - typedef ShapeMatrices<NodalVector, DimNodalMatrix, DimMatrix, - GlobalDimNodalMatrix> - ShapeMatricesType; - typedef NaturalCoordinatesMapping<MeshLib::Line, ShapeLine2, - ShapeMatricesType> - MappingType; + using ShapeMatricesType = ShapeMatrices<NodalVector, DimNodalMatrix, + DimMatrix, GlobalDimNodalMatrix>; + using MappingType = + NaturalCoordinatesMapping<MeshLib::Line, ShapeLine2, ShapeMatricesType>; double r[] = {0.5}; auto line = TestLine2::createY(); static const unsigned dim = 1; diff --git a/Tests/NumLib/TestFe.cpp b/Tests/NumLib/TestFe.cpp index 1bfc22504b9..10a24912de9 100644 --- a/Tests/NumLib/TestFe.cpp +++ b/Tests/NumLib/TestFe.cpp @@ -44,95 +44,95 @@ namespace template <class TestFeType_, template <typename, unsigned> class ShapeMatrixPolicy_> struct TestCase { - typedef TestFeType_ TestFeType; + using TestFeType = TestFeType_; static const unsigned GlobalDim = TestFeType::global_dim; using ShapeMatrixTypes = ShapeMatrixPolicy_<typename TestFeType::ShapeFunction, GlobalDim>; template <typename X> using ShapeMatrixPolicy = ShapeMatrixPolicy_<X, GlobalDim>; }; -typedef ::testing::Types< - TestCase<TestFeHEX8, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFeLINE2, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFeLINE2Y, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFeLINE3, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFePRISM6, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFePYRA5, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFeQUAD4, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFeTET4, EigenDynamicShapeMatrixPolicy>, - TestCase<TestFeTRI3, EigenDynamicShapeMatrixPolicy>, - - TestCase<TestFeHEX8, EigenFixedShapeMatrixPolicy>, - TestCase<TestFeLINE2, EigenFixedShapeMatrixPolicy>, - TestCase<TestFeLINE2Y, EigenFixedShapeMatrixPolicy>, - TestCase<TestFeLINE3, EigenFixedShapeMatrixPolicy>, - TestCase<TestFePRISM6, EigenFixedShapeMatrixPolicy>, - TestCase<TestFePYRA5, EigenFixedShapeMatrixPolicy>, - TestCase<TestFeQUAD4, EigenFixedShapeMatrixPolicy>, - TestCase<TestFeTET4, EigenFixedShapeMatrixPolicy>, - TestCase<TestFeTRI3, EigenFixedShapeMatrixPolicy> - > TestTypes; +using TestTypes = + ::testing::Types<TestCase<TestFeHEX8, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFeLINE2, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFeLINE2Y, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFeLINE3, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFePRISM6, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFePYRA5, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFeQUAD4, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFeTET4, EigenDynamicShapeMatrixPolicy>, + TestCase<TestFeTRI3, EigenDynamicShapeMatrixPolicy>, + + TestCase<TestFeHEX8, EigenFixedShapeMatrixPolicy>, + TestCase<TestFeLINE2, EigenFixedShapeMatrixPolicy>, + TestCase<TestFeLINE2Y, EigenFixedShapeMatrixPolicy>, + TestCase<TestFeLINE3, EigenFixedShapeMatrixPolicy>, + TestCase<TestFePRISM6, EigenFixedShapeMatrixPolicy>, + TestCase<TestFePYRA5, EigenFixedShapeMatrixPolicy>, + TestCase<TestFeQUAD4, EigenFixedShapeMatrixPolicy>, + TestCase<TestFeTET4, EigenFixedShapeMatrixPolicy>, + TestCase<TestFeTRI3, EigenFixedShapeMatrixPolicy>>; } template <class T> class NumLibFemIsoTest : public ::testing::Test, public T::TestFeType { public: - typedef typename T::ShapeMatrixTypes ShapeMatrixTypes; - typedef typename T::TestFeType TestFeType; - // Matrix types - typedef typename ShapeMatrixTypes::NodalMatrixType NodalMatrix; - typedef typename ShapeMatrixTypes::NodalVectorType NodalVector; - typedef typename ShapeMatrixTypes::DimNodalMatrixType DimNodalMatrix; - typedef typename ShapeMatrixTypes::DimMatrixType DimMatrix; - typedef typename ShapeMatrixTypes::GlobalDimMatrixType GlobalDimMatrixType; - - // Finite element type - template <typename X> - using ShapeMatrixPolicy = typename T::template ShapeMatrixPolicy<X>; - typedef typename TestFeType::template FeType<ShapeMatrixPolicy>::type FeType; - - // Shape matrix data type - typedef typename ShapeMatrixTypes::ShapeMatrices ShapeMatricesType; - typedef typename TestFeType::MeshElementType MeshElementType; - - static const unsigned dim = TestFeType::dim; - static const unsigned e_nnodes = TestFeType::e_nnodes; - static const unsigned n_sample_pt_order2 = TestFeType::n_sample_pt_order2; - static const unsigned n_sample_pt_order3 = TestFeType::n_sample_pt_order3; - - using IntegrationMethod = - typename NumLib::GaussIntegrationPolicy<MeshElementType>::IntegrationMethod; - + using ShapeMatrixTypes = typename T::ShapeMatrixTypes; + using TestFeType = typename T::TestFeType; + // Matrix types + using NodalMatrix = typename ShapeMatrixTypes::NodalMatrixType; + using NodalVector = typename ShapeMatrixTypes::NodalVectorType; + using DimNodalMatrix = typename ShapeMatrixTypes::DimNodalMatrixType; + using DimMatrix = typename ShapeMatrixTypes::DimMatrixType; + using GlobalDimMatrixType = typename ShapeMatrixTypes::GlobalDimMatrixType; + + // Finite element type + template <typename X> + using ShapeMatrixPolicy = typename T::template ShapeMatrixPolicy<X>; + using FeType = + typename TestFeType::template FeType<ShapeMatrixPolicy>::type; + + // Shape matrix data type + using ShapeMatricesType = typename ShapeMatrixTypes::ShapeMatrices; + using MeshElementType = typename TestFeType::MeshElementType; + + static const unsigned dim = TestFeType::dim; + static const unsigned e_nnodes = TestFeType::e_nnodes; + static const unsigned n_sample_pt_order2 = TestFeType::n_sample_pt_order2; + static const unsigned n_sample_pt_order3 = TestFeType::n_sample_pt_order3; + + using IntegrationMethod = typename NumLib::GaussIntegrationPolicy< + MeshElementType>::IntegrationMethod; public: - NumLibFemIsoTest() : - D(dim, dim), - expectedM(e_nnodes,e_nnodes), - expectedK(e_nnodes,e_nnodes), - integration_method(2) - { - // create a mesh element used for testing - mesh_element = this->createMeshElement(); - - // set a conductivity tensor - setIdentityMatrix(dim, D); - D *= conductivity; - MeshLib::ElementCoordinatesMappingLocal ele_local_coord( - *mesh_element, MeshLib::CoordinateSystem(*mesh_element).getDimension()); - auto R = ele_local_coord.getRotationMatrixToGlobal().topLeftCorner( - TestFeType::dim, TestFeType::global_dim); - globalD.noalias() = R.transpose() * (D * R); - - // set expected matrices - this->setExpectedMassMatrix(expectedM); - this->setExpectedLaplaceMatrix(conductivity, expectedK); - - // for destructor - vec_eles.push_back(mesh_element); - for (auto e : vec_eles) - for (unsigned i=0; i<e->getNumberOfNodes(); i++) - vec_nodes.push_back(e->getNode(i)); + NumLibFemIsoTest() + : D(dim, dim), + expectedM(e_nnodes, e_nnodes), + expectedK(e_nnodes, e_nnodes), + integration_method(2) + { + // create a mesh element used for testing + mesh_element = this->createMeshElement(); + + // set a conductivity tensor + setIdentityMatrix(dim, D); + D *= conductivity; + MeshLib::ElementCoordinatesMappingLocal ele_local_coord( + *mesh_element, + MeshLib::CoordinateSystem(*mesh_element).getDimension()); + auto R = ele_local_coord.getRotationMatrixToGlobal().topLeftCorner( + TestFeType::dim, TestFeType::global_dim); + globalD.noalias() = R.transpose() * (D * R); + + // set expected matrices + this->setExpectedMassMatrix(expectedM); + this->setExpectedLaplaceMatrix(conductivity, expectedK); + + // for destructor + vec_eles.push_back(mesh_element); + for (auto e : vec_eles) + for (unsigned i = 0; i < e->getNumberOfNodes(); i++) + vec_nodes.push_back(e->getNode(i)); } virtual ~NumLibFemIsoTest() @@ -183,9 +183,9 @@ TYPED_TEST_CASE(NumLibFemIsoTest, TestTypes); TYPED_TEST(NumLibFemIsoTest, CheckMassMatrix) { // Refer to typedefs in the fixture - typedef typename TestFixture::FeType FeType; - typedef typename TestFixture::NodalMatrix NodalMatrix; - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; + using FeType = typename TestFixture::FeType; + using NodalMatrix = typename TestFixture::NodalMatrix; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; // create a finite element object FeType fe(*this->mesh_element); @@ -208,9 +208,9 @@ TYPED_TEST(NumLibFemIsoTest, CheckMassMatrix) TYPED_TEST(NumLibFemIsoTest, CheckLaplaceMatrix) { // Refer to typedefs in the fixture - typedef typename TestFixture::FeType FeType; - typedef typename TestFixture::NodalMatrix NodalMatrix; - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; + using FeType = typename TestFixture::FeType; + using NodalMatrix = typename TestFixture::NodalMatrix; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; // create a finite element object FeType fe(*this->mesh_element); @@ -233,9 +233,9 @@ TYPED_TEST(NumLibFemIsoTest, CheckLaplaceMatrix) TYPED_TEST(NumLibFemIsoTest, CheckMassLaplaceMatrices) { // Refer to typedefs in the fixture - typedef typename TestFixture::FeType FeType; - typedef typename TestFixture::NodalMatrix NodalMatrix; - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; + using FeType = typename TestFixture::FeType; + using NodalMatrix = typename TestFixture::NodalMatrix; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; // create a finite element object FeType fe(*this->mesh_element); @@ -262,9 +262,9 @@ TYPED_TEST(NumLibFemIsoTest, CheckMassLaplaceMatrices) TYPED_TEST(NumLibFemIsoTest, CheckGaussIntegrationLevel) { // Refer to typedefs in the fixture - typedef typename TestFixture::FeType FeType; - typedef typename TestFixture::NodalMatrix NodalMatrix; - typedef typename TestFixture::ShapeMatricesType ShapeMatricesType; + using FeType = typename TestFixture::FeType; + using NodalMatrix = typename TestFixture::NodalMatrix; + using ShapeMatricesType = typename TestFixture::ShapeMatricesType; // create a finite element object with gauss quadrature level 2 FeType fe(*this->mesh_element); diff --git a/Tests/NumLib/TestMeshComponentMap.cpp b/Tests/NumLib/TestMeshComponentMap.cpp index 213cc41a510..ba7bef491e0 100644 --- a/Tests/NumLib/TestMeshComponentMap.cpp +++ b/Tests/NumLib/TestMeshComponentMap.cpp @@ -22,9 +22,9 @@ class NumLibMeshComponentMapTest : public ::testing::Test { public: - typedef MeshLib::MeshItemType MeshItemType; - typedef MeshLib::Location Location; - typedef NumLib::MeshComponentMap MeshComponentMap; + using MeshItemType = MeshLib::MeshItemType; + using Location = MeshLib::Location; + using MeshComponentMap = NumLib::MeshComponentMap; public: NumLibMeshComponentMapTest() diff --git a/Tests/NumLib/TestODEInt.cpp b/Tests/NumLib/TestODEInt.cpp index c38f8b66e47..38497469315 100644 --- a/Tests/NumLib/TestODEInt.cpp +++ b/Tests/NumLib/TestODEInt.cpp @@ -223,7 +223,7 @@ TESTCASESLIST TestCase<ODE, NumLib::TIMEDISC> #define TCLSEP , -typedef ::testing::Types<TESTCASESLIST> TestCases; +using TestCases = ::testing::Types<TESTCASESLIST>; #undef TESTCASESLIST #undef TCLSEP diff --git a/Tests/NumLib/TestSerialExecutor.cpp b/Tests/NumLib/TestSerialExecutor.cpp index b0569b13933..9f5d11d14b3 100644 --- a/Tests/NumLib/TestSerialExecutor.cpp +++ b/Tests/NumLib/TestSerialExecutor.cpp @@ -67,7 +67,7 @@ public: static std::size_t const size = 100; }; -typedef ::testing::Types<int> TestCases; +using TestCases = ::testing::Types<int>; TYPED_TEST_CASE(NumLibSerialExecutor, TestCases); diff --git a/Tests/NumLib/TestShapeMatrices.cpp b/Tests/NumLib/TestShapeMatrices.cpp index 88eb72df717..5f90e15451e 100644 --- a/Tests/NumLib/TestShapeMatrices.cpp +++ b/Tests/NumLib/TestShapeMatrices.cpp @@ -26,12 +26,14 @@ TEST(NumLib, FemShapeMatricesWithEigen) const static unsigned e_nnodes = 4; // Eigen matrix types - typedef Eigen::Matrix<double, e_nnodes, 1> NodalVector; - typedef Eigen::Matrix<double, dim, e_nnodes, Eigen::RowMajor> DimNodalMatrix; - typedef Eigen::Matrix<double, dim, dim, Eigen::RowMajor> DimMatrix; + using NodalVector = Eigen::Matrix<double, e_nnodes, 1>; + using DimNodalMatrix = + Eigen::Matrix<double, dim, e_nnodes, Eigen::RowMajor>; + using DimMatrix = Eigen::Matrix<double, dim, dim, Eigen::RowMajor>; // Shape data type - typedef ShapeMatrices<NodalVector,DimNodalMatrix,DimMatrix,DimNodalMatrix> ShapeMatricesType; + using ShapeMatricesType = + ShapeMatrices<NodalVector, DimNodalMatrix, DimMatrix, DimNodalMatrix>; auto setShapeDataToOnes = [](ShapeMatricesType &shape) { diff --git a/Tests/ProcessLib/TestJacobianAssembler.cpp b/Tests/ProcessLib/TestJacobianAssembler.cpp index 576982caba7..b33da55d1dd 100644 --- a/Tests/ProcessLib/TestJacobianAssembler.cpp +++ b/Tests/ProcessLib/TestJacobianAssembler.cpp @@ -548,7 +548,7 @@ private: } }; -typedef ::testing::Types< +using TestCases = ::testing::Types< // DiagX LocalAssemblerM<MatVecDiagX>, LocalAssemblerK<MatVecDiagX>, LocalAssemblerB<MatVecDiagX>, @@ -566,8 +566,7 @@ typedef ::testing::Types< LocalAssemblerK<MatVecXSquaredShifted>, LocalAssemblerB<MatVecXSquaredShifted>, LocalAssemblerMKb<MatVecXSquaredShifted, MatVecXSquaredShifted, - MatVecXSquaredShifted>> - TestCases; + MatVecXSquaredShifted>>; TYPED_TEST_CASE(ProcessLibCentralDifferencesJacobianAssembler, TestCases); -- GitLab