diff --git a/src/Benchmarks/BLAS/VectorOperations.h b/src/Benchmarks/BLAS/VectorOperations.h index 43c3b9c8859f6be555255be78cd6f90ac7bce7a4..dfe8bd2668f44cbb4ecbb4b65b232edb9826fa93 100644 --- a/src/Benchmarks/BLAS/VectorOperations.h +++ b/src/Benchmarks/BLAS/VectorOperations.h @@ -22,7 +22,7 @@ struct VectorOperations< Devices::Host > const Scalar1 alpha, const Scalar2 thisMultiplicator = 1.0 ) { - typedef typename Vector1::IndexType Index; + using Index = typename Vector1::IndexType; TNL_ASSERT_GT( x.getSize(), 0, "Vector size must be positive." ); TNL_ASSERT_EQ( x.getSize(), y.getSize(), "The vector sizes must be the same." ); @@ -51,7 +51,7 @@ struct VectorOperations< Devices::Host > const Scalar2 multiplicator2, const Scalar3 thisMultiplicator = 1.0 ) { - typedef typename Vector1::IndexType Index; + using Index = typename Vector1::IndexType; TNL_ASSERT_GT( v.getSize(), 0, "Vector size must be positive." ); TNL_ASSERT_EQ( v.getSize(), v1.getSize(), "The vector sizes must be the same." ); diff --git a/src/Benchmarks/HeatEquation/BenchmarkLaplace.h b/src/Benchmarks/HeatEquation/BenchmarkLaplace.h index 0c2fd92e309b53964a017b498dfd76ddf595e0bf..96a8d89d049bda6e3eb814ae4f50d9fe29ba66f1 100644 --- a/src/Benchmarks/HeatEquation/BenchmarkLaplace.h +++ b/src/Benchmarks/HeatEquation/BenchmarkLaplace.h @@ -25,12 +25,12 @@ class BenchmarkLaplace< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Real, In Index > { public: - typedef Meshes::Grid< 1, MeshReal, Device, MeshIndex > MeshType; - typedef typename MeshType::CoordinatesType CoordinatesType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - typedef Functions::MeshFunction< MeshType > MeshFunctionType; + using MeshType = Meshes::Grid< 1, MeshReal, Device, MeshIndex >; + using CoordinatesType = typename MeshType::CoordinatesType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; + using MeshFunctionType = Functions::MeshFunction< MeshType >; enum { Dimension = MeshType::getMeshDimension() }; template< typename MeshFunction, typename MeshEntity > @@ -71,12 +71,12 @@ class BenchmarkLaplace< Meshes::Grid< 2,MeshReal, Device, MeshIndex >, Real, Ind Index > { public: - typedef Meshes::Grid< 2, MeshReal, Device, MeshIndex > MeshType; - typedef typename MeshType::CoordinatesType CoordinatesType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - typedef Functions::MeshFunction< MeshType > MeshFunctionType; + using MeshType = Meshes::Grid< 2, MeshReal, Device, MeshIndex >; + using CoordinatesType = typename MeshType::CoordinatesType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; + using MeshFunctionType = Functions::MeshFunction< MeshType >; enum { Dimension = MeshType::getMeshDimension() }; template< typename MeshFunction, typename MeshEntity > @@ -132,12 +132,12 @@ class BenchmarkLaplace< Meshes::Grid< 3,MeshReal, Device, MeshIndex >, Real, Ind Index > { public: - typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType; - typedef typename MeshType::CoordinatesType CoordinatesType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - typedef Functions::MeshFunction< MeshType > MeshFunctionType; + using MeshType = Meshes::Grid< 3, MeshReal, Device, MeshIndex >; + using CoordinatesType = typename MeshType::CoordinatesType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; + using MeshFunctionType = Functions::MeshFunction< MeshType >; enum { Dimension = MeshType::getMeshDimension() }; template< typename MeshFunction, typename MeshEntity > diff --git a/src/Benchmarks/HeatEquation/DirichletBoundaryConditions.h b/src/Benchmarks/HeatEquation/DirichletBoundaryConditions.h index 393a571e76ed15b4b1cda56510a9fef64b16daf6..23001e928967a4b4e157584d58248ce10d63b545 100644 --- a/src/Benchmarks/HeatEquation/DirichletBoundaryConditions.h +++ b/src/Benchmarks/HeatEquation/DirichletBoundaryConditions.h @@ -21,16 +21,15 @@ class DirichletBoundaryConditions Index > { public: - - typedef Mesh MeshType; - typedef Function FunctionType; - typedef Real RealType; - typedef typename MeshType::DeviceType DeviceType; - typedef Index IndexType; - - typedef Pointers::SharedPointer< Mesh > MeshPointer; - typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; - typedef typename MeshType::PointType PointType; + using MeshType = Mesh; + using FunctionType = Function; + using RealType = Real; + using DeviceType = typename MeshType::DeviceType; + using IndexType = Index; + + using MeshPointer = Pointers::SharedPointer< Mesh >; + using DofVectorType = Containers::Vector< RealType, DeviceType, IndexType >; + using PointType = typename MeshType::PointType; static constexpr int getMeshDimension() { return MeshType::getMeshDimension(); } diff --git a/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem.h b/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem.h index 6389161cc84dfc49494acfacece5b0f5abab9731..f4286f8b4fb43ccf681233f23f17400f8adcf97b 100644 --- a/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem.h +++ b/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem.h @@ -20,16 +20,15 @@ class HeatEquationBenchmarkProblem: typename DifferentialOperator::IndexType > { public: - - typedef typename DifferentialOperator::RealType RealType; - typedef typename Mesh::DeviceType DeviceType; - typedef typename DifferentialOperator::IndexType IndexType; - typedef Functions::MeshFunctionView< Mesh > MeshFunctionViewType; - typedef Pointers::SharedPointer< MeshFunctionViewType, DeviceType > MeshFunctionViewPointer; - typedef PDEProblem< Mesh, RealType, DeviceType, IndexType > BaseType; - typedef Pointers::SharedPointer< DifferentialOperator > DifferentialOperatorPointer; - typedef Pointers::SharedPointer< BoundaryCondition > BoundaryConditionPointer; - typedef Pointers::SharedPointer< RightHandSide, DeviceType > RightHandSidePointer; + using RealType = typename DifferentialOperator::RealType; + using DeviceType = typename Mesh::DeviceType; + using IndexType = typename DifferentialOperator::IndexType; + using MeshFunctionViewType = Functions::MeshFunctionView< Mesh >; + using MeshFunctionViewPointer = Pointers::SharedPointer< MeshFunctionViewType, DeviceType >; + using BaseType = PDEProblem< Mesh, RealType, DeviceType, IndexType >; + using DifferentialOperatorPointer = Pointers::SharedPointer< DifferentialOperator >; + using BoundaryConditionPointer = Pointers::SharedPointer< BoundaryCondition >; + using RightHandSidePointer = Pointers::SharedPointer< RightHandSide, DeviceType >; using typename BaseType::MeshType; using typename BaseType::MeshPointer; diff --git a/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem_impl.h b/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem_impl.h index 9283a8c026dac05e525fbd1bb9b0de617b0d70d1..4647fa28eb0f0638e0ef7b8a732e77d3e25c9ad5 100644 --- a/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem_impl.h +++ b/src/Benchmarks/HeatEquation/HeatEquationBenchmarkProblem_impl.h @@ -144,7 +144,7 @@ HeatEquationBenchmarkProblem< Mesh, BoundaryCondition, RightHandSide, Differenti setupLinearSystem( Matrix& matrix ) { const IndexType dofs = this->getDofs(); - typedef typename Matrix::RowsCapacitiesType RowsCapacitiesTypeType; + using RowsCapacitiesTypeType = typename Matrix::RowsCapacitiesType; RowsCapacitiesTypeType rowLengths; if( ! rowLengths.setSize( dofs ) ) return false; diff --git a/src/Benchmarks/HeatEquation/HeatEquationBenchmarkRhs.h b/src/Benchmarks/HeatEquation/HeatEquationBenchmarkRhs.h index b2fef66caada72c2c098a1c937635b0ccae1a108..ce12f61ce5232dee28519361529d481ee92a14ad 100644 --- a/src/Benchmarks/HeatEquation/HeatEquationBenchmarkRhs.h +++ b/src/Benchmarks/HeatEquation/HeatEquationBenchmarkRhs.h @@ -5,9 +5,8 @@ template< typename Mesh, typename Real >class HeatEquationBenchmarkRhs : public Functions::Domain< Mesh::getMeshDimension(), Functions::MeshDomain > { public: - - typedef Mesh MeshType; - typedef Real RealType; + using MeshType = Mesh; + using RealType = Real; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ) diff --git a/src/Benchmarks/HeatEquation/TestGridEntity.h b/src/Benchmarks/HeatEquation/TestGridEntity.h index 747a0d2665d981a12ddb00ba0639360b0d552585..41acf11f4d1a8ce42cb0690b46fa0aa79a37a60b 100644 --- a/src/Benchmarks/HeatEquation/TestGridEntity.h +++ b/src/Benchmarks/HeatEquation/TestGridEntity.h @@ -41,13 +41,12 @@ template< int Dimension, class TestGridEntity< Meshes::Grid< Dimension, Real, Device, Index >, Dimension > { public: - - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; - typedef GridType MeshType; - typedef typename GridType::RealType RealType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; + using MeshType = GridType; + using RealType = typename GridType::RealType; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; + using PointType = typename GridType::PointType; //typedef Config ConfigType; static const int meshDimension = GridType::meshDimension; @@ -57,12 +56,11 @@ class TestGridEntity< Meshes::Grid< Dimension, Real, Device, Index >, Dimension constexpr static int getDimensions() { return entityDimension; }; constexpr static int getDimension() { return meshDimension; }; - - - typedef Containers::StaticVector< meshDimension, IndexType > EntityOrientationType; - typedef Containers::StaticVector< meshDimension, IndexType > EntityBasisType; - typedef TestNeighborGridEntitiesStorage< TestGridEntity > NeighborGridEntitiesStorageType; - + + using EntityOrientationType = Containers::StaticVector< meshDimension, IndexType >; + using EntityBasisType = Containers::StaticVector< meshDimension, IndexType >; + using NeighborGridEntitiesStorageType = TestNeighborGridEntitiesStorage< TestGridEntity >; + __cuda_callable__ inline TestGridEntity( const GridType& grid ) : grid( grid ), diff --git a/src/Benchmarks/HeatEquation/Tuning/ExplicitUpdater.h b/src/Benchmarks/HeatEquation/Tuning/ExplicitUpdater.h index b21ba7a494761cac617bf951904a60fb79908173..c9e04890dc8af2e66b9044474a4d4419e116e693 100644 --- a/src/Benchmarks/HeatEquation/Tuning/ExplicitUpdater.h +++ b/src/Benchmarks/HeatEquation/Tuning/ExplicitUpdater.h @@ -54,22 +54,19 @@ template< typename Mesh, class ExplicitUpdater { public: - typedef Mesh MeshType; - typedef Pointers::SharedPointer< MeshType > MeshPointer; - typedef typename MeshFunction::RealType RealType; - typedef typename MeshFunction::DeviceType DeviceType; - typedef typename MeshFunction::IndexType IndexType; - typedef ExplicitUpdaterTraverserUserData< RealType, - MeshFunction, - DifferentialOperator, - BoundaryConditions, - RightHandSide > TraverserUserData; - typedef Pointers::SharedPointer< DifferentialOperator, DeviceType > DifferentialOperatorPointer; - typedef Pointers::SharedPointer< BoundaryConditions, DeviceType > BoundaryConditionsPointer; - typedef Pointers::SharedPointer< RightHandSide, DeviceType > RightHandSidePointer; - typedef Pointers::SharedPointer< MeshFunction, DeviceType > MeshFunctionPointer; - typedef Pointers::SharedPointer< TraverserUserData, DeviceType > TraverserUserDataPointer; - + using MeshType = Mesh; + using MeshPointer = Pointers::SharedPointer< MeshType >; + using RealType = typename MeshFunction::RealType; + using DeviceType = typename MeshFunction::DeviceType; + using IndexType = typename MeshFunction::IndexType; + using TraverserUserData = + ExplicitUpdaterTraverserUserData< RealType, MeshFunction, DifferentialOperator, BoundaryConditions, RightHandSide >; + using DifferentialOperatorPointer = Pointers::SharedPointer< DifferentialOperator, DeviceType >; + using BoundaryConditionsPointer = Pointers::SharedPointer< BoundaryConditions, DeviceType >; + using RightHandSidePointer = Pointers::SharedPointer< RightHandSide, DeviceType >; + using MeshFunctionPointer = Pointers::SharedPointer< MeshFunction, DeviceType >; + using TraverserUserDataPointer = Pointers::SharedPointer< TraverserUserData, DeviceType >; + void setDifferentialOperator( const DifferentialOperatorPointer& differentialOperatorPointer ) { this->userDataPointer->differentialOperator = &differentialOperatorPointer.template getData< DeviceType >(); @@ -165,8 +162,7 @@ class ExplicitUpdater class TraverserInteriorEntitiesProcessor { public: - - typedef typename MeshType::PointType PointType; + using PointType = typename MeshType::PointType; template< typename EntityType > __cuda_callable__ @@ -174,7 +170,7 @@ class ExplicitUpdater TraverserUserData& userData, const EntityType& entity ) { - typedef Functions::FunctionAdapter< MeshType, RightHandSide > FunctionAdapter; + using FunctionAdapter = Functions::FunctionAdapter< MeshType, RightHandSide >; ( *userData.fu )( entity ) = ( *userData.differentialOperator )( *userData.u, entity, userData.time ); // TODO: fix the right hand side here !!! @@ -188,7 +184,7 @@ class ExplicitUpdater const IndexType& entityIndex, const typename MeshType::CoordinatesType& coordinates ) { - typedef Functions::FunctionAdapter< MeshType, RightHandSide > FunctionAdapter; + using FunctionAdapter = Functions::FunctionAdapter< MeshType, RightHandSide >; userData.real_fu[ entityIndex ] = ( *userData.differentialOperator )( mesh, userData.real_u, entityIndex, coordinates, userData.time ); // TODO: fix the right hand side here !!! diff --git a/src/Benchmarks/HeatEquation/Tuning/GridTraverser.h b/src/Benchmarks/HeatEquation/Tuning/GridTraverser.h index b127a953da78f669de4f0549232d0bca33140b4a..75afe5e8c0dac0cd448cc44327d18360faf489b0 100644 --- a/src/Benchmarks/HeatEquation/Tuning/GridTraverser.h +++ b/src/Benchmarks/HeatEquation/Tuning/GridTraverser.h @@ -23,14 +23,13 @@ template< typename Real, class GridTraverser< Meshes::Grid< 2, Real, Devices::Host, Index >, Cell > { public: - - typedef Meshes::Grid< 2, Real, Devices::Host, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Host DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - + using GridType = Meshes::Grid< 2, Real, Devices::Host, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Host; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + template< typename GridEntity, typename EntitiesProcessor, @@ -62,14 +61,13 @@ template< typename Real, class GridTraverser< Meshes::Grid< 2, Real, Devices::Cuda, Index >, Cell > { public: - - typedef Meshes::Grid< 2, Real, Devices::Cuda, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Cuda DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - + using GridType = Meshes::Grid< 2, Real, Devices::Cuda, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Cuda; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + template< typename GridEntity, typename EntitiesProcessor, diff --git a/src/Benchmarks/HeatEquation/Tuning/SimpleCell.h b/src/Benchmarks/HeatEquation/Tuning/SimpleCell.h index 4406a8542a0ab39d69e1fadbfd4d65047e7d496b..87cfbfabbb36bd12221fca4352c5add375d74a4e 100644 --- a/src/Benchmarks/HeatEquation/Tuning/SimpleCell.h +++ b/src/Benchmarks/HeatEquation/Tuning/SimpleCell.h @@ -9,17 +9,15 @@ template< typename Grid, typename Config = Meshes::GridEntityNoStencilStorage > class SimpleCell { public: - - typedef Grid GridType; - typedef GridType MeshType; - typedef typename GridType::RealType RealType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::PointType PointType; - typedef Meshes::NeighborGridEntitiesStorage< SimpleCell, Config > - NeighborGridEntitiesStorageType; - typedef Config ConfigType; - + using GridType = Grid; + using MeshType = GridType; + using RealType = typename GridType::RealType; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; + using PointType = typename GridType::PointType; + using NeighborGridEntitiesStorageType = Meshes::NeighborGridEntitiesStorage< SimpleCell, Config >; + using ConfigType = Config; + constexpr static int getMeshDimension() { return GridType::getMeshDimension(); }; constexpr static int getEntityDimension() { return getMeshDimension(); }; diff --git a/src/Benchmarks/HeatEquation/Tuning/Traverser_Grid2D.h b/src/Benchmarks/HeatEquation/Tuning/Traverser_Grid2D.h index 538940297d3cb66ff6db24d55db228d8719d7ba3..87ea028fc763827bfbea837a3737066ef8d273b7 100644 --- a/src/Benchmarks/HeatEquation/Tuning/Traverser_Grid2D.h +++ b/src/Benchmarks/HeatEquation/Tuning/Traverser_Grid2D.h @@ -38,9 +38,9 @@ template< typename Real, class Traverser< Meshes::Grid< 2, Real, Device, Index >, GridEntity, 2 > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using CoordinatesType = typename GridType::CoordinatesType; template< typename UserData, typename EntitiesProcessor > diff --git a/src/Benchmarks/HeatEquation/tnl-benchmark-heat-equation.h b/src/Benchmarks/HeatEquation/tnl-benchmark-heat-equation.h index 8ed3472e5fabd276371ed5984f8b29d8f6dfbf95..532bfa4a10e10a4513ff574bbb34f8662b05416f 100644 --- a/src/Benchmarks/HeatEquation/tnl-benchmark-heat-equation.h +++ b/src/Benchmarks/HeatEquation/tnl-benchmark-heat-equation.h @@ -9,7 +9,7 @@ #include "HeatEquationBenchmarkRhs.h" #include "HeatEquationBenchmarkBuildConfigTag.h" -typedef HeatEquationBenchmarkBuildConfigTag BuildConfig; +using BuildConfig = HeatEquationBenchmarkBuildConfigTag; /**** * Uncoment the following (and comment the previous line) for the complete build. @@ -53,31 +53,32 @@ template< typename Real, class HeatEquationBenchmarkSetter { public: - - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; static bool run( const Config::ParameterContainer & parameters ) { enum { Dimension = MeshType::getMeshDimension() }; - typedef BenchmarkLaplace< MeshType, Real, Index > ApproximateOperator; - typedef HeatEquationBenchmarkRhs< MeshType, Real > RightHandSide; - typedef Containers::StaticVector < MeshType::getMeshDimension(), Real > Point; + using ApproximateOperator = BenchmarkLaplace< MeshType, Real, Index >; + using RightHandSide = HeatEquationBenchmarkRhs< MeshType, Real >; + using Point = Containers::StaticVector< MeshType::getMeshDimension(), Real >; - /**** - * Resolve the template arguments of your solver here. - * The following code is for the Dirichlet and the Neumann boundary conditions. - * Both can be constant or defined as descrete values of Vector. - */ + /**** + * Resolve the template arguments of your solver here. + * The following code is for the Dirichlet and the Neumann boundary conditions. + * Both can be constant or defined as descrete values of Vector. + */ String boundaryConditionsType = parameters.getParameter< String >( "boundary-conditions-type" ); if( parameters.checkParameter( "boundary-conditions-constant" ) ) { - typedef Functions::Analytic::Constant< Dimension, Real > Constant; + using Constant = Functions::Analytic::Constant< Dimension, Real >; if( boundaryConditionsType == "dirichlet" ) { - typedef Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getMeshDimension(), Real, Index > BoundaryConditions; - typedef HeatEquationBenchmarkProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem; + using BoundaryConditions = + Operators::DirichletBoundaryConditions< MeshType, Constant, MeshType::getMeshDimension(), Real, Index >; + using Problem = + HeatEquationBenchmarkProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator >; SolverStarter solverStarter; return solverStarter.template run< Problem >( parameters ); } diff --git a/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h b/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h index 6bfce808e9515f432d1f2f00d909d0f2f6a50d14..5687a2182056dc90ca35c179a43725f6c29136f9 100644 --- a/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h +++ b/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h @@ -537,8 +537,8 @@ bool solveHeatEquationHost( const Config::ParameterContainer& parameters, /**** * Saving the result */ - typedef Meshes::Grid< 2, Real, Devices::Host, Index > GridType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 2, Real, Devices::Host, Index >; + using PointType = typename GridType::PointType; Pointers::SharedPointer< GridType > gridPointer; gridPointer->setDimensions( gridXSize, gridYSize ); gridPointer->setDomain( PointType( 0.0, 0.0 ), PointType( domainXSize, domainYSize ) ); diff --git a/src/Benchmarks/ODESolvers/Euler.h b/src/Benchmarks/ODESolvers/Euler.h index c5b12187e933d689c4fb47c782a8749e2baeb1cc..48b55d4b7fd374d3786a88a0adcd219382a9ec82 100644 --- a/src/Benchmarks/ODESolvers/Euler.h +++ b/src/Benchmarks/ODESolvers/Euler.h @@ -16,13 +16,12 @@ template< typename Problem, class Euler : public Solvers::ODE::ExplicitSolver< Problem, SolverMonitor > { public: - - typedef Problem ProblemType; - typedef typename Problem::DofVectorType DofVectorType; - typedef typename Problem::RealType RealType; - typedef typename Problem::DeviceType DeviceType; - typedef typename Problem::IndexType IndexType; - typedef Pointers::SharedPointer< DofVectorType, DeviceType > DofVectorPointer; + using ProblemType = Problem; + using DofVectorType = typename Problem::DofVectorType; + using RealType = typename Problem::RealType; + using DeviceType = typename Problem::DeviceType; + using IndexType = typename Problem::IndexType; + using DofVectorPointer = Pointers::SharedPointer< DofVectorType, DeviceType >; using VectorOperations = CommonVectorOperations< DeviceType >; diff --git a/src/Benchmarks/ODESolvers/Merson.h b/src/Benchmarks/ODESolvers/Merson.h index cf86a241ddcbc667afbe05d013a72a3fd9580217..6bcdf64fa36aa974a1e788e68f2ca7c59f9dfcd3 100644 --- a/src/Benchmarks/ODESolvers/Merson.h +++ b/src/Benchmarks/ODESolvers/Merson.h @@ -14,13 +14,12 @@ template< class Problem, class Merson : public Solvers::ODE::ExplicitSolver< Problem, SolverMonitor > { public: - - typedef Problem ProblemType; - typedef typename Problem :: DofVectorType DofVectorType; - typedef typename Problem :: RealType RealType; - typedef typename Problem :: DeviceType DeviceType; - typedef typename Problem :: IndexType IndexType; - typedef Pointers::SharedPointer< DofVectorType, DeviceType > DofVectorPointer; + using ProblemType = Problem; + using DofVectorType = typename Problem::DofVectorType; + using RealType = typename Problem::RealType; + using DeviceType = typename Problem::DeviceType; + using IndexType = typename Problem::IndexType; + using DofVectorPointer = Pointers::SharedPointer< DofVectorType, DeviceType >; using VectorOperations = CommonVectorOperations< DeviceType >; Merson(); diff --git a/src/TNL/Algorithms/Segments/detail/CheckLambdas.h b/src/TNL/Algorithms/Segments/detail/CheckLambdas.h index 30fec96bd338a728233e68ca95e77a755f0e3770..95fba02fffdb2af760c537a5c522b47b7e7990c0 100644 --- a/src/TNL/Algorithms/Segments/detail/CheckLambdas.h +++ b/src/TNL/Algorithms/Segments/detail/CheckLambdas.h @@ -15,8 +15,8 @@ template< typename Index, typename Lambda > class CheckFetchLambda { private: - typedef char YesType[ 1 ]; - typedef char NoType[ 2 ]; + using YesType = char[ 1 ]; + using NoType = char[ 2 ]; template< typename C > static YesType& diff --git a/src/TNL/Functions/Analytic/Blob.h b/src/TNL/Functions/Analytic/Blob.h index 0f568fde3e322f8e5f55b3db8060b4b56e95f484..0978e8636cc924c075dd4b5041909dc96fbf5f6b 100644 --- a/src/TNL/Functions/Analytic/Blob.h +++ b/src/TNL/Functions/Analytic/Blob.h @@ -19,7 +19,7 @@ template< typename Real, int Dimension > class BlobBase : public Domain< Dimension, SpaceDomain > { public: - typedef Real RealType; + using RealType = Real; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ); @@ -40,8 +40,8 @@ public: { Dimension = 1 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Blob(); @@ -63,8 +63,8 @@ public: { Dimension = 2 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Blob(); @@ -86,8 +86,8 @@ public: { Dimension = 3 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Blob(); diff --git a/src/TNL/Functions/Analytic/Constant.h b/src/TNL/Functions/Analytic/Constant.h index 76033b6286bae3ab6c83cf7568b7cbea8cd892b7..c0df590e14c85e5493d63fdfb18457feb5551ae3 100644 --- a/src/TNL/Functions/Analytic/Constant.h +++ b/src/TNL/Functions/Analytic/Constant.h @@ -18,8 +18,8 @@ template< int dimensions, typename Real = double > class Constant : public Domain< dimensions, NonspaceDomain > { public: - typedef Real RealType; - typedef Containers::StaticVector< dimensions, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< dimensions, RealType >; __cuda_callable__ Constant(); diff --git a/src/TNL/Functions/Analytic/Cylinder.h b/src/TNL/Functions/Analytic/Cylinder.h index 942248733e350b7ef9ccbc2c490daeaf2f00110e..0f74917127b006b968e43e291e83fdadd058cbc1 100644 --- a/src/TNL/Functions/Analytic/Cylinder.h +++ b/src/TNL/Functions/Analytic/Cylinder.h @@ -19,7 +19,7 @@ template< typename Real, int Dimension > class CylinderBase : public Domain< Dimension, SpaceDomain > { public: - typedef Real RealType; + using RealType = Real; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ); @@ -46,8 +46,8 @@ public: { Dimension = 1 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Cylinder(); @@ -69,8 +69,8 @@ public: { Dimension = 2 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Cylinder(); @@ -92,8 +92,8 @@ public: { Dimension = 3 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Cylinder(); diff --git a/src/TNL/Functions/Analytic/ExpBump.h b/src/TNL/Functions/Analytic/ExpBump.h index 441f85ba471ca7678a6b81f333badeff389d00aa..e7fcaa89f442fe04928a1fa71e961c1baab30a44 100644 --- a/src/TNL/Functions/Analytic/ExpBump.h +++ b/src/TNL/Functions/Analytic/ExpBump.h @@ -18,7 +18,7 @@ template< int dimensions, typename Real > class ExpBumpBase : public Domain< dimensions, SpaceDomain > { public: - typedef Real RealType; + using RealType = Real; ExpBumpBase(); @@ -49,8 +49,8 @@ template< typename Real > class ExpBump< 1, Real > : public ExpBumpBase< 1, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; ExpBump(); @@ -68,8 +68,8 @@ template< typename Real > class ExpBump< 2, Real > : public ExpBumpBase< 2, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; ExpBump(); @@ -87,8 +87,8 @@ template< typename Real > class ExpBump< 3, Real > : public ExpBumpBase< 3, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; ExpBump(); diff --git a/src/TNL/Functions/Analytic/Flowerpot.h b/src/TNL/Functions/Analytic/Flowerpot.h index 1a0bfff17d031a41b0c7e2d6f549ebcae3b3022e..ee70c49054be463e7dd5a96a11843efaacf6611a 100644 --- a/src/TNL/Functions/Analytic/Flowerpot.h +++ b/src/TNL/Functions/Analytic/Flowerpot.h @@ -19,7 +19,7 @@ template< typename Real, int Dimension > class FlowerpotBase : public Domain< Dimension, SpaceDomain > { public: - typedef Real RealType; + using RealType = Real; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ); @@ -46,8 +46,8 @@ public: { Dimension = 1 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Flowerpot(); @@ -69,8 +69,8 @@ public: { Dimension = 2 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Flowerpot(); @@ -92,8 +92,8 @@ public: { Dimension = 3 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Flowerpot(); diff --git a/src/TNL/Functions/Analytic/Paraboloid.h b/src/TNL/Functions/Analytic/Paraboloid.h index 93bebb8ee46d9de506d0af15d4f62fb464d7ca6b..f994aa6190e8fe76490d53794f16eafd6a61ec2b 100644 --- a/src/TNL/Functions/Analytic/Paraboloid.h +++ b/src/TNL/Functions/Analytic/Paraboloid.h @@ -65,8 +65,8 @@ template< typename Real > class Paraboloid< 1, Real > : public ParaboloidBase< 1, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -85,8 +85,8 @@ template< typename Real > class Paraboloid< 2, Real > : public ParaboloidBase< 2, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -105,8 +105,8 @@ template< typename Real > class Paraboloid< 3, Real > : public ParaboloidBase< 3, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ diff --git a/src/TNL/Functions/Analytic/ParaboloidSDF.h b/src/TNL/Functions/Analytic/ParaboloidSDF.h index e6d89a67c174cecc4805fdb8c03a26b6a7b23974..57a44a54cf0e6fa55101cccd46ea4d3935831932 100644 --- a/src/TNL/Functions/Analytic/ParaboloidSDF.h +++ b/src/TNL/Functions/Analytic/ParaboloidSDF.h @@ -65,8 +65,8 @@ template< typename Real > class ParaboloidSDF< 1, Real > : public ParaboloidSDFBase< 1, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -82,8 +82,8 @@ template< typename Real > class ParaboloidSDF< 2, Real > : public ParaboloidSDFBase< 2, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -99,8 +99,8 @@ template< typename Real > class ParaboloidSDF< 3, Real > : public ParaboloidSDFBase< 3, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ diff --git a/src/TNL/Functions/Analytic/PseudoSquare.h b/src/TNL/Functions/Analytic/PseudoSquare.h index 2384fcbe9cb8c4f728c031604cda5ea903b72574..2525d680e099a072828566d89a37927fe0cb9199 100644 --- a/src/TNL/Functions/Analytic/PseudoSquare.h +++ b/src/TNL/Functions/Analytic/PseudoSquare.h @@ -19,7 +19,7 @@ template< typename Real, int Dimension > class PseudoSquareBase : public Domain< Dimension, SpaceDomain > { public: - typedef Real RealType; + using RealType = Real; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ); @@ -40,8 +40,8 @@ public: { Dimension = 1 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; PseudoSquare(); @@ -63,8 +63,8 @@ public: { Dimension = 2 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; PseudoSquare(); @@ -86,8 +86,8 @@ public: { Dimension = 3 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; PseudoSquare(); diff --git a/src/TNL/Functions/Analytic/SinBumps.h b/src/TNL/Functions/Analytic/SinBumps.h index 53e0ee31d3f42ef508411dc809c30759e6330020..32930993d8c380a67594b251c12a85f2ae4d2e97 100644 --- a/src/TNL/Functions/Analytic/SinBumps.h +++ b/src/TNL/Functions/Analytic/SinBumps.h @@ -22,8 +22,8 @@ template< typename Point > class SinBumpsBase : public Domain< Point::getSize(), SpaceDomain > { public: - typedef Point PointType; - typedef typename Point::RealType RealType; + using PointType = Point; + using RealType = typename Point::RealType; enum { Dimension = PointType::getSize() @@ -67,8 +67,8 @@ template< typename Real > class SinBumps< 1, Real > : public SinBumpsBase< Containers::StaticVector< 1, Real > > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; SinBumps(); @@ -89,8 +89,8 @@ template< typename Real > class SinBumps< 2, Real > : public SinBumpsBase< Containers::StaticVector< 2, Real > > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; SinBumps(); @@ -111,8 +111,8 @@ template< typename Real > class SinBumps< 3, Real > : public SinBumpsBase< Containers::StaticVector< 3, Real > > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; SinBumps(); diff --git a/src/TNL/Functions/Analytic/SinBumpsSDF.h b/src/TNL/Functions/Analytic/SinBumpsSDF.h index 923b755e9eb12fca8acb4743a7724525fe4d166b..7d641c8ecb82410a36ea04ef5f88367bdedff8d0 100644 --- a/src/TNL/Functions/Analytic/SinBumpsSDF.h +++ b/src/TNL/Functions/Analytic/SinBumpsSDF.h @@ -18,8 +18,8 @@ template< typename Point > class SinBumpsSDFBase : public Domain< Point::getSize(), SpaceDomain > { public: - typedef Point PointType; - typedef typename Point::RealType RealType; + using PointType = Point; + using RealType = typename Point::RealType; enum { Dimensions = PointType::getSize() @@ -63,8 +63,8 @@ template< typename Real > class SinBumpsSDF< 1, Real > : public SinBumpsSDFBase< Containers::StaticVector< 1, Real > > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; SinBumpsSDF(); @@ -85,8 +85,8 @@ template< typename Real > class SinBumpsSDF< 2, Real > : public SinBumpsSDFBase< Containers::StaticVector< 2, Real > > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; SinBumpsSDF(); @@ -107,8 +107,8 @@ template< typename Real > class SinBumpsSDF< 3, Real > : public SinBumpsSDFBase< Containers::StaticVector< 3, Real > > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; SinBumpsSDF(); diff --git a/src/TNL/Functions/Analytic/SinWave.h b/src/TNL/Functions/Analytic/SinWave.h index a0d200814d407d6634a614ee20c57f27821e76e8..a564e7dde828ef8f4cd19897fb5ddb425ac4ed05 100644 --- a/src/TNL/Functions/Analytic/SinWave.h +++ b/src/TNL/Functions/Analytic/SinWave.h @@ -65,8 +65,8 @@ template< typename Real > class SinWave< 1, Real > : public SinWaveBase< 1, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -82,8 +82,8 @@ template< typename Real > class SinWave< 2, Real > : public SinWaveBase< 2, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -99,8 +99,8 @@ template< typename Real > class SinWave< 3, Real > : public SinWaveBase< 3, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ diff --git a/src/TNL/Functions/Analytic/SinWaveSDF.h b/src/TNL/Functions/Analytic/SinWaveSDF.h index 801b929585bf6c3fa093e1326246d9baed1dd023..bb14afd21d09e43136e1c4d048169eaf09687ac7 100644 --- a/src/TNL/Functions/Analytic/SinWaveSDF.h +++ b/src/TNL/Functions/Analytic/SinWaveSDF.h @@ -63,8 +63,8 @@ template< typename Real > class SinWaveSDF< 1, Real > : public SinWaveSDFBase< 1, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 1, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 1, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -80,8 +80,8 @@ template< typename Real > class SinWaveSDF< 2, Real > : public SinWaveSDFBase< 2, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 2, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 2, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ @@ -97,8 +97,8 @@ template< typename Real > class SinWaveSDF< 3, Real > : public SinWaveSDFBase< 3, Real > { public: - typedef Real RealType; - typedef Containers::StaticVector< 3, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< 3, RealType >; template< int XDiffOrder = 0, int YDiffOrder = 0, int ZDiffOrder = 0 > __cuda_callable__ diff --git a/src/TNL/Functions/Analytic/Twins.h b/src/TNL/Functions/Analytic/Twins.h index d1b0647b1e81893e90c03ada42561a061df4ed56..4a0dc720e97e703f67ebb90bdb2109107ab2b91e 100644 --- a/src/TNL/Functions/Analytic/Twins.h +++ b/src/TNL/Functions/Analytic/Twins.h @@ -19,7 +19,7 @@ template< typename Real, int Dimension > class TwinsBase : public Domain< Dimension, SpaceDomain > { public: - typedef Real RealType; + using RealType = Real; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ); @@ -37,8 +37,8 @@ public: { Dimension = 1 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Twins(); @@ -60,8 +60,8 @@ public: { Dimension = 2 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Twins(); @@ -83,8 +83,8 @@ public: { Dimension = 3 }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; Twins(); diff --git a/src/TNL/Functions/Analytic/VectorNorm.h b/src/TNL/Functions/Analytic/VectorNorm.h index b06322cb6830cdcdcf99fe57d2abb3ab0924de99..d271da27c0a76f2e15c0c332fde5bc3c8dba508f 100644 --- a/src/TNL/Functions/Analytic/VectorNorm.h +++ b/src/TNL/Functions/Analytic/VectorNorm.h @@ -17,8 +17,8 @@ template< int Dimensions_, typename Real > class VectorNormBase : public Domain< Dimensions_, SpaceDomain > { public: - typedef Real RealType; - typedef Containers::StaticVector< Dimensions_, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimensions_, RealType >; VectorNormBase() : center( 0.0 ), anisotropy( 1.0 ), power( 2.0 ), radius( 0.0 ), multiplicator( 1.0 ), maxNorm( false ){}; @@ -138,7 +138,7 @@ template< typename Real > class VectorNorm< 1, Real > : public VectorNormBase< 1, Real > { public: - typedef VectorNormBase< 1, Real > BaseType; + using BaseType = VectorNormBase< 1, Real >; using typename BaseType::PointType; using typename BaseType::RealType; @@ -171,7 +171,7 @@ template< typename Real > class VectorNorm< 2, Real > : public VectorNormBase< 2, Real > { public: - typedef VectorNormBase< 2, Real > BaseType; + using BaseType = VectorNormBase< 2, Real >; using typename BaseType::PointType; using typename BaseType::RealType; @@ -216,7 +216,7 @@ template< typename Real > class VectorNorm< 3, Real > : public VectorNormBase< 3, Real > { public: - typedef VectorNormBase< 3, Real > BaseType; + using BaseType = VectorNormBase< 3, Real >; using typename BaseType::PointType; using typename BaseType::RealType; diff --git a/src/TNL/Functions/Domain.h b/src/TNL/Functions/Domain.h index 3bf93a2f4abc29e06455b78fc16e22ab0815c5a2..2423882d8c9de6487c1bf904be699ee15940e295 100644 --- a/src/TNL/Functions/Domain.h +++ b/src/TNL/Functions/Domain.h @@ -22,7 +22,7 @@ template< int Dimension, DomainType DomainType_ = SpaceDomain > class Domain { public: - typedef void DeviceType; + using DeviceType = void; static constexpr int getDomainDimension() diff --git a/src/TNL/Functions/FunctionAdapter.h b/src/TNL/Functions/FunctionAdapter.h index b0c73be9ae50f70c3d7a08e2d86a08839fa0e5b6..c791f60dc6ec9a5d9b32bcc576d65fcd9c6ec36e 100644 --- a/src/TNL/Functions/FunctionAdapter.h +++ b/src/TNL/Functions/FunctionAdapter.h @@ -23,10 +23,10 @@ template< typename Mesh, typename Function, int domainType = Function::getDomain class FunctionAdapter { public: - typedef Function FunctionType; - typedef Mesh MeshType; - typedef typename FunctionType::RealType RealType; - typedef typename MeshType::GlobalIndexType IndexType; + using FunctionType = Function; + using MeshType = Mesh; + using RealType = typename FunctionType::RealType; + using IndexType = typename MeshType::GlobalIndexType; // typedef typename FunctionType::PointType PointType; template< typename MeshPointer > @@ -56,11 +56,11 @@ template< typename Mesh, typename Function > class FunctionAdapter< Mesh, Function, SpaceDomain > { public: - typedef Function FunctionType; - typedef Mesh MeshType; - typedef typename FunctionType::RealType RealType; - typedef typename MeshType::GlobalIndexType IndexType; - typedef typename FunctionType::PointType PointType; + using FunctionType = Function; + using MeshType = Mesh; + using RealType = typename FunctionType::RealType; + using IndexType = typename MeshType::GlobalIndexType; + using PointType = typename FunctionType::PointType; template< typename MeshPointer > static bool @@ -90,11 +90,11 @@ template< typename Mesh, typename Function > class FunctionAdapter< Mesh, Function, NonspaceDomain > { public: - typedef Function FunctionType; - typedef Mesh MeshType; - typedef typename FunctionType::RealType RealType; - typedef typename MeshType::GlobalIndexType IndexType; - typedef typename FunctionType::PointType PointType; + using FunctionType = Function; + using MeshType = Mesh; + using RealType = typename FunctionType::RealType; + using IndexType = typename MeshType::GlobalIndexType; + using PointType = typename FunctionType::PointType; template< typename MeshPointer > static bool diff --git a/src/TNL/Functions/MeshFunctionEvaluator.h b/src/TNL/Functions/MeshFunctionEvaluator.h index 586232da00813ff398367748bcd7e05bff6a10cb..f50b0aab66fcfa75c0579c9b36842eba1efc0d2c 100644 --- a/src/TNL/Functions/MeshFunctionEvaluator.h +++ b/src/TNL/Functions/MeshFunctionEvaluator.h @@ -15,7 +15,7 @@ template< typename OutMeshFunction, typename InFunction, typename Real > class MeshFunctionEvaluatorTraverserUserData { public: - typedef InFunction InFunctionType; + using InFunctionType = InFunction; MeshFunctionEvaluatorTraverserUserData( const InFunction* function, const Real& time, @@ -47,10 +47,10 @@ class MeshFunctionEvaluator "Input and output functions must have the same domain dimensions." ); public: - typedef typename InFunction::RealType RealType; - typedef typename OutMeshFunction::MeshType MeshType; - typedef typename MeshType::DeviceType DeviceType; - typedef Functions::MeshFunctionEvaluatorTraverserUserData< OutMeshFunction, InFunction, RealType > TraverserUserData; + using RealType = typename InFunction::RealType; + using MeshType = typename OutMeshFunction::MeshType; + using DeviceType = typename MeshType::DeviceType; + using TraverserUserData = Functions::MeshFunctionEvaluatorTraverserUserData< OutMeshFunction, InFunction, RealType >; template< typename OutMeshFunctionPointer, typename InFunctionPointer > static void @@ -111,7 +111,7 @@ public: static inline void processEntity( const MeshType& mesh, UserData& userData, const EntityType& entity ) { - typedef FunctionAdapter< MeshType, typename UserData::InFunctionType > FunctionAdapter; + using FunctionAdapter = FunctionAdapter< MeshType, typename UserData::InFunctionType >; ( *userData.meshFunction )( entity ) = userData.inFunctionMultiplicator * FunctionAdapter::getValue( *userData.function, entity, userData.time ); /*cerr << "Idx = " << entity.getIndex() @@ -130,7 +130,7 @@ public: static inline void processEntity( const MeshType& mesh, UserData& userData, const EntityType& entity ) { - typedef FunctionAdapter< MeshType, typename UserData::InFunctionType > FunctionAdapter; + using FunctionAdapter = FunctionAdapter< MeshType, typename UserData::InFunctionType >; ( *userData.meshFunction )( entity ) = userData.outFunctionMultiplicator * ( *userData.meshFunction )( entity ) + userData.inFunctionMultiplicator * FunctionAdapter::getValue( *userData.function, entity, userData.time ); diff --git a/src/TNL/Functions/MeshFunctionEvaluator_impl.h b/src/TNL/Functions/MeshFunctionEvaluator_impl.h index a8a3d8515ff8c16d71f4c0ed371ecaad8181386b..3bac5923d919b6e11ad0d8e840646f90d0923618 100644 --- a/src/TNL/Functions/MeshFunctionEvaluator_impl.h +++ b/src/TNL/Functions/MeshFunctionEvaluator_impl.h @@ -112,10 +112,10 @@ MeshFunctionEvaluator< OutMeshFunction, InFunction >::evaluateEntities( OutMeshF static_assert( std::is_same< typename std::decay< typename InFunctionPointer::ObjectType >::type, InFunction >::value, "expected a smart pointer" ); - typedef typename MeshType::template EntityType< OutMeshFunction::getEntitiesDimension() > MeshEntityType; - typedef Functions::MeshFunctionEvaluatorAssignmentEntitiesProcessor< MeshType, TraverserUserData > - AssignmentEntitiesProcessor; - typedef Functions::MeshFunctionEvaluatorAdditionEntitiesProcessor< MeshType, TraverserUserData > AdditionEntitiesProcessor; + using MeshEntityType = typename MeshType::template EntityType< OutMeshFunction::getEntitiesDimension() >; + using AssignmentEntitiesProcessor = + Functions::MeshFunctionEvaluatorAssignmentEntitiesProcessor< MeshType, TraverserUserData >; + using AdditionEntitiesProcessor = Functions::MeshFunctionEvaluatorAdditionEntitiesProcessor< MeshType, TraverserUserData >; // typedef typename OutMeshFunction::MeshPointer OutMeshPointer; TraverserUserData userData( &function.template getData< DeviceType >(), diff --git a/src/TNL/Functions/MeshFunctionNormGetter.h b/src/TNL/Functions/MeshFunctionNormGetter.h index 060005dde85e7b65b01e2b7a79c249bc169a3e7a..362e85044e132cdb4ca30a933c8a797d9995db89 100644 --- a/src/TNL/Functions/MeshFunctionNormGetter.h +++ b/src/TNL/Functions/MeshFunctionNormGetter.h @@ -24,16 +24,16 @@ template< int Dimension, typename MeshReal, typename MeshIndex > class MeshFunctionNormGetter< Meshes::Grid< Dimension, MeshReal, Devices::Host, MeshIndex > > { public: - typedef Meshes::Grid< Dimension, MeshReal, Devices::Host, MeshIndex > GridType; - typedef MeshReal MeshRealType; - typedef Devices::Host DeviceType; - typedef MeshIndex MeshIndexType; + using GridType = Meshes::Grid< Dimension, MeshReal, Devices::Host, MeshIndex >; + using MeshRealType = MeshReal; + using DeviceType = Devices::Host; + using MeshIndexType = MeshIndex; template< typename MeshFunctionType > static typename MeshFunctionType::RealType getNorm( const MeshFunctionType& function, const typename MeshFunctionType::RealType& p ) { - typedef typename MeshFunctionType::RealType RealType; + using RealType = typename MeshFunctionType::RealType; static constexpr int EntityDimension = MeshFunctionType::getEntitiesDimension(); if( EntityDimension == Dimension ) { if( p == 1.0 ) @@ -43,8 +43,8 @@ public: return std::pow( function.getMesh().getCellMeasure(), 1.0 / p ) * lpNorm( function.getData(), p ); } if( EntityDimension > 0 ) { - typedef typename MeshFunctionType::MeshType MeshType; - typedef typename MeshType::Face EntityType; + using MeshType = typename MeshFunctionType::MeshType; + using EntityType = typename MeshType::Face; if( p == 1.0 ) { RealType result( 0.0 ); for( MeshIndexType i = 0; i < function.getMesh().template getEntitiesCount< EntityType >(); i++ ) { @@ -85,16 +85,16 @@ template< int Dimension, typename MeshReal, typename MeshIndex > class MeshFunctionNormGetter< Meshes::Grid< Dimension, MeshReal, Devices::Cuda, MeshIndex > > { public: - typedef Meshes::Grid< Dimension, MeshReal, Devices::Cuda, MeshIndex > GridType; - typedef MeshReal MeshRealType; - typedef Devices::Cuda DeviceType; - typedef MeshIndex MeshIndexType; + using GridType = Meshes::Grid< Dimension, MeshReal, Devices::Cuda, MeshIndex >; + using MeshRealType = MeshReal; + using DeviceType = Devices::Cuda; + using MeshIndexType = MeshIndex; template< typename MeshFunctionType > static typename MeshFunctionType::RealType getNorm( const MeshFunctionType& function, const typename MeshFunctionType::RealType& p ) { - typedef typename MeshFunctionType::RealType RealType; + using RealType = typename MeshFunctionType::RealType; static constexpr int EntityDimension = MeshFunctionType::getEntitiesDimension(); if( EntityDimension == Dimension ) { if( p == 1.0 ) @@ -104,8 +104,8 @@ public: return ::pow( function.getMesh().getCellMeasure(), 1.0 / p ) * function.getData().lpNorm( p ); } if( EntityDimension > 0 ) { - typedef typename MeshFunctionType::MeshType MeshType; - typedef typename MeshType::Face EntityType; + using MeshType = typename MeshFunctionType::MeshType; + using EntityType = typename MeshType::Face; throw Exceptions::NotImplementedError( "Not implemented yet." ); } diff --git a/src/TNL/Functions/TestFunction.h b/src/TNL/Functions/TestFunction.h index a8e6e33e4f6c0887296861057735db04ad5c7658..d34055f1f5ac6fccc7b8fed83b6fb024d0f13469 100644 --- a/src/TNL/Functions/TestFunction.h +++ b/src/TNL/Functions/TestFunction.h @@ -57,8 +57,8 @@ public: { Dimension = FunctionDimension }; - typedef Real RealType; - typedef Containers::StaticVector< Dimension, Real > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimension, Real >; TestFunction(); diff --git a/src/TNL/Functions/TestFunction_impl.h b/src/TNL/Functions/TestFunction_impl.h index 3086271d181d53ef433b22f3a30f4400b58ae650..4efe45a2aec8990f222dfa164c01cb9f39e8e7e2 100644 --- a/src/TNL/Functions/TestFunction_impl.h +++ b/src/TNL/Functions/TestFunction_impl.h @@ -176,114 +176,114 @@ TestFunction< FunctionDimension, Real, Device >::setup( const Config::ParameterC const String& testFunction = parameters.getParameter< String >( prefix + "test-function" ); std::cout << "Test function ... " << testFunction << std::endl; if( testFunction == "constant" ) { - typedef Constant< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Constant< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = constant; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "paraboloid" ) { - typedef Paraboloid< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Paraboloid< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = paraboloid; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "exp-bump" ) { - typedef ExpBump< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = ExpBump< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = expBump; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "sin-bumps" ) { - typedef SinBumps< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinBumps< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = sinBumps; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "sin-wave" ) { - typedef SinWave< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinWave< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = sinWave; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "cylinder" ) { - typedef Cylinder< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Cylinder< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = cylinder; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "flowerpot" ) { - typedef Flowerpot< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Flowerpot< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = flowerpot; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "twins" ) { - typedef Twins< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Twins< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = twins; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "pseudoSquare" ) { - typedef PseudoSquare< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = PseudoSquare< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = pseudoSquare; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "blob" ) { - typedef Blob< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Blob< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = blob; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "paraboloid-sdf" ) { - typedef ParaboloidSDF< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = ParaboloidSDF< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = paraboloidSDF; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "sin-bumps-sdf" ) { - typedef SinBumpsSDF< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinBumpsSDF< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = sinBumpsSDF; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "sin-wave-sdf" ) { - typedef SinWaveSDF< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinWaveSDF< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = sinWaveSDF; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "vector-norm" ) { - typedef VectorNorm< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = VectorNorm< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; functionType = vectorNorm; operatorType = identity; return ( setupFunction< FunctionType >( parameters, prefix ) && setupOperator< OperatorType >( parameters, prefix ) ); } if( testFunction == "heaviside-of-vector-norm" ) { - typedef VectorNorm< Dimension, Real > FunctionType; - typedef Heaviside< Dimension, Real > OperatorType; + using FunctionType = VectorNorm< Dimension, Real >; + using OperatorType = Heaviside< Dimension, Real >; functionType = vectorNorm; operatorType = heaviside; return ( setupFunction< FunctionType >( parameters, prefix + "vector-norm-" ) && setupOperator< OperatorType >( parameters, prefix + "heaviside-" ) ); } if( testFunction == "smooth-heaviside-of-vector-norm" ) { - typedef VectorNorm< Dimension, Real > FunctionType; - typedef SmoothHeaviside< Dimension, Real > OperatorType; + using FunctionType = VectorNorm< Dimension, Real >; + using OperatorType = SmoothHeaviside< Dimension, Real >; functionType = vectorNorm; operatorType = smoothHeaviside; return ( setupFunction< FunctionType >( parameters, prefix + "vector-norm-" ) @@ -380,8 +380,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi switch( functionType ) { case constant: { - typedef Constant< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Constant< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -390,9 +390,9 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case paraboloid: { - typedef Paraboloid< Dimension, Real > FunctionType; + using FunctionType = Paraboloid< Dimension, Real >; if( operatorType == identity ) { - typedef Identity< Dimension, Real > OperatorType; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -400,7 +400,7 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi *(FunctionType*) this->function, vertex, time ); } if( operatorType == heaviside ) { - typedef Heaviside< Dimension, Real > OperatorType; + using OperatorType = Heaviside< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -408,7 +408,7 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi *(FunctionType*) this->function, vertex, time ); } if( operatorType == smoothHeaviside ) { - typedef SmoothHeaviside< Dimension, Real > OperatorType; + using OperatorType = SmoothHeaviside< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -418,8 +418,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case expBump: { - typedef ExpBump< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = ExpBump< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -428,8 +428,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case sinBumps: { - typedef SinBumps< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinBumps< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -438,8 +438,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case sinWave: { - typedef SinWave< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinWave< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -448,8 +448,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case cylinder: { - typedef Cylinder< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Cylinder< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -458,8 +458,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case flowerpot: { - typedef Flowerpot< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Flowerpot< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -468,8 +468,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case twins: { - typedef Twins< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Twins< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -478,8 +478,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case pseudoSquare: { - typedef PseudoSquare< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = PseudoSquare< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -488,8 +488,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case blob: { - typedef Blob< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = Blob< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -498,9 +498,9 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case vectorNorm: { - typedef VectorNorm< Dimension, Real > FunctionType; + using FunctionType = VectorNorm< Dimension, Real >; if( operatorType == identity ) { - typedef Identity< Dimension, Real > OperatorType; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -508,7 +508,7 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi *(FunctionType*) this->function, vertex, time ); } if( operatorType == heaviside ) { - typedef Heaviside< Dimension, Real > OperatorType; + using OperatorType = Heaviside< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -516,7 +516,7 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi *(FunctionType*) this->function, vertex, time ); } if( operatorType == smoothHeaviside ) { - typedef SmoothHeaviside< Dimension, Real > OperatorType; + using OperatorType = SmoothHeaviside< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -526,8 +526,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case sinBumpsSDF: { - typedef SinBumpsSDF< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinBumpsSDF< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -536,8 +536,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case sinWaveSDF: { - typedef SinWaveSDF< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = SinWaveSDF< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -546,8 +546,8 @@ TestFunction< FunctionDimension, Real, Device >::getPartialDerivative( const Poi } case paraboloidSDF: { - typedef ParaboloidSDF< Dimension, Real > FunctionType; - typedef Identity< Dimension, Real > OperatorType; + using FunctionType = ParaboloidSDF< Dimension, Real >; + using OperatorType = Identity< Dimension, Real >; return scale * ( (OperatorType*) this->operator_ ) @@ -584,35 +584,35 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT switch( functionType ) { case constant: { - typedef Constant< Dimension, Real > FunctionType; + using FunctionType = Constant< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); } case paraboloid: { - typedef Paraboloid< Dimension, Real > FunctionType; + using FunctionType = Paraboloid< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); } case expBump: { - typedef ExpBump< Dimension, Real > FunctionType; + using FunctionType = ExpBump< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); } case sinBumps: { - typedef SinBumps< Dimension, Real > FunctionType; + using FunctionType = SinBumps< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); } case sinWave: { - typedef SinWave< Dimension, Real > FunctionType; + using FunctionType = SinWave< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -620,7 +620,7 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT } case cylinder: { - typedef Cylinder< Dimension, Real > FunctionType; + using FunctionType = Cylinder< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -628,7 +628,7 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT } case flowerpot: { - typedef Flowerpot< Dimension, Real > FunctionType; + using FunctionType = Flowerpot< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -636,7 +636,7 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT } case twins: { - typedef Twins< Dimension, Real > FunctionType; + using FunctionType = Twins< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -644,7 +644,7 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT } case pseudoSquare: { - typedef PseudoSquare< Dimension, Real > FunctionType; + using FunctionType = PseudoSquare< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -652,7 +652,7 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT } case blob: { - typedef Blob< Dimension, Real > FunctionType; + using FunctionType = Blob< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -661,21 +661,21 @@ TestFunction< FunctionDimension, Real, Device >::getTimeDerivative( const PointT case paraboloidSDF: { - typedef ParaboloidSDF< Dimension, Real > FunctionType; + using FunctionType = ParaboloidSDF< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); } case sinBumpsSDF: { - typedef SinBumpsSDF< Dimension, Real > FunctionType; + using FunctionType = SinBumpsSDF< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); } case sinWaveSDF: { - typedef SinWaveSDF< Dimension, Real > FunctionType; + using FunctionType = SinWaveSDF< Dimension, Real >; return scale * ( (FunctionType*) function ) ->template getPartialDerivative< XDiffOrder, YDiffOrder, ZDiffOrder >( vertex, time ); @@ -724,14 +724,14 @@ TestFunction< FunctionDimension, Real, Device >::deleteFunctions() switch( functionType ) { case constant: { - typedef Constant< Dimension, Real > FunctionType; + using FunctionType = Constant< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case paraboloid: { - typedef Paraboloid< Dimension, Real > FunctionType; + using FunctionType = Paraboloid< Dimension, Real >; deleteFunction< FunctionType >(); if( operatorType == identity ) deleteOperator< Identity< Dimension, Real > >(); @@ -741,63 +741,63 @@ TestFunction< FunctionDimension, Real, Device >::deleteFunctions() } case expBump: { - typedef ExpBump< Dimension, Real > FunctionType; + using FunctionType = ExpBump< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case sinBumps: { - typedef SinBumps< Dimension, Real > FunctionType; + using FunctionType = SinBumps< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case sinWave: { - typedef SinWave< Dimension, Real > FunctionType; + using FunctionType = SinWave< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case cylinder: { - typedef Cylinder< Dimension, Real > FunctionType; + using FunctionType = Cylinder< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case flowerpot: { - typedef Flowerpot< Dimension, Real > FunctionType; + using FunctionType = Flowerpot< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case twins: { - typedef Twins< Dimension, Real > FunctionType; + using FunctionType = Twins< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case pseudoSquare: { - typedef PseudoSquare< Dimension, Real > FunctionType; + using FunctionType = PseudoSquare< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case blob: { - typedef Blob< Dimension, Real > FunctionType; + using FunctionType = Blob< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case vectorNorm: { - typedef VectorNorm< Dimension, Real > FunctionType; + using FunctionType = VectorNorm< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; @@ -805,21 +805,21 @@ TestFunction< FunctionDimension, Real, Device >::deleteFunctions() case paraboloidSDF: { - typedef ParaboloidSDF< Dimension, Real > FunctionType; + using FunctionType = ParaboloidSDF< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case sinBumpsSDF: { - typedef SinBumpsSDF< Dimension, Real > FunctionType; + using FunctionType = SinBumpsSDF< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; } case sinWaveSDF: { - typedef SinWaveSDF< Dimension, Real > FunctionType; + using FunctionType = SinWaveSDF< Dimension, Real >; deleteFunction< FunctionType >(); deleteOperator< Identity< Dimension, Real > >(); break; diff --git a/src/TNL/Images/DicomSeries.h b/src/TNL/Images/DicomSeries.h index 269385b1aa591fdd6a930a3e83d4fb31696feae4..3c9d9fa7c1bb219cf6b5aff1406220b09affd27a 100644 --- a/src/TNL/Images/DicomSeries.h +++ b/src/TNL/Images/DicomSeries.h @@ -49,7 +49,7 @@ struct ImagesInfo class DicomSeries : public Image< int > { public: - typedef int IndexType; + using IndexType = int; inline DicomSeries( const String& filePath ); diff --git a/src/TNL/Images/DicomSeries_impl.h b/src/TNL/Images/DicomSeries_impl.h index a0a5a86b243f0d51d31adb7bb99320dbc3c96ecb..82d7c55ddbfc17bd340cd8905c1f242756802460 100644 --- a/src/TNL/Images/DicomSeries_impl.h +++ b/src/TNL/Images/DicomSeries_impl.h @@ -78,7 +78,7 @@ DicomSeries::getImage( const int imageIdx, { #ifdef HAVE_DCMTK_H const Uint16* imageData = this->getData( imageIdx ); - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; typename GridType::Cell cell( grid ); Index i, j; diff --git a/src/TNL/Images/Image.h b/src/TNL/Images/Image.h index d542546e951bfa792b6e79f716e093ab826451d3..c17e22ddc647a65667e78d23e918bee7af29a64b 100644 --- a/src/TNL/Images/Image.h +++ b/src/TNL/Images/Image.h @@ -16,7 +16,7 @@ template< typename Index = int > class Image { public: - typedef Index IndexType; + using IndexType = Index; Image() : width( 0 ), height( 0 ){}; diff --git a/src/TNL/Images/JPEGImage.h b/src/TNL/Images/JPEGImage.h index 4ac7e2733eac5f42823fd0c71b835ad345e33000..65c23cc7f15530d0a038bed59edc7b2039cd6285 100644 --- a/src/TNL/Images/JPEGImage.h +++ b/src/TNL/Images/JPEGImage.h @@ -29,7 +29,7 @@ template< typename Index = int > class JPEGImage : public Image< Index > { public: - typedef Index IndexType; + using IndexType = Index; JPEGImage(); diff --git a/src/TNL/Images/JPEGImage_impl.h b/src/TNL/Images/JPEGImage_impl.h index 8b0e9e63a35e314b16174e774cf2bf92bdc4f9d5..5e642df1b8cdb2960171ba1396515f15cd09a4b8 100644 --- a/src/TNL/Images/JPEGImage_impl.h +++ b/src/TNL/Images/JPEGImage_impl.h @@ -92,7 +92,7 @@ JPEGImage< Index >::read( const RegionOfInterest< Index > roi, Functions::MeshFunction< Meshes::Grid< 2, MeshReal, Device, Index >, 2, Real >& function ) { #ifdef HAVE_JPEG_H - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; const GridType& grid = function.getMesh(); typename GridType::Cell cell( grid ); @@ -201,7 +201,7 @@ template< typename Real, typename Device, typename Vector > bool JPEGImage< Index >::write( const Meshes::Grid< 2, Real, Device, Index >& grid, Vector& vector ) { - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; typename GridType::Cell cell( grid ); #ifdef HAVE_JPEG_H @@ -236,7 +236,7 @@ template< typename MeshReal, typename Device, typename Real > bool JPEGImage< Index >::write( const Functions::MeshFunction< Meshes::Grid< 2, MeshReal, Device, Index >, 2, Real >& function ) { - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; const GridType& grid = function.getMesh(); typename GridType::Cell cell( grid ); diff --git a/src/TNL/Images/PGMImage.h b/src/TNL/Images/PGMImage.h index b86ead296676c67187a16ddd4e6bd371829f60e8..8fc3d7c3d5fae695e353283e43c5f18f9b175002 100644 --- a/src/TNL/Images/PGMImage.h +++ b/src/TNL/Images/PGMImage.h @@ -20,7 +20,7 @@ template< typename Index = int > class PGMImage : public Image< Index > { public: - typedef Index IndexType; + using IndexType = Index; PGMImage(); diff --git a/src/TNL/Images/PGMImage_impl.h b/src/TNL/Images/PGMImage_impl.h index 24fd483b4222f2c0bb221a34258f8ad99aa9de7d..d14575925d6b9a9251f7bf1a1943c332e43090c0 100644 --- a/src/TNL/Images/PGMImage_impl.h +++ b/src/TNL/Images/PGMImage_impl.h @@ -73,7 +73,7 @@ bool PGMImage< Index >::read( const RegionOfInterest< Index > roi, Functions::MeshFunction< Meshes::Grid< 2, MeshReal, Device, Index >, 2, Real >& function ) { - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; const GridType& grid = function.getMesh(); typename GridType::Cell cell( grid ); @@ -138,7 +138,7 @@ template< typename Real, typename Device, typename Vector > bool PGMImage< Index >::write( const Meshes::Grid< 2, Real, Device, Index >& grid, Vector& vector ) { - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; typename GridType::Cell cell( grid ); Index i, j; @@ -171,7 +171,7 @@ template< typename MeshReal, typename Device, typename Real > bool PGMImage< Index >::write( const Functions::MeshFunction< Meshes::Grid< 2, MeshReal, Device, Index >, 2, Real >& function ) { - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; const GridType& grid = function.getMesh(); typename GridType::Cell cell( grid ); diff --git a/src/TNL/Images/PNGImage_impl.h b/src/TNL/Images/PNGImage_impl.h index 69acf21d9eb52cd6c241f9ad346923ed21b957e5..8e812a1c26727a01ba4878fbe8bb76a1652dbf40 100644 --- a/src/TNL/Images/PNGImage_impl.h +++ b/src/TNL/Images/PNGImage_impl.h @@ -101,7 +101,7 @@ PNGImage< Index >::read( const RegionOfInterest< Index > roi, Functions::MeshFunction< Meshes::Grid< 2, MeshReal, Device, Index >, 2, Real >& function ) { #ifdef HAVE_PNG_H - typedef Meshes::Grid< 2, MeshReal, Device, Index > GridType; + using GridType = Meshes::Grid< 2, MeshReal, Device, Index >; const GridType& grid = function.getMesh(); typename GridType::Cell cell( grid ); @@ -249,7 +249,7 @@ bool PNGImage< Index >::write( const Meshes::Grid< 2, Real, Device, Index >& grid, Vector& vector ) { #ifdef HAVE_PNG_H - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; typename GridType::Cell cell( grid ); /*** @@ -287,7 +287,7 @@ bool PNGImage< Index >::write( const Functions::MeshFunction< Meshes::Grid< 2, MeshReal, Device, Index >, 2, Real >& function ) { #ifdef HAVE_PNG_H - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; const GridType& grid = function.getMesh(); typename GridType::Cell cell( grid ); diff --git a/src/TNL/Matrices/MatrixReader.h b/src/TNL/Matrices/MatrixReader.h index 18aa7408b3fab83d3ef0098c0b0e6d182cac2000..91a4f525e4860e16d4cef6f3538651525dc795c2 100644 --- a/src/TNL/Matrices/MatrixReader.h +++ b/src/TNL/Matrices/MatrixReader.h @@ -80,17 +80,17 @@ public: /** * \brief Type of matrix elements values. */ - typedef typename Matrix::RealType RealType; + using RealType = typename Matrix::RealType; /** * \brief Device where the matrix is allocated. */ - typedef typename Matrix::DeviceType DeviceType; + using DeviceType = typename Matrix::DeviceType; /** * \brief Type used for indexing of matrix elements. */ - typedef typename Matrix::IndexType IndexType; + using IndexType = typename Matrix::IndexType; /** * \brief Method for importing matrix from file with given filename. diff --git a/src/TNL/Matrices/MatrixSetter.h b/src/TNL/Matrices/MatrixSetter.h index 51cb1251caaf2632d197b12abfd5af4309ac7507..d21ffe220a7152033b3f5d0e2a1c66f6b11f0285 100644 --- a/src/TNL/Matrices/MatrixSetter.h +++ b/src/TNL/Matrices/MatrixSetter.h @@ -15,7 +15,7 @@ template< typename DifferentialOperator, typename BoundaryConditions, typename R class MatrixSetterTraverserUserData { public: - typedef typename RowsCapacitiesType::DeviceType DeviceType; + using DeviceType = typename RowsCapacitiesType::DeviceType; const DifferentialOperator* differentialOperator; @@ -34,14 +34,14 @@ template< typename Mesh, typename DifferentialOperator, typename BoundaryConditi class MatrixSetter { public: - typedef Mesh MeshType; - typedef Pointers::SharedPointer< MeshType > MeshPointer; - typedef typename MeshType::DeviceType DeviceType; - typedef typename RowsCapacitiesType::RealType IndexType; - typedef MatrixSetterTraverserUserData< DifferentialOperator, BoundaryConditions, RowsCapacitiesType > TraverserUserData; - typedef Pointers::SharedPointer< DifferentialOperator, DeviceType > DifferentialOperatorPointer; - typedef Pointers::SharedPointer< BoundaryConditions, DeviceType > BoundaryConditionsPointer; - typedef Pointers::SharedPointer< RowsCapacitiesType, DeviceType > RowsCapacitiesTypePointer; + using MeshType = Mesh; + using MeshPointer = Pointers::SharedPointer< MeshType >; + using DeviceType = typename MeshType::DeviceType; + using IndexType = typename RowsCapacitiesType::RealType; + using TraverserUserData = MatrixSetterTraverserUserData< DifferentialOperator, BoundaryConditions, RowsCapacitiesType >; + using DifferentialOperatorPointer = Pointers::SharedPointer< DifferentialOperator, DeviceType >; + using BoundaryConditionsPointer = Pointers::SharedPointer< BoundaryConditions, DeviceType >; + using RowsCapacitiesTypePointer = Pointers::SharedPointer< RowsCapacitiesType, DeviceType >; template< typename EntityType > void diff --git a/src/TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h b/src/TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h index 7ade51c3b33a56e88ba320daa9c6f0e4543b9be9..15c168d4e2f2f20371ce33762afa1fc8fd24eda1 100644 --- a/src/TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h +++ b/src/TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h @@ -19,9 +19,9 @@ template< typename MeshFunctionType > class CopyEntitiesHelper< MeshFunctionType, 1 > { public: - typedef typename MeshFunctionType::MeshType::CoordinatesType CoordinatesType; - typedef typename MeshFunctionType::MeshType::Cell Cell; - typedef typename MeshFunctionType::MeshType::GlobalIndexType Index; + using CoordinatesType = typename MeshFunctionType::MeshType::CoordinatesType; + using Cell = typename MeshFunctionType::MeshType::Cell; + using Index = typename MeshFunctionType::MeshType::GlobalIndexType; template< typename FromFunction > static void @@ -50,9 +50,9 @@ template< typename MeshFunctionType > class CopyEntitiesHelper< MeshFunctionType, 2 > { public: - typedef typename MeshFunctionType::MeshType::CoordinatesType CoordinatesType; - typedef typename MeshFunctionType::MeshType::Cell Cell; - typedef typename MeshFunctionType::MeshType::GlobalIndexType Index; + using CoordinatesType = typename MeshFunctionType::MeshType::CoordinatesType; + using Cell = typename MeshFunctionType::MeshType::Cell; + using Index = typename MeshFunctionType::MeshType::GlobalIndexType; template< typename FromFunction > static void @@ -83,9 +83,9 @@ template< typename MeshFunctionType > class CopyEntitiesHelper< MeshFunctionType, 3 > { public: - typedef typename MeshFunctionType::MeshType::CoordinatesType CoordinatesType; - typedef typename MeshFunctionType::MeshType::Cell Cell; - typedef typename MeshFunctionType::MeshType::GlobalIndexType Index; + using CoordinatesType = typename MeshFunctionType::MeshType::CoordinatesType; + using Cell = typename MeshFunctionType::MeshType::Cell; + using Index = typename MeshFunctionType::MeshType::GlobalIndexType; template< typename FromFunction > static void diff --git a/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h b/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h index 7d5e527345623951a00da62c8a0c76e48f34b496..48c75b882f676ce861b436401e60d2c366272ef6 100644 --- a/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h +++ b/src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h @@ -23,9 +23,9 @@ template< int MeshDimension, typename Index, typename Device, typename GridReal class DistributedMeshSynchronizer< DistributedMesh< Grid< MeshDimension, GridReal, Device, Index > >, MeshDimension > { public: - typedef typename Grid< MeshDimension, GridReal, Device, Index >::Cell Cell; - typedef DistributedMesh< Grid< MeshDimension, GridReal, Device, Index > > DistributedGridType; - typedef typename DistributedGridType::CoordinatesType CoordinatesType; + using Cell = typename Grid< MeshDimension, GridReal, Device, Index >::Cell; + using DistributedGridType = DistributedMesh< Grid< MeshDimension, GridReal, Device, Index > >; + using CoordinatesType = typename DistributedGridType::CoordinatesType; using SubdomainOverlapsType = typename DistributedGridType::SubdomainOverlapsType; static constexpr int diff --git a/src/TNL/Meshes/DummyMesh.h b/src/TNL/Meshes/DummyMesh.h index db35318f9238b31d08129583e5b4648f9cec3186..4e87567776f22fd5caf80eab72089de3fbc271bf 100644 --- a/src/TNL/Meshes/DummyMesh.h +++ b/src/TNL/Meshes/DummyMesh.h @@ -15,9 +15,9 @@ template< typename Real = double, typename Device = Devices::Host, typename Inde class DummyMesh { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; constexpr static int getMeshDimension() diff --git a/src/TNL/Meshes/GridDetails/BoundaryGridEntityChecker.h b/src/TNL/Meshes/GridDetails/BoundaryGridEntityChecker.h index 706c301f691584618c4979fb1227bce001a0e749..6a4d798b23cf985e5249d9fde1ed3fa6d707b8bb 100644 --- a/src/TNL/Meshes/GridDetails/BoundaryGridEntityChecker.h +++ b/src/TNL/Meshes/GridDetails/BoundaryGridEntityChecker.h @@ -20,8 +20,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 1, Real, Device, Index >, 1, Config > > { public: - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, 1, Config > GridEntityType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 1, Config >; __cuda_callable__ inline static bool @@ -35,8 +35,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 1, Real, Device, Index >, 0, Config > > { public: - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, 0, Config > GridEntityType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 0, Config >; __cuda_callable__ inline static bool @@ -53,8 +53,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 2, Real, Device, Index >, 2, Config > > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, 2, Config > GridEntityType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 2, Config >; __cuda_callable__ inline static bool @@ -70,8 +70,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 2, Real, Device, Index >, 1, Config > > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, 1, Config > GridEntityType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 1, Config >; __cuda_callable__ inline static bool @@ -90,8 +90,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 2, Real, Device, Index >, 0, Config > > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, 0, Config > GridEntityType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 0, Config >; __cuda_callable__ inline static bool @@ -110,8 +110,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 3, Real, Device, Index >, 3, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, 3, Config > GridEntityType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 3, Config >; __cuda_callable__ inline static bool @@ -128,8 +128,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 3, Real, Device, Index >, 2, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, 2, Config > GridEntityType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 2, Config >; __cuda_callable__ inline static bool @@ -150,8 +150,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 3, Real, Device, Index >, 1, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, 1, Config > GridEntityType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 1, Config >; __cuda_callable__ inline static bool @@ -176,8 +176,8 @@ template< typename Real, typename Device, typename Index, typename Config > class BoundaryGridEntityChecker< GridEntity< Meshes::Grid< 3, Real, Device, Index >, 0, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, 0, Config > GridEntityType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 0, Config >; __cuda_callable__ inline static bool diff --git a/src/TNL/Meshes/GridDetails/Grid1D.h b/src/TNL/Meshes/GridDetails/Grid1D.h index 69d538af1ef0b4db8d90b5a6c91b917753e0b340..9864b44002fde1d32fd19e333ee8e62d79e66628 100644 --- a/src/TNL/Meshes/GridDetails/Grid1D.h +++ b/src/TNL/Meshes/GridDetails/Grid1D.h @@ -28,7 +28,7 @@ public: using CoordinatesType = Containers::StaticVector< 1, Index >; // TODO: deprecated and to be removed (GlobalIndexType shall be used instead) - typedef Index IndexType; + using IndexType = Index; /** * \brief Returns number of this mesh grid dimensions. @@ -42,9 +42,9 @@ public: template< int EntityDimension, typename Config = GridEntityCrossStencilStorage< 1 > > using EntityType = GridEntity< Grid, EntityDimension, Config >; - typedef EntityType< getMeshDimension(), GridEntityCrossStencilStorage< 1 > > Cell; - typedef EntityType< 0 > Face; - typedef EntityType< 0 > Vertex; + using Cell = EntityType< getMeshDimension(), GridEntityCrossStencilStorage< 1 > >; + using Face = EntityType< 0 >; + using Vertex = EntityType< 0 >; /** * \brief Basic constructor. diff --git a/src/TNL/Meshes/GridDetails/Grid2D.h b/src/TNL/Meshes/GridDetails/Grid2D.h index fd24e99899af885c9ad4ad8d81832f22ab671539..48ea6231bf4cf3e8c21b379f73aa2ad3d19dac74 100644 --- a/src/TNL/Meshes/GridDetails/Grid2D.h +++ b/src/TNL/Meshes/GridDetails/Grid2D.h @@ -21,14 +21,14 @@ template< typename Real, typename Device, typename Index > class Grid< 2, Real, Device, Index > { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index GlobalIndexType; - typedef Containers::StaticVector< 2, Real > PointType; - typedef Containers::StaticVector< 2, Index > CoordinatesType; + using RealType = Real; + using DeviceType = Device; + using GlobalIndexType = Index; + using PointType = Containers::StaticVector< 2, Real >; + using CoordinatesType = Containers::StaticVector< 2, Index >; // TODO: deprecated and to be removed (GlobalIndexType shall be used instead) - typedef Index IndexType; + using IndexType = Index; static constexpr int getMeshDimension() @@ -39,9 +39,9 @@ public: template< int EntityDimension, typename Config = GridEntityCrossStencilStorage< 1 > > using EntityType = GridEntity< Grid, EntityDimension, Config >; - typedef EntityType< getMeshDimension(), GridEntityCrossStencilStorage< 1 > > Cell; - typedef EntityType< getMeshDimension() - 1 > Face; - typedef EntityType< 0 > Vertex; + using Cell = EntityType< getMeshDimension(), GridEntityCrossStencilStorage< 1 > >; + using Face = EntityType< getMeshDimension() - 1 >; + using Vertex = EntityType< 0 >; /** * \brief See Grid1D::Grid(). diff --git a/src/TNL/Meshes/GridDetails/Grid3D.h b/src/TNL/Meshes/GridDetails/Grid3D.h index d65b04f6fd643739e6a26326e77a716f470bfc94..6224f959f36f953c8eed5cf30bd61e0c374a31ab 100644 --- a/src/TNL/Meshes/GridDetails/Grid3D.h +++ b/src/TNL/Meshes/GridDetails/Grid3D.h @@ -21,14 +21,14 @@ template< typename Real, typename Device, typename Index > class Grid< 3, Real, Device, Index > { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index GlobalIndexType; - typedef Containers::StaticVector< 3, Real > PointType; - typedef Containers::StaticVector< 3, Index > CoordinatesType; + using RealType = Real; + using DeviceType = Device; + using GlobalIndexType = Index; + using PointType = Containers::StaticVector< 3, Real >; + using CoordinatesType = Containers::StaticVector< 3, Index >; // TODO: deprecated and to be removed (GlobalIndexType shall be used instead) - typedef Index IndexType; + using IndexType = Index; static constexpr int getMeshDimension() @@ -39,10 +39,10 @@ public: template< int EntityDimension, typename Config = GridEntityCrossStencilStorage< 1 > > using EntityType = GridEntity< Grid, EntityDimension, Config >; - typedef EntityType< getMeshDimension(), GridEntityCrossStencilStorage< 1 > > Cell; - typedef EntityType< getMeshDimension() - 1 > Face; - typedef EntityType< 1 > Edge; - typedef EntityType< 0 > Vertex; + using Cell = EntityType< getMeshDimension(), GridEntityCrossStencilStorage< 1 > >; + using Face = EntityType< getMeshDimension() - 1 >; + using Edge = EntityType< 1 >; + using Vertex = EntityType< 0 >; /** * \brief See Grid1D::Grid(). diff --git a/src/TNL/Meshes/GridDetails/GridEntityCenterGetter.h b/src/TNL/Meshes/GridDetails/GridEntityCenterGetter.h index 11b23f12536efea20d176fe95dfab9ff02daff3d..af30ce8f97d8cca270232d34acb5f1be43405393 100644 --- a/src/TNL/Meshes/GridDetails/GridEntityCenterGetter.h +++ b/src/TNL/Meshes/GridDetails/GridEntityCenterGetter.h @@ -20,9 +20,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index >, 1, Config > > { public: - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, 1, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 1, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -37,9 +37,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index >, 0, Config > > { public: - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, 0, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 0, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -57,9 +57,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index >, 2, Config > > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, 2, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 2, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -75,9 +75,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index >, 1, Config > > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, 1, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 1, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -94,9 +94,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index >, 0, Config > > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, 0, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 0, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -115,9 +115,9 @@ template< typename Real, typename Device, typename Index, int EntityDimension, t class GridEntityCenterGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index >, EntityDimension, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -135,9 +135,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index >, 3, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, 3, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 3, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType @@ -154,9 +154,9 @@ template< typename Real, typename Device, typename Index, typename Config > class GridEntityCenterGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index >, 0, Config > > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, 0, Config > GridEntityType; - typedef typename GridType::PointType PointType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, 0, Config >; + using PointType = typename GridType::PointType; __cuda_callable__ inline static PointType diff --git a/src/TNL/Meshes/GridDetails/GridEntityGetter_impl.h b/src/TNL/Meshes/GridDetails/GridEntityGetter_impl.h index d0cf77fa4d01a88d5a6184b565a7aa6e36d56ea0..15da79e9e08085b072b26836d8ddbf80e4a63b96 100644 --- a/src/TNL/Meshes/GridDetails/GridEntityGetter_impl.h +++ b/src/TNL/Meshes/GridDetails/GridEntityGetter_impl.h @@ -23,9 +23,9 @@ class GridEntityGetter< Meshes::Grid< 1, Real, Device, Index >, GridEntity, Enti public: static constexpr int entityDimension = EntityDimension; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ @@ -60,9 +60,9 @@ class GridEntityGetter< Meshes::Grid< 2, Real, Device, Index >, GridEntity, 2 > public: static constexpr int entityDimension = 2; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ @@ -100,9 +100,9 @@ class GridEntityGetter< Meshes::Grid< 2, Real, Device, Index >, GridEntity, 1 > public: static constexpr int entityDimension = 1; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension, EntityConfig > GridEntity; __cuda_callable__ @@ -151,9 +151,9 @@ class GridEntityGetter< Meshes::Grid< 2, Real, Device, Index >, GridEntity, 0 > public: static constexpr int entityDimension = 0; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ @@ -195,9 +195,9 @@ class GridEntityGetter< Meshes::Grid< 3, Real, Device, Index >, GridEntity, 3 > public: static constexpr int entityDimension = 3; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ @@ -237,9 +237,9 @@ class GridEntityGetter< Meshes::Grid< 3, Real, Device, Index >, GridEntity, 2 > public: static constexpr int entityDimension = 2; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ @@ -303,9 +303,9 @@ class GridEntityGetter< Meshes::Grid< 3, Real, Device, Index >, GridEntity, 1 > public: static constexpr int entityDimension = 1; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ @@ -369,9 +369,9 @@ class GridEntityGetter< Meshes::Grid< 3, Real, Device, Index >, GridEntity, 0 > public: static constexpr int entityDimension = 0; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; // typedef typename GridType::template GridEntity< entityDimension > GridEntity; __cuda_callable__ diff --git a/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h b/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h index 0a3ba1eebe848bcfcbc526ce18e8a4b50e50737f..f4e3f1f4091cd50df1bfc689e93afdbb8e917f45 100644 --- a/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h +++ b/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h @@ -20,7 +20,7 @@ template< int Dimension, typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< Dimension, Real, Device, Index >, 0 > { public: - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; template< typename EntityType > __cuda_callable__ @@ -39,7 +39,7 @@ template< typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< 1, Real, Device, Index >, 1 > { public: - typedef Meshes::Grid< 1, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; template< typename EntityType > __cuda_callable__ @@ -57,7 +57,7 @@ template< typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< 2, Real, Device, Index >, 2 > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; template< typename EntityType > __cuda_callable__ @@ -72,7 +72,7 @@ template< typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< 2, Real, Device, Index >, 1 > { public: - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; template< typename EntityType > __cuda_callable__ @@ -93,7 +93,7 @@ template< typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< 3, Real, Device, Index >, 3 > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; template< typename EntityType > __cuda_callable__ @@ -108,7 +108,7 @@ template< typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< 3, Real, Device, Index >, 2 > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; template< typename EntityType > __cuda_callable__ @@ -128,7 +128,7 @@ template< typename Real, typename Device, typename Index > class GridEntityMeasureGetter< Meshes::Grid< 3, Real, Device, Index >, 1 > { public: - typedef Meshes::Grid< 3, Real, Device, Index > GridType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; template< typename EntityType > __cuda_callable__ diff --git a/src/TNL/Meshes/GridDetails/GridEntityTopology.h b/src/TNL/Meshes/GridDetails/GridEntityTopology.h index 43ecf6100291dacaa65dc88033e17fe29e936252..3f4d0baaec08e9df184dbcd0502a18f69e8cd3d1 100644 --- a/src/TNL/Meshes/GridDetails/GridEntityTopology.h +++ b/src/TNL/Meshes/GridDetails/GridEntityTopology.h @@ -13,15 +13,15 @@ template< typename Grid, int EntityDimension, typename EntityOrientation_, typen class GridEntityTopology { public: - typedef Grid GridType; + using GridType = Grid; static constexpr int meshDimension = GridType::getMeshDimension(); static constexpr int entityDimension = EntityDimension; - typedef EntityOrientation_ EntityOrientation; + using EntityOrientation = EntityOrientation_; - typedef EntityProportions_ EntityProportions; + using EntityProportions = EntityProportions_; // TODO: restore when CUDA allows it // static_assert( meshDimension == EntityOrientation_::size, diff --git a/src/TNL/Meshes/GridDetails/GridEntity_impl.h b/src/TNL/Meshes/GridDetails/GridEntity_impl.h index 1fa5d0ea504c0d05be8d494f8bc3aca23d139552..6fdb0a85f886ecf1bae952a8582576e670d6d805 100644 --- a/src/TNL/Meshes/GridDetails/GridEntity_impl.h +++ b/src/TNL/Meshes/GridDetails/GridEntity_impl.h @@ -82,8 +82,8 @@ __cuda_callable__ inline Index GridEntity< Meshes::Grid< Dimension, Real, Device, Index >, EntityDimension, Config >::getIndex() const { - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; - typedef typename GridType::template EntityType< EntityDimension > EntityType; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; + using EntityType = typename GridType::template EntityType< EntityDimension >; TNL_ASSERT_GE( this->entityIndex, 0, "Entity index is not non-negative." ); TNL_ASSERT_LT( this->entityIndex, grid.template getEntitiesCount< EntityDimension >(), "Entity index is out of bounds." ); TNL_ASSERT_EQ( this->entityIndex, grid.getEntityIndex( *this ), "Wrong value of stored index." ); @@ -367,8 +367,8 @@ __cuda_callable__ inline Index GridEntity< Meshes::Grid< Dimension, Real, Device, Index >, 0, Config >::getIndex() const { - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; - typedef typename GridType::Vertex Vertex; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; + using Vertex = typename GridType::Vertex; TNL_ASSERT_GE( this->entityIndex, 0, "Entity index is not non-negative." ); TNL_ASSERT_LT( this->entityIndex, grid.template getEntitiesCount< 0 >(), "Entity index is out of bounds." ); TNL_ASSERT_EQ( this->entityIndex, grid.getEntityIndex( *this ), "Wrong value of stored index." ); diff --git a/src/TNL/Meshes/GridDetails/GridTraverser.h b/src/TNL/Meshes/GridDetails/GridTraverser.h index 17f776adab5ad5dceda8e1577a4e49f604e1dbe8..25f629879735293c2eeacdb30eb0ddf1db65790f 100644 --- a/src/TNL/Meshes/GridDetails/GridTraverser.h +++ b/src/TNL/Meshes/GridDetails/GridTraverser.h @@ -32,12 +32,12 @@ template< typename Real, typename Index > class GridTraverser< Meshes::Grid< 1, Real, Devices::Host, Index > > { public: - typedef Meshes::Grid< 1, Real, Devices::Host, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Host DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 1, Real, Devices::Host, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Host; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData, bool processOnlyBoundaryEntities > static void @@ -56,12 +56,12 @@ template< typename Real, typename Index > class GridTraverser< Meshes::Grid< 1, Real, Devices::Cuda, Index > > { public: - typedef Meshes::Grid< 1, Real, Devices::Cuda, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Cuda DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 1, Real, Devices::Cuda, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Cuda; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, typename UserData, bool processOnlyBoundaryEntities > static void @@ -80,12 +80,12 @@ template< typename Real, typename Index > class GridTraverser< Meshes::Grid< 2, Real, Devices::Host, Index > > { public: - typedef Meshes::Grid< 2, Real, Devices::Host, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Host DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, Real, Devices::Host, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Host; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, @@ -116,12 +116,12 @@ template< typename Real, typename Index > class GridTraverser< Meshes::Grid< 2, Real, Devices::Cuda, Index > > { public: - typedef Meshes::Grid< 2, Real, Devices::Cuda, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Cuda DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, Real, Devices::Cuda, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Cuda; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, @@ -152,12 +152,12 @@ template< typename Real, typename Index > class GridTraverser< Meshes::Grid< 3, Real, Devices::Host, Index > > { public: - typedef Meshes::Grid< 3, Real, Devices::Host, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Host DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, Real, Devices::Host, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Host; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, @@ -189,12 +189,12 @@ template< typename Real, typename Index > class GridTraverser< Meshes::Grid< 3, Real, Devices::Cuda, Index > > { public: - typedef Meshes::Grid< 3, Real, Devices::Cuda, Index > GridType; - typedef Pointers::SharedPointer< GridType > GridPointer; - typedef Real RealType; - typedef Devices::Cuda DeviceType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, Real, Devices::Cuda, Index >; + using GridPointer = Pointers::SharedPointer< GridType >; + using RealType = Real; + using DeviceType = Devices::Cuda; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; template< typename GridEntity, typename EntitiesProcessor, diff --git a/src/TNL/Meshes/GridDetails/NeighborGridEntitiesStorage.h b/src/TNL/Meshes/GridDetails/NeighborGridEntitiesStorage.h index 8bf0841de2882b00c79d5d4b07c03ec051127f05..ffd68c334580793e3972f70d3593dda28364c337 100644 --- a/src/TNL/Meshes/GridDetails/NeighborGridEntitiesStorage.h +++ b/src/TNL/Meshes/GridDetails/NeighborGridEntitiesStorage.h @@ -21,8 +21,8 @@ template< typename GridEntity, class NeighborGridEntityLayer : public NeighborGridEntityLayer< GridEntity, NeighborEntityDimension - 1, GridEntityConfig > { public: - typedef NeighborGridEntityLayer< GridEntity, NeighborEntityDimension - 1, GridEntityConfig > BaseType; - typedef NeighborGridEntityGetter< GridEntity, NeighborEntityDimension > NeighborEntityGetterType; + using BaseType = NeighborGridEntityLayer< GridEntity, NeighborEntityDimension - 1, GridEntityConfig >; + using NeighborEntityGetterType = NeighborGridEntityGetter< GridEntity, NeighborEntityDimension >; using BaseType::getNeighborEntities; @@ -52,7 +52,7 @@ template< typename GridEntity, typename GridEntityConfig, bool storage > class NeighborGridEntityLayer< GridEntity, 0, GridEntityConfig, storage > { public: - typedef NeighborGridEntityGetter< GridEntity, 0 > NeighborEntityGetterType; + using NeighborEntityGetterType = NeighborGridEntityGetter< GridEntity, 0 >; __cuda_callable__ NeighborGridEntityLayer( const GridEntity& entity ) : neighborEntities( entity ) {} @@ -79,7 +79,7 @@ template< typename GridEntity, typename GridEntityConfig > class NeighborGridEntitiesStorage : public NeighborGridEntityLayer< GridEntity, GridEntity::getMeshDimension(), GridEntityConfig > { - typedef NeighborGridEntityLayer< GridEntity, GridEntity::getMeshDimension(), GridEntityConfig > BaseType; + using BaseType = NeighborGridEntityLayer< GridEntity, GridEntity::getMeshDimension(), GridEntityConfig >; public: using BaseType::getNeighborEntities; diff --git a/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter1D_impl.h b/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter1D_impl.h index 18de57109a1786186588f1ec048c95b164a84a87..c9db445e6d938d2384f5cf7fc43e827eb5ba9cc3 100644 --- a/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter1D_impl.h +++ b/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter1D_impl.h @@ -30,13 +30,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index public: static constexpr int EntityDimension = 1; static constexpr int NeighborEntityDimension = 1; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -90,13 +90,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index public: static constexpr int EntityDimension = 1; static constexpr int NeighborEntityDimension = 1; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; static constexpr int stencilSize = Config::getStencilSize(); @@ -171,13 +171,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index public: static constexpr int EntityDimension = 1; static constexpr int NeighborEntityDimension = 0; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -235,13 +235,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index public: static constexpr int EntityDimension = 0; static constexpr int NeighborEntityDimension = 1; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -303,13 +303,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index public: static constexpr int EntityDimension = 0; static constexpr int NeighborEntityDimension = 1; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -365,13 +365,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 1, Real, Device, Index public: static constexpr int EntityDimension = 0; static constexpr int NeighborEntityDimension = 0; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 1, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} diff --git a/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter2D_impl.h b/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter2D_impl.h index bd612c4eb9c78feba941260d83af56c94601df09..dde6019d9f68bb08f8b709b33f56c5f4fa90339f 100644 --- a/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter2D_impl.h +++ b/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter2D_impl.h @@ -28,13 +28,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index public: static constexpr int EntityDimension = 2; static constexpr int NeighborEntityDimension = 2; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -97,14 +97,14 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index public: static constexpr int EntityDimension = 2; static constexpr int NeighborEntityDimension = 2; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; - typedef GridEntityStencilStorageTag< GridEntityCrossStencil > StencilStorage; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; + using StencilStorage = GridEntityStencilStorageTag< GridEntityCrossStencil >; static constexpr int stencilSize = Config::getStencilSize(); @@ -194,15 +194,15 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index public: static constexpr int EntityDimension = 2; static constexpr int NeighborEntityDimension = 1; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; - typedef typename GridEntityType::EntityOrientationType EntityOrientationType; - typedef typename GridEntityType::EntityBasisType EntityBasisType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; + using EntityOrientationType = typename GridEntityType::EntityOrientationType; + using EntityBasisType = typename GridEntityType::EntityBasisType; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -260,13 +260,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index public: static constexpr int EntityDimension = 2; static constexpr int NeighborEntityDimension = 0; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -324,13 +324,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index public: static constexpr int EntityDimension = 1; static constexpr int NeighborEntityDimension = 2; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -397,13 +397,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 2, Real, Device, Index public: static constexpr int EntityDimension = 0; static constexpr int NeighborEntityDimension = 0; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 2, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} diff --git a/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter3D_impl.h b/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter3D_impl.h index 5d50bb5e6d7455ddc9bcdc36765487d75f40e701..405184a32096e1b96994a3310a02b47b5784a472 100644 --- a/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter3D_impl.h +++ b/src/TNL/Meshes/GridDetails/NeighborGridEntityGetter3D_impl.h @@ -30,13 +30,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 3; static constexpr int NeighborEntityDimension = 3; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -102,14 +102,14 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 3; static constexpr int NeighborEntityDimension = 3; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; - typedef GridEntityStencilStorageTag< GridEntityCrossStencil > StencilStorage; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; + using StencilStorage = GridEntityStencilStorageTag< GridEntityCrossStencil >; static constexpr int stencilSize = Config::getStencilSize(); @@ -215,15 +215,15 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 3; static constexpr int NeighborEntityDimension = 2; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; - typedef typename GridEntityType::EntityOrientationType EntityOrientationType; - typedef typename GridEntityType::EntityBasisType EntityBasisType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; + using EntityOrientationType = typename GridEntityType::EntityOrientationType; + using EntityBasisType = typename GridEntityType::EntityBasisType; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -290,15 +290,15 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 3; static constexpr int NeighborEntityDimension = 2; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; - typedef typename GridEntityType::EntityOrientationType EntityOrientationType; - typedef typename GridEntityType::EntityBasisType EntityBasisType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; + using EntityOrientationType = typename GridEntityType::EntityOrientationType; + using EntityBasisType = typename GridEntityType::EntityBasisType; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -365,15 +365,15 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 3; static constexpr int NeighborEntityDimension = 1; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; - typedef typename GridEntityType::EntityOrientationType EntityOrientationType; - typedef typename GridEntityType::EntityBasisType EntityBasisType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; + using EntityOrientationType = typename GridEntityType::EntityOrientationType; + using EntityBasisType = typename GridEntityType::EntityBasisType; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -438,13 +438,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 3; static constexpr int NeighborEntityDimension = 0; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -509,13 +509,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 2; static constexpr int NeighborEntityDimension = 3; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} @@ -593,13 +593,13 @@ class NeighborGridEntityGetter< GridEntity< Meshes::Grid< 3, Real, Device, Index public: static constexpr int EntityDimension = 0; static constexpr int NeighborEntityDimension = 0; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; - typedef GridEntity< GridType, EntityDimension, Config > GridEntityType; - typedef GridEntity< GridType, NeighborEntityDimension, Config > NeighborGridEntityType; - typedef Real RealType; - typedef Index IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef GridEntityGetter< GridType, NeighborGridEntityType > GridEntityGetterType; + using GridType = Meshes::Grid< 3, Real, Device, Index >; + using GridEntityType = GridEntity< GridType, EntityDimension, Config >; + using NeighborGridEntityType = GridEntity< GridType, NeighborEntityDimension, Config >; + using RealType = Real; + using IndexType = Index; + using CoordinatesType = typename GridType::CoordinatesType; + using GridEntityGetterType = GridEntityGetter< GridType, NeighborGridEntityType >; __cuda_callable__ inline NeighborGridEntityGetter( const GridEntityType& entity ) : entity( entity ) {} diff --git a/src/TNL/Meshes/GridEntity.h b/src/TNL/Meshes/GridEntity.h index 3ec5323fc801f48d35e137180d92a9043ae6927d..a7c863db5445a2b162445fbf5a0ddd975ece88ae 100644 --- a/src/TNL/Meshes/GridEntity.h +++ b/src/TNL/Meshes/GridEntity.h @@ -29,12 +29,12 @@ template< int Dimension, typename Real, typename Device, typename Index, int Ent class GridEntity< Meshes::Grid< Dimension, Real, Device, Index >, EntityDimension, Config > { public: - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; - typedef GridType MeshType; - typedef typename GridType::RealType RealType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef Config ConfigType; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; + using MeshType = GridType; + using RealType = typename GridType::RealType; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; + using ConfigType = Config; constexpr static int getMeshDimension() @@ -48,11 +48,11 @@ public: return EntityDimension; }; - typedef Containers::StaticVector< getMeshDimension(), IndexType > EntityOrientationType; - typedef Containers::StaticVector< getMeshDimension(), IndexType > EntityBasisType; - typedef typename GridType::PointType PointType; + using EntityOrientationType = Containers::StaticVector< getMeshDimension(), IndexType >; + using EntityBasisType = Containers::StaticVector< getMeshDimension(), IndexType >; + using PointType = typename GridType::PointType; - typedef NeighborGridEntitiesStorage< GridEntity, Config > NeighborGridEntitiesStorageType; + using NeighborGridEntitiesStorageType = NeighborGridEntitiesStorage< GridEntity, Config >; template< int NeighborEntityDimension = getEntityDimension() > using NeighborEntities = @@ -160,13 +160,13 @@ template< int Dimension, typename Real, typename Device, typename Index, typenam class GridEntity< Meshes::Grid< Dimension, Real, Device, Index >, Dimension, Config > { public: - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; - typedef GridType MeshType; - typedef typename GridType::RealType RealType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::PointType PointType; - typedef Config ConfigType; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; + using MeshType = GridType; + using RealType = typename GridType::RealType; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; + using PointType = typename GridType::PointType; + using ConfigType = Config; constexpr static int getMeshDimension() @@ -180,9 +180,9 @@ public: return getMeshDimension(); }; - typedef Containers::StaticVector< getMeshDimension(), IndexType > EntityOrientationType; - typedef Containers::StaticVector< getMeshDimension(), IndexType > EntityBasisType; - typedef NeighborGridEntitiesStorage< GridEntity, Config > NeighborGridEntitiesStorageType; + using EntityOrientationType = Containers::StaticVector< getMeshDimension(), IndexType >; + using EntityBasisType = Containers::StaticVector< getMeshDimension(), IndexType >; + using NeighborGridEntitiesStorageType = NeighborGridEntitiesStorage< GridEntity, Config >; template< int NeighborEntityDimension = getEntityDimension() > using NeighborEntities = @@ -290,13 +290,13 @@ template< int Dimension, typename Real, typename Device, typename Index, typenam class GridEntity< Meshes::Grid< Dimension, Real, Device, Index >, 0, Config > { public: - typedef Meshes::Grid< Dimension, Real, Device, Index > GridType; - typedef GridType MeshType; - typedef typename GridType::RealType RealType; - typedef typename GridType::IndexType IndexType; - typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::PointType PointType; - typedef Config ConfigType; + using GridType = Meshes::Grid< Dimension, Real, Device, Index >; + using MeshType = GridType; + using RealType = typename GridType::RealType; + using IndexType = typename GridType::IndexType; + using CoordinatesType = typename GridType::CoordinatesType; + using PointType = typename GridType::PointType; + using ConfigType = Config; constexpr static int getMeshDimension() @@ -310,9 +310,9 @@ public: return 0; }; - typedef Containers::StaticVector< getMeshDimension(), IndexType > EntityOrientationType; - typedef Containers::StaticVector< getMeshDimension(), IndexType > EntityBasisType; - typedef NeighborGridEntitiesStorage< GridEntity, Config > NeighborGridEntitiesStorageType; + using EntityOrientationType = Containers::StaticVector< getMeshDimension(), IndexType >; + using EntityBasisType = Containers::StaticVector< getMeshDimension(), IndexType >; + using NeighborGridEntitiesStorageType = NeighborGridEntitiesStorage< GridEntity, Config >; template< int NeighborEntityDimension = getEntityDimension() > using NeighborEntities = NeighborGridEntityGetter< GridEntity< Meshes::Grid< Dimension, Real, Device, Index >, 0, Config >, diff --git a/src/TNL/Meshes/Topologies/Edge.h b/src/TNL/Meshes/Topologies/Edge.h index 0fcc645019a54d01822b744515dc945458a8a045..ac3a890aa5c642f9b67860ab5d0d9b4f5a328e45 100644 --- a/src/TNL/Meshes/Topologies/Edge.h +++ b/src/TNL/Meshes/Topologies/Edge.h @@ -27,7 +27,7 @@ struct Edge template<> struct Subtopology< Edge, 0 > { - typedef Vertex Topology; + using Topology = Vertex; static constexpr int count = 2; }; diff --git a/src/TNL/Meshes/Topologies/Hexahedron.h b/src/TNL/Meshes/Topologies/Hexahedron.h index f673bc2471ba174111666b829725729273290eda..0987abbf206b906c1cfb6171b28e45506a3d2da0 100644 --- a/src/TNL/Meshes/Topologies/Hexahedron.h +++ b/src/TNL/Meshes/Topologies/Hexahedron.h @@ -26,7 +26,7 @@ struct Hexahedron template<> struct Subtopology< Hexahedron, 0 > { - typedef Vertex Topology; + using Topology = Vertex; static constexpr int count = 8; }; @@ -34,7 +34,7 @@ struct Subtopology< Hexahedron, 0 > template<> struct Subtopology< Hexahedron, 1 > { - typedef Edge Topology; + using Topology = Edge; static constexpr int count = 12; }; @@ -42,7 +42,7 @@ struct Subtopology< Hexahedron, 1 > template<> struct Subtopology< Hexahedron, 2 > { - typedef Quadrangle Topology; + using Topology = Quadrangle; static constexpr int count = 6; }; diff --git a/src/TNL/Meshes/Topologies/Quadrangle.h b/src/TNL/Meshes/Topologies/Quadrangle.h index 3da30ddba63a48cbe4a5ad767ccbdf6b303bc877..6a5f0222cf2e3c74b87e0707b4943ba7b83a9e95 100644 --- a/src/TNL/Meshes/Topologies/Quadrangle.h +++ b/src/TNL/Meshes/Topologies/Quadrangle.h @@ -26,7 +26,7 @@ struct Quadrangle template<> struct Subtopology< Quadrangle, 0 > { - typedef Vertex Topology; + using Topology = Vertex; static constexpr int count = 4; }; @@ -34,7 +34,7 @@ struct Subtopology< Quadrangle, 0 > template<> struct Subtopology< Quadrangle, 1 > { - typedef Edge Topology; + using Topology = Edge; static constexpr int count = 4; }; diff --git a/src/TNL/Meshes/Topologies/Simplex.h b/src/TNL/Meshes/Topologies/Simplex.h index e42db61244d2cfbe95b9a3fa247d58e048435c4c..4aee3a9f314010b319209d58e8890cfa109e6a48 100644 --- a/src/TNL/Meshes/Topologies/Simplex.h +++ b/src/TNL/Meshes/Topologies/Simplex.h @@ -42,7 +42,7 @@ class Subtopology< Simplex< dimension >, subtopologyDim > static constexpr int subtopologyVertexCount = Subtopology< Simplex< subtopologyDim >, 0 >::count; public: - typedef Simplex< subtopologyDim > Topology; + using Topology = Simplex< subtopologyDim >; static constexpr int count = SimplexDetails::NumCombinations< topologyVertexCount, subtopologyVertexCount >::value; }; @@ -53,7 +53,7 @@ class Subtopology< Simplex< dimension >, 0 > static_assert( 0 < dimension, "invalid dimension" ); public: - typedef Vertex Topology; + using Topology = Vertex; static constexpr int count = dimension + 1; }; diff --git a/src/TNL/Meshes/Topologies/Tetrahedron.h b/src/TNL/Meshes/Topologies/Tetrahedron.h index b36e4f8720d5a5bb5dcc6d2d0e33653ebf6dce74..1bb8ed7122d93def989a5c02908f62277e702a48 100644 --- a/src/TNL/Meshes/Topologies/Tetrahedron.h +++ b/src/TNL/Meshes/Topologies/Tetrahedron.h @@ -26,7 +26,7 @@ struct Tetrahedron template<> struct Subtopology< Tetrahedron, 0 > { - typedef Vertex Topology; + using Topology = Vertex; static constexpr int count = 4; }; @@ -34,7 +34,7 @@ struct Subtopology< Tetrahedron, 0 > template<> struct Subtopology< Tetrahedron, 1 > { - typedef Edge Topology; + using Topology = Edge; static constexpr int count = 6; }; @@ -42,7 +42,7 @@ struct Subtopology< Tetrahedron, 1 > template<> struct Subtopology< Tetrahedron, 2 > { - typedef Triangle Topology; + using Topology = Triangle; static constexpr int count = 4; }; diff --git a/src/TNL/Meshes/Topologies/Triangle.h b/src/TNL/Meshes/Topologies/Triangle.h index 1a481dfcea22bee873e57cfd6873010f8e1e711b..3948d98137b7a89f088bd9dab0a8199c1d441a32 100644 --- a/src/TNL/Meshes/Topologies/Triangle.h +++ b/src/TNL/Meshes/Topologies/Triangle.h @@ -26,7 +26,7 @@ struct Triangle template<> struct Subtopology< Triangle, 0 > { - typedef Vertex Topology; + using Topology = Vertex; static constexpr int count = 3; }; @@ -34,7 +34,7 @@ struct Subtopology< Triangle, 0 > template<> struct Subtopology< Triangle, 1 > { - typedef Edge Topology; + using Topology = Edge; static constexpr int count = 3; }; diff --git a/src/TNL/Operators/Analytic/Heaviside.h b/src/TNL/Operators/Analytic/Heaviside.h index 59ef55864478c5109f549dd3d3ccdb0e423d9908..25f94d300e1cafb637d2ea146bcd1f18ec00a62d 100644 --- a/src/TNL/Operators/Analytic/Heaviside.h +++ b/src/TNL/Operators/Analytic/Heaviside.h @@ -19,8 +19,8 @@ template< int Dimensions, typename Real = double > class Heaviside : public Functions::Domain< Dimensions, Functions::SpaceDomain > { public: - typedef Real RealType; - typedef Containers::StaticVector< Dimensions, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimensions, RealType >; Heaviside() : multiplicator( 1.0 ) {} diff --git a/src/TNL/Operators/Analytic/Identity.h b/src/TNL/Operators/Analytic/Identity.h index f8d1da5e52440faf3e95ecde5dddc4545f1d7f01..f3e188c209f6693ca1ca1b8ad409f9586c274eb7 100644 --- a/src/TNL/Operators/Analytic/Identity.h +++ b/src/TNL/Operators/Analytic/Identity.h @@ -18,8 +18,8 @@ template< int Dimensions, typename Real > class Identity : public Functions::Domain< Dimensions, Functions::SpaceDomain > { public: - typedef Real RealType; - typedef Containers::StaticVector< Dimensions, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimensions, RealType >; bool setup( const Config::ParameterContainer& parameters, const String& prefix = "" ) diff --git a/src/TNL/Operators/Analytic/SmoothHeaviside.h b/src/TNL/Operators/Analytic/SmoothHeaviside.h index d228319dada0ce68e8d24e10f7f1827e8a827ec4..a12185386faa92d5a84d3a0274b505c21afa1177 100644 --- a/src/TNL/Operators/Analytic/SmoothHeaviside.h +++ b/src/TNL/Operators/Analytic/SmoothHeaviside.h @@ -18,8 +18,8 @@ template< int Dimensions, typename Real = double > class SmoothHeaviside : public Functions::Domain< Dimensions, Functions::SpaceDomain > { public: - typedef Real RealType; - typedef Containers::StaticVector< Dimensions, RealType > PointType; + using RealType = Real; + using PointType = Containers::StaticVector< Dimensions, RealType >; SmoothHeaviside() : sharpness( 1.0 ) {} diff --git a/src/TNL/Operators/DirichletBoundaryConditions.h b/src/TNL/Operators/DirichletBoundaryConditions.h index f465883758d0e9a17e273d4f85a37522089ce68c..3d72741da01292357b5cc482d9c795db366e57c3 100644 --- a/src/TNL/Operators/DirichletBoundaryConditions.h +++ b/src/TNL/Operators/DirichletBoundaryConditions.h @@ -23,15 +23,15 @@ class DirichletBoundaryConditions : public Operator< Mesh, Functions::MeshBoundaryDomain, MeshEntitiesDimension, MeshEntitiesDimension, Real, Index > { public: - typedef Mesh MeshType; - typedef Function FunctionType; - typedef Real RealType; - typedef typename MeshType::DeviceType DeviceType; - typedef Index IndexType; - - typedef Pointers::SharedPointer< Mesh > MeshPointer; - typedef Containers::Vector< RealType, DeviceType, IndexType > DofVectorType; - typedef typename MeshType::PointType PointType; + using MeshType = Mesh; + using FunctionType = Function; + using RealType = Real; + using DeviceType = typename MeshType::DeviceType; + using IndexType = Index; + + using MeshPointer = Pointers::SharedPointer< Mesh >; + using DofVectorType = Containers::Vector< RealType, DeviceType, IndexType >; + using PointType = typename MeshType::PointType; static constexpr int getMeshDimension() diff --git a/src/TNL/Operators/FiniteDifferences.h b/src/TNL/Operators/FiniteDifferences.h index 6ba75f47515cc1351bf48294bac64dac6d6d85ee..2b54ca010a1e94ca919e0717c4c8ee69f39df03b 100644 --- a/src/TNL/Operators/FiniteDifferences.h +++ b/src/TNL/Operators/FiniteDifferences.h @@ -19,12 +19,12 @@ template< typename Real, typename Device, typename Index > class FiniteDifferences< Meshes::Grid< 1, Real, Device, Index > > { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - typedef Meshes::Grid< 1, Real, Device, Index > GridType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; + using GridType = Meshes::Grid< 1, Real, Device, Index >; // typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::Cell CellType; + using CellType = typename GridType::Cell; template< typename GridFunction, int XDifferenceOrder, @@ -51,12 +51,12 @@ template< typename Real, typename Device, typename Index > class FiniteDifferences< Meshes::Grid< 2, Real, Device, Index > > { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - typedef Meshes::Grid< 2, Real, Device, Index > GridType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; + using GridType = Meshes::Grid< 2, Real, Device, Index >; // typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::Cell CellType; + using CellType = typename GridType::Cell; template< typename GridFunction, int XDifferenceOrder, @@ -83,12 +83,12 @@ template< typename Real, typename Device, typename Index > class FiniteDifferences< Meshes::Grid< 3, Real, Device, Index > > { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - typedef Meshes::Grid< 3, Real, Device, Index > GridType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; + using GridType = Meshes::Grid< 3, Real, Device, Index >; // typedef typename GridType::CoordinatesType CoordinatesType; - typedef typename GridType::Cell CellType; + using CellType = typename GridType::Cell; template< typename GridFunction, int XDifferenceOrder, diff --git a/src/TNL/Operators/NeumannBoundaryConditions.h b/src/TNL/Operators/NeumannBoundaryConditions.h index 94d5d37470269a4075b8b27e4fee454291a8f8e1..8f5e11f2e19caf60c5fcb52e245dd616a78d3cfe 100644 --- a/src/TNL/Operators/NeumannBoundaryConditions.h +++ b/src/TNL/Operators/NeumannBoundaryConditions.h @@ -25,7 +25,7 @@ template< typename Function > class NeumannBoundaryConditionsBase { public: - typedef Function FunctionType; + using FunctionType = Function; static void configSetup( const Config::ConfigDescription& config, const String& prefix = "" ) @@ -84,16 +84,16 @@ class NeumannBoundaryConditions< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, public Operator< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, Functions::MeshBoundaryDomain, 1, 1, Real, Index > { public: - typedef Meshes::Grid< 1, MeshReal, Device, MeshIndex > MeshType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; + using MeshType = Meshes::Grid< 1, MeshReal, Device, MeshIndex >; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; - typedef Function FunctionType; - typedef Containers::Vector< RealType, DeviceType, IndexType > DofVectorType; - typedef Containers::StaticVector< 1, RealType > PointType; - typedef typename MeshType::CoordinatesType CoordinatesType; - typedef NeumannBoundaryConditionsBase< Function > BaseType; + using FunctionType = Function; + using DofVectorType = Containers::Vector< RealType, DeviceType, IndexType >; + using PointType = Containers::StaticVector< 1, RealType >; + using CoordinatesType = typename MeshType::CoordinatesType; + using BaseType = NeumannBoundaryConditionsBase< Function >; template< typename EntityType, typename MeshFunction > __cuda_callable__ @@ -159,16 +159,16 @@ class NeumannBoundaryConditions< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, { public: - typedef Meshes::Grid< 2, MeshReal, Device, MeshIndex > MeshType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; + using MeshType = Meshes::Grid< 2, MeshReal, Device, MeshIndex >; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; - typedef Function FunctionType; - typedef Containers::Vector< RealType, DeviceType, IndexType > DofVectorType; - typedef Containers::StaticVector< 2, RealType > PointType; - typedef typename MeshType::CoordinatesType CoordinatesType; - typedef NeumannBoundaryConditionsBase< Function > BaseType; + using FunctionType = Function; + using DofVectorType = Containers::Vector< RealType, DeviceType, IndexType >; + using PointType = Containers::StaticVector< 2, RealType >; + using CoordinatesType = typename MeshType::CoordinatesType; + using BaseType = NeumannBoundaryConditionsBase< Function >; template< typename EntityType, typename MeshFunction > __cuda_callable__ @@ -259,16 +259,16 @@ class NeumannBoundaryConditions< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, public Operator< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, Functions::MeshBoundaryDomain, 3, 3, Real, Index > { public: - typedef Meshes::Grid< 3, MeshReal, Device, MeshIndex > MeshType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; + using MeshType = Meshes::Grid< 3, MeshReal, Device, MeshIndex >; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; - typedef Function FunctionType; - typedef Containers::Vector< RealType, DeviceType, IndexType > DofVectorType; - typedef Containers::StaticVector< 3, RealType > PointType; - typedef typename MeshType::CoordinatesType CoordinatesType; - typedef NeumannBoundaryConditionsBase< Function > BaseType; + using FunctionType = Function; + using DofVectorType = Containers::Vector< RealType, DeviceType, IndexType >; + using PointType = Containers::StaticVector< 3, RealType >; + using CoordinatesType = typename MeshType::CoordinatesType; + using BaseType = NeumannBoundaryConditionsBase< Function >; template< typename EntityType, typename MeshFunction > __cuda_callable__ diff --git a/src/TNL/Operators/Operator.h b/src/TNL/Operators/Operator.h index 1e9ca5a674da438739cf247ca7f5d9addd4fe126..9949eccb40839688f88c46c753143f568b970dc3 100644 --- a/src/TNL/Operators/Operator.h +++ b/src/TNL/Operators/Operator.h @@ -20,13 +20,13 @@ template< typename Mesh, class Operator : public Functions::Domain< Mesh::getMeshDimension(), DomainType > { public: - typedef Mesh MeshType; - typedef typename MeshType::RealType MeshRealType; - typedef typename MeshType::DeviceType DeviceType; - typedef typename MeshType::GlobalIndexType MeshIndexType; - typedef Real RealType; - typedef Index IndexType; - typedef void ExactOperatorType; + using MeshType = Mesh; + using MeshRealType = typename MeshType::RealType; + using DeviceType = typename MeshType::DeviceType; + using MeshIndexType = typename MeshType::GlobalIndexType; + using RealType = Real; + using IndexType = Index; + using ExactOperatorType = void; constexpr static int getMeshDimension() diff --git a/src/TNL/Pointers/SmartPointersRegister.h b/src/TNL/Pointers/SmartPointersRegister.h index fc941ee28fbb416f9648e218ca31e6f63954bad6..3dfe5ff9663f77d4396fb3f1754aeb6cc7baefaf 100644 --- a/src/TNL/Pointers/SmartPointersRegister.h +++ b/src/TNL/Pointers/SmartPointersRegister.h @@ -79,7 +79,7 @@ public: } protected: - typedef std::unordered_set< SmartPointer* > SetType; + using SetType = std::unordered_set< SmartPointer* >; std::unordered_map< int, SetType > pointersOnDevices; }; diff --git a/src/TNL/Problems/PDEProblem.h b/src/TNL/Problems/PDEProblem.h index 2f530ae1d01e14a5a74d7f3aa557e895796a415d..1b7bfba7f734c0de17f747130ef7408c7ea7b472 100644 --- a/src/TNL/Problems/PDEProblem.h +++ b/src/TNL/Problems/PDEProblem.h @@ -50,7 +50,7 @@ public: /**** * This means that the time stepper will be set from the command line arguments. */ - typedef void TimeStepper; + using TimeStepper = void; String getPrologHeader() const; diff --git a/src/TNL/Problems/Problem.h b/src/TNL/Problems/Problem.h index 46f24cc60a6f652f461893ee8cc5d51acaab9378..5696bc97a8e562e06a7c7e918353e040fed62ddb 100644 --- a/src/TNL/Problems/Problem.h +++ b/src/TNL/Problems/Problem.h @@ -13,9 +13,9 @@ template< typename Real, typename Device, typename Index > class Problem { public: - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; + using RealType = Real; + using DeviceType = Device; + using IndexType = Index; }; } // namespace Problems diff --git a/src/TNL/Solvers/PDE/ExplicitUpdater.h b/src/TNL/Solvers/PDE/ExplicitUpdater.h index df6c333eb5b0e0d0c05e379c5d15959bd6476c6f..3df67401e3e9401199c517876487d12868dc4381 100644 --- a/src/TNL/Solvers/PDE/ExplicitUpdater.h +++ b/src/TNL/Solvers/PDE/ExplicitUpdater.h @@ -64,18 +64,18 @@ template< typename Mesh, class ExplicitUpdater { public: - typedef Mesh MeshType; - typedef Pointers::SharedPointer< MeshType > MeshPointer; - typedef typename MeshFunction::RealType RealType; - typedef typename MeshFunction::DeviceType DeviceType; - typedef typename MeshFunction::IndexType IndexType; - typedef ExplicitUpdaterTraverserUserData< RealType, MeshFunction, DifferentialOperator, BoundaryConditions, RightHandSide > - TraverserUserData; - typedef Pointers::SharedPointer< DifferentialOperator, DeviceType > DifferentialOperatorPointer; - typedef Pointers::SharedPointer< BoundaryConditions, DeviceType > BoundaryConditionsPointer; - typedef Pointers::SharedPointer< RightHandSide, DeviceType > RightHandSidePointer; - typedef Pointers::SharedPointer< MeshFunction, DeviceType > MeshFunctionPointer; - typedef Pointers::SharedPointer< TraverserUserData, DeviceType > TraverserUserDataPointer; + using MeshType = Mesh; + using MeshPointer = Pointers::SharedPointer< MeshType >; + using RealType = typename MeshFunction::RealType; + using DeviceType = typename MeshFunction::DeviceType; + using IndexType = typename MeshFunction::IndexType; + using TraverserUserData = + ExplicitUpdaterTraverserUserData< RealType, MeshFunction, DifferentialOperator, BoundaryConditions, RightHandSide >; + using DifferentialOperatorPointer = Pointers::SharedPointer< DifferentialOperator, DeviceType >; + using BoundaryConditionsPointer = Pointers::SharedPointer< BoundaryConditions, DeviceType >; + using RightHandSidePointer = Pointers::SharedPointer< RightHandSide, DeviceType >; + using MeshFunctionPointer = Pointers::SharedPointer< MeshFunction, DeviceType >; + using TraverserUserDataPointer = Pointers::SharedPointer< TraverserUserData, DeviceType >; void setDifferentialOperator( const DifferentialOperatorPointer& differentialOperatorPointer ) @@ -166,14 +166,14 @@ public: class TraverserInteriorEntitiesProcessor { public: - typedef typename MeshType::PointType PointType; + using PointType = typename MeshType::PointType; template< typename EntityType > __cuda_callable__ static inline void processEntity( const MeshType& mesh, TraverserUserData& userData, const EntityType& entity ) { - typedef Functions::FunctionAdapter< MeshType, RightHandSide > FunctionAdapter; + using FunctionAdapter = Functions::FunctionAdapter< MeshType, RightHandSide >; ( *userData.fu )( entity ) = ( *userData.differentialOperator )( *userData.u, entity, userData.time ) + FunctionAdapter::getValue( *userData.rightHandSide, entity, userData.time ); } diff --git a/src/TNL/Solvers/PDE/LinearSystemAssembler.h b/src/TNL/Solvers/PDE/LinearSystemAssembler.h index fe6ef22034889be368771fb2506204d7632bebdb..cd09d13b83d5afa373741facad5ad63894669d09 100644 --- a/src/TNL/Solvers/PDE/LinearSystemAssembler.h +++ b/src/TNL/Solvers/PDE/LinearSystemAssembler.h @@ -56,11 +56,11 @@ template< typename Mesh, class LinearSystemAssembler { public: - typedef typename MeshFunction::MeshType MeshType; - typedef typename MeshFunction::MeshPointer MeshPointer; - typedef typename MeshFunction::RealType RealType; - typedef typename MeshFunction::DeviceType DeviceType; - typedef typename MeshFunction::IndexType IndexType; + using MeshType = typename MeshFunction::MeshType; + using MeshPointer = typename MeshFunction::MeshPointer; + using RealType = typename MeshFunction::RealType; + using DeviceType = typename MeshFunction::DeviceType; + using IndexType = typename MeshFunction::IndexType; template< typename MatrixView > using TraverserUserData = LinearSystemAssemblerTraverserUserData< RealType, @@ -72,11 +72,11 @@ public: MatrixView >; // typedef Pointers::SharedPointer< Matrix, DeviceType > MatrixPointer; - typedef Pointers::SharedPointer< DifferentialOperator, DeviceType > DifferentialOperatorPointer; - typedef Pointers::SharedPointer< BoundaryConditions, DeviceType > BoundaryConditionsPointer; - typedef Pointers::SharedPointer< RightHandSide, DeviceType > RightHandSidePointer; - typedef Pointers::SharedPointer< MeshFunction, DeviceType > MeshFunctionPointer; - typedef Pointers::SharedPointer< DofVector, DeviceType > DofVectorPointer; + using DifferentialOperatorPointer = Pointers::SharedPointer< DifferentialOperator, DeviceType >; + using BoundaryConditionsPointer = Pointers::SharedPointer< BoundaryConditions, DeviceType >; + using RightHandSidePointer = Pointers::SharedPointer< RightHandSide, DeviceType >; + using MeshFunctionPointer = Pointers::SharedPointer< MeshFunction, DeviceType >; + using DofVectorPointer = Pointers::SharedPointer< DofVector, DeviceType >; void setDifferentialOperator( const DifferentialOperatorPointer& differentialOperatorPointer ) @@ -157,8 +157,8 @@ public: userData.differentialOperator->setMatrixElements( *userData.u, entity, userData.time + userData.tau, userData.tau, userData.matrix, *userData.b ); - typedef Functions::FunctionAdapter< MeshType, RightHandSide > RhsFunctionAdapter; - typedef Functions::FunctionAdapter< MeshType, MeshFunction > MeshFunctionAdapter; + using RhsFunctionAdapter = Functions::FunctionAdapter< MeshType, RightHandSide >; + using MeshFunctionAdapter = Functions::FunctionAdapter< MeshType, MeshFunction >; const RealType& rhs = RhsFunctionAdapter::getValue( *userData.rightHandSide, entity, userData.time ); TimeDiscretisation::applyTimeDiscretisation( userData.matrix, ( *userData.b )[ entity.getIndex() ], diff --git a/src/TNL/Solvers/PDE/SemiImplicitTimeStepper.h b/src/TNL/Solvers/PDE/SemiImplicitTimeStepper.h index 98d60d4823e11140956de430a3856f2fd8af3cd0..99d3d9de7f3fda595341a6f1ee813ce6bd6374be 100644 --- a/src/TNL/Solvers/PDE/SemiImplicitTimeStepper.h +++ b/src/TNL/Solvers/PDE/SemiImplicitTimeStepper.h @@ -22,14 +22,14 @@ template< typename Problem > class SemiImplicitTimeStepper { public: - typedef Problem ProblemType; - typedef typename Problem::RealType RealType; - typedef typename Problem::DeviceType DeviceType; - typedef typename Problem::IndexType IndexType; - typedef typename Problem::MeshType MeshType; - typedef typename ProblemType::DofVectorType DofVectorType; - typedef Pointers::SharedPointer< DofVectorType, DeviceType > DofVectorPointer; - typedef IterativeSolverMonitor< RealType, IndexType > SolverMonitorType; + using ProblemType = Problem; + using RealType = typename Problem::RealType; + using DeviceType = typename Problem::DeviceType; + using IndexType = typename Problem::IndexType; + using MeshType = typename Problem::MeshType; + using DofVectorType = typename ProblemType::DofVectorType; + using DofVectorPointer = Pointers::SharedPointer< DofVectorType, DeviceType >; + using SolverMonitorType = IterativeSolverMonitor< RealType, IndexType >; using MatrixType = typename ProblemType::MatrixType; using MatrixPointer = std::shared_ptr< MatrixType >; diff --git a/src/TNL/Solvers/PDE/TimeDependentPDESolver.h b/src/TNL/Solvers/PDE/TimeDependentPDESolver.h index 1c81f60e00f709ecebc1d1fe670fe76f47b53edd..cd9e826ea69d1d9683bdcf3b29d46649f2eb33bf 100644 --- a/src/TNL/Solvers/PDE/TimeDependentPDESolver.h +++ b/src/TNL/Solvers/PDE/TimeDependentPDESolver.h @@ -29,13 +29,13 @@ public: using IndexType = typename Problem::IndexType; using BaseType = PDESolver< RealType, IndexType >; using ProblemType = Problem; - typedef typename ProblemType::MeshType MeshType; - typedef typename ProblemType::DofVectorType DofVectorType; - typedef typename ProblemType::CommonDataType CommonDataType; - typedef typename ProblemType::CommonDataPointer CommonDataPointer; - typedef Pointers::SharedPointer< MeshType, DeviceType > MeshPointer; - typedef Pointers::SharedPointer< DofVectorType, DeviceType > DofVectorPointer; - typedef IterativeSolverMonitor< typename Problem::RealType, typename Problem::IndexType > SolverMonitorType; + using MeshType = typename ProblemType::MeshType; + using DofVectorType = typename ProblemType::DofVectorType; + using CommonDataType = typename ProblemType::CommonDataType; + using CommonDataPointer = typename ProblemType::CommonDataPointer; + using MeshPointer = Pointers::SharedPointer< MeshType, DeviceType >; + using DofVectorPointer = Pointers::SharedPointer< DofVectorType, DeviceType >; + using SolverMonitorType = IterativeSolverMonitor< typename Problem::RealType, typename Problem::IndexType >; static_assert( ProblemType::isTimeDependent(), "The problem is not time dependent." ); diff --git a/src/TNL/Solvers/PDE/TimeIndependentPDESolver.h b/src/TNL/Solvers/PDE/TimeIndependentPDESolver.h index dfa0eee81554cd316705fd1c06071b98bbc02007..986876a1245e50d59eb5cad752a0e7d887923b2e 100644 --- a/src/TNL/Solvers/PDE/TimeIndependentPDESolver.h +++ b/src/TNL/Solvers/PDE/TimeIndependentPDESolver.h @@ -37,12 +37,12 @@ public: using IndexType = typename Problem::IndexType; using BaseType = PDESolver< RealType, IndexType >; using ProblemType = Problem; - typedef typename ProblemType::MeshType MeshType; - typedef typename ProblemType::DofVectorType DofVectorType; - typedef Pointers::SharedPointer< MeshType, DeviceType > MeshPointer; - typedef Pointers::SharedPointer< DofVectorType, DeviceType > DofVectorPointer; - typedef typename ProblemType::CommonDataType CommonDataType; - typedef typename ProblemType::CommonDataPointer CommonDataPointer; + using MeshType = typename ProblemType::MeshType; + using DofVectorType = typename ProblemType::DofVectorType; + using MeshPointer = Pointers::SharedPointer< MeshType, DeviceType >; + using DofVectorPointer = Pointers::SharedPointer< DofVectorType, DeviceType >; + using CommonDataType = typename ProblemType::CommonDataType; + using CommonDataPointer = typename ProblemType::CommonDataPointer; TimeIndependentPDESolver(); diff --git a/src/TNL/Solvers/SolverStarter.hpp b/src/TNL/Solvers/SolverStarter.hpp index f6b02cc1af613885fa72548dcc1ca81f9e530348..39a088e19eb93c7c0235592ac43a5d6abc5f24cd 100644 --- a/src/TNL/Solvers/SolverStarter.hpp +++ b/src/TNL/Solvers/SolverStarter.hpp @@ -182,7 +182,7 @@ public: static bool run( Problem& problem, const Config::ParameterContainer& parameters ) { - typedef PDE::SemiImplicitTimeStepper< Problem > TimeStepper; + using TimeStepper = PDE::SemiImplicitTimeStepper< Problem >; SolverStarter< ConfigTag > solverStarter; return solverStarter.template runPDESolver< Problem, TimeStepper >( problem, parameters ); } @@ -224,7 +224,7 @@ public: static bool run( Problem& problem, const Config::ParameterContainer& parameters ) { - typedef PDE::ExplicitTimeStepper< Problem, ExplicitSolverTag::template Template > TimeStepper; + using TimeStepper = PDE::ExplicitTimeStepper< Problem, ExplicitSolverTag::template Template >; SolverStarter< ConfigTag > solverStarter; return solverStarter.template runPDESolver< Problem, TimeStepper >( problem, parameters ); } diff --git a/src/TNL/TypeTraits.h b/src/TNL/TypeTraits.h index f4433fb952fb0082acd2e4c2889f3f018f575c7a..4d3972af27859800caf9c7044692202b5bc4897c 100644 --- a/src/TNL/TypeTraits.h +++ b/src/TNL/TypeTraits.h @@ -26,8 +26,8 @@ template< typename T > class HasGetArrayDataMethod { private: - typedef char YesType[1]; - typedef char NoType[2]; + using YesType = char[1]; + using NoType = char[2]; template< typename C > static YesType& test( decltype(std::declval< C >().getArrayData()) ); template< typename C > static NoType& test(...); @@ -43,8 +43,8 @@ template< typename T > class HasGetSizeMethod { private: - typedef char YesType[1]; - typedef char NoType[2]; + using YesType = char[1]; + using NoType = char[2]; template< typename C > static YesType& test( decltype(std::declval< C >().getSize() ) ); template< typename C > static NoType& test(...); @@ -268,8 +268,8 @@ template< typename T > class HasGetCommunicatorMethod { private: - typedef char YesType[1]; - typedef char NoType[2]; + using YesType = char[1]; + using NoType = char[2]; template< typename C > static YesType& test( decltype(std::declval< C >().getCommunicator()) ); template< typename C > static NoType& test(...); diff --git a/src/Tools/tnl-dicom-reader.cpp b/src/Tools/tnl-dicom-reader.cpp index 44c7e5d24c0ce19a72ba742a8f2495d4782e2bd8..179b1a2387bc622054356989144aaed148b8e155 100644 --- a/src/Tools/tnl-dicom-reader.cpp +++ b/src/Tools/tnl-dicom-reader.cpp @@ -33,7 +33,7 @@ bool processDicomSeries( const Config::ParameterContainer& parameters ) String meshFile = parameters.getParameter< String >( "mesh-file" ); bool verbose = parameters.getParameter< bool >( "verbose" ); - typedef Meshes::Grid< 2, double, Devices::Host, int > GridType; + using GridType = Meshes::Grid< 2, double, Devices::Host, int >; GridType grid; Containers::Vector< double, Devices::Host, int > vector; Images::RegionOfInterest< int > roi; diff --git a/src/Tools/tnl-diff.h b/src/Tools/tnl-diff.h index 0db35061f81d1d65145281586189cc94242b5380..d2465eb8a55adce2a5981bf99f88d1882de96420 100644 --- a/src/Tools/tnl-diff.h +++ b/src/Tools/tnl-diff.h @@ -202,7 +202,7 @@ bool computeDifferenceOfMeshFunctions( const MeshPointer& meshPointer, const Con if( verbose ) std::cout << std::endl; - typedef typename MeshPointer::ObjectType Mesh; + using Mesh = typename MeshPointer::ObjectType; using MeshFunctionType = Functions::MeshFunction< Mesh, Mesh::getMeshDimension(), Real >; MeshFunctionType v1( meshPointer ), v2( meshPointer ), diff( meshPointer ); Real totalL1Diff( 0.0 ), totalL2Diff( 0.0 ), totalMaxDiff( 0.0 ); @@ -553,7 +553,7 @@ bool processFiles( const Config::ParameterContainer& parameters ) const String meshFile = parameters.getParameter< String >( "mesh" ); const String meshFileFormat = parameters.getParameter< String >( "mesh-format" ); - typedef Pointers::SharedPointer< Mesh > MeshPointer; + using MeshPointer = Pointers::SharedPointer< Mesh >; MeshPointer meshPointer; if( ! Meshes::loadMesh( *meshPointer, meshFile, meshFileFormat ) ) return false; diff --git a/src/Tools/tnl-grid-setup.h b/src/Tools/tnl-grid-setup.h index fcb10bd06c13ac0f97e78d493204a0ba3ae8f53e..43aaca14dd9a04b2b025ad07d50cec0974e817b9 100644 --- a/src/Tools/tnl-grid-setup.h +++ b/src/Tools/tnl-grid-setup.h @@ -21,9 +21,9 @@ bool setupGrid( const Config::ParameterContainer& parameters ) } IndexType sizeX = parameters.getParameter< int >( "size-x" ); - typedef Meshes::Grid< 1, RealType, Devices::Host, IndexType > GridType; - typedef typename GridType::PointType PointType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 1, RealType, Devices::Host, IndexType >; + using PointType = typename GridType::PointType; + using CoordinatesType = typename GridType::CoordinatesType; GridType grid; grid.setDomain( PointType( originX ), PointType( proportionsX ) ); grid.setDimensions( CoordinatesType( sizeX ) ); @@ -46,9 +46,9 @@ bool setupGrid( const Config::ParameterContainer& parameters ) } IndexType sizeX = parameters.getParameter< int >( "size-x" ); IndexType sizeY = parameters.getParameter< int >( "size-y" ); - typedef Meshes::Grid< 2, RealType, Devices::Host, IndexType > GridType; - typedef typename GridType::PointType PointType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 2, RealType, Devices::Host, IndexType >; + using PointType = typename GridType::PointType; + using CoordinatesType = typename GridType::CoordinatesType; GridType grid; grid.setDomain( PointType( originX, originY ), PointType( proportionsX, proportionsY ) ); grid.setDimensions( CoordinatesType( sizeX, sizeY ) ); @@ -86,9 +86,9 @@ bool setupGrid( const Config::ParameterContainer& parameters ) IndexType sizeY = parameters.getParameter< int >( "size-y" ); IndexType sizeZ = parameters.getParameter< int >( "size-z" ); - typedef Meshes::Grid< 3, RealType, Devices::Host, IndexType > GridType; - typedef typename GridType::PointType PointType; - typedef typename GridType::CoordinatesType CoordinatesType; + using GridType = Meshes::Grid< 3, RealType, Devices::Host, IndexType >; + using PointType = typename GridType::PointType; + using CoordinatesType = typename GridType::CoordinatesType; GridType grid; grid.setDomain( PointType( originX, originY, originZ ), PointType( proportionsX, proportionsY, proportionsZ ) ); grid.setDimensions( CoordinatesType( sizeX, sizeY, sizeZ ) ); diff --git a/src/Tools/tnl-init.h b/src/Tools/tnl-init.h index 9e9d6a07b62de0f58287fb28842ff5e948626500..e1d4965b7151b16603610cc6049b8e5903aa3a01 100644 --- a/src/Tools/tnl-init.h +++ b/src/Tools/tnl-init.h @@ -42,15 +42,15 @@ bool renderFunction( const Config::ParameterContainer& parameters ) reader.loadMesh( *meshPointer ); } - typedef Functions::TestFunction< MeshType::getMeshDimension(), RealType > FunctionType; - typedef Pointers::SharedPointer< FunctionType, typename MeshType::DeviceType > FunctionPointer; + using FunctionType = Functions::TestFunction< MeshType::getMeshDimension(), RealType >; + using FunctionPointer = Pointers::SharedPointer< FunctionType, typename MeshType::DeviceType >; FunctionPointer function; std::cout << "Setting up the function ... " << std::endl; if( ! function->setup( parameters, "" ) ) return false; std::cout << "done." << std::endl; - typedef Functions::MeshFunction< MeshType, MeshType::getMeshDimension() > MeshFunctionType; - typedef Pointers::SharedPointer< MeshFunctionType, typename MeshType::DeviceType > MeshFunctionPointer; + using MeshFunctionType = Functions::MeshFunction< MeshType, MeshType::getMeshDimension() >; + using MeshFunctionPointer = Pointers::SharedPointer< MeshFunctionType, typename MeshType::DeviceType >; MeshFunctionPointer meshFunction( meshPointer ); //if( ! discreteFunction.setSize( mesh.template getEntitiesCount< typename MeshType::Cell >() ) ) // return false;