diff --git a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp index f8b5674dff39a25cdaf4854a8249d45dbefe988c..73e19a030e91a85a4dda5549d9a19c8078674886 100644 --- a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp +++ b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp @@ -90,25 +90,25 @@ using walberla::uint_t; ////////////// // PDF field, flag field & body field -typedef lbm::D3Q19< lbm::collision_model::TRT, false> LatticeModel_T; -typedef LatticeModel_T::Stencil Stencil_T; -typedef lbm::PdfField< LatticeModel_T > PdfField_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::TRT, false>; +using Stencil_T = LatticeModel_T::Stencil; +using PdfField_T = lbm::PdfField<LatticeModel_T>; -typedef walberla::uint8_t flag_t; -typedef FlagField< flag_t > FlagField_T; -typedef GhostLayerField< pe::BodyID, 1 > BodyField_T; -typedef GhostLayerField< Vector3<real_t>, 1 > VelocityField_T; +using flag_t = walberla::uint8_t; +using FlagField_T = FlagField<flag_t>; +using BodyField_T = GhostLayerField<pe::BodyID, 1>; +using VelocityField_T = GhostLayerField<Vector3<real_t>, 1>; const uint_t FieldGhostLayers = 4; // boundary handling -typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; +using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; -typedef pe_coupling::CurvedLinear< LatticeModel_T, FlagField_T > MO_T; +using MO_T = pe_coupling::CurvedLinear<LatticeModel_T, FlagField_T>; -typedef BoundaryHandling< FlagField_T, Stencil_T, NoSlip_T, MO_T > BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, NoSlip_T, MO_T>; -typedef std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane> BodyTypeTuple; +using BodyTypeTuple = std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane>; /////////// // FLAGS // @@ -135,8 +135,8 @@ template< typename LatticeModel_T, typename Filter_T > class VectorGradientRefinement { public: - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; VectorGradientRefinement( const ConstBlockDataID & fieldID, const Filter_T & filter, const real_t upperLimit, const real_t lowerLimit, const uint_t maxLevel ) : @@ -1504,7 +1504,7 @@ int main( int argc, char **argv ) // add velocity field and utility BlockDataID velocityFieldID = field::addToStorage<VelocityField_T>( blocks, "velocity field", Vector3<real_t>(real_t(0)), field::zyxf, uint_t(2) ); - typedef lbm::VelocityFieldWriter< PdfField_T, VelocityField_T > VelocityFieldWriter_T; + using VelocityFieldWriter_T = lbm::VelocityFieldWriter<PdfField_T, VelocityField_T>; BlockSweepWrapper< VelocityFieldWriter_T > velocityFieldWriter( blocks, VelocityFieldWriter_T( pdfFieldID, velocityFieldID ) ); @@ -1847,7 +1847,7 @@ int main( int argc, char **argv ) "Body Mapping", finestLevel ); // add sweep for restoring PDFs in cells previously occupied by pe bodies - typedef pe_coupling::EquilibriumReconstructor< LatticeModel_T, BoundaryHandling_T > Reconstructor_T; + using Reconstructor_T = pe_coupling::EquilibriumReconstructor<LatticeModel_T, BoundaryHandling_T>; Reconstructor_T reconstructor( blocks, boundaryHandlingID, bodyFieldID ); refinementTimestep->addPostStreamVoidFunction(lbm::refinement::SweepAsFunctorWrapper( pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructor_T > ( blocks, pdfFieldID, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, reconstructor, FormerMO_Flag, Fluid_Flag ), blocks ), diff --git a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSettlingSphere.cpp b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSettlingSphere.cpp index 0db5c807dfac7f573d2d894980d90e14112928a3..c13a7c93db4905f2f50342a79667613ec748771b 100644 --- a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSettlingSphere.cpp +++ b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSettlingSphere.cpp @@ -84,25 +84,25 @@ using walberla::uint_t; ////////////// // PDF field, flag field & body field -typedef lbm::D3Q19< lbm::collision_model::TRT, false > LatticeModel_T; -typedef LatticeModel_T::Stencil Stencil_T; -typedef lbm::PdfField< LatticeModel_T > PdfField_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::TRT, false>; +using Stencil_T = LatticeModel_T::Stencil; +using PdfField_T = lbm::PdfField<LatticeModel_T>; -typedef walberla::uint8_t flag_t; -typedef FlagField< flag_t > FlagField_T; -typedef GhostLayerField< pe::BodyID, 1 > BodyField_T; -typedef GhostLayerField< Vector3<real_t>, 1 > VelocityField_T; +using flag_t = walberla::uint8_t; +using FlagField_T = FlagField<flag_t>; +using BodyField_T = GhostLayerField<pe::BodyID, 1>; +using VelocityField_T = GhostLayerField<Vector3<real_t>, 1>; const uint_t FieldGhostLayers = 4; // boundary handling -typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; +using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; -typedef pe_coupling::CurvedLinear< LatticeModel_T, FlagField_T > MO_T; +using MO_T = pe_coupling::CurvedLinear<LatticeModel_T, FlagField_T>; -typedef BoundaryHandling< FlagField_T, Stencil_T, NoSlip_T, MO_T > BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, NoSlip_T, MO_T>; -typedef std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane> BodyTypeTuple; +using BodyTypeTuple = std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane>; /////////// // FLAGS // @@ -128,8 +128,8 @@ template< typename LatticeModel_T, typename Filter_T > class VectorGradientRefinement { public: - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; VectorGradientRefinement( const ConstBlockDataID & fieldID, const Filter_T & filter, const real_t upperLimit, const real_t lowerLimit, const uint_t maxLevel ) : @@ -994,7 +994,7 @@ int main( int argc, char **argv ) // add velocity field and utility BlockDataID velocityFieldID = field::addToStorage<VelocityField_T>( blocks, "velocity field", Vector3<real_t>(real_t(0)), field::zyxf, uint_t(2) ); - typedef lbm::VelocityFieldWriter< PdfField_T, VelocityField_T > VelocityFieldWriter_T; + using VelocityFieldWriter_T = lbm::VelocityFieldWriter<PdfField_T, VelocityField_T>; BlockSweepWrapper< VelocityFieldWriter_T > velocityFieldWriter( blocks, VelocityFieldWriter_T( pdfFieldID, velocityFieldID ) ); @@ -1177,7 +1177,7 @@ int main( int argc, char **argv ) "Body Mapping", finestLevel ); // add sweep for restoring PDFs in cells previously occupied by pe bodies - typedef pe_coupling::EquilibriumReconstructor< LatticeModel_T, BoundaryHandling_T > Reconstructor_T; + using Reconstructor_T = pe_coupling::EquilibriumReconstructor<LatticeModel_T, BoundaryHandling_T>; Reconstructor_T reconstructor( blocks, boundaryHandlingID, bodyFieldID ); refinementTimestep->addPostStreamVoidFunction(lbm::refinement::SweepAsFunctorWrapper( pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructor_T > ( blocks, pdfFieldID, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, reconstructor, FormerMO_Flag, Fluid_Flag ), blocks ), diff --git a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/WorkloadEvaluation.cpp b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/WorkloadEvaluation.cpp index 18d93204ff732f767ff0655935355b2a3f2992c8..01f0b3f99a4b998b53a0d9f431442db5916ce1d9 100644 --- a/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/WorkloadEvaluation.cpp +++ b/apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/WorkloadEvaluation.cpp @@ -86,23 +86,23 @@ using namespace walberla; using walberla::uint_t; // PDF field, flag field & body field -typedef lbm::D3Q19< lbm::collision_model::TRT, false> LatticeModel_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::TRT, false>; -typedef LatticeModel_T::Stencil Stencil_T; -typedef lbm::PdfField< LatticeModel_T > PdfField_T; +using Stencil_T = LatticeModel_T::Stencil; +using PdfField_T = lbm::PdfField<LatticeModel_T>; -typedef walberla::uint8_t flag_t; -typedef FlagField< flag_t > FlagField_T; -typedef GhostLayerField< pe::BodyID, 1 > BodyField_T; +using flag_t = walberla::uint8_t; +using FlagField_T = FlagField<flag_t>; +using BodyField_T = GhostLayerField<pe::BodyID, 1>; const uint_t FieldGhostLayers = 1; // boundary handling -typedef pe_coupling::CurvedLinear< LatticeModel_T, FlagField_T > MO_CLI_T; +using MO_CLI_T = pe_coupling::CurvedLinear<LatticeModel_T, FlagField_T>; -typedef BoundaryHandling< FlagField_T, Stencil_T, MO_CLI_T > BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, MO_CLI_T>; -typedef std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane> BodyTypeTuple; +using BodyTypeTuple = std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane>; /////////// // FLAGS // @@ -754,7 +754,7 @@ int main( int argc, char **argv ) << Sweep( pe_coupling::BodyMapping< LatticeModel_T, BoundaryHandling_T >( blocks, pdfFieldID, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, MO_CLI_Flag, FormerMO_Flag, pe_coupling::selectRegularBodies ), "Body Mapping" ); // sweep for restoring PDFs in cells previously occupied by pe bodies - typedef pe_coupling::EquilibriumReconstructor< LatticeModel_T, BoundaryHandling_T > Reconstructor_T; + using Reconstructor_T = pe_coupling::EquilibriumReconstructor<LatticeModel_T, BoundaryHandling_T>; Reconstructor_T reconstructor( blocks, boundaryHandlingID, bodyFieldID); timeloop.add() << Sweep( pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructor_T > diff --git a/apps/benchmarks/CouetteFlow/CouetteFlow.cpp b/apps/benchmarks/CouetteFlow/CouetteFlow.cpp index 4bedb57423a9e7f3f9e0267b05ec3d3f4dbf7d7b..b313738d067f0f0ad6501f4e1776d3e0ed9f2bf9 100644 --- a/apps/benchmarks/CouetteFlow/CouetteFlow.cpp +++ b/apps/benchmarks/CouetteFlow/CouetteFlow.cpp @@ -118,21 +118,21 @@ using walberla::real_t; // TYPEDEFS // ////////////// -typedef lbm::D3Q15< lbm::collision_model::SRT, false > D3Q15_SRT_INCOMP; -typedef lbm::D3Q15< lbm::collision_model::SRT, true > D3Q15_SRT_COMP; -typedef lbm::D3Q15< lbm::collision_model::TRT, false > D3Q15_TRT_INCOMP; -typedef lbm::D3Q15< lbm::collision_model::TRT, true > D3Q15_TRT_COMP; - -typedef lbm::D3Q19< lbm::collision_model::SRT, false > D3Q19_SRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::SRT, true > D3Q19_SRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, false > D3Q19_TRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, true > D3Q19_TRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::D3Q19MRT, false > D3Q19_MRT_INCOMP; - -typedef lbm::D3Q27< lbm::collision_model::SRT, false > D3Q27_SRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::SRT, true > D3Q27_SRT_COMP; -typedef lbm::D3Q27< lbm::collision_model::TRT, false > D3Q27_TRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::TRT, true > D3Q27_TRT_COMP; +using D3Q15_SRT_INCOMP = lbm::D3Q15<lbm::collision_model::SRT, false>; +using D3Q15_SRT_COMP = lbm::D3Q15<lbm::collision_model::SRT, true>; +using D3Q15_TRT_INCOMP = lbm::D3Q15<lbm::collision_model::TRT, false>; +using D3Q15_TRT_COMP = lbm::D3Q15<lbm::collision_model::TRT, true>; + +using D3Q19_SRT_INCOMP = lbm::D3Q19<lbm::collision_model::SRT, false>; +using D3Q19_SRT_COMP = lbm::D3Q19<lbm::collision_model::SRT, true>; +using D3Q19_TRT_INCOMP = lbm::D3Q19<lbm::collision_model::TRT, false>; +using D3Q19_TRT_COMP = lbm::D3Q19<lbm::collision_model::TRT, true>; +using D3Q19_MRT_INCOMP = lbm::D3Q19<lbm::collision_model::D3Q19MRT, false>; + +using D3Q27_SRT_INCOMP = lbm::D3Q27<lbm::collision_model::SRT, false>; +using D3Q27_SRT_COMP = lbm::D3Q27<lbm::collision_model::SRT, true>; +using D3Q27_TRT_INCOMP = lbm::D3Q27<lbm::collision_model::TRT, false>; +using D3Q27_TRT_COMP = lbm::D3Q27<lbm::collision_model::TRT, true>; template< typename LatticeModel_T > struct Types @@ -370,10 +370,10 @@ class MyBoundaryHandling { public: - typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; - typedef lbm::SimpleUBB< LatticeModel_T, flag_t > UBB_T; + using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; + using UBB_T = lbm::SimpleUBB<LatticeModel_T, flag_t>; - typedef BoundaryHandling< FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, UBB_T > BoundaryHandling_T; + using BoundaryHandling_T = BoundaryHandling<FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, UBB_T>; @@ -616,7 +616,7 @@ struct AddRefinementTimeStep } else { - typedef lbm::SplitSweep< LatticeModel_T, FlagField_T > Sweep_T; + using Sweep_T = lbm::SplitSweep<LatticeModel_T, FlagField_T>; auto mySweep = make_shared< Sweep_T >( pdfFieldId, flagFieldId, Fluid_Flag ); addRefinementTimeStep< LatticeModel_T, Sweep_T >( timeloop, blocks, pdfFieldId, boundaryHandlingId, timingPool, levelwiseTimingPool, diff --git a/apps/benchmarks/DEM/DEM.cpp b/apps/benchmarks/DEM/DEM.cpp index a76f4993f8514030d92c52e6d9cb09573f7ffa8c..eb892fa4cf8f29a78a183262d7e4233fc8d139d4 100644 --- a/apps/benchmarks/DEM/DEM.cpp +++ b/apps/benchmarks/DEM/DEM.cpp @@ -48,7 +48,7 @@ int main( int argc, char** argv ) using namespace walberla; using namespace walberla::pe; - typedef std::tuple<Sphere, Plane> BodyTuple ; + using BodyTuple = std::tuple<Sphere, Plane> ; walberla::MPIManager::instance()->initializeMPI( &argc, &argv ); diff --git a/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp b/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp index 7e5c37e2e6d0f56a765b987f774bb721df67925f..a01b5210f10c3dfecc54980e3f7861f0fd278f76 100644 --- a/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp +++ b/apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp @@ -81,23 +81,23 @@ using walberla::uint_t; ////////////// // PDF field, flag field & body field -typedef lbm::D3Q19< lbm::collision_model::TRT, false > LatticeModel_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::TRT, false>; using Stencil_T = LatticeModel_T::Stencil; using PdfField_T = lbm::PdfField<LatticeModel_T>; using flag_t = walberla::uint8_t; using FlagField_T = FlagField<flag_t>; -typedef GhostLayerField< pe::BodyID, 1 > BodyField_T; +using BodyField_T = GhostLayerField<pe::BodyID, 1>; const uint_t FieldGhostLayers = 4; // boundary handling -typedef pe_coupling::SimpleBB< LatticeModel_T, FlagField_T > MO_SBB_T; -typedef pe_coupling::CurvedLinear< LatticeModel_T, FlagField_T > MO_CLI_T; +using MO_SBB_T = pe_coupling::SimpleBB<LatticeModel_T, FlagField_T>; +using MO_CLI_T = pe_coupling::CurvedLinear<LatticeModel_T, FlagField_T>; -typedef BoundaryHandling< FlagField_T, Stencil_T, MO_SBB_T, MO_CLI_T > BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, MO_SBB_T, MO_CLI_T>; -typedef std::tuple< pe::Sphere, pe::Plane > BodyTypeTuple; +using BodyTypeTuple = std::tuple<pe::Sphere, pe::Plane>; /////////// // FLAGS // diff --git a/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp b/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp index efeb8186e0f7a7659f58f17f50c0368659a46b58..293451af236c7c2605968c10cbac6333367911f9 100644 --- a/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp +++ b/apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp @@ -76,29 +76,29 @@ using walberla::uint_t; ////////////// // PDF field, flag field & body field -typedef lbm::D3Q19< lbm::collision_model::TRT, false > LatticeModel_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::TRT, false>; using Stencil_T = LatticeModel_T::Stencil; using PdfField_T = lbm::PdfField<LatticeModel_T>; using flag_t = walberla::uint8_t; using FlagField_T = FlagField<flag_t>; -typedef GhostLayerField< pe::BodyID, 1 > BodyField_T; +using BodyField_T = GhostLayerField<pe::BodyID, 1>; -typedef std::pair< pe::BodyID, real_t > BodyAndVolumeFraction_T; -typedef GhostLayerField< std::vector< BodyAndVolumeFraction_T >, 1 > BodyAndVolumeFractionField_T; +using BodyAndVolumeFraction_T = std::pair<pe::BodyID, real_t>; +using BodyAndVolumeFractionField_T = GhostLayerField<std::vector<BodyAndVolumeFraction_T>, 1>; const uint_t FieldGhostLayers = 1; // boundary handling -typedef lbm::SimpleUBB< LatticeModel_T, flag_t > UBB_T; -typedef lbm::SimplePressure< LatticeModel_T, flag_t > Outlet_T; +using UBB_T = lbm::SimpleUBB<LatticeModel_T, flag_t>; +using Outlet_T = lbm::SimplePressure<LatticeModel_T, flag_t>; -typedef pe_coupling::SimpleBB< LatticeModel_T, FlagField_T > MEM_BB_T; -typedef pe_coupling::CurvedLinear< LatticeModel_T, FlagField_T > MEM_CLI_T; -typedef pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T > MEM_MR_T; +using MEM_BB_T = pe_coupling::SimpleBB<LatticeModel_T, FlagField_T>; +using MEM_CLI_T = pe_coupling::CurvedLinear<LatticeModel_T, FlagField_T>; +using MEM_MR_T = pe_coupling::CurvedQuadratic<LatticeModel_T, FlagField_T>; -typedef BoundaryHandling< FlagField_T, Stencil_T, UBB_T, Outlet_T, MEM_BB_T, MEM_CLI_T, MEM_MR_T > BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, UBB_T, Outlet_T, MEM_BB_T, MEM_CLI_T, MEM_MR_T>; using BodyTypeTuple = std::tuple<pe::Sphere>; @@ -1236,7 +1236,7 @@ int main( int argc, char **argv ) // reconstruct missing PDFs using ExtrapolationFinder_T = pe_coupling::SphereNormalExtrapolationDirectionFinder; ExtrapolationFinder_T extrapolationFinder( blocks, bodyFieldID ); - typedef pe_coupling::ExtrapolationReconstructor< LatticeModel_T, BoundaryHandling_T, ExtrapolationFinder_T > Reconstructor_T; + using Reconstructor_T = pe_coupling::ExtrapolationReconstructor<LatticeModel_T, BoundaryHandling_T, ExtrapolationFinder_T>; Reconstructor_T reconstructor( blocks, boundaryHandlingID, bodyFieldID, extrapolationFinder, true ); timeloop.add() << Sweep( pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructor_T > ( blocks, pdfFieldID, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, reconstructor, FormerMEM_Flag, Fluid_Flag ), "PDF Restore" ); diff --git a/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp b/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp index 631625909b21548fa4f23c7e5b5f5702bcec7960..817097ccab6f4a08d1eb0bd80b169d1dca326111 100644 --- a/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp +++ b/apps/benchmarks/NonUniformGrid/NonUniformGrid.cpp @@ -97,11 +97,11 @@ using walberla::real_t; // TYPEDEFS // ////////////// -typedef lbm::D3Q19< lbm::collision_model::SRT, false > D3Q19_SRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::SRT, true > D3Q19_SRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, false > D3Q19_TRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, true > D3Q19_TRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::D3Q19MRT, false > D3Q19_MRT_INCOMP; +using D3Q19_SRT_INCOMP = lbm::D3Q19<lbm::collision_model::SRT, false>; +using D3Q19_SRT_COMP = lbm::D3Q19<lbm::collision_model::SRT, true>; +using D3Q19_TRT_INCOMP = lbm::D3Q19<lbm::collision_model::TRT, false>; +using D3Q19_TRT_COMP = lbm::D3Q19<lbm::collision_model::TRT, true>; +using D3Q19_MRT_INCOMP = lbm::D3Q19<lbm::collision_model::D3Q19MRT, false>; template< typename LatticeModel_T > struct Types @@ -437,10 +437,10 @@ void ReGrid::operator()( std::vector< std::pair< const Block *, uint_t > > & min template< typename LatticeModel_T > struct MyBoundaryTypes { - typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; - typedef lbm::SimpleUBB< LatticeModel_T, flag_t > UBB_T; + using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; + using UBB_T = lbm::SimpleUBB<LatticeModel_T, flag_t>; - typedef BoundaryHandling< FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, UBB_T > BoundaryHandling_T; + using BoundaryHandling_T = BoundaryHandling<FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, UBB_T>; }; template< typename LatticeModel_T > @@ -632,7 +632,7 @@ struct AddRefinementTimeStep } else { - typedef lbm::SplitSweep< LatticeModel_T, FlagField_T > Sweep_T; + using Sweep_T = lbm::SplitSweep<LatticeModel_T, FlagField_T>; auto mySweep = make_shared< Sweep_T >( pdfFieldId, flagFieldId, Fluid_Flag ); addRefinementTimeStep< LatticeModel_T, Sweep_T >( timeloop, blocks, pdfFieldId, boundaryHandlingId, timingPool, levelwiseTimingPool, diff --git a/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp b/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp index f5695a0f50a6fb9736dd19dac9da6671a2e9c217..9542fad39b7963d76d4c6a7f1a5280ea0ef2dd04 100644 --- a/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp +++ b/apps/benchmarks/PoiseuilleChannel/PoiseuilleChannel.cpp @@ -116,15 +116,15 @@ using walberla::real_t; // TYPEDEFS // ////////////// -typedef lbm::D3Q19< lbm::collision_model::SRT, false, lbm::force_model::SimpleConstant > D3Q19_SRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::SRT, true, lbm::force_model::SimpleConstant > D3Q19_SRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, false, lbm::force_model::SimpleConstant > D3Q19_TRT_INCOMP; +using D3Q19_SRT_INCOMP = lbm::D3Q19<lbm::collision_model::SRT, false, lbm::force_model::SimpleConstant>; +using D3Q19_SRT_COMP = lbm::D3Q19<lbm::collision_model::SRT, true, lbm::force_model::SimpleConstant>; +using D3Q19_TRT_INCOMP = lbm::D3Q19<lbm::collision_model::TRT, false, lbm::force_model::SimpleConstant>; //typedef lbm::D3Q19< lbm::collision_model::TRT, true, lbm::force_model::SimpleConstant > D3Q19_TRT_COMP; -typedef lbm::D3Q27< lbm::collision_model::SRT, false, lbm::force_model::SimpleConstant > D3Q27_SRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::SRT, true, lbm::force_model::SimpleConstant > D3Q27_SRT_COMP; -typedef lbm::D3Q27< lbm::collision_model::TRT, false, lbm::force_model::SimpleConstant > D3Q27_TRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::TRT, true, lbm::force_model::SimpleConstant > D3Q27_TRT_COMP; +using D3Q27_SRT_INCOMP = lbm::D3Q27<lbm::collision_model::SRT, false, lbm::force_model::SimpleConstant>; +using D3Q27_SRT_COMP = lbm::D3Q27<lbm::collision_model::SRT, true, lbm::force_model::SimpleConstant>; +using D3Q27_TRT_INCOMP = lbm::D3Q27<lbm::collision_model::TRT, false, lbm::force_model::SimpleConstant>; +using D3Q27_TRT_COMP = lbm::D3Q27<lbm::collision_model::TRT, true, lbm::force_model::SimpleConstant>; template< typename LatticeModel_T > struct Types @@ -453,10 +453,10 @@ class MyBoundaryHandling { public: - typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; - typedef lbm::Curved< LatticeModel_T, FlagField_T > Curved_T; + using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; + using Curved_T = lbm::Curved<LatticeModel_T, FlagField_T>; - typedef BoundaryHandling< FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, Curved_T > BoundaryHandling_T; + using BoundaryHandling_T = BoundaryHandling<FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, Curved_T>; diff --git a/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp b/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp index c49dafff07a5b1ed2c24670d6c2fcc583f143048..cdbd64fbe079aea41ae4a75927230b77324431c0 100644 --- a/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp +++ b/apps/benchmarks/SchaeferTurek/SchaeferTurek.cpp @@ -133,26 +133,26 @@ using walberla::real_t; // TYPEDEFS // ////////////// -typedef lbm::D2Q9< lbm::collision_model::SRT, false > D2Q9_SRT_INCOMP; -typedef lbm::D2Q9< lbm::collision_model::SRT, true > D2Q9_SRT_COMP; -typedef lbm::D2Q9< lbm::collision_model::TRT, false > D2Q9_TRT_INCOMP; -typedef lbm::D2Q9< lbm::collision_model::TRT, true > D2Q9_TRT_COMP; - -typedef lbm::D3Q15< lbm::collision_model::SRT, false > D3Q15_SRT_INCOMP; -typedef lbm::D3Q15< lbm::collision_model::SRT, true > D3Q15_SRT_COMP; -typedef lbm::D3Q15< lbm::collision_model::TRT, false > D3Q15_TRT_INCOMP; -typedef lbm::D3Q15< lbm::collision_model::TRT, true > D3Q15_TRT_COMP; - -typedef lbm::D3Q19< lbm::collision_model::SRT, false > D3Q19_SRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::SRT, true > D3Q19_SRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, false > D3Q19_TRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, true > D3Q19_TRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::D3Q19MRT, false > D3Q19_MRT_INCOMP; - -typedef lbm::D3Q27< lbm::collision_model::SRT, false > D3Q27_SRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::SRT, true > D3Q27_SRT_COMP; -typedef lbm::D3Q27< lbm::collision_model::TRT, false > D3Q27_TRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::TRT, true > D3Q27_TRT_COMP; +using D2Q9_SRT_INCOMP = lbm::D2Q9<lbm::collision_model::SRT, false>; +using D2Q9_SRT_COMP = lbm::D2Q9<lbm::collision_model::SRT, true>; +using D2Q9_TRT_INCOMP = lbm::D2Q9<lbm::collision_model::TRT, false>; +using D2Q9_TRT_COMP = lbm::D2Q9<lbm::collision_model::TRT, true>; + +using D3Q15_SRT_INCOMP = lbm::D3Q15<lbm::collision_model::SRT, false>; +using D3Q15_SRT_COMP = lbm::D3Q15<lbm::collision_model::SRT, true>; +using D3Q15_TRT_INCOMP = lbm::D3Q15<lbm::collision_model::TRT, false>; +using D3Q15_TRT_COMP = lbm::D3Q15<lbm::collision_model::TRT, true>; + +using D3Q19_SRT_INCOMP = lbm::D3Q19<lbm::collision_model::SRT, false>; +using D3Q19_SRT_COMP = lbm::D3Q19<lbm::collision_model::SRT, true>; +using D3Q19_TRT_INCOMP = lbm::D3Q19<lbm::collision_model::TRT, false>; +using D3Q19_TRT_COMP = lbm::D3Q19<lbm::collision_model::TRT, true>; +using D3Q19_MRT_INCOMP = lbm::D3Q19<lbm::collision_model::D3Q19MRT, false>; + +using D3Q27_SRT_INCOMP = lbm::D3Q27<lbm::collision_model::SRT, false>; +using D3Q27_SRT_COMP = lbm::D3Q27<lbm::collision_model::SRT, true>; +using D3Q27_TRT_INCOMP = lbm::D3Q27<lbm::collision_model::TRT, false>; +using D3Q27_TRT_COMP = lbm::D3Q27<lbm::collision_model::TRT, true>; template< typename LatticeModel_T > struct Types @@ -776,16 +776,15 @@ private: template< typename LatticeModel_T > struct MyBoundaryTypes { - typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; - typedef lbm::NoSlip< LatticeModel_T, flag_t > Obstacle_T; - typedef lbm::Curved< LatticeModel_T, FlagField_T > Curved_T; - typedef lbm::DynamicUBB< LatticeModel_T, flag_t, - SinusInflowVelocity<Is2D< LatticeModel_T >::value> > DynamicUBB_T; - typedef lbm::Outlet< LatticeModel_T, FlagField_T, 2, 1 > Outlet21_T; - typedef lbm::Outlet< LatticeModel_T, FlagField_T, 4, 3 > Outlet43_T; - typedef lbm::SimplePressure< LatticeModel_T, flag_t > PressureOutlet_T; - - typedef BoundaryHandling< FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, Obstacle_T, Curved_T, DynamicUBB_T, Outlet21_T, Outlet43_T, PressureOutlet_T > BoundaryHandling_T; + using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; + using Obstacle_T = lbm::NoSlip<LatticeModel_T, flag_t>; + using Curved_T = lbm::Curved<LatticeModel_T, FlagField_T>; + using DynamicUBB_T = lbm::DynamicUBB<LatticeModel_T, flag_t, SinusInflowVelocity<Is2D<LatticeModel_T>::value>>; + using Outlet21_T = lbm::Outlet<LatticeModel_T, FlagField_T, 2, 1>; + using Outlet43_T = lbm::Outlet<LatticeModel_T, FlagField_T, 4, 3>; + using PressureOutlet_T = lbm::SimplePressure<LatticeModel_T, flag_t>; + + using BoundaryHandling_T = BoundaryHandling<FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, Obstacle_T, Curved_T, DynamicUBB_T, Outlet21_T, Outlet43_T, PressureOutlet_T>; }; @@ -2285,7 +2284,7 @@ struct AddRefinementTimeStep } else { - typedef lbm::SplitSweep< LatticeModel_T, FlagField_T > Sweep_T; + using Sweep_T = lbm::SplitSweep<LatticeModel_T, FlagField_T>; auto mySweep = make_shared< Sweep_T >( pdfFieldId, flagFieldId, Fluid_Flag ); addRefinementTimeStep< LatticeModel_T, Sweep_T >( timeloop, blocks, pdfFieldId, boundaryHandlingId, timingPool, levelwiseTimingPool, @@ -2365,10 +2364,10 @@ void run( const shared_ptr< Config > & config, const LatticeModel_T & latticeMod // add velocity field + initialize velocity field writer (only used for simulations with an adaptive block structure) - typedef field::GhostLayerField< Vector3<real_t>, 1 > VelocityField_T; + using VelocityField_T = field::GhostLayerField<Vector3<real_t>, 1>; BlockDataID velocityFieldId = field::addToStorage< VelocityField_T >( blocks, "velocity", Vector3<real_t>(0), field::zyxf, FieldGhostLayers, true, None, Empty ); - typedef lbm::VelocityFieldWriter< typename Types<LatticeModel_T>::PdfField_T, VelocityField_T > VelocityFieldWriter_T; + using VelocityFieldWriter_T = lbm::VelocityFieldWriter<typename Types<LatticeModel_T>::PdfField_T, VelocityField_T>; BlockSweepWrapper< VelocityFieldWriter_T > velocityFieldWriter( blocks, VelocityFieldWriter_T( pdfFieldId, velocityFieldId ), None, Empty ); velocityFieldWriter(); diff --git a/apps/benchmarks/UniformGrid/UniformGrid.cpp b/apps/benchmarks/UniformGrid/UniformGrid.cpp index d5d355e491812c639ac1b4fca5a982622c19af5e..0a947d20f060c3f8f93ee92d45cbe4298143b635 100644 --- a/apps/benchmarks/UniformGrid/UniformGrid.cpp +++ b/apps/benchmarks/UniformGrid/UniformGrid.cpp @@ -101,12 +101,12 @@ using walberla::real_t; // TYPEDEFS // ////////////// -typedef lbm::D3Q19< lbm::collision_model::SRT, false > D3Q19_SRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::SRT, true > D3Q19_SRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, false > D3Q19_TRT_INCOMP; -typedef lbm::D3Q19< lbm::collision_model::TRT, true > D3Q19_TRT_COMP; -typedef lbm::D3Q19< lbm::collision_model::D3Q19MRT, false > D3Q19_MRT_INCOMP; -typedef lbm::D3Q27< lbm::collision_model::D3Q27Cumulant, true > D3Q27_CUMULANT_COMP; +using D3Q19_SRT_INCOMP = lbm::D3Q19<lbm::collision_model::SRT, false>; +using D3Q19_SRT_COMP = lbm::D3Q19<lbm::collision_model::SRT, true>; +using D3Q19_TRT_INCOMP = lbm::D3Q19<lbm::collision_model::TRT, false>; +using D3Q19_TRT_COMP = lbm::D3Q19<lbm::collision_model::TRT, true>; +using D3Q19_MRT_INCOMP = lbm::D3Q19<lbm::collision_model::D3Q19MRT, false>; +using D3Q27_CUMULANT_COMP = lbm::D3Q27<lbm::collision_model::D3Q27Cumulant, true>; template< typename LatticeModel_T > @@ -347,10 +347,10 @@ class MyBoundaryHandling { public: - typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; - typedef lbm::SimpleUBB< LatticeModel_T, flag_t > UBB_T; + using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; + using UBB_T = lbm::SimpleUBB<LatticeModel_T, flag_t>; - typedef BoundaryHandling< FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, UBB_T > BoundaryHandling_T; + using BoundaryHandling_T = BoundaryHandling<FlagField_T, typename Types<LatticeModel_T>::Stencil_T, NoSlip_T, UBB_T>; @@ -565,7 +565,7 @@ struct AddLB } else { - typedef lbm::SplitSweep< LatticeModel_T, FlagField_T > Sweep_T; + using Sweep_T = lbm::SplitSweep<LatticeModel_T, FlagField_T>; auto sweep = make_shared< Sweep_T >( pdfFieldId, flagFieldId, Fluid_Flag ); timeloop.add() << Sweep( lbm::CollideSweep< Sweep_T >( sweep ), "split LB sweep (collide)" ); diff --git a/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp b/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp index d3e6fe63a866c8df9d30a9c5ea23d8522d868a9f..dad90bc62a911a87738db60f5ffa799046599aa3 100644 --- a/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp +++ b/apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp @@ -76,12 +76,12 @@ const uint_t FieldGhostLayers( 1 ); //#define OutletBC // PDF field, flag field & body field -typedef GhostLayerField< Matrix3<real_t>, 1 > TensorField_T; -typedef GhostLayerField< Vector3<real_t>, 1 > Vec3Field_T; -typedef GhostLayerField< real_t, 1 > ScalarField_T; +using TensorField_T = GhostLayerField<Matrix3<real_t>, 1>; +using Vec3Field_T = GhostLayerField<Vector3<real_t>, 1>; +using ScalarField_T = GhostLayerField<real_t, 1>; using ForceModel_T = lbm::force_model::GuoField<Vec3Field_T>; -typedef lbm::D3Q19< lbm::collision_model::SRTField<ScalarField_T>, false, ForceModel_T > LatticeModel_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::SRTField<ScalarField_T>, false, ForceModel_T>; using Stencil_T = LatticeModel_T::Stencil; using PdfField_T = lbm::PdfField<LatticeModel_T>; @@ -89,18 +89,18 @@ using flag_t = walberla::uint8_t; using FlagField_T = FlagField<flag_t>; // boundary handling -typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; -typedef lbm::SimpleUBB< LatticeModel_T, flag_t > Inflow_T; +using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; +using Inflow_T = lbm::SimpleUBB<LatticeModel_T, flag_t>; #ifdef OutletBC typedef lbm::Outlet< LatticeModel_T, FlagField_T > Outflow_T; #else -typedef lbm::SimplePressure< LatticeModel_T, flag_t > Outflow_T; +using Outflow_T = lbm::SimplePressure<LatticeModel_T, flag_t>; #endif -typedef BoundaryHandling<FlagField_T, Stencil_T, NoSlip_T, Inflow_T, Outflow_T> BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, NoSlip_T, Inflow_T, Outflow_T>; -typedef std::tuple<pe::Plane, pe::Sphere> BodyTypeTuple ; +using BodyTypeTuple = std::tuple<pe::Plane, pe::Sphere> ; /////////// // FLAGS // @@ -1191,7 +1191,7 @@ int main( int argc, char **argv ) { if( dpm == DPMethod::GNS ) { if (interpol == Interpolation::INearestNeighbor) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor> IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr<IFE_T> forceEvaluatorPtr = make_shared<IFE_T>(blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, @@ -1199,7 +1199,7 @@ int main( int argc, char **argv ) { viscosity); dragAndPressureForceEvaluationFunction = std::bind(&IFE_T::operator(), forceEvaluatorPtr); } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor> IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor>; shared_ptr<IFE_T> forceEvaluatorPtr = make_shared<IFE_T>(blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, @@ -1209,7 +1209,7 @@ int main( int argc, char **argv ) { } } else if (interpol == Interpolation::IKernel) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor> IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr<IFE_T> forceEvaluatorPtr = make_shared<IFE_T>(blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, @@ -1217,7 +1217,7 @@ int main( int argc, char **argv ) { viscosity); dragAndPressureForceEvaluationFunction = std::bind(&IFE_T::operator(), forceEvaluatorPtr); } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor> IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor>; shared_ptr<IFE_T> forceEvaluatorPtr = make_shared<IFE_T>(blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, @@ -1227,7 +1227,7 @@ int main( int argc, char **argv ) { } } else if (interpol == Interpolation::ITrilinear) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::NearestNeighborDistributor> IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr<IFE_T> forceEvaluatorPtr = make_shared<IFE_T>(blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, @@ -1235,7 +1235,7 @@ int main( int argc, char **argv ) { viscosity); dragAndPressureForceEvaluationFunction = std::bind(&IFE_T::operator(), forceEvaluatorPtr); } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::KernelDistributor> IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::KernelDistributor>; shared_ptr<IFE_T> forceEvaluatorPtr = make_shared<IFE_T>(blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, @@ -1257,7 +1257,7 @@ int main( int argc, char **argv ) { { if( dist == Distribution::DNearestNeighbor ) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity ); @@ -1265,7 +1265,7 @@ int main( int argc, char **argv ) { } else if( dist == Distribution::DKernel ) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity ); @@ -1276,7 +1276,7 @@ int main( int argc, char **argv ) { { if( dist == Distribution::DNearestNeighbor ) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity ); @@ -1284,7 +1284,7 @@ int main( int argc, char **argv ) { } else if( dist == Distribution::DKernel ) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity ); @@ -1295,7 +1295,7 @@ int main( int argc, char **argv ) { { if( dist == Distribution::DNearestNeighbor ) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< FlagField_T, field::TrilinearFieldInterpolator, field::NearestNeighborDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity ); @@ -1303,7 +1303,7 @@ int main( int argc, char **argv ) { } else if( dist == Distribution::DKernel ) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< FlagField_T, field::TrilinearFieldInterpolator, field::KernelDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity ); @@ -1317,7 +1317,7 @@ int main( int argc, char **argv ) { { if( dist == Distribution::DNearestNeighbor ) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator ); @@ -1325,7 +1325,7 @@ int main( int argc, char **argv ) { } else if( dist == Distribution::DKernel ) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator ); @@ -1336,7 +1336,7 @@ int main( int argc, char **argv ) { { if( dist == Distribution::DNearestNeighbor ) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator ); @@ -1344,7 +1344,7 @@ int main( int argc, char **argv ) { } else if( dist == Distribution::DKernel ) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator ); @@ -1355,7 +1355,7 @@ int main( int argc, char **argv ) { { if( dist == Distribution::DNearestNeighbor ) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< FlagField_T, field::TrilinearFieldInterpolator, field::NearestNeighborDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator ); @@ -1363,7 +1363,7 @@ int main( int argc, char **argv ) { } else if( dist == Distribution::DKernel ) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< FlagField_T, field::TrilinearFieldInterpolator, field::KernelDistributor > IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::TrilinearFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T > ( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator ); diff --git a/apps/showcases/CombinedResolvedUnresolved/CombinedResolvedUnresolved.cpp b/apps/showcases/CombinedResolvedUnresolved/CombinedResolvedUnresolved.cpp index e8e27e9cf9e0bc8d5f0c0f3d28e1fbe7c10d2780..5e1074ad008cd0a14f82fd6d3defd133063d4456 100644 --- a/apps/showcases/CombinedResolvedUnresolved/CombinedResolvedUnresolved.cpp +++ b/apps/showcases/CombinedResolvedUnresolved/CombinedResolvedUnresolved.cpp @@ -81,13 +81,13 @@ using walberla::uint_t; // PDF field, flag field & body field -typedef GhostLayerField< pe::BodyID, 1 > BodyField_T; -typedef GhostLayerField< Matrix3< real_t >, 1 > TensorField_T; -typedef GhostLayerField< Vector3< real_t >, 1 > Vec3Field_T; -typedef GhostLayerField< real_t, 1 > ScalarField_T; +using BodyField_T = GhostLayerField<pe::BodyID, 1>; +using TensorField_T = GhostLayerField<Matrix3<real_t>, 1>; +using Vec3Field_T = GhostLayerField<Vector3<real_t>, 1>; +using ScalarField_T = GhostLayerField<real_t, 1>; using ForceModel_T = lbm::force_model::GuoField< Vec3Field_T >; -typedef lbm::D3Q19< lbm::collision_model::SRTField< ScalarField_T >, false, ForceModel_T > LatticeModel_T; +using LatticeModel_T = lbm::D3Q19<lbm::collision_model::SRTField<ScalarField_T>, false, ForceModel_T>; using Stencil_T = LatticeModel_T::Stencil; using PdfField_T = lbm::PdfField< LatticeModel_T >; @@ -97,13 +97,13 @@ using FlagField_T = FlagField< flag_t >; const uint_t FieldGhostLayers = 1; // boundary handling -typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; +using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; -typedef pe_coupling::CurvedLinear< LatticeModel_T, FlagField_T > MO_T; +using MO_T = pe_coupling::CurvedLinear<LatticeModel_T, FlagField_T>; -typedef BoundaryHandling< FlagField_T, Stencil_T, NoSlip_T, MO_T > BoundaryHandling_T; +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, NoSlip_T, MO_T>; -typedef std::tuple< pe::Sphere, pe::Plane > BodyTypeTuple; +using BodyTypeTuple = std::tuple<pe::Sphere, pe::Plane>; /////////// // FLAGS // @@ -798,9 +798,7 @@ int main(int argc, char** argv) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator< - FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, pressureGradientFieldID, dragCorrelationFunction, viscosity, selectDPMBodies); @@ -808,9 +806,7 @@ int main(int argc, char** argv) } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator< - FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, pressureGradientFieldID, dragCorrelationFunction, viscosity, selectDPMBodies); @@ -821,9 +817,7 @@ int main(int argc, char** argv) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator< - FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, pressureGradientFieldID, dragCorrelationFunction, viscosity, selectDPMBodies); @@ -831,9 +825,7 @@ int main(int argc, char** argv) } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::InteractionForceEvaluator< - FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::InteractionForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, dragForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, svfFieldID, pressureGradientFieldID, dragCorrelationFunction, viscosity, selectDPMBodies); @@ -847,9 +839,7 @@ int main(int argc, char** argv) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< - FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >(blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity, selectDPMBodies); @@ -857,9 +847,7 @@ int main(int argc, char** argv) } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< - FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >(blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity, selectDPMBodies); @@ -870,9 +858,7 @@ int main(int argc, char** argv) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< - FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >(blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity, selectDPMBodies); @@ -880,9 +866,7 @@ int main(int argc, char** argv) } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::LiftForceEvaluator< - FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::LiftForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >(blocks, liftForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, velocityFieldID, velocityCurlFieldID, liftCorrelationFunction, viscosity, selectDPMBodies); @@ -896,9 +880,7 @@ int main(int argc, char** argv) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< - FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator, selectDPMBodies); @@ -906,9 +888,7 @@ int main(int argc, char** argv) } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< - FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::NearestNeighborFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator, selectDPMBodies); @@ -919,9 +899,7 @@ int main(int argc, char** argv) { if (dist == Distribution::DNearestNeighbor) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< - FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::NearestNeighborDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator, selectDPMBodies); @@ -929,9 +907,7 @@ int main(int argc, char** argv) } else if (dist == Distribution::DKernel) { - typedef pe_coupling::discrete_particle_methods::AddedMassForceEvaluator< - FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor > - IFE_T; + using IFE_T = pe_coupling::discrete_particle_methods::AddedMassForceEvaluator<FlagField_T, field::KernelFieldInterpolator, field::KernelDistributor>; shared_ptr< IFE_T > forceEvaluatorPtr = make_shared< IFE_T >( blocks, amForceFieldID, bodyStorageID, flagFieldID, Fluid_Flag, timeDerivativeVelocityFieldID, addedMassCorrelationFunction, bodyVelocityTimeDerivativeEvaluator, selectDPMBodies); @@ -1216,9 +1192,7 @@ int main(int argc, char** argv) // sweep for restoring PDFs in cells previously occupied by pe bodies pe_coupling::SphereNormalExtrapolationDirectionFinder extrapolationFinder(blocks, bodyFieldID); - typedef pe_coupling::ExtrapolationReconstructor< LatticeModel_T, BoundaryHandling_T, - pe_coupling::SphereNormalExtrapolationDirectionFinder > - Reconstructor_T; + using Reconstructor_T = pe_coupling::ExtrapolationReconstructor<LatticeModel_T, BoundaryHandling_T, pe_coupling::SphereNormalExtrapolationDirectionFinder>; Reconstructor_T reconstructor(blocks, boundaryHandlingID, bodyFieldID, extrapolationFinder, true); timeloop.add() << Sweep(pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructor_T >( diff --git a/apps/tutorials/basics/03_GameOfLife.cpp b/apps/tutorials/basics/03_GameOfLife.cpp index 92cc1146bdedf42b85c5481c0bc6166a401701cb..868e21bcd7f8c5e62d49f984958fadb96a16221c 100644 --- a/apps/tutorials/basics/03_GameOfLife.cpp +++ b/apps/tutorials/basics/03_GameOfLife.cpp @@ -186,7 +186,7 @@ int main( int argc, char ** argv ) false, // one block per process? - "false" means all blocks to one process false, false, false ); // no periodicity - typedef GhostLayerField<real_t,1> ScalarField; + using ScalarField = GhostLayerField<real_t, 1>; BlockDataID fieldID = field::addToStorage<ScalarField>( blocks, // block storage "My Field", // name real_c(0), // initial value diff --git a/apps/tutorials/lbm/01_BasicLBM.cpp b/apps/tutorials/lbm/01_BasicLBM.cpp index 1380a1f10e052d8f09032cda1e943698a193d668..ccfd0632d29ed34e7f43bb724500decb4f3145ff 100644 --- a/apps/tutorials/lbm/01_BasicLBM.cpp +++ b/apps/tutorials/lbm/01_BasicLBM.cpp @@ -69,7 +69,7 @@ int main( int argc, char ** argv ) auto boundariesConfig = walberlaEnv.config()->getOneBlock( "Boundaries" ); - typedef lbm::DefaultBoundaryHandlingFactory< LatticeModel_T, FlagField_T > BHFactory; + using BHFactory = lbm::DefaultBoundaryHandlingFactory<LatticeModel_T, FlagField_T>; BlockDataID boundaryHandlingId = BHFactory::addBoundaryHandlingToStorage( blocks, "boundary handling", flagFieldId, pdfFieldId, fluidFlagUID, boundariesConfig.getParameter< Vector3<real_t> >( "velocity0", Vector3<real_t>() ), diff --git a/apps/tutorials/lbm/02_BasicLBM_ExemplaryExtensions.cpp b/apps/tutorials/lbm/02_BasicLBM_ExemplaryExtensions.cpp index 3f75b9bf607e014c9d63744e5a3d8b5981408b7c..1c491b90cd3266361401b3a33795985c4336d536 100644 --- a/apps/tutorials/lbm/02_BasicLBM_ExemplaryExtensions.cpp +++ b/apps/tutorials/lbm/02_BasicLBM_ExemplaryExtensions.cpp @@ -32,7 +32,7 @@ namespace walberla { -typedef lbm::D2Q9< lbm::collision_model::SRT, false, lbm::force_model::SimpleConstant > LatticeModel_T; +using LatticeModel_T = lbm::D2Q9<lbm::collision_model::SRT, false, lbm::force_model::SimpleConstant>; using Stencil_T = LatticeModel_T::Stencil; using CommunicationStencil_T = LatticeModel_T::CommunicationStencil; @@ -78,7 +78,7 @@ public: return; // data type for storing a position together with a floating point value - typedef std::pair< Cell, real_t > PosValuePair; + using PosValuePair = std::pair<Cell, real_t>; // variables for storing the process local minimum/maximum velocity & density PosValuePair maxVelocity = std::pair< Cell, real_t >( Cell(), real_c(0) ); @@ -582,7 +582,7 @@ int main( int argc, char ** argv ) auto boundariesConfig = walberlaEnv.config()->getOneBlock( "Boundaries" ); - typedef lbm::DefaultBoundaryHandlingFactory< LatticeModel_T, FlagField_T > BHFactory; + using BHFactory = lbm::DefaultBoundaryHandlingFactory<LatticeModel_T, FlagField_T>; BlockDataID boundaryHandlingId = BHFactory::addBoundaryHandlingToStorage( blocks, "boundary handling", flagFieldId, pdfFieldId, fluidFlagUID, boundariesConfig.getParameter< Vector3<real_t> >( "velocity0", Vector3<real_t>() ), boundariesConfig.getParameter< Vector3<real_t> >( "velocity1", Vector3<real_t>() ), diff --git a/apps/tutorials/lbm/03_LBLidDrivenCavity.cpp b/apps/tutorials/lbm/03_LBLidDrivenCavity.cpp index 7aa2e29bc21be81d2d2877dcea2abb3af21b5662..95f9ef95e8dc4551bcfe508fea5a8bffea6f7371 100644 --- a/apps/tutorials/lbm/03_LBLidDrivenCavity.cpp +++ b/apps/tutorials/lbm/03_LBLidDrivenCavity.cpp @@ -75,11 +75,11 @@ using FlagField_T = FlagField<flag_t>; // the flag field: used for marking cells // (also used for distinguishing between different boundary conditions // -> every boundary condition possesses its own, unique flag) -typedef lbm::NoSlip< LatticeModel_T, flag_t > NoSlip_T; // no slip boundary condition -typedef lbm::SimpleUBB< LatticeModel_T, flag_t > UBB_T; // velocity bounce back boundary condition that internally works with one ... +using NoSlip_T = lbm::NoSlip<LatticeModel_T, flag_t>; // no slip boundary condition +using UBB_T = lbm::SimpleUBB<LatticeModel_T, flag_t>; // velocity bounce back boundary condition that internally works with one ... // ... constant velocity that must be set during the setup phase -typedef BoundaryHandling< FlagField_T, Stencil_T, NoSlip_T, UBB_T > BoundaryHandling_T; // the boundary handling, includes a collection of all boundary conditions +using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, NoSlip_T, UBB_T>; // the boundary handling, includes a collection of all boundary conditions /////////// // FLAGS // diff --git a/apps/tutorials/pde/01_SolvingPDE.cpp b/apps/tutorials/pde/01_SolvingPDE.cpp index 4b1e7d92f5edfaf572085862668ea085e6c22d96..3091c7597b6d8ef1ba8618eea6350f759d1f5a55 100644 --- a/apps/tutorials/pde/01_SolvingPDE.cpp +++ b/apps/tutorials/pde/01_SolvingPDE.cpp @@ -39,7 +39,7 @@ namespace walberla { -typedef GhostLayerField<real_t,1> ScalarField; +using ScalarField = GhostLayerField<real_t, 1>; using Stencil_T = stencil::D2Q5; diff --git a/apps/tutorials/pde/02_HeatEquation.cpp b/apps/tutorials/pde/02_HeatEquation.cpp index dea4433808530f6d64fb25e5d881b214ca09ce6d..54a13fd9dd7151908183c81e1bcc21b573769d1f 100644 --- a/apps/tutorials/pde/02_HeatEquation.cpp +++ b/apps/tutorials/pde/02_HeatEquation.cpp @@ -43,7 +43,7 @@ namespace walberla { -typedef GhostLayerField<real_t,1> ScalarField; +using ScalarField = GhostLayerField<real_t, 1>; using Stencil_T = stencil::D2Q5; diff --git a/apps/tutorials/pde/03_HeatEquation_Extensions.cpp b/apps/tutorials/pde/03_HeatEquation_Extensions.cpp index 9f65e2b125fddd3b50ddfb468cbeb05c07f342b0..a1b42906a8a13107516921c168e76dc903e9996d 100644 --- a/apps/tutorials/pde/03_HeatEquation_Extensions.cpp +++ b/apps/tutorials/pde/03_HeatEquation_Extensions.cpp @@ -44,7 +44,7 @@ namespace walberla { -typedef GhostLayerField<real_t,1> ScalarField; +using ScalarField = GhostLayerField<real_t, 1>; using Stencil_T = stencil::D2Q5; diff --git a/apps/tutorials/pe/01_ConfinedGas.cpp b/apps/tutorials/pe/01_ConfinedGas.cpp index 6e0d1f7ab989f149270fdd38abe29ce9b5ffb047..df137021bdd824eddbd025cf34a0945838d7a029 100644 --- a/apps/tutorials/pe/01_ConfinedGas.cpp +++ b/apps/tutorials/pe/01_ConfinedGas.cpp @@ -35,7 +35,7 @@ namespace walberla { using namespace walberla::pe; //! [BodyTypeTuple] -typedef std::tuple<Sphere, Plane> BodyTypeTuple ; +using BodyTypeTuple = std::tuple<Sphere, Plane> ; //! [BodyTypeTuple] int main( int argc, char ** argv ) diff --git a/apps/tutorials/pe/02_ConfinedGasExtended.cpp b/apps/tutorials/pe/02_ConfinedGasExtended.cpp index 69629eba1e82294ecaff18e5f25c540df05e5c91..4e08411755475040ba6bbf8ad2404f8cec568c18 100644 --- a/apps/tutorials/pe/02_ConfinedGasExtended.cpp +++ b/apps/tutorials/pe/02_ConfinedGasExtended.cpp @@ -43,7 +43,7 @@ using namespace walberla::pe; using namespace walberla::timing; using namespace walberla::pe::raytracing; -typedef std::tuple<Sphere, Plane> BodyTuple ; +using BodyTuple = std::tuple<Sphere, Plane> ; int main( int argc, char ** argv ) { diff --git a/src/blockforest/Block.h b/src/blockforest/Block.h index caf87d6239c355bdd155e209fdf45afd84fadf45..64c7dafa70efecb428807de242ddf165e4417023 100644 --- a/src/blockforest/Block.h +++ b/src/blockforest/Block.h @@ -366,7 +366,7 @@ inline void Block::setTargetLevel( const uint_t tl ) } // namespace blockforest -typedef blockforest::Block Block; +using Block = blockforest::Block; } // namespace walberla diff --git a/src/blockforest/BlockDataHandling.h b/src/blockforest/BlockDataHandling.h index be978d3a8ba7d098ac4c55c99ea812bb6a868f79..7f56467c06b9eebf033753847020843a14a264c3 100644 --- a/src/blockforest/BlockDataHandling.h +++ b/src/blockforest/BlockDataHandling.h @@ -95,7 +95,7 @@ namespace internal { class BlockDataHandlingWrapper : public domain_decomposition::internal::BlockDataHandlingWrapper { public: - typedef domain_decomposition::internal::BlockData BlockData; + using BlockData = domain_decomposition::internal::BlockData; ~BlockDataHandlingWrapper() override = default; @@ -115,7 +115,7 @@ template< typename T > class BlockDataHandlingHelper : public BlockDataHandlingWrapper { public: - typedef domain_decomposition::internal::BlockData BlockData; + using BlockData = domain_decomposition::internal::BlockData; BlockDataHandlingHelper( const shared_ptr< BlockDataHandling<T> > & dataHandling ) : dataHandling_( dataHandling ) {} ~BlockDataHandlingHelper() override = default; diff --git a/src/blockforest/BlockForest.h b/src/blockforest/BlockForest.h index bd66ced43c30940857cf5609847e839f019ba593..0edd764afde9eaa965b544fd1aaa61b3b9c48f54 100644 --- a/src/blockforest/BlockForest.h +++ b/src/blockforest/BlockForest.h @@ -55,7 +55,6 @@ public: using RefreshCallbackFunction = std::function<void (BlockForest &, const PhantomBlockForest &)>; using SnapshotCreationFunction = std::function<void (std::vector<uint_t> &, std::vector<uint_t> &)>; - [[deprecated("typo: use SnapshotRestoreFunction")]] typedef std::function<uint_t (const uint_t)> SnapshotRestorenFunction; using SnapshotRestoreFunction = std::function<uint_t (const uint_t)>; using SnapshotRestoreCallbackFunction = std::function<void ()>; diff --git a/src/blockforest/BlockID.h b/src/blockforest/BlockID.h index d4efc6bcc4bf557755dfb6a296a3f8681c7c6f74..e62d8ff09d05de25810b4364ecba6aff9824ee06 100644 --- a/src/blockforest/BlockID.h +++ b/src/blockforest/BlockID.h @@ -385,7 +385,7 @@ void BlockID::fromBuffer( Buffer_T& buffer ) { } // namespace blockforest -typedef blockforest::BlockID BlockID; +using BlockID = blockforest::BlockID; } // namespace walberla diff --git a/src/blockforest/GlobalLoadBalancing.h b/src/blockforest/GlobalLoadBalancing.h index ca7c687a9095d427f597ff23897aa7e2cff6b1e9..ba92b73f23d751e2592e253b3a5f001fba227365 100644 --- a/src/blockforest/GlobalLoadBalancing.h +++ b/src/blockforest/GlobalLoadBalancing.h @@ -55,7 +55,7 @@ public: class MetisConfiguration { public: - typedef std::function< memory_t ( const BLOCK* const, const BLOCK* const ) > CommunicationFunction; + using CommunicationFunction = std::function<memory_t (const BLOCK *const, const BLOCK *const)>; MetisConfiguration( const bool _includeMetis = false, const bool _forceMetis = false, CommunicationFunction _communicationFunction = nullptr, const real_t _maxUbvec = real_c(1.5), const uint_t _iterations = uint_c(10) ) : diff --git a/src/blockforest/PhantomBlock.h b/src/blockforest/PhantomBlock.h index 2d6c2b6ee60e9d21fea189a647f98aadc1866575..3872a72610f8ac4d72e095d48573d2c5f069b005 100644 --- a/src/blockforest/PhantomBlock.h +++ b/src/blockforest/PhantomBlock.h @@ -374,6 +374,6 @@ inline const AABB & PhantomBlock::getNeighborAABB( const uint_t index ) const } // namespace blockforest -typedef blockforest::PhantomBlock PhantomBlock; +using PhantomBlock = blockforest::PhantomBlock; } // namespace walberla diff --git a/src/blockforest/PhantomBlockForest.h b/src/blockforest/PhantomBlockForest.h index 1c7285167da9295ab15394133195f812406e1626..92211a7fc7d70c6075e951f83405b0496a8a349b 100644 --- a/src/blockforest/PhantomBlockForest.h +++ b/src/blockforest/PhantomBlockForest.h @@ -42,23 +42,16 @@ class PhantomBlockForest { public: - typedef std::function< Set<SUID> ( const std::vector< std::pair< BlockID, Set<SUID> > > & source, const BlockID & destintation ) > - BlockStateDeterminationFunction; + using BlockStateDeterminationFunction = std::function<Set<SUID> (const std::vector<std::pair<BlockID, Set<SUID>>> &, const BlockID &)>; - typedef std::function< void ( std::vector< std::pair< const PhantomBlock *, walberla::any > > & blockData, - const PhantomBlockForest & phantomForest ) > - PhantomBlockDataAssignmentFunction; + using PhantomBlockDataAssignmentFunction = std::function<void (std::vector<std::pair<const PhantomBlock *, walberla::any>> &, const PhantomBlockForest &)>; /// \param iteration execution counter of this callback /// \return should the callback rerun after phantom block migration? - typedef std::function< bool ( std::vector< std::pair< const PhantomBlock *, uint_t > > & targetProcess, - std::set< uint_t > & processesToRecvFrom, - const PhantomBlockForest & phantomForest, - const uint_t iteration ) > - MigrationPreparationFunction; // = load balancing + using MigrationPreparationFunction = std::function<bool (std::vector<std::pair<const PhantomBlock *, uint_t>> &, std::set<uint_t> &, const PhantomBlockForest &, const uint_t)>; // = load balancing - typedef std::function< void ( mpi::SendBuffer & buffer, const PhantomBlock & block ) > PhantomBlockDataPackFunction; - typedef std::function< void ( mpi::RecvBuffer & buffer, const PhantomBlock & block, walberla::any & data ) > PhantomBlockDataUnpackFunction; + using PhantomBlockDataPackFunction = std::function<void (mpi::SendBuffer &, const PhantomBlock &)>; + using PhantomBlockDataUnpackFunction = std::function<void (mpi::RecvBuffer &, const PhantomBlock &, walberla::any &)>; @@ -128,6 +121,6 @@ inline shared_ptr< PhantomBlock > PhantomBlockForest::getBlock( const BlockID & } // namespace blockforest -typedef blockforest::PhantomBlockForest PhantomBlockForest; +using PhantomBlockForest = blockforest::PhantomBlockForest; } // namespace walberla diff --git a/src/blockforest/SetupBlockForest.h b/src/blockforest/SetupBlockForest.h index 2dac1578f59feaf30e366e822793baf4242c7354..17fd2685a75b864b1c6bd5ba689a38a06acdbc23 100644 --- a/src/blockforest/SetupBlockForest.h +++ b/src/blockforest/SetupBlockForest.h @@ -45,8 +45,7 @@ class SetupBlockForest : private NonCopyable { public: - typedef std::function< uint_t ( SetupBlockForest & forest, const uint_t numberOfProcesses, const memory_t perProcessMemoryLimit ) > - TargetProcessAssignmentFunction; // returns number of processes (may be lower than numberOfProcesses) + using TargetProcessAssignmentFunction = std::function<uint_t (SetupBlockForest &, const uint_t, const memory_t)>; // returns number of processes (may be lower than numberOfProcesses) @@ -72,14 +71,14 @@ public: // Do not use a vector of bool's! Due to the implementation of this vector in the standard library, parallel access to a // vector of bool's - even on different elements - is not thread-safe! - typedef std::function< void ( std::vector<uint8_t>& excludeBlock, const RootBlockAABB& aabb ) > RootBlockExclusionFunction; + using RootBlockExclusionFunction = std::function<void (std::vector<uint8_t> &, const RootBlockAABB &)>; - typedef std::function< void ( SetupBlockForest& forest ) > RefinementSelectionFunction; - typedef std::function< void ( SetupBlockForest& forest ) > WorkloadMemorySUIDAssignmentFunction; + using RefinementSelectionFunction = std::function<void (SetupBlockForest &)>; + using WorkloadMemorySUIDAssignmentFunction = std::function<void (SetupBlockForest &)>; - typedef std::vector< std::pair< const SetupBlock*, const SetupBlock* > > CommunicationPairs; - typedef std::vector< real_t > CommunicationWeights; - typedef std::function< void ( const CommunicationPairs &, CommunicationWeights & ) > CommunicationWeightFunction; + using CommunicationPairs = std::vector<std::pair<const SetupBlock *, const SetupBlock *>>; + using CommunicationWeights = std::vector<real_t>; + using CommunicationWeightFunction = std::function<void (const CommunicationPairs &, CommunicationWeights &)>; inline static void NullCommunicationWeightFunction( const CommunicationPairs &, CommunicationWeights & ) { @@ -715,7 +714,7 @@ class RefinementSelectionFunctions { public: - typedef blockforest::SetupBlockForest::RefinementSelectionFunction RefinementSelectionFunction; + using RefinementSelectionFunction = blockforest::SetupBlockForest::RefinementSelectionFunction; void add( const RefinementSelectionFunction & function ) { diff --git a/src/blockforest/Types.h b/src/blockforest/Types.h index 76ab3911327cb28608cb6c89b2a8e964a6791803..dc61b3551056bdb8e44ec15aa722494c5c81746c 100644 --- a/src/blockforest/Types.h +++ b/src/blockforest/Types.h @@ -33,8 +33,8 @@ namespace blockforest { // data structure specific types -typedef real_t workload_t; -typedef real_t memory_t; +using workload_t = real_t; +using memory_t = real_t; WALBERLA_STATIC_ASSERT( sizeof( workload_t ) == 4 || sizeof( workload_t ) == 8 ); WALBERLA_STATIC_ASSERT( sizeof( memory_t ) == 4 || sizeof( memory_t ) == 8 ); diff --git a/src/blockforest/communication/NonUniformBufferedScheme.h b/src/blockforest/communication/NonUniformBufferedScheme.h index 3e206f36d1aa4bfca2eebf14859dd22b68da72bd..caf91651c578ddc7da5bea5b8a67398e8cc590ee 100644 --- a/src/blockforest/communication/NonUniformBufferedScheme.h +++ b/src/blockforest/communication/NonUniformBufferedScheme.h @@ -55,12 +55,12 @@ public: enum INDEX { EQUAL_LEVEL = 0, COARSE_TO_FINE = 1, FINE_TO_COARSE = 2 }; - typedef mpi::SendBuffer SendBuffer; - typedef mpi::RecvBuffer RecvBuffer; + using SendBuffer = mpi::SendBuffer; + using RecvBuffer = mpi::RecvBuffer; - typedef shared_ptr< blockforest::communication::NonUniformPackInfo > PackInfo; - typedef std::function<void ()> VoidFunction; - typedef std::function<void ( SendBuffer & buffer )> SendBufferFunction; + using PackInfo = shared_ptr<blockforest::communication::NonUniformPackInfo>; + using VoidFunction = std::function<void ()>; + using SendBufferFunction = std::function<void (SendBuffer &)>; //**Construction & Destruction*************************************************************************************** /*! \name Construction & Destruction */ diff --git a/src/blockforest/communication/UniformBufferedScheme.h b/src/blockforest/communication/UniformBufferedScheme.h index 6ee1be18c1d82e98a9684c5869dde1cd08a74fd2..8677b5f83afe7c4ba8bb047fbd95724bc7ce3ac3 100644 --- a/src/blockforest/communication/UniformBufferedScheme.h +++ b/src/blockforest/communication/UniformBufferedScheme.h @@ -80,16 +80,16 @@ template< typename Stencil_T > class UniformBufferedScheme { public: - typedef Stencil_T Stencil; - typedef mpi::SendBuffer SendBuffer; - typedef mpi::RecvBuffer RecvBuffer; + using Stencil = Stencil_T; + using SendBuffer = mpi::SendBuffer; + using RecvBuffer = mpi::RecvBuffer; - typedef shared_ptr< walberla::communication::UniformPackInfo > PackInfo; + using PackInfo = shared_ptr<walberla::communication::UniformPackInfo>; - typedef std::function<void ()> VoidFunction; - typedef std::function<void ( SendBuffer & buffer )> SendBufferFunction; + using VoidFunction = std::function<void ()>; + using SendBufferFunction = std::function<void (SendBuffer &)>; - typedef walberla::communication::UniformPackInfo CommunicationItemInfo; + using CommunicationItemInfo = walberla::communication::UniformPackInfo; //**Construction & Destruction*************************************************************************************** /*! \name Construction & Destruction */ diff --git a/src/blockforest/communication/UniformDirectScheme.h b/src/blockforest/communication/UniformDirectScheme.h index 7dfa2d781396d95f4543dcd5e2755db2fa2f0ff4..0d10c2f4c383281e3b81aecf8c1778f1572ea13f 100644 --- a/src/blockforest/communication/UniformDirectScheme.h +++ b/src/blockforest/communication/UniformDirectScheme.h @@ -48,9 +48,9 @@ template< typename Stencil_T > class UniformDirectScheme { public: - typedef Stencil_T Stencil; - typedef walberla::communication::UniformMPIDatatypeInfo UniformMPIDatatypeInfo; - typedef walberla::communication::UniformMPIDatatypeInfo CommunicationItemInfo; + using Stencil = Stencil_T; + using UniformMPIDatatypeInfo = walberla::communication::UniformMPIDatatypeInfo; + using CommunicationItemInfo = walberla::communication::UniformMPIDatatypeInfo; //**Construction & Destruction*************************************************************************************** /*! \name Construction & Destruction */ diff --git a/src/blockforest/loadbalancing/DynamicCurve.h b/src/blockforest/loadbalancing/DynamicCurve.h index 30724c40f91a67afdcd8781be216a4a44037c0a1..8b3e5808ac2c23b4b0a2016e91b5c18bd438f52f 100644 --- a/src/blockforest/loadbalancing/DynamicCurve.h +++ b/src/blockforest/loadbalancing/DynamicCurve.h @@ -53,8 +53,8 @@ template< typename PhantomData_T, typename Value_T, bool weighted = true > class BlockIDSorter { public: - typedef typename PhantomData_T::weight_t weight_t; - typedef std::vector< std::vector< std::pair< BlockID, weight_t > > > Blocks_T; + using weight_t = typename PhantomData_T::weight_t; + using Blocks_T = std::vector<std::vector<std::pair<BlockID, weight_t>>>; BlockIDSorter( const Blocks_T & blocks ) : blocks_( blocks ) {} bool operator()( const Value_T & lhs, const Value_T & rhs ) const { @@ -68,7 +68,7 @@ template< typename PhantomData_T, typename Value_T > class BlockIDSorter< PhantomData_T, Value_T, false > { public: - typedef std::vector< std::vector< BlockID > > Blocks_T; + using Blocks_T = std::vector<std::vector<BlockID>>; BlockIDSorter( const Blocks_T & blocks ) : blocks_( blocks ) {} bool operator()( const Value_T & lhs, const Value_T & rhs ) const { @@ -101,10 +101,10 @@ class DynamicCurveBalance { public: - typedef typename PhantomData_T::weight_t weight_t; - typedef mpi::MPIRank pid_t; - typedef uint16_t idx_t; // limits the maximum number of blocks per process to 65536 - typedef internal::Node< pid_t, idx_t > Node; + using weight_t = typename PhantomData_T::weight_t; + using pid_t = mpi::MPIRank; + using idx_t = uint16_t; // limits the maximum number of blocks per process to 65536 + using Node = internal::Node<pid_t, idx_t>; DynamicCurveBalance( const bool hilbert = true, const bool allGather = true, const bool levelwise = true ) : hilbert_( hilbert ), allGather_( allGather ), levelwise_(levelwise) diff --git a/src/blockforest/loadbalancing/DynamicParMetis.h b/src/blockforest/loadbalancing/DynamicParMetis.h index fa5663db5961e89cb57f4150cca10902706379d3..f78a4c4c055c56a6047c7b834125ead1af1219d3 100644 --- a/src/blockforest/loadbalancing/DynamicParMetis.h +++ b/src/blockforest/loadbalancing/DynamicParMetis.h @@ -92,8 +92,8 @@ class DynamicParMetisBlockInfo { public: - typedef int64_t weight_t; - typedef int64_t vsize_t; + using weight_t = int64_t; + using vsize_t = int64_t; DynamicParMetisBlockInfo( const weight_t vertexWeight, const uint_t ncon = 1 ) : vertexWeight_(ncon, vertexWeight), vertexSize_(1) diff --git a/src/blockforest/loadbalancing/NoPhantomData.h b/src/blockforest/loadbalancing/NoPhantomData.h index a1662855d50a9477be38ded3e7ac7edfd945d129..7de1f9aaf90ac6576f8c09e5184cfea34b1280c5 100644 --- a/src/blockforest/loadbalancing/NoPhantomData.h +++ b/src/blockforest/loadbalancing/NoPhantomData.h @@ -31,7 +31,7 @@ namespace blockforest { class NoPhantomData { public: - typedef uint8_t weight_t; + using weight_t = uint8_t; weight_t weight() const { return uint8_t(1); } }; diff --git a/src/blockforest/loadbalancing/PODPhantomData.h b/src/blockforest/loadbalancing/PODPhantomData.h index 2be8c77cecf13525222529e9dfbc2d31dfd35cea..2b8bc23eb8b4f0b5f1b49b7e5a690235d9e7384c 100644 --- a/src/blockforest/loadbalancing/PODPhantomData.h +++ b/src/blockforest/loadbalancing/PODPhantomData.h @@ -35,7 +35,7 @@ class PODPhantomWeight { public: - typedef T weight_t; + using weight_t = T; PODPhantomWeight( const T _weight ) : weight_( _weight ) {} diff --git a/src/blockforest/loadbalancing/StaticParMetis.h b/src/blockforest/loadbalancing/StaticParMetis.h index 0e77baf45b72be5a6f6991fed3c8cc49891f94f9..305d10a6d2c3486efb95f8113b62d115436471d6 100644 --- a/src/blockforest/loadbalancing/StaticParMetis.h +++ b/src/blockforest/loadbalancing/StaticParMetis.h @@ -40,8 +40,8 @@ public: enum Algorithm { PARMETIS_PART_GEOM_KWAY, PARMETIS_PART_KWAY }; enum WeightsToUse { PARMETIS_NO_WEIGHTS = 0, PARMETIS_EDGE_WEIGHTS = 1, PARMETIS_VERTEX_WEIGHTS = 2, PARMETIS_BOTH_WEIGHTS = 3 }; - typedef std::pair< const SetupBlock *, const SetupBlock * > BlockPair; - typedef std::function<void (const std::vector< BlockPair > & edges, std::vector< int64_t > & weights ) > CommWeightFunction; + using BlockPair = std::pair<const SetupBlock *, const SetupBlock *>; + using CommWeightFunction = std::function<void (const std::vector<BlockPair> &, std::vector<int64_t> &)>; StaticLevelwiseParMetis( const Algorithm algorithm = PARMETIS_PART_GEOM_KWAY ) : algorithm_( algorithm ), weightsToUse_( PARMETIS_VERTEX_WEIGHTS ) {} diff --git a/src/boundary/BoundaryHandling.h b/src/boundary/BoundaryHandling.h index 0910be4552c9f97d587c668cd8a95551f23cd3fe..9aa5a34390fb71d7479d512130dca4d81dc982b6 100644 --- a/src/boundary/BoundaryHandling.h +++ b/src/boundary/BoundaryHandling.h @@ -66,7 +66,7 @@ using std::tuple_size; class BHUIDGenerator : public uid::IndexGenerator< BHUIDGenerator, uint_t >{}; -typedef UID< BHUIDGenerator > BoundaryHandlingUID; +using BoundaryHandlingUID = UID<BHUIDGenerator>; @@ -78,9 +78,9 @@ public: template< typename F, typename... T > friend class BoundaryHandlingCollection; - typedef FlagField_T FlagField; - typedef typename FlagField_T::flag_t flag_t; - typedef typename FlagField_T::const_base_iterator ConstFlagFieldBaseIterator; + using FlagField = FlagField_T; + using flag_t = typename FlagField_T::flag_t; + using ConstFlagFieldBaseIterator = typename FlagField_T::const_base_iterator; enum Mode { OPTIMIZED_SPARSE_TRAVERSAL, ENTIRE_FIELD_TRAVERSAL }; @@ -664,7 +664,7 @@ private: std::vector< std::vector< std::vector< std::pair< Cell, stencil::Direction > > > > cellDirectionPairs_; // 1st vector: numberOfGhostLayersToInclude // 2nd vector: boundary condition index // 3rd vector: vector of cell<->direction pairs - typedef std::tuple<Boundaries...> Tuple; + using Tuple = std::tuple<Boundaries...>; Tuple boundaryConditions_; bool threadSafeBCs_; diff --git a/src/boundary/BoundaryHandlingCollection.h b/src/boundary/BoundaryHandlingCollection.h index 61320c1788d2a7725e08cae6faa4fc24481557d1..7b94d4a0e2c47b12724162ce89c007c850de964d 100644 --- a/src/boundary/BoundaryHandlingCollection.h +++ b/src/boundary/BoundaryHandlingCollection.h @@ -49,7 +49,7 @@ namespace boundary { class BHCUIDGenerator : public uid::IndexGenerator< BHCUIDGenerator, uint_t >{}; -typedef UID< BHCUIDGenerator > BoundaryHandlingCollectionUID; +using BoundaryHandlingCollectionUID = UID<BHCUIDGenerator>; @@ -58,9 +58,9 @@ class BoundaryHandlingCollection { public: - typedef FlagField_T FlagField; - typedef typename FlagField_T::flag_t flag_t; - typedef typename FlagField_T::const_base_iterator ConstFlagFieldBaseIterator; + using FlagField = FlagField_T; + using flag_t = typename FlagField_T::flag_t; + using ConstFlagFieldBaseIterator = typename FlagField_T::const_base_iterator; @@ -534,7 +534,7 @@ private: const CellInterval outerBB_; - typedef std::tuple<Handlers...> Tuple; + using Tuple = std::tuple<Handlers...>; Tuple boundaryHandlers_; }; // class BoundaryHandlingCollection diff --git a/src/boundary/BoundaryUID.h b/src/boundary/BoundaryUID.h index 3df48a8c8b0ae31c9f109c376b429d55bf2e9367..0f3a86bb125faffce711309f137cc1a9878c6036 100644 --- a/src/boundary/BoundaryUID.h +++ b/src/boundary/BoundaryUID.h @@ -29,7 +29,7 @@ namespace boundary { class BUIDGenerator : public uid::IndexGenerator< BUIDGenerator, size_t >{}; -typedef UID< BUIDGenerator > BoundaryUID; +using BoundaryUID = UID<BUIDGenerator>; } // namespace boundary diff --git a/src/core/Abort.h b/src/core/Abort.h index 23b1ef1ff30d428fd0dce81a1f72360e7ec6eb40..ee77794f5c5ab634c451f8f14bde1bdcaa5893d5 100644 --- a/src/core/Abort.h +++ b/src/core/Abort.h @@ -40,7 +40,7 @@ class Abort : public singleton::Singleton<Abort> public: - typedef std::function<void ( const std::string & message, const std::string & callerPath, const int line, bool withDebugInfo )> AbortFunction; + using AbortFunction = std::function<void (const std::string &, const std::string &, const int, bool)>; void resetAbortFunction( const AbortFunction & function = AbortFunction() ) { abortFunction_ = function; } diff --git a/src/core/AllSet.h b/src/core/AllSet.h index 74842fd8359bc0a64bebcbcb764ed3a473764f55..a2c79581b0eddab97af45c967c832cc793bf9502 100644 --- a/src/core/AllSet.h +++ b/src/core/AllSet.h @@ -94,7 +94,7 @@ public: friend inline bool operator==( const AllSet& a, const AllSet& b ) { return setIsEqual(a,b); } ///< compares the content of two sets friend inline bool operator!=( const AllSet& a, const AllSet& b ) { return !setIsEqual(a,b); } ///< compares the content of two sets - typedef typename std::set<T>::const_iterator ConstIter; + using ConstIter = typename std::set<T>::const_iterator; diff --git a/src/core/DataTypes.h b/src/core/DataTypes.h index 121f836c58109e4aa35f0c4ca9f0a365dbf4d649..8cb35637b67fe63c28846454955750b769574518 100644 --- a/src/core/DataTypes.h +++ b/src/core/DataTypes.h @@ -86,10 +86,10 @@ inline S numeric_cast( T t ) { // fixed size signed integral types -typedef std::int8_t int8_t; ///< 8 bit signed integer -typedef std::int16_t int16_t; ///< 16 bit signed integer -typedef std::int32_t int32_t; ///< 32 bit signed integer -typedef std::int64_t int64_t; ///< 64 bit signed integer +using int8_t = std::int8_t; ///< 8 bit signed integer +using int16_t = std::int16_t; ///< 16 bit signed integer +using int32_t = std::int32_t; ///< 32 bit signed integer +using int64_t = std::int64_t; ///< 64 bit signed integer template< typename T > inline int8_t int8_c( T t ) { return numeric_cast< int8_t >(t); } ///< cast to type int8_t using "int8_c(x)" template< typename T > inline int16_t int16_c( T t ) { return numeric_cast< int16_t >(t); } ///< cast to type int16_t using "int16_c(x)" @@ -100,12 +100,12 @@ template< typename T > inline int64_t int64_c( T t ) { return numeric_cast< int6 // fixed size unsigned integral types -typedef std::uint8_t uint8_t; ///< 8 bit unsigned integer -typedef std::uint16_t uint16_t; ///< 16 bit unsigned integer -typedef std::uint32_t uint32_t; ///< 32 bit unsigned integer -typedef std::uint64_t uint64_t; ///< 64 bit unsigned integer -typedef uint8_t byte_t; -typedef uint64_t id_t; //sid datatype for pe +using uint8_t = std::uint8_t; ///< 8 bit unsigned integer +using uint16_t = std::uint16_t; ///< 16 bit unsigned integer +using uint32_t = std::uint32_t; ///< 32 bit unsigned integer +using uint64_t = std::uint64_t; ///< 64 bit unsigned integer +using byte_t = uint8_t; +using id_t = uint64_t; //sid datatype for pe template< typename T > inline uint8_t uint8_c( T t ) { return numeric_cast< uint8_t >(t); } ///< cast to type uint8_t using "uint8_c(x)" template< typename T > inline uint16_t uint16_c( T t ) { return numeric_cast< uint16_t >(t); } ///< cast to type uint16_t using "uint16_c(x)" @@ -127,7 +127,7 @@ inline void static_assert_int_t() { // unsigned integral type -typedef size_t uint_t; +using uint_t = size_t; static_assert( std::numeric_limits<uint_t>::is_specialized && std::numeric_limits<uint_t>::is_integer && @@ -144,7 +144,7 @@ inline void static_assert_uint_t() { // data structure specific data types -typedef int cell_idx_t; +using cell_idx_t = int; //typedef int64_t cell_idx_t; WALBERLA_STATIC_ASSERT( std::numeric_limits<cell_idx_t>::is_specialized && @@ -158,7 +158,7 @@ template< typename T > inline cell_idx_t cell_idx_c( T t ) { return numeric_cast // floating point type #ifdef WALBERLA_DOUBLE_ACCURACY -typedef double real_t; +using real_t = double; #else typedef float real_t; #endif diff --git a/src/core/OpenMP.h b/src/core/OpenMP.h index 67d32589a2c3676361e9605ee06cdee385dcdebd..b8ae3d6077ea8e5467fa84deecc959f5be80bb4c 100644 --- a/src/core/OpenMP.h +++ b/src/core/OpenMP.h @@ -48,12 +48,12 @@ namespace walberla { #define WALBERLA_OPENMP_FUNCTION_ERROR WALBERLA_ABORT( "Invalid OpenMP function call! In case of compiling without OpenMP, OpenMP functions are not available and shouldn't be called!" ); /* schedule kind constants */ -typedef enum omp_sched_t { +using omp_sched_t = enum omp_sched_t { omp_sched_static = 1, omp_sched_dynamic = 2, omp_sched_guided = 3, omp_sched_auto = 4 -} omp_sched_t; +}; /* set API functions */ inline void omp_set_num_threads (int) { WALBERLA_OPENMP_FUNCTION_ERROR } @@ -81,9 +81,9 @@ inline void omp_get_schedule (omp_sched_t *, int *) { WALBERLA_OPE inline int omp_get_max_task_priority (void) { WALBERLA_OPENMP_FUNCTION_ERROR } /* lock API functions */ -typedef struct omp_lock_t { +using omp_lock_t = struct omp_lock_t { void * _lk; -} omp_lock_t; +}; inline void omp_init_lock (omp_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR } inline void omp_set_lock (omp_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR } @@ -92,9 +92,9 @@ inline void omp_destroy_lock (omp_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR inline int omp_test_lock (omp_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR } /* nested lock API functions */ -typedef struct omp_nest_lock_t { +using omp_nest_lock_t = struct omp_nest_lock_t { void * _lk; -} omp_nest_lock_t; +}; inline void omp_init_nest_lock (omp_nest_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR } inline void omp_set_nest_lock (omp_nest_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR } @@ -103,7 +103,7 @@ inline void omp_destroy_nest_lock (omp_nest_lock_t *) { WALBERLA_OPENMP_FUNCT inline int omp_test_nest_lock (omp_nest_lock_t *) { WALBERLA_OPENMP_FUNCTION_ERROR } /* lock hint type for dynamic user lock */ -typedef enum omp_lock_hint_t { +using omp_lock_hint_t = enum omp_lock_hint_t { omp_lock_hint_none = 0, omp_lock_hint_uncontended = 1, omp_lock_hint_contended = (1<<1 ), @@ -112,7 +112,7 @@ typedef enum omp_lock_hint_t { kmp_lock_hint_hle = (1<<16), kmp_lock_hint_rtm = (1<<17), kmp_lock_hint_adaptive = (1<<18) -} omp_lock_hint_t; +}; /* hinted lock initializers */ inline void omp_init_lock_with_hint(omp_lock_t *, omp_lock_hint_t) { WALBERLA_OPENMP_FUNCTION_ERROR } @@ -144,13 +144,13 @@ inline int omp_target_associate_ptr(void *, void *, size_t, size_t, int) { WA inline int omp_target_disassociate_ptr(void *, int) { WALBERLA_OPENMP_FUNCTION_ERROR } /* OpenMP 4.0 affinity API */ -typedef enum omp_proc_bind_t { +using omp_proc_bind_t = enum omp_proc_bind_t { omp_proc_bind_false = 0, omp_proc_bind_true = 1, omp_proc_bind_master = 2, omp_proc_bind_close = 3, omp_proc_bind_spread = 4 -} omp_proc_bind_t; +}; inline omp_proc_bind_t omp_get_proc_bind (void) { WALBERLA_OPENMP_FUNCTION_ERROR } diff --git a/src/core/Set.h b/src/core/Set.h index 7f094ad961abf8a0d0cb434684a712fbd2cfc3e3..cbc0d5c1196404f4fb71d72492c40a7a326b03c2 100644 --- a/src/core/Set.h +++ b/src/core/Set.h @@ -85,9 +85,9 @@ template< typename T > class Set { public: - typedef typename std::set<T>::value_type value_type; - typedef typename std::set<T>::const_iterator const_iterator; - typedef typename std::set<T>::iterator iterator; + using value_type = typename std::set<T>::value_type; + using const_iterator = typename std::set<T>::const_iterator; + using iterator = typename std::set<T>::iterator; friend inline Set<T> operator&( const Set& a, const Set& b ) { return setIntersection(a,b); } ///< intersection friend inline Set<T> operator+( const Set& a, const Set& b ) { return setUnion (a,b); } ///< union diff --git a/src/core/VectorTrait.h b/src/core/VectorTrait.h index b050d159ee2a9a39670e715f5ebdccd7a95d42aa..82d60ef0bdd1ddf51193c9b7840d097d8fcfd99f 100644 --- a/src/core/VectorTrait.h +++ b/src/core/VectorTrait.h @@ -38,7 +38,7 @@ namespace walberla { template< typename T, class Enable = void > struct VectorTrait { - typedef void OutputType; + using OutputType = void; static const uint_t F_SIZE = 0u; }; @@ -46,7 +46,7 @@ struct VectorTrait template< typename T > struct VectorTrait<T, typename std::enable_if<std::is_arithmetic<T>::value>::type> { - typedef T OutputType; + using OutputType = T; static const uint_t F_SIZE = 1u; static T get ( T value, uint_t /*f*/ ) { return value; } diff --git a/src/core/cell/CellInterval.h b/src/core/cell/CellInterval.h index 10f2529aaebe86813a63524bc61a306371455481..4befe87c1a85298e475636776bdd7eafd731e2b0 100644 --- a/src/core/cell/CellInterval.h +++ b/src/core/cell/CellInterval.h @@ -50,7 +50,7 @@ class CellIntervalIterator; class CellInterval { public: - typedef CellIntervalIterator const_iterator; + using const_iterator = CellIntervalIterator; CellInterval() : min_( cell_idx_c(0), cell_idx_c(0), cell_idx_c(0) ), max_( cell_idx_c(-1), cell_idx_c(-1), cell_idx_c(-1) ) {} CellInterval( const Cell& _min, const Cell& _max ) : min_( _min ), max_( _max ) {} @@ -132,11 +132,11 @@ inline bool CellInterval::positiveIndicesOnly() const { class CellIntervalIterator { public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef Cell value_type; - typedef ptrdiff_t difference_type; - typedef Cell* pointer; - typedef Cell& reference; + using iterator_category = std::bidirectional_iterator_tag; + using value_type = Cell; + using difference_type = ptrdiff_t; + using pointer = Cell *; + using reference = Cell &; CellIntervalIterator( const CellInterval & ci, const Cell & cell ) : ci_(ci), cell_( cell ) { } diff --git a/src/core/cell/CellVector.h b/src/core/cell/CellVector.h index aa0fdefbd91171929dc0bceca786c515ed220ab7..c05474400a39ba7b59ffd0268649eb12e3abc2eb 100644 --- a/src/core/cell/CellVector.h +++ b/src/core/cell/CellVector.h @@ -45,13 +45,13 @@ public: /*! \name Standard container typedefs */ //@{ - typedef std::vector<Cell>::iterator iterator; - typedef std::vector<Cell>::const_iterator const_iterator; - typedef std::vector<Cell>::size_type size_type; - typedef std::vector<Cell>::reference reference; - typedef std::vector<Cell>::const_reference const_reference; - typedef std::vector<Cell>::difference_type difference_type; - typedef Cell value_type; + using iterator = std::vector<Cell>::iterator; + using const_iterator = std::vector<Cell>::const_iterator; + using size_type = std::vector<Cell>::size_type; + using reference = std::vector<Cell>::reference; + using const_reference = std::vector<Cell>::const_reference; + using difference_type = std::vector<Cell>::difference_type; + using value_type = Cell; //@} /*! \name Constructors */ diff --git a/src/core/config/Config.h b/src/core/config/Config.h index 0566612517457c7b5ac4f9d1f5afb102e30cb95a..51d16fdeee366dcbe69ebce182e217fa9113e8ce 100644 --- a/src/core/config/Config.h +++ b/src/core/config/Config.h @@ -88,16 +88,16 @@ public: private: //**Type definitions**************************************************************************** - typedef std::string Key; //!< Parameter key. - typedef std::string Value; //!< Parameter value. - typedef std::map<Key,Value, CaseInsensitiveCompare> Map; //!< Parameter map. - typedef std::list<Block> List; //!< List for parameter blocks. - typedef std::map<Value,Value> ValueReplacementMap; //!< Parameter value replacement map - - typedef std::stringstream::pos_type sstreamPos; //!< Stream position. - typedef std::pair<sstreamPos,unsigned int> Pair; //!< Pair consisting of a stream position + using Key = std::string; //!< Parameter key. + using Value = std::string; //!< Parameter value. + using Map = std::map<Key, Value, CaseInsensitiveCompare>; //!< Parameter map. + using List = std::list<Block>; //!< List for parameter blocks. + using ValueReplacementMap = std::map<Value, Value>; //!< Parameter value replacement map + + using sstreamPos = std::stringstream::pos_type; //!< Stream position. + using Pair = std::pair<sstreamPos, unsigned int>; //!< Pair consisting of a stream position //!< and a line number. - typedef std::vector<Pair> LineVector; //!< Vector for Pair. + using LineVector = std::vector<Pair>; //!< Vector for Pair. //******************************************************************************************************************* //**Member constants************************************************************************************************* @@ -106,11 +106,11 @@ private: public: //**Type definitions**************************************************************************** - typedef std::vector<BlockHandle> Blocks; //!< Container for block handles. - typedef List::size_type size_type; //!< Size type for a Block count. + using Blocks = std::vector<BlockHandle>; //!< Container for block handles. + using size_type = List::size_type; //!< Size type for a Block count. - typedef Map::iterator iterator; //!< Iterator over the contained parameters. - typedef Map::const_iterator const_iterator; //!< Constant iterator over the contained parameters. + using iterator = Map::iterator; //!< Iterator over the contained parameters. + using const_iterator = Map::const_iterator; //!< Constant iterator over the contained parameters. //******************************************************************************************************************* //**Error codes****************************************************************************************************** diff --git a/src/core/debug/CheckFunctions.impl.h b/src/core/debug/CheckFunctions.impl.h index e1932fddae763bfe6bc983be52637f978754b8e9..e4615bc0e1aaeca998385b5b8352bd00d05efa3a 100644 --- a/src/core/debug/CheckFunctions.impl.h +++ b/src/core/debug/CheckFunctions.impl.h @@ -61,14 +61,14 @@ inline bool check_not_nullptr( const shared_ptr<T> & p ) template< typename T, typename U > inline bool check_equal( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_equal( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_equal( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return static_cast<HighType>(lhs) == static_cast<HighType>(rhs); } @@ -81,14 +81,14 @@ inline bool check_equal( const T & lhs, const U & rhs, const std::false_type & ) template< typename T, typename U > inline bool check_unequal( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_unequal( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_unequal( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return static_cast<HighType>(lhs) != static_cast<HighType>(rhs); } @@ -104,7 +104,7 @@ inline bool check_float_equal( const T & lhs, const U & rhs ) static_assert( std::is_floating_point<T>::value, "First operand type T is not a floating point type!"); static_assert( std::is_floating_point<U>::value, "Second operand type U is not a floating point type!"); - typedef typename math::MathTrait<T,U>::Low LowType; + using LowType = typename math::MathTrait<T, U>::Low; LowType low_lhs = static_cast<LowType>( lhs ); LowType low_rhs = static_cast<LowType>( rhs ); @@ -118,7 +118,7 @@ inline bool check_float_unequal( const T & lhs, const U & rhs ) static_assert( std::is_floating_point<T>::value, "First operand type T is not a floating point type!"); static_assert( std::is_floating_point<U>::value, "Second operand type U is not a floating point type!"); - typedef typename math::MathTrait<T,U>::Low LowType; + using LowType = typename math::MathTrait<T, U>::Low; LowType low_lhs = static_cast<LowType>( lhs ); LowType low_rhs = static_cast<LowType>( rhs ); @@ -133,7 +133,7 @@ inline bool check_float_equal_eps( const T & lhs, const U & rhs, static_assert( std::is_floating_point<T>::value, "First operand type T is not a floating point type!"); static_assert( std::is_floating_point<U>::value, "Second operand type U is not a floating point type!"); - typedef typename math::MathTrait<T,U>::Low LowType; + using LowType = typename math::MathTrait<T, U>::Low; LowType low_lhs = static_cast<LowType>( lhs ); LowType low_rhs = static_cast<LowType>( rhs ); @@ -148,7 +148,7 @@ inline bool check_float_unequal_eps( const T & lhs, const U & rhs, static_assert( std::is_floating_point<T>::value, "First operand type T is not a floating point type!"); static_assert( std::is_floating_point<U>::value, "Second operand type U is not a floating point type!"); - typedef typename math::MathTrait<T,U>::Low LowType; + using LowType = typename math::MathTrait<T, U>::Low; LowType low_lhs = static_cast<LowType>( lhs ); LowType low_rhs = static_cast<LowType>( rhs ); @@ -159,14 +159,14 @@ inline bool check_float_unequal_eps( const T & lhs, const U & rhs, template< typename T, typename U > inline bool check_identical( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_identical( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_identical( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return isIdentical( static_cast<HighType>(lhs), static_cast<HighType>(rhs) ); } @@ -179,14 +179,14 @@ inline bool check_identical( const T & lhs, const U & rhs, const std::false_type template< typename T, typename U > inline bool check_not_identical( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_not_identical( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_not_identical( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return !isIdentical( static_cast<HighType>(lhs), static_cast<HighType>(rhs) ); } @@ -199,14 +199,14 @@ inline bool check_not_identical( const T & lhs, const U & rhs, const std::false_ template< typename T, typename U > inline bool check_less( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_less( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_less( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return static_cast<HighType>(lhs) < static_cast<HighType>(rhs); } @@ -219,14 +219,14 @@ inline bool check_less( const T & lhs, const U & rhs, const std::false_type & ) template< typename T, typename U > inline bool check_greater( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_greater( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_greater( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return static_cast<HighType>(lhs) > static_cast<HighType>(rhs); } @@ -239,14 +239,14 @@ inline bool check_greater( const T & lhs, const U & rhs, const std::false_type & template< typename T, typename U > inline bool check_less_equal( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_less_equal( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_less_equal( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return static_cast<HighType>(lhs) <= static_cast<HighType>(rhs); } @@ -259,14 +259,14 @@ inline bool check_less_equal( const T & lhs, const U & rhs, const std::false_typ template< typename T, typename U > inline bool check_greater_equal( const T & lhs, const U & rhs ) { - typedef std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value> truth_type; + using truth_type = std::integral_constant<bool, std::is_arithmetic<T>::value && std::is_arithmetic<U>::value>; return check_greater_equal( lhs, rhs, truth_type() ); } template< typename T, typename U > inline bool check_greater_equal( const T & lhs, const U & rhs, const std::true_type & ) { - typedef typename math::MathTrait<T,U>::High HighType; + using HighType = typename math::MathTrait<T, U>::High; return static_cast<HighType>(lhs) >= static_cast<HighType>(rhs); } diff --git a/src/core/math/AABBFwd.h b/src/core/math/AABBFwd.h index 9a7593b67bb0ef469a3753a786282aa7e64045cd..3a51fbd441b3b6addfb9f09b10d2aec02c0ae5e5 100644 --- a/src/core/math/AABBFwd.h +++ b/src/core/math/AABBFwd.h @@ -30,7 +30,7 @@ namespace math { template< typename T > class GenericAABB; -typedef GenericAABB< real_t > AABB; /// see class GenericAABB +using AABB = GenericAABB<real_t>; /// see class GenericAABB } // namespace math diff --git a/src/core/math/GenericAABB.h b/src/core/math/GenericAABB.h index a6e18882af3e2df37e7f9fb00983d360ed3d6d14..5d326b5af973b66db1c7628650cfa77e6c5d9433 100644 --- a/src/core/math/GenericAABB.h +++ b/src/core/math/GenericAABB.h @@ -48,8 +48,8 @@ class GenericAABB public: // Typedefs - typedef T value_type; /// scalar data type - typedef Vector3< T > vector_type; /// data type for three dimensional vectors + using value_type = T; /// scalar data type + using vector_type = Vector3<T>; /// data type for three dimensional vectors // Constructors inline GenericAABB(); diff --git a/src/core/math/MathTrait.h b/src/core/math/MathTrait.h index 3f333228957bd553f13d0bf9ad8ae60f985a454e..492badea48f77837f90b1dfe0c88a542cf820748 100644 --- a/src/core/math/MathTrait.h +++ b/src/core/math/MathTrait.h @@ -195,19 +195,19 @@ struct INVALID_NUMERICAL_TYPE; template< typename T1, typename T2 > struct MathTrait { - typedef T1 HighType; - typedef T2 LowType; - typedef T1 High; - typedef T2 Low; + using HighType = T1; + using LowType = T2; + using High = T1; + using Low = T2; }; template< typename T> struct MathTrait< T, T > { - typedef T HighType; - typedef T LowType; - typedef T High; - typedef T Low; + using HighType = T; + using LowType = T; + using High = T; + using Low = T; }; diff --git a/src/core/math/Matrix2.h b/src/core/math/Matrix2.h index a9377506d81203be3881810ad4c1ab124b722819..7132b05d06b6b524024587c40bb1f1dd85a12566 100644 --- a/src/core/math/Matrix2.h +++ b/src/core/math/Matrix2.h @@ -987,7 +987,7 @@ namespace walberla { template<typename T> struct VectorTrait< Matrix2<T> > { - typedef T OutputType; + using OutputType = T; static const uint_t F_SIZE = 4u; static T get( const Matrix2<T> & v, uint_t f ) { return v[f]; } diff --git a/src/core/math/Matrix3.h b/src/core/math/Matrix3.h index e8253b4ad578b7a38c94bc0bb34180813f6f5cb4..d6020cd539992e0f5863eb8e25a553da40dbe6a1 100644 --- a/src/core/math/Matrix3.h +++ b/src/core/math/Matrix3.h @@ -1694,7 +1694,7 @@ namespace walberla { template<typename T> struct VectorTrait< Matrix3<T> > { - typedef T OutputType; + using OutputType = T; static const uint_t F_SIZE = 9u; static T get( const Matrix3<T> & v, uint_t f ) { return v[f]; } diff --git a/src/core/math/MatrixMxN.h b/src/core/math/MatrixMxN.h index 1d633e74e862da728b10931051a440827262b1e9..380baeb326b4e8f6841575317c3bf9b61752d352 100644 --- a/src/core/math/MatrixMxN.h +++ b/src/core/math/MatrixMxN.h @@ -96,10 +96,10 @@ class MatrixMxN public: //**Type definitions**************************************************************************** - typedef MatrixMxN<Type> This; //!< Type of this MatrixMxN instance. - typedef This ResultType; //!< Result type for expression template evaluations. - typedef Type ElementType; //!< Type of the matrix elements. - typedef const MatrixMxN& CompositeType; //!< Data type for composite expression templates. + using This = MatrixMxN<Type>; //!< Type of this MatrixMxN instance. + using ResultType = This; //!< Result type for expression template evaluations. + using ElementType = Type; //!< Type of the matrix elements. + using CompositeType = const MatrixMxN &; //!< Data type for composite expression templates. //********************************************************************************************** //**Constructors******************************************************************************** diff --git a/src/core/math/Plane.h b/src/core/math/Plane.h index bab0ac1e842c10583404e7cc312390474a43cb19..219a13c3919a1081b45b3577901a6616ebfa5311 100644 --- a/src/core/math/Plane.h +++ b/src/core/math/Plane.h @@ -33,7 +33,7 @@ namespace math { class Plane { public: - typedef Vector3<real_t> Vec3Real; + using Vec3Real = Vector3<real_t>; inline Plane(); inline Plane( const Vec3Real & origin, const Vec3Real & _normal ); diff --git a/src/core/math/Quaternion.h b/src/core/math/Quaternion.h index 9ca8c6f53b8d7877121acdbd85ed626862ebcbfb..417e9b7937c1e1cb372cfa18495514c00a526090 100644 --- a/src/core/math/Quaternion.h +++ b/src/core/math/Quaternion.h @@ -108,7 +108,7 @@ class Quaternion public: //**Type definitions**************************************************************************** - typedef Type ElementType; //!< Type of the quaternion elements. + using ElementType = Type; //!< Type of the quaternion elements. //********************************************************************************************** //**Constructors******************************************************************************** @@ -659,7 +659,7 @@ template< typename Other> // Data type of the vector inline const Vector3< typename MathTrait<Type,Other>::MultType > Quaternion<Type>::rotate( const Vector3<Other>& v ) const { - typedef typename MathTrait<Type,Other>::MultType MT; + using MT = typename MathTrait<Type, Other>::MultType; // Multiplication in two steps const MT w( v_[1]*v[0] + v_[2]*v[1] + v_[3]*v[2] ); @@ -701,7 +701,7 @@ template< typename Other > // Data type of the matrix inline const Matrix3< typename MathTrait<Type,Other>::MultType > Quaternion<Type>::rotate( const Matrix3<Other>& m ) const { - typedef typename MathTrait<Type,Other>::MultType MT; + using MT = typename MathTrait<Type, Other>::MultType; const Matrix3<MT> R( this->toRotationMatrix() ); return R.rotate( m ); } @@ -725,7 +725,7 @@ template< typename Other > // Data type of the diagonal matrix inline const Matrix3< typename MathTrait<Type,Other>::MultType > Quaternion<Type>::diagRotate( const Matrix3<Other>& m ) const { - typedef typename MathTrait<Type,Other>::MultType MT; + using MT = typename MathTrait<Type, Other>::MultType; const Matrix3<MT> R( this->toRotationMatrix() ); return R.diagRotate( m ); } @@ -743,7 +743,7 @@ template< typename Other > // Data type of the axis inline typename MathTrait<Type,Other>::HighType Quaternion<Type>::calcAngle( const Vector3<Other>& axis ) const { - typedef typename MathTrait<Type,Other>::HighType High; + using High = typename MathTrait<Type, Other>::HighType; const Vector3<High> u( v_[1], v_[2], v_[3] ); const High y ( u.length() ); @@ -1057,7 +1057,7 @@ template< typename T1 // Data type of the left-hand side quaternion inline const Quaternion< typename MathTrait<T1,T2>::MultType > operator*( const Quaternion<T1>& lhs, const Quaternion<T2>& rhs ) { - typedef typename MathTrait<T1,T2>::MultType MT; + using MT = typename MathTrait<T1, T2>::MultType; const MT r( lhs[0]*rhs[0] - lhs[1]*rhs[1] - lhs[2]*rhs[2] - lhs[3]*rhs[3] ); const MT i( lhs[0]*rhs[1] + lhs[1]*rhs[0] + lhs[2]*rhs[3] - lhs[3]*rhs[2] ); @@ -1137,7 +1137,7 @@ using math::Quaternion; template<typename T> struct VectorTrait< Quaternion<T> > { - typedef T OutputType; + using OutputType = T; static const uint_t F_SIZE = 4u; static T get( const Quaternion<T> & v, uint_t f ) { return v[f]; } diff --git a/src/core/math/SqrtTrait.h b/src/core/math/SqrtTrait.h index 372eebae18895f87acfad618f28211ce73f12bc3..5712e65a07db9a7cdd816162f8b7774b2516bf2f 100644 --- a/src/core/math/SqrtTrait.h +++ b/src/core/math/SqrtTrait.h @@ -64,7 +64,7 @@ namespace math { template< typename T > struct SqrtTrait { - typedef double Type; //!< Return type of std::sqrt for integral and double arguments. + using Type = double; //!< Return type of std::sqrt for integral and double arguments. }; //********************************************************************************************************************** @@ -77,7 +77,7 @@ struct SqrtTrait template<> struct SqrtTrait<float> { - typedef float Type; //!< Return type of std::sqrt for float arguments. + using Type = float; //!< Return type of std::sqrt for float arguments. }; /*! \endcond */ //********************************************************************************************************************** @@ -91,7 +91,7 @@ struct SqrtTrait<float> template<> struct SqrtTrait<long double> { - typedef long double Type; //!< Return type of std::sqrt for long double arguments. + using Type = long double; //!< Return type of std::sqrt for long double arguments. }; /*! \endcond */ //********************************************************************************************************************** diff --git a/src/core/math/Uint.h b/src/core/math/Uint.h index 3b0ab172171024aa8151f986b996980e145fe1d9..c5fc28d833f3d78cd360cd4f10d214277898943f 100644 --- a/src/core/math/Uint.h +++ b/src/core/math/Uint.h @@ -194,10 +194,10 @@ template<> inline uint_t uintMSBPosition< uint8_t >( uint8_t value ) { } template< uint_t size > struct uintFromBitWidth; -template<> struct uintFromBitWidth< 8 > { typedef uint8_t type; }; -template<> struct uintFromBitWidth< 16 > { typedef uint16_t type; }; -template<> struct uintFromBitWidth< 32 > { typedef uint32_t type; }; -template<> struct uintFromBitWidth< 64 > { typedef uint64_t type; }; +template<> struct uintFromBitWidth< 8 > { using type = uint8_t; }; +template<> struct uintFromBitWidth< 16 > { using type = uint16_t; }; +template<> struct uintFromBitWidth< 32 > { using type = uint32_t; }; +template<> struct uintFromBitWidth< 64 > { using type = uint64_t; }; constexpr uint_t leastUnsignedIntegerBitWidth( uint_t width ) { @@ -218,7 +218,7 @@ constexpr uint_t leastUnsignedIntegerBitWidth( uint_t width ) template< uint_t minSize > struct leastUnsignedInteger { - typedef typename uintFromBitWidth< leastUnsignedIntegerBitWidth( minSize ) >::type type; + using type = typename uintFromBitWidth<leastUnsignedIntegerBitWidth(minSize)>::type; }; /// \cond internal diff --git a/src/core/math/Utility.h b/src/core/math/Utility.h index b71ea90e07522396b798cef116fc6af8e76d5efb..87300282bca8c9f7b5949796407c95fea5bdabe6 100644 --- a/src/core/math/Utility.h +++ b/src/core/math/Utility.h @@ -346,7 +346,7 @@ inline bool equal_backend<long double>( long double a, long double b ) template< typename T1, typename T2 > inline bool equal( T1 a, T2 b ) { - typedef typename MathTrait<T1,T2>::High High; + using High = typename MathTrait<T1, T2>::High; return equal_backend<High>( a, b ); } //********************************************************************************************************************** diff --git a/src/core/math/Vector2.h b/src/core/math/Vector2.h index c69f7bcc780ab19f3fe0a9b070ce3718cca856c2..00bfabe88bfbf785b2ed3789258358cfc2912a7e 100644 --- a/src/core/math/Vector2.h +++ b/src/core/math/Vector2.h @@ -94,10 +94,10 @@ private: public: //**Type definitions**************************************************************************** - typedef typename SqrtTrait<Type>::Type Length; //!< Vector length return type. + using Length = typename SqrtTrait<Type>::Type; //!< Vector length return type. /*!< Return type of the Vector2<Type>::length function. */ - typedef Type value_type; + using value_type = Type; //******************************************************************************************************************* //**Constructors***************************************************************************************************** @@ -1670,7 +1670,7 @@ namespace walberla { template<typename T> struct VectorTrait< Vector2<T> > { - typedef T OutputType; + using OutputType = T; static const uint_t F_SIZE = 2u; static T get( const Vector2<T> & v, uint_t f ) { return v[f]; } diff --git a/src/core/math/Vector3.h b/src/core/math/Vector3.h index 72b6a45fabdb65b7fe8506c6857cf4599bc7e1f5..c47fd4a66986e94b6bd361ec2eda9bdadb9a98df 100644 --- a/src/core/math/Vector3.h +++ b/src/core/math/Vector3.h @@ -94,10 +94,10 @@ private: public: //**Type definitions**************************************************************************** - typedef typename SqrtTrait<Type>::Type Length; //!< Vector length return type. + using Length = typename SqrtTrait<Type>::Type; //!< Vector length return type. /*!< Return type of the Vector3<Type>::length function. */ - typedef Type value_type; + using value_type = Type; //******************************************************************************************************************* //**Constructors***************************************************************************************************** @@ -1926,7 +1926,7 @@ namespace walberla { template<typename T> struct VectorTrait< Vector3<T> > { - typedef T OutputType; + using OutputType = T; static const uint_t F_SIZE = 3u; static T get( const Vector3<T> & v, uint_t f ) { return v[f]; } diff --git a/src/core/math/equation_system/EquationSystem.h b/src/core/math/equation_system/EquationSystem.h index e78df0345321a0e51a372941b0a96b46bfd88e29..82d17a0f79a552aa4d2b1cf13c575484909baf1e 100644 --- a/src/core/math/equation_system/EquationSystem.h +++ b/src/core/math/equation_system/EquationSystem.h @@ -67,16 +67,16 @@ namespace math { // forward declaration of EquationParser class friend class EquationParser; - typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS> EqGraph; + using EqGraph = boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>; - typedef std::map<std::string, EqGraph::vertex_descriptor> EqVertexMap; - typedef std::map<std::string, EqGraph::vertex_descriptor> VarVertexMap; + using EqVertexMap = std::map<std::string, EqGraph::vertex_descriptor>; + using VarVertexMap = std::map<std::string, EqGraph::vertex_descriptor>; - typedef std::map<std::string, EqGraph::vertex_descriptor>::const_iterator EqVertexMapIt; - typedef std::map<std::string, EqGraph::vertex_descriptor>::const_iterator VarVertexMapIt; + using EqVertexMapIt = std::map<std::string, EqGraph::vertex_descriptor>::const_iterator; + using VarVertexMapIt = std::map<std::string, EqGraph::vertex_descriptor>::const_iterator; - typedef std::map<std::string, EquationPtr> EqMap; - typedef std::map<std::string, EquationPtr>::const_iterator EqMapIt; + using EqMap = std::map<std::string, EquationPtr>; + using EqMapIt = std::map<std::string, EquationPtr>::const_iterator; EqMap eqMap_; EqGraph eqGraph_; @@ -121,7 +121,7 @@ namespace math { }; - typedef shared_ptr< EquationSystem > EquationSystemPtr; + using EquationSystemPtr = shared_ptr<EquationSystem>; } // namespace math } // namespace walberla diff --git a/src/core/math/equation_system/FwdEquation.h b/src/core/math/equation_system/FwdEquation.h index 37787456b7eb1daa3ab131cb30112bd9804e483e..21fbb523cd241c52d51f60fb6fd3f13c0ca136cf 100644 --- a/src/core/math/equation_system/FwdEquation.h +++ b/src/core/math/equation_system/FwdEquation.h @@ -41,13 +41,13 @@ namespace math { }; class Node; - typedef std::shared_ptr<Node> NodePtr; + using NodePtr = std::shared_ptr<Node>; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // EQUATION ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class Equation; - typedef std::shared_ptr< Equation > EquationPtr; + using EquationPtr = std::shared_ptr<Equation>; } // namespace math } // namespace walberla diff --git a/src/core/math/equation_system/FwdVariable.h b/src/core/math/equation_system/FwdVariable.h index 76715f973efe5b97d47fe7762abc8747f14e760b..bb9e8edf550f014eb01aa904eee6aa1c697c9727 100644 --- a/src/core/math/equation_system/FwdVariable.h +++ b/src/core/math/equation_system/FwdVariable.h @@ -33,10 +33,10 @@ namespace math { class Var; - typedef std::shared_ptr<Var> VarPtr; + using VarPtr = std::shared_ptr<Var>; - typedef std::map<std::string, VarPtr> VarMap; - typedef std::map<std::string, VarPtr>::const_iterator VarMapIt; + using VarMap = std::map<std::string, VarPtr>; + using VarMapIt = std::map<std::string, VarPtr>::const_iterator; } // namespace math } // namespace walberla diff --git a/src/core/mpi/BufferDataTypeExtensions.h b/src/core/mpi/BufferDataTypeExtensions.h index 69f3e52e9d1f2fb5f5e69b38c3d509c5c94d5953..0af75724692a1f9434d97f72eded6afed1e6d24e 100644 --- a/src/core/mpi/BufferDataTypeExtensions.h +++ b/src/core/mpi/BufferDataTypeExtensions.h @@ -266,7 +266,7 @@ template< typename T, // Element type of SendBuffer GenericSendBuffer<T,G>& packBoolVectorWithoutSize(GenericSendBuffer<T,G> & buf, const std::vector<bool> & bools ) { // Use an unsigned type at least as large as the SendBuffer base type as container for the bools - typedef typename math::leastUnsignedInteger< std::numeric_limits<T>::digits >::type ContainerType; + using ContainerType = typename math::leastUnsignedInteger<std::numeric_limits<T>::digits>::type; static const size_t NUM_BITS = std::numeric_limits<ContainerType>::digits; auto it = bools.begin(); @@ -287,7 +287,7 @@ template< typename T > // Element type of RecvBuffer GenericRecvBuffer<T>& unpackBoolVectorWithoutSize(GenericRecvBuffer<T> & buf, std::vector<bool> & bools, size_t size ) { // Use an unsigned type at least as large as the RecvBuffer base type as container for the bools - typedef typename math::leastUnsignedInteger<std::numeric_limits<T>::digits>::type ContainerType; + using ContainerType = typename math::leastUnsignedInteger<std::numeric_limits<T>::digits>::type; static const size_t NUM_BITS = std::numeric_limits<ContainerType>::digits; bools.resize(size); diff --git a/src/core/mpi/BufferSystem.h b/src/core/mpi/BufferSystem.h index ea1037b13845ca6ba117acc56c157671cc3a1393..f2b0cbf431741cf020eaadea1f0268e27c8b3429 100644 --- a/src/core/mpi/BufferSystem.h +++ b/src/core/mpi/BufferSystem.h @@ -211,7 +211,7 @@ public: //* Rank Ranges ************************************************************************************************* /*! \name Rank Ranges */ //@{ - typedef std::set<MPIRank> RankRange; + using RankRange = std::set<MPIRank>; static RankRange noRanks(); static RankRange allRanks(); static RankRange allRanksButRoot(); @@ -264,7 +264,7 @@ protected: int64_t numberOfReceives_ = 0; ///< number of communication partners during last receive }; -typedef GenericBufferSystem<RecvBuffer, SendBuffer> BufferSystem; +using BufferSystem = GenericBufferSystem<RecvBuffer, SendBuffer>; } // namespace mpi } // namespace walberla diff --git a/src/core/mpi/MPIWrapper.h b/src/core/mpi/MPIWrapper.h index 233baa6bb727c1814b15de0e85cef63d1ec7bb20..cd250cb97bdf438e48e79c4010d75942e16ba010 100644 --- a/src/core/mpi/MPIWrapper.h +++ b/src/core/mpi/MPIWrapper.h @@ -89,16 +89,16 @@ namespace walberla { namespace mpistubs { -typedef int MPI_Comm; -typedef int MPI_Datatype; -typedef int MPI_Group; -typedef int MPI_Op; -typedef int MPI_Request; -typedef int MPI_File; -typedef int MPI_Offset; -typedef int MPI_Info; -typedef int MPI_Aint; -typedef void (MPI_User_function) (void* a, void* b, int* len, MPI_Datatype*); +using MPI_Comm = int; +using MPI_Datatype = int; +using MPI_Group = int; +using MPI_Op = int; +using MPI_Request = int; +using MPI_File = int; +using MPI_Offset = int; +using MPI_Info = int; +using MPI_Aint = int; +using MPI_User_function = void (void *, void *, int *, MPI_Datatype *); struct MPI_Status { diff --git a/src/core/mpi/OpenMPBufferSystem.h b/src/core/mpi/OpenMPBufferSystem.h index 232f54f42a6dbe4037c4b2c8f2d7f02b98773bcb..660a5ccebe415e129f5965c3ef5a418731ef71df 100644 --- a/src/core/mpi/OpenMPBufferSystem.h +++ b/src/core/mpi/OpenMPBufferSystem.h @@ -100,7 +100,7 @@ private: void waitSerial(); }; -typedef GenericOpenMPBufferSystem<RecvBuffer, SendBuffer> OpenMPBufferSystem; +using OpenMPBufferSystem = GenericOpenMPBufferSystem<RecvBuffer, SendBuffer>; } // namespace mpi diff --git a/src/core/mpi/RecvBuffer.h b/src/core/mpi/RecvBuffer.h index b3dacb3db41a866d66164991c687b4c8837b17e2..0b3df4abffd48550221cf321c94c4a5c6f95cb77 100644 --- a/src/core/mpi/RecvBuffer.h +++ b/src/core/mpi/RecvBuffer.h @@ -81,7 +81,7 @@ class GenericRecvBuffer { public: //**Type definitions************************************************************************************************* - typedef T ElementType; //!< Type of the receive buffer elements. + using ElementType = T; //!< Type of the receive buffer elements. //******************************************************************************************************************* //**Constructors***************************************************************************************************** @@ -173,7 +173,7 @@ private: }; //********************************************************************************************************************** -typedef GenericRecvBuffer<> RecvBuffer; +using RecvBuffer = GenericRecvBuffer<>; diff --git a/src/core/mpi/SendBuffer.h b/src/core/mpi/SendBuffer.h index 60d8e471f5ed9891749fd9d75d82c12ad309cbd2..3fac958a74fec25adb8cb4396845f8a184a4b7eb 100644 --- a/src/core/mpi/SendBuffer.h +++ b/src/core/mpi/SendBuffer.h @@ -87,7 +87,7 @@ public: { public: static_assert( std::is_fundamental<VT>::value, "only fundamental data types are allowed"); - typedef VT value_type; + using value_type = VT; Ptr(GenericSendBuffer<T, G>& buffer, const std::ptrdiff_t offset, const size_t length) : buffer_(buffer), offset_(offset), length_(length) {} @@ -102,7 +102,7 @@ public: }; //**Type definitions************************************************************************************************* - typedef T ElementType; //!< Type of the receive buffer elements. + using ElementType = T; //!< Type of the receive buffer elements. //******************************************************************************************************************* //**Constructors***************************************************************************************************** @@ -216,7 +216,7 @@ private: }; //********************************************************************************************************************** -typedef GenericSendBuffer<> SendBuffer; +using SendBuffer = GenericSendBuffer<>; //====================================================================================================================== diff --git a/src/core/timing/Timer.h b/src/core/timing/Timer.h index f25602bfa04f417089f76ee63ed581a94c7ecd4d..15a9632656e55798888d0da9c6ed0a94651391c4 100644 --- a/src/core/timing/Timer.h +++ b/src/core/timing/Timer.h @@ -105,7 +105,7 @@ class Timer friend mpi::GenericRecvBuffer<T>& operator>>( mpi::GenericRecvBuffer<T> & buf, Timer<TP2> & t ); public: //**Type definitions************************************************************************************************* - typedef TP TimingPolicy; //!< Timing policy of the Timer. + using TimingPolicy = TP; //!< Timing policy of the Timer. //******************************************************************************************************************* //**Constructor****************************************************************************************************** @@ -589,7 +589,7 @@ mpi::GenericRecvBuffer<T>& operator>>( mpi::GenericRecvBuffer<T> & buf, Timer<TP } //namespace timing -typedef timing::Timer<timing::CpuPolicy> CpuTimer; -typedef timing::Timer<timing::WcPolicy> WcTimer; +using CpuTimer = timing::Timer<timing::CpuPolicy>; +using WcTimer = timing::Timer<timing::WcPolicy>; } // namespace walberla diff --git a/src/core/timing/TimingNode.h b/src/core/timing/TimingNode.h index a99dfe05b218c27391603870c8cc3e3297bbe134..6682ab62600653b3b52dcb73da912e66b86d1a53 100644 --- a/src/core/timing/TimingNode.h +++ b/src/core/timing/TimingNode.h @@ -493,7 +493,7 @@ void addRemainderNodes(timing::TimingNode<TP> &tn) { } /// namespace internal } -typedef timing::TimingNode<timing::WcPolicy> WcTimingNode; -typedef timing::TimingNode<timing::CpuPolicy> CpuTimingNode; +using WcTimingNode = timing::TimingNode<timing::WcPolicy>; +using CpuTimingNode = timing::TimingNode<timing::CpuPolicy>; } diff --git a/src/core/timing/TimingPool.h b/src/core/timing/TimingPool.h index b927151aced1611fb611ba06b19441794fba0df6..5e41c14d783067b68f4fa76e3a789a0a6728c0bf 100644 --- a/src/core/timing/TimingPool.h +++ b/src/core/timing/TimingPool.h @@ -70,8 +70,8 @@ public: //** Access to Timer Objects **************************************************************************************** /*! \name Access to Timer Objects */ //@{ - typedef typename std::map<std::string, Timer<TP> >::iterator iterator; - typedef typename std::map<std::string, Timer<TP> >::const_iterator const_iterator; + using iterator = typename std::map<std::string, Timer<TP>>::iterator; + using const_iterator = typename std::map<std::string, Timer<TP>>::const_iterator; iterator begin() { return timerMap_.begin(); } const_iterator begin() const { return timerMap_.begin(); } @@ -248,6 +248,6 @@ namespace timing { //====================================================================================================================== namespace walberla { - typedef timing::TimingPool<timing::WcPolicy> WcTimingPool; - typedef timing::TimingPool<timing::CpuPolicy> CpuTimingPool; + using WcTimingPool = timing::TimingPool<timing::WcPolicy>; + using CpuTimingPool = timing::TimingPool<timing::CpuPolicy>; } diff --git a/src/core/timing/TimingTree.h b/src/core/timing/TimingTree.h index 7fe833b1e2d4d0558e4246533ceb4f6ddda87215..e7fcda9607cce0ec230add8f41302db482bc8a47 100644 --- a/src/core/timing/TimingTree.h +++ b/src/core/timing/TimingTree.h @@ -251,6 +251,6 @@ TimingTree< TP > TimingTree< TP >::getCopyWithRemainder() const } -typedef timing::TimingTree<timing::WcPolicy> WcTimingTree; -typedef timing::TimingTree<timing::CpuPolicy> CpuTimingTree; +using WcTimingTree = timing::TimingTree<timing::WcPolicy>; +using CpuTimingTree = timing::TimingTree<timing::CpuPolicy>; } diff --git a/src/core/uid/SUID.h b/src/core/uid/SUID.h index 329abb0fa0dd45f2bcc50adf665c224f6b8deb8f..21b48ca261242354e910e9746abd1989e6045d59 100644 --- a/src/core/uid/SUID.h +++ b/src/core/uid/SUID.h @@ -33,7 +33,7 @@ namespace uid { namespace suidgenerator { class S : public IndexGenerator< S, size_t >{}; ///< generator class for unified state/selection UIDs } -typedef UID< suidgenerator::S > SUID; ///< unified state/selection UID +using SUID = UID<suidgenerator::S>; ///< unified state/selection UID } // namespace uid diff --git a/src/core/uid/UID.h b/src/core/uid/UID.h index f90f7f9de7e8bf9cb5a65d1df5341e806f73d96e..89a270e4cbe23ae5c17819d20d3dc43f6aeba22e 100644 --- a/src/core/uid/UID.h +++ b/src/core/uid/UID.h @@ -74,7 +74,7 @@ template< typename T > class UID { public: - typedef typename T::uint_type uint_type; + using uint_type = typename T::uint_type; inline UID( const char* const identifier, const bool newUid = false, const bool appendUIDtoIdentifier = false ); diff --git a/src/core/uid/UIDGenerators.h b/src/core/uid/UIDGenerators.h index 0e913b16a100773e9f2aa149c55e2320a51684a4..4d4a333f9800ffdd88f32fa6e277f710ea21615d 100644 --- a/src/core/uid/UIDGenerators.h +++ b/src/core/uid/UIDGenerators.h @@ -87,8 +87,8 @@ template< typename T, typename UINT > class IndexGenerator { public: - typedef UINT uint_type; - typedef index_generated_tag generator_type; + using uint_type = UINT; + using generator_type = index_generated_tag; static uint_type generateUID() { static uint_type uid(0); @@ -123,8 +123,8 @@ template< typename T, typename UINT > class StandardGenerator { public: - typedef UINT uint_type; - typedef standard_generated_tag generator_type; + using uint_type = UINT; + using generator_type = standard_generated_tag; static uint_type generateUID() { static uint_type uid(0); @@ -216,8 +216,8 @@ template< typename T, typename UINT > class BitGenerator { public: - typedef UINT uint_type; - typedef bit_generated_tag generator_type; + using uint_type = UINT; + using generator_type = bit_generated_tag; static uint_type generateUID() { static uint_type uid(1); @@ -262,8 +262,8 @@ template< typename T, typename UINT > class SingletonGenerator { public: - typedef UINT uint_type; - typedef singleton_generated_tag generator_type; + using uint_type = UINT; + using generator_type = singleton_generated_tag; static uint_type generateUID() { static uint_type uid(0); diff --git a/src/domain_decomposition/BlockDataHandling.h b/src/domain_decomposition/BlockDataHandling.h index 4b07594e08f58c443b5c4090389f42c804bf8fd0..0720eb572ffadafc2deb78b3733e4cf5ff225029 100644 --- a/src/domain_decomposition/BlockDataHandling.h +++ b/src/domain_decomposition/BlockDataHandling.h @@ -45,7 +45,7 @@ template< typename T > class BlockDataHandling { public: - typedef T value_type; + using value_type = T; virtual ~BlockDataHandling() = default; @@ -82,7 +82,7 @@ class BlockDataHandlingFunctionAdaptor : public BlockDataHandling<T> { public: - typedef std::function< T* ( IBlock * const block ) > Function; + using Function = std::function<T *(IBlock *const)>; BlockDataHandlingFunctionAdaptor( const Function & function ) : function_( function ) {} @@ -206,7 +206,7 @@ private: -typedef selectable::SetSelectableObject< shared_ptr< BlockDataHandlingWrapper >, SUID > SelectableBlockDataHandlingWrapper; +using SelectableBlockDataHandlingWrapper = selectable::SetSelectableObject<shared_ptr<BlockDataHandlingWrapper>, SUID>; diff --git a/src/domain_decomposition/BlockStorage.h b/src/domain_decomposition/BlockStorage.h index 0d6dfc6c1e4aa121936e01d4bdba54f7719178c1..b59f7b30fe803a2c9abbe48c8856c9b4bbf2be20 100644 --- a/src/domain_decomposition/BlockStorage.h +++ b/src/domain_decomposition/BlockStorage.h @@ -73,7 +73,7 @@ class BlockStorage : private NonCopyable { public: - typedef std::map< IBlockID::IDType, IBlock* > BlockContainerType ; + using BlockContainerType = std::map<IBlockID::IDType, IBlock *> ; class const_iterator; diff --git a/src/domain_decomposition/IBlock.h b/src/domain_decomposition/IBlock.h index 27c0b894f253a746e94220c562efd5de399f859b..06e48b6905194a71ed3970550ca65ee525876080 100644 --- a/src/domain_decomposition/IBlock.h +++ b/src/domain_decomposition/IBlock.h @@ -207,7 +207,7 @@ class IBlock : private NonCopyable { public: - typedef internal::BlockData BlockData; + using BlockData = internal::BlockData; friend class BlockStorage; friend class StructuredBlockStorage; diff --git a/src/domain_decomposition/IBlockID.h b/src/domain_decomposition/IBlockID.h index e73a5010128eaaafad456b830ac5a58c8d6b17e6..5e1cb771db8d2b6a9d9116aa7e9019a6e1439ea1 100644 --- a/src/domain_decomposition/IBlockID.h +++ b/src/domain_decomposition/IBlockID.h @@ -44,7 +44,7 @@ class IBlockID { public: /// ID type which can be used as a key in a map - typedef uint64_t IDType; + using IDType = uint64_t; virtual ~IBlockID() = default; diff --git a/src/domain_decomposition/StructuredBlockStorage.h b/src/domain_decomposition/StructuredBlockStorage.h index 8a44ebfd8e36c03fa392596e4b095cf24505e405..574634255f49d6f969c82a108c98f0dde7582132 100644 --- a/src/domain_decomposition/StructuredBlockStorage.h +++ b/src/domain_decomposition/StructuredBlockStorage.h @@ -121,8 +121,8 @@ public: internal::SelectableBlockDataHandlingWrapper dataHandling_; }; - typedef BlockStorage::const_iterator const_iterator; - typedef BlockStorage::iterator iterator; + using const_iterator = BlockStorage::const_iterator; + using iterator = BlockStorage::iterator; const BlockStorage& getBlockStorage() const { return *blockStorage_; } BlockStorage& getBlockStorage() { return *blockStorage_; } diff --git a/src/fft/Fft.h b/src/fft/Fft.h index 5e4372b1c0510c414e2ddf0545c9e3e9489cb2c3..e3219e46137071497d3697933d01c11ad1c02c38 100644 --- a/src/fft/Fft.h +++ b/src/fft/Fft.h @@ -35,7 +35,7 @@ class FourierTransform typedef std::unique_ptr<pfft_complex[], std::function<void(pfft_complex*)> > FFTComplex; typedef std::unique_ptr<std::remove_pointer<pfft_plan>::type, std::function<void(pfft_plan)> > FFTPlan; #else - typedef std::unique_ptr<double[], std::function<void(double*)> > FFTReal; + using FFTReal = std::unique_ptr<double [], std::function<void (double *)>>; typedef std::unique_ptr<fftw_complex[], std::function<void(fftw_complex*)> > FFTComplex; typedef std::unique_ptr<std::remove_pointer<fftw_plan>::type, std::function<void(fftw_plan)> > FFTPlan; #endif diff --git a/src/field/AccuracyEvaluation.h b/src/field/AccuracyEvaluation.h index 036803b431c280d1b611d9e381bd6f7002a9280b..77fd10c4d3d649789ba29fc1b43fb23b332c4b13 100644 --- a/src/field/AccuracyEvaluation.h +++ b/src/field/AccuracyEvaluation.h @@ -332,7 +332,7 @@ shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T > > makeAccuracyEval const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef AccuracyEvaluation< Field_T, SolutionFunction_T > AE_T; + using AE_T = AccuracyEvaluation<Field_T, SolutionFunction_T>; return shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, plotFrequency, logFrequency, requiredSelectors, incompatibleSelectors ) ); } @@ -345,7 +345,7 @@ makeAccuracyEvaluation( const weak_ptr< StructuredBlockStorage > & blocks, const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef AccuracyEvaluation< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > AE_T; + using AE_T = AccuracyEvaluation<Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T>>; return shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), plotFrequency, logFrequency, requiredSelectors, incompatibleSelectors ) ); } @@ -358,7 +358,7 @@ makeAccuracyEvaluation( const weak_ptr< StructuredBlockStorage > & blocks, const const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef AccuracyEvaluation< Field_T, SolutionFunction_T, Filter_T > AE_T; + using AE_T = AccuracyEvaluation<Field_T, SolutionFunction_T, Filter_T>; return shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, filter, plotFrequency, logFrequency, requiredSelectors, incompatibleSelectors ) ); } @@ -419,7 +419,7 @@ shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T > > makeAccuracyEval const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_CONFIG_PARSER( config ) - typedef AccuracyEvaluation< Field_T, SolutionFunction_T > AE_T; + using AE_T = AccuracyEvaluation<Field_T, SolutionFunction_T>; auto evaluation = shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, defaultPlotFrequency, defaultLogFrequency, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_SET_AND_RETURN() } @@ -435,7 +435,7 @@ makeAccuracyEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_CONFIG_PARSER( config ) - typedef AccuracyEvaluation< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > AE_T; + using AE_T = AccuracyEvaluation<Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T>>; auto evaluation = shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), defaultPlotFrequency, defaultLogFrequency, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_SET_AND_RETURN() @@ -451,7 +451,7 @@ makeAccuracyEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_CONFIG_PARSER( config ) - typedef AccuracyEvaluation< Field_T, SolutionFunction_T, Filter_T > AE_T; + using AE_T = AccuracyEvaluation<Field_T, SolutionFunction_T, Filter_T>; auto evaluation = shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, filter, defaultPlotFrequency, defaultLogFrequency, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_SET_AND_RETURN() diff --git a/src/field/AccuracyEvaluationLinePlot.h b/src/field/AccuracyEvaluationLinePlot.h index 51a18da5151a90d93179a0ebcf80809840233860..a0c2218609ee7a1d4f3be1ed969e0f01923ca95d 100644 --- a/src/field/AccuracyEvaluationLinePlot.h +++ b/src/field/AccuracyEvaluationLinePlot.h @@ -356,7 +356,7 @@ void AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T >::operat WALBERLA_ROOT_SECTION() { - typedef typename Field_T::value_type Value_T; + using Value_T = typename Field_T::value_type; std::vector< internal::AccuracyEvaluationPlotData<Value_T> > points; while( !buffer.isEmpty() ) @@ -398,7 +398,7 @@ shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > makeAccu const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > AE_T; + using AE_T = AccuracyEvaluationLinePlot<Field_T, SolutionFunction_T>; return shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, yAxis, requiredSelectors, incompatibleSelectors ) ); } @@ -411,7 +411,7 @@ makeAccuracyEvaluationLinePlot( const weak_ptr< StructuredBlockStorage > & block const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > AE_T; + using AE_T = AccuracyEvaluationLinePlot<Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T>>; return shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), yAxis, requiredSelectors, incompatibleSelectors ) ); } @@ -424,7 +424,7 @@ makeAccuracyEvaluationLinePlot( const weak_ptr< StructuredBlockStorage > & block const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > AE_T; + using AE_T = AccuracyEvaluationLinePlot<Field_T, SolutionFunction_T, Filter_T>; return shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, filter, yAxis, requiredSelectors, incompatibleSelectors ) ); } @@ -491,7 +491,7 @@ makeAccuracyEvaluationLinePlot( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_CONFIG_PARSER( config ) - typedef AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > AE_T; + using AE_T = AccuracyEvaluationLinePlot<Field_T, SolutionFunction_T>; auto evaluation = shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, defaultYAxis, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_SET_AND_RETURN() } @@ -507,7 +507,7 @@ makeAccuracyEvaluationLinePlot( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_CONFIG_PARSER( config ) - typedef AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > AE_T; + using AE_T = AccuracyEvaluationLinePlot<Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T>>; auto evaluation = shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), defaultYAxis, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_SET_AND_RETURN() @@ -523,7 +523,7 @@ makeAccuracyEvaluationLinePlot( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_CONFIG_PARSER( config ) - typedef AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > AE_T; + using AE_T = AccuracyEvaluationLinePlot<Field_T, SolutionFunction_T, Filter_T>; auto evaluation = shared_ptr< AE_T >( new AE_T( blocks, fieldId, solution, filter, defaultYAxis, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_ACCURACY_EVALUATION_LINE_PLOT_SET_AND_RETURN() } @@ -642,7 +642,7 @@ makeAccuracyEvaluationLinePlotter( const shared_ptr< AccuracyEvaluationLinePlot_ const std::string & filename = internal::accuracyEvaluationLinePlotterFilename, const std::string & fileExtension = internal::accuracyEvaluationLinePlotterExtension ) { - typedef AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > AE_T; + using AE_T = AccuracyEvaluationLinePlotter<AccuracyEvaluationLinePlot_T>; return shared_ptr< AE_T >( new AE_T( plot, evaluationFrequency, filename, fileExtension ) ); } @@ -686,7 +686,7 @@ makeAccuracyEvaluationLinePlotter( const Config_T & config, std::string defaultFilename( internal::accuracyEvaluationLinePlotterFilename ); std::string defaultFileExtension( internal::accuracyEvaluationLinePlotterExtension ); internal::accuracyEvaluationLinePlotterConfigParser( config, configBlockName, defaultEvaluationFrequency, defaultFilename, defaultFileExtension ); - typedef AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > AE_T; + using AE_T = AccuracyEvaluationLinePlotter<AccuracyEvaluationLinePlot_T>; return shared_ptr< AE_T >( new AE_T( plot, defaultEvaluationFrequency, defaultFilename, defaultFileExtension ) ); } diff --git a/src/field/Field.h b/src/field/Field.h index 7b3103b802ea59f7d2350a4526d38bd0634736ea..a47fe47e7314011fe0bae2df37ca090facabb321 100644 --- a/src/field/Field.h +++ b/src/field/Field.h @@ -72,24 +72,21 @@ namespace field { //** Type Definitions ******************************************************************************************* /*! \name Type Definitions */ //@{ - typedef T value_type; + using value_type = T; - typedef ForwardFieldIterator<T,fSize_> iterator; - typedef ForwardFieldIterator<const T,fSize_> const_iterator; + using iterator = ForwardFieldIterator<T, fSize_>; + using const_iterator = ForwardFieldIterator<const T, fSize_>; - typedef ReverseFieldIterator<T,fSize_> reverse_iterator; - typedef ReverseFieldIterator<const T,fSize_> const_reverse_iterator; + using reverse_iterator = ReverseFieldIterator<T, fSize_>; + using const_reverse_iterator = ReverseFieldIterator<const T, fSize_>; - typedef FieldIterator<T,fSize_ > base_iterator; - typedef FieldIterator<const T,fSize_ > const_base_iterator; + using base_iterator = FieldIterator<T, fSize_>; + using const_base_iterator = FieldIterator<const T, fSize_>; - typedef FieldPointer<Field<T,fSize_>, Field<T,fSize_>, T > Ptr; - typedef FieldPointer<Field<T,fSize_>, const Field<T,fSize_>, const T > ConstPtr; + using Ptr = FieldPointer<Field<T, fSize_>, Field<T, fSize_>, T>; + using ConstPtr = FieldPointer<Field<T, fSize_>, const Field<T, fSize_>, const T>; - typedef typename std::conditional<VectorTrait<T>::F_SIZE!=0, - Field<typename VectorTrait<T>::OutputType, VectorTrait<T>::F_SIZE*fSize_>, - Field<T, fSize_> - >::type FlattenedField; + using FlattenedField = typename std::conditional<VectorTrait<T>::F_SIZE != 0, Field<typename VectorTrait<T>::OutputType, VectorTrait<T>::F_SIZE * fSize_>, Field<T, fSize_>>::type; static const uint_t F_SIZE = fSize_; //@} @@ -283,8 +280,7 @@ namespace field { //** Monitoring ************************************************************************************************* /*! \name Monitoring */ //@{ - typedef std::function< void ( cell_idx_t x, cell_idx_t y, - cell_idx_t z, cell_idx_t f, const T & value) > MonitorFunction; + using MonitorFunction = std::function<void (cell_idx_t, cell_idx_t, cell_idx_t, cell_idx_t, const T &)>; void addMonitoringFunction( const MonitorFunction & func ); //@} diff --git a/src/field/FlagField.h b/src/field/FlagField.h index ebf17fb39565baa76c00bf396f0f6ab901abc54b..a2333770d5b1ae3b9b901b8248f572a41cb63520 100644 --- a/src/field/FlagField.h +++ b/src/field/FlagField.h @@ -86,21 +86,21 @@ public: //** Type Definitions ********************************************************************************************** /*! \name Type Definitions */ //@{ - typedef T flag_t; + using flag_t = T; - typedef typename GhostLayerField<T,1>::value_type value_type; + using value_type = typename GhostLayerField<T, 1>::value_type; - typedef typename GhostLayerField<T,1>::iterator iterator; - typedef typename GhostLayerField<T,1>::const_iterator const_iterator; + using iterator = typename GhostLayerField<T, 1>::iterator; + using const_iterator = typename GhostLayerField<T, 1>::const_iterator; - typedef typename GhostLayerField<T,1>::reverse_iterator reverse_iterator; - typedef typename GhostLayerField<T,1>::const_reverse_iterator const_reverse_iterator; + using reverse_iterator = typename GhostLayerField<T, 1>::reverse_iterator; + using const_reverse_iterator = typename GhostLayerField<T, 1>::const_reverse_iterator; - typedef typename Field<T,1>::base_iterator base_iterator; - typedef typename Field<T,1>::const_base_iterator const_base_iterator; + using base_iterator = typename Field<T, 1>::base_iterator; + using const_base_iterator = typename Field<T, 1>::const_base_iterator; - typedef typename GhostLayerField<T,1>::Ptr Ptr; - typedef typename GhostLayerField<T,1>::ConstPtr ConstPtr; + using Ptr = typename GhostLayerField<T, 1>::Ptr; + using ConstPtr = typename GhostLayerField<T, 1>::ConstPtr; //@} //******************************************************************************************************************* @@ -123,7 +123,7 @@ public: //** Access Functions *********************************************************************************************** /*! \name Access Functions */ //@{ - typedef cell_idx_t idx; + using idx = cell_idx_t; void addMask (idx x, idx y, idx z, flag_t m) { WALBERLA_ASSERT(isRegistered(m)); field::addMask( this->get(x,y,z), m ); } void addFlag (idx x, idx y, idx z, flag_t f) { WALBERLA_ASSERT(isRegistered(f)); field::addFlag( this->get(x,y,z), f ); } diff --git a/src/field/FlagField.impl.h b/src/field/FlagField.impl.h index bc2c5e950f824021e19f9c829270d476f45ef997..4e32e312cae0e4d23c697ec1f785ff34b4abff29 100644 --- a/src/field/FlagField.impl.h +++ b/src/field/FlagField.impl.h @@ -489,7 +489,7 @@ namespace field { template<class Sten, typename FieldPtrOrIterator> inline bool isFlagInNeighborhood(const FieldPtrOrIterator & i, typename FieldPtrOrIterator::value_type mask) { - typedef typename std::remove_const< typename FieldPtrOrIterator::value_type >::type T; + using T = typename std::remove_const<typename FieldPtrOrIterator::value_type>::type; static_assert( (std::is_same< T,uint8_t >::value || std::is_same< T,uint16_t>::value || @@ -512,7 +512,7 @@ namespace field { inline typename std::remove_const<typename FieldPtrOrIterator::value_type>::type getOredNeighborhood(const FieldPtrOrIterator & i) { - typedef typename std::remove_const<typename FieldPtrOrIterator::value_type>::type RetType; + using RetType = typename std::remove_const<typename FieldPtrOrIterator::value_type>::type; RetType flag = 0; for( auto d = Sten::beginNoCenter(); d != Sten::end(); ++d ) { diff --git a/src/field/FlagUID.h b/src/field/FlagUID.h index 3e97fac54a7ad5baed78f73b7725e072890063da..116cb21d0f6e9f222822b3559999e18c54d3dca9 100644 --- a/src/field/FlagUID.h +++ b/src/field/FlagUID.h @@ -30,7 +30,7 @@ namespace field { ///\cond internal class FlagUIDGenerator : public uid::IndexGenerator< FlagUIDGenerator, uint_t >{}; -typedef UID< FlagUIDGenerator > FlagUID; +using FlagUID = UID<FlagUIDGenerator>; ///\endcond } // namespace field diff --git a/src/field/GhostLayerField.h b/src/field/GhostLayerField.h index 9a1a5770412832bb05e4a7b2c7dfa09c13878ed0..381a06ccd9caffc903ebe7cd5f45b8f4f2c3de9b 100644 --- a/src/field/GhostLayerField.h +++ b/src/field/GhostLayerField.h @@ -53,24 +53,21 @@ namespace field { //** Type Definitions ******************************************************************************************* /*! \name Type Definitions */ //@{ - typedef typename Field<T,fSize_>::value_type value_type; + using value_type = typename Field<T, fSize_>::value_type; - typedef typename Field<T,fSize_>::iterator iterator; - typedef typename Field<T,fSize_>::const_iterator const_iterator; + using iterator = typename Field<T, fSize_>::iterator; + using const_iterator = typename Field<T, fSize_>::const_iterator; - typedef typename Field<T,fSize_>::reverse_iterator reverse_iterator; - typedef typename Field<T,fSize_>::const_reverse_iterator const_reverse_iterator; + using reverse_iterator = typename Field<T, fSize_>::reverse_iterator; + using const_reverse_iterator = typename Field<T, fSize_>::const_reverse_iterator; - typedef typename Field<T,fSize_>::base_iterator base_iterator; - typedef typename Field<T,fSize_>::const_base_iterator const_base_iterator; + using base_iterator = typename Field<T, fSize_>::base_iterator; + using const_base_iterator = typename Field<T, fSize_>::const_base_iterator; - typedef typename Field<T,fSize_>::Ptr Ptr; - typedef typename Field<T,fSize_>::ConstPtr ConstPtr; + using Ptr = typename Field<T, fSize_>::Ptr; + using ConstPtr = typename Field<T, fSize_>::ConstPtr; - typedef typename std::conditional<VectorTrait<T>::F_SIZE!=0, - GhostLayerField<typename VectorTrait<T>::OutputType, VectorTrait<T>::F_SIZE*fSize_>, - GhostLayerField<T, fSize_> - >::type FlattenedField; + using FlattenedField = typename std::conditional<VectorTrait<T>::F_SIZE != 0, GhostLayerField<typename VectorTrait<T>::OutputType, VectorTrait<T>::F_SIZE * fSize_>, GhostLayerField<T, fSize_>>::type; //@} //**************************************************************************************************************** diff --git a/src/field/MassEvaluation.h b/src/field/MassEvaluation.h index a6aebf96f5200af1b5652826144fb83bfd0f47d9..0b9ec26a42962a5d34019ec850539bac9ed88eaf 100644 --- a/src/field/MassEvaluation.h +++ b/src/field/MassEvaluation.h @@ -297,7 +297,7 @@ shared_ptr< MassEvaluation< DensityField_T > > makeMassEvaluation( const weak_pt const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef MassEvaluation< DensityField_T > ME_T; + using ME_T = MassEvaluation<DensityField_T>; return shared_ptr< ME_T >( new ME_T( blocks, fieldId, plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); } @@ -310,7 +310,7 @@ makeMassEvaluation( const weak_ptr< StructuredBlockStorage > & blocks, const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef MassEvaluation< DensityField_T, FlagFieldEvaluationFilter<FlagField_T> > ME_T; + using ME_T = MassEvaluation<DensityField_T, FlagFieldEvaluationFilter<FlagField_T>>; return shared_ptr< ME_T >( new ME_T( blocks, fieldId, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); } @@ -323,7 +323,7 @@ shared_ptr< MassEvaluation< DensityField_T, Filter_T > > makeMassEvaluation( con const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef MassEvaluation< DensityField_T, Filter_T > ME_T; + using ME_T = MassEvaluation<DensityField_T, Filter_T>; return shared_ptr< ME_T >( new ME_T( blocks, fieldId, filter, plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); } @@ -385,7 +385,7 @@ shared_ptr< MassEvaluation< DensityField_T > > makeMassEvaluation( const Config_ const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef MassEvaluation< DensityField_T > ME_T; + using ME_T = MassEvaluation<DensityField_T>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() @@ -401,7 +401,7 @@ makeMassEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef MassEvaluation< DensityField_T, FlagFieldEvaluationFilter<FlagField_T> > ME_T; + using ME_T = MassEvaluation<DensityField_T, FlagFieldEvaluationFilter<FlagField_T>>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() @@ -416,7 +416,7 @@ shared_ptr< MassEvaluation< DensityField_T, Filter_T > > makeMassEvaluation( con const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef MassEvaluation< DensityField_T, Filter_T > ME_T; + using ME_T = MassEvaluation<DensityField_T, Filter_T>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, filter, defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() diff --git a/src/field/StabilityChecker.h b/src/field/StabilityChecker.h index 85a29e7253f5e9e9a713ffe567e630e6d3d46a2d..fbbc530e74564421f2053c3404a6c6352a99938c 100644 --- a/src/field/StabilityChecker.h +++ b/src/field/StabilityChecker.h @@ -138,7 +138,7 @@ class StabilityChecker { private: - typedef std::map< const IBlock *, std::map< Cell, std::set< cell_idx_t > > > BlockCellsMap; + using BlockCellsMap = std::map<const IBlock *, std::map<Cell, std::set<cell_idx_t>>>; //////////////////////////////// // VTK Output Helper Classes // @@ -510,7 +510,7 @@ shared_ptr< StabilityChecker< Field_T > > makeStabilityChecker( const weak_ptr< const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef StabilityChecker< Field_T > SC_T; + using SC_T = StabilityChecker<Field_T>; return shared_ptr< SC_T >( new SC_T( blocks, fieldId, checkFrequency, outputToStream, outputVTK, requiredSelectors, incompatibleSelectors ) ); } @@ -523,7 +523,7 @@ makeStabilityChecker( const weak_ptr< StructuredBlockStorage > & blocks, const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef StabilityChecker< Field_T, FlagFieldEvaluationFilter<FlagField_T> > SC_T; + using SC_T = StabilityChecker<Field_T, FlagFieldEvaluationFilter<FlagField_T>>; return shared_ptr< SC_T >( new SC_T( blocks, fieldId, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), checkFrequency, outputToStream, outputVTK, requiredSelectors, incompatibleSelectors ) ); } @@ -536,7 +536,7 @@ makeStabilityChecker( const weak_ptr< StructuredBlockStorage > & blocks, const C const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef StabilityChecker< Field_T, Filter_T > SC_T; + using SC_T = StabilityChecker<Field_T, Filter_T>; return shared_ptr< SC_T >( new SC_T( blocks, fieldId, filter, checkFrequency, outputToStream, outputVTK, requiredSelectors, incompatibleSelectors ) ); } @@ -618,7 +618,7 @@ shared_ptr< StabilityChecker< Field_T > > makeStabilityChecker( const Config_T & const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_STABILITY_CHECKER_CONFIG_PARSER( config ) - typedef StabilityChecker< Field_T > SC_T; + using SC_T = StabilityChecker<Field_T>; auto checker = shared_ptr< SC_T >( new SC_T( blocks, fieldId, defaultCheckFrequency, defaultOutputToStream, defaultOutputVTK, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_STABILITY_CHECKER_SET_AND_RETURN() } @@ -633,7 +633,7 @@ makeStabilityChecker( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_STABILITY_CHECKER_CONFIG_PARSER( config ) - typedef StabilityChecker< Field_T, FlagFieldEvaluationFilter<FlagField_T> > SC_T; + using SC_T = StabilityChecker<Field_T, FlagFieldEvaluationFilter<FlagField_T>>; auto checker = shared_ptr< SC_T >( new SC_T( blocks, fieldId, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), defaultCheckFrequency, defaultOutputToStream, defaultOutputVTK, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_STABILITY_CHECKER_SET_AND_RETURN() @@ -648,7 +648,7 @@ makeStabilityChecker( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_STABILITY_CHECKER_CONFIG_PARSER( config ) - typedef StabilityChecker< Field_T, Filter_T > SC_T; + using SC_T = StabilityChecker<Field_T, Filter_T>; auto checker = shared_ptr< SC_T >( new SC_T( blocks, fieldId, filter, defaultCheckFrequency, defaultOutputToStream, defaultOutputVTK, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_STABILITY_CHECKER_SET_AND_RETURN() diff --git a/src/field/VolumetricFlowRateEvaluation.h b/src/field/VolumetricFlowRateEvaluation.h index bbbcc01e0691de2aff1dbb3d86b41690171b2299..063bd1518ed2af8f79635311aa046d51566fc322 100644 --- a/src/field/VolumetricFlowRateEvaluation.h +++ b/src/field/VolumetricFlowRateEvaluation.h @@ -48,8 +48,8 @@ namespace field { namespace internal { -typedef std::function< real_t () > FlowRateSolution_T; -typedef std::function< Vector3< real_t > ( const Vector3< real_t > & ) > FlowRateVelocitySolution_T; +using FlowRateSolution_T = std::function<real_t ()>; +using FlowRateVelocitySolution_T = std::function<Vector3<real_t> (const Vector3<real_t> &)>; const std::string volumetricFlowRateEvaluationFilename("flowrate.dat"); const real_t volumetricFlowRateEvaluationNormalization( real_t(1) ); @@ -150,8 +150,8 @@ class VolumetricFlowRateEvaluation { public: - typedef internal::FlowRateSolution_T Solution_T; - typedef internal::FlowRateVelocitySolution_T VelocitySolution_T; + using Solution_T = internal::FlowRateSolution_T; + using VelocitySolution_T = internal::FlowRateVelocitySolution_T; VolumetricFlowRateEvaluation( const weak_ptr< StructuredBlockStorage > & blocks, const ConstBlockDataID & fieldId, const Filter_T & filter, @@ -491,7 +491,7 @@ shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > makeVolumetricFlow const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef VolumetricFlowRateEvaluation< VelocityField_T > FR_T; + using FR_T = VolumetricFlowRateEvaluation<VelocityField_T>; return shared_ptr< FR_T >( new FR_T( blocks, velocityFieldId, plotFrequency, logFrequency, solution, velocitySolution, requiredSelectors, incompatibleSelectors ) ); } @@ -505,7 +505,7 @@ makeVolumetricFlowRateEvaluation( const weak_ptr< StructuredBlockStorage > & blo const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter<FlagField_T> > FR_T; + using FR_T = VolumetricFlowRateEvaluation<VelocityField_T, FlagFieldEvaluationFilter<FlagField_T>>; return shared_ptr< FR_T >( new FR_T( blocks, velocityFieldId, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), plotFrequency, logFrequency, solution, velocitySolution, requiredSelectors, incompatibleSelectors ) ); } @@ -519,7 +519,7 @@ makeVolumetricFlowRateEvaluation( const weak_ptr< StructuredBlockStorage > & blo const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > FR_T; + using FR_T = VolumetricFlowRateEvaluation<VelocityField_T, Filter_T>; return shared_ptr< FR_T >( new FR_T( blocks, velocityFieldId, filter, plotFrequency, logFrequency, solution, velocitySolution, requiredSelectors, incompatibleSelectors ) ); } @@ -596,7 +596,7 @@ shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > makeVolumetricFlow const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_CONFIG_PARSER( config ) - typedef VolumetricFlowRateEvaluation< VelocityField_T > FR_T; + using FR_T = VolumetricFlowRateEvaluation<VelocityField_T>; auto evaluation = shared_ptr< FR_T >( new FR_T( blocks, velocityFieldId, defaultPlotFrequency, defaultLogFrequency, solution, velocitySolution, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_SET_AND_RETURN() @@ -614,7 +614,7 @@ makeVolumetricFlowRateEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_CONFIG_PARSER( config ) - typedef VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter<FlagField_T> > FR_T; + using FR_T = VolumetricFlowRateEvaluation<VelocityField_T, FlagFieldEvaluationFilter<FlagField_T>>; auto evaluation = shared_ptr< FR_T >( new FR_T( blocks, velocityFieldId, FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, cellsToEvaluate ), defaultPlotFrequency, defaultLogFrequency, solution, velocitySolution, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_SET_AND_RETURN() @@ -632,7 +632,7 @@ makeVolumetricFlowRateEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_CONFIG_PARSER( config ) - typedef VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > FR_T; + using FR_T = VolumetricFlowRateEvaluation<VelocityField_T, Filter_T>; auto evaluation = shared_ptr< FR_T >( new FR_T( blocks, velocityFieldId, filter, defaultPlotFrequency, defaultLogFrequency, solution, velocitySolution, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_SET_AND_RETURN() diff --git a/src/field/adaptors/AdaptorCreators.h b/src/field/adaptors/AdaptorCreators.h index 56bfff20162ff9287d6fb13bd4b4627ce3040c81..b6907b2c20b761516d8529819b19e038eef0cd72 100644 --- a/src/field/adaptors/AdaptorCreators.h +++ b/src/field/adaptors/AdaptorCreators.h @@ -38,14 +38,14 @@ class AdaptorHandling : public blockforest::AlwaysInitializeBlockDataHandling< A { public: - typedef typename Adaptor_T::functor_t AdaptionFunction_T; + using AdaptionFunction_T = typename Adaptor_T::functor_t; AdaptorHandling( const ConstBlockDataID & adaptedFieldId, const AdaptionFunction_T & function ) : adaptedFieldId_( adaptedFieldId ), function_( function ) {} Adaptor_T * initialize( IBlock * const block ) override { - typedef typename Adaptor_T::basefield_t AdaptedField_T; + using AdaptedField_T = typename Adaptor_T::basefield_t; const AdaptedField_T * adaptedField = block->getData< AdaptedField_T >( adaptedFieldId_ ); return new Adaptor_T( *adaptedField, function_ ); } diff --git a/src/field/adaptors/AdaptorIterator.h b/src/field/adaptors/AdaptorIterator.h index b9504ef310f73be92f3b91acb6aee16ded907c97..e2da36e2e3a0545c85bdd4397f597445f3d32458 100644 --- a/src/field/adaptors/AdaptorIterator.h +++ b/src/field/adaptors/AdaptorIterator.h @@ -43,9 +43,9 @@ template < typename AdaptedIterator, typename FieldAdaptor> class AdaptorIterator { public: - typedef typename FieldAdaptor::value_type T; - typedef typename FieldAdaptor::functor_t Functor; - typedef AdaptorIterator<AdaptedIterator, FieldAdaptor > OwnType; + using T = typename FieldAdaptor::value_type; + using Functor = typename FieldAdaptor::functor_t; + using OwnType = AdaptorIterator<AdaptedIterator, FieldAdaptor>; AdaptorIterator( const AdaptedIterator & baseIterator, const FieldAdaptor * adaptedField ) : base_( baseIterator ), adaptedField_( adaptedField), functor_( adaptedField->getFunctor() ) diff --git a/src/field/adaptors/ComponentExtractionAdaptor.h b/src/field/adaptors/ComponentExtractionAdaptor.h index bfd60854c1e38885fbfcec755f74ef3c70e3bec5..12451fcc647b6259e800116f093cb3d86266229e 100644 --- a/src/field/adaptors/ComponentExtractionAdaptor.h +++ b/src/field/adaptors/ComponentExtractionAdaptor.h @@ -32,12 +32,12 @@ namespace field { class ComponentExtractionFunction { public: - typedef Field_T basefield_t; - typedef typename Field_T::const_base_iterator basefield_iterator; + using basefield_t = Field_T; + using basefield_iterator = typename Field_T::const_base_iterator; - typedef VectorTrait<typename basefield_t::value_type > OutputTrait; + using OutputTrait = VectorTrait<typename basefield_t::value_type>; - typedef typename OutputTrait::OutputType value_type; + using value_type = typename OutputTrait::OutputType; static const uint_t F_SIZE = 1; @@ -61,8 +61,8 @@ namespace field { class ComponentExtractionAdaptor : public GhostLayerFieldAdaptor< ComponentExtractionFunction<field_t,component,vectorComponent>, 0 > { public: - typedef ComponentExtractionFunction<field_t,component,vectorComponent> Func; - typedef GhostLayerFieldAdaptor< Func, 0 > baseclass; + using Func = ComponentExtractionFunction<field_t, component, vectorComponent>; + using baseclass = GhostLayerFieldAdaptor<Func, 0>; ComponentExtractionAdaptor( const field_t & field, const Func & func = Func() ) : baseclass( field, func) diff --git a/src/field/adaptors/GhostLayerFieldAdaptor.h b/src/field/adaptors/GhostLayerFieldAdaptor.h index 3b22ae6ef936186bfad6a3619a899527f41471bd..13ac8f0e289b6bf5300ac70647816a44dbb034f1 100644 --- a/src/field/adaptors/GhostLayerFieldAdaptor.h +++ b/src/field/adaptors/GhostLayerFieldAdaptor.h @@ -85,23 +85,23 @@ public: //** Type Definitions ********************************************************************************************** /*! \name Type Definitions */ //@{ - typedef Functor functor_t; - typedef typename Functor::basefield_t basefield_t; - typedef typename Functor::value_type value_type; - typedef typename Functor::value_type T; + using functor_t = Functor; + using basefield_t = typename Functor::basefield_t; + using value_type = typename Functor::value_type; + using T = typename Functor::value_type; static const uint_t F_SIZE = Functor::F_SIZE; - typedef typename basefield_t::const_base_iterator adapted_base_iterator; - typedef typename basefield_t::const_iterator adapted_iterator; - typedef typename basefield_t::const_reverse_iterator adapted_reverse_iterator; + using adapted_base_iterator = typename basefield_t::const_base_iterator; + using adapted_iterator = typename basefield_t::const_iterator; + using adapted_reverse_iterator = typename basefield_t::const_reverse_iterator; - typedef GhostLayerFieldAdaptor<Functor,glDecrease> OwnType; - typedef AdaptorIterator<adapted_base_iterator, OwnType > const_base_iterator; - typedef AdaptorIterator<adapted_iterator, OwnType > const_iterator; - typedef AdaptorIterator<adapted_reverse_iterator,OwnType > const_reverse_iterator; + using OwnType = GhostLayerFieldAdaptor<Functor, glDecrease>; + using const_base_iterator = AdaptorIterator<adapted_base_iterator, OwnType>; + using const_iterator = AdaptorIterator<adapted_iterator, OwnType>; + using const_reverse_iterator = AdaptorIterator<adapted_reverse_iterator, OwnType>; - typedef FieldPointer<OwnType, const OwnType, const T > ConstPtr; + using ConstPtr = FieldPointer<OwnType, const OwnType, const T>; //@} //******************************************************************************************************************* diff --git a/src/field/adaptors/VectorFieldAccessor.h b/src/field/adaptors/VectorFieldAccessor.h index e41f4684a13d264d3d193599e6b8f01b11b9549c..2ba6ca1a28969687caab67540456b5c615d7cbab 100644 --- a/src/field/adaptors/VectorFieldAccessor.h +++ b/src/field/adaptors/VectorFieldAccessor.h @@ -36,7 +36,7 @@ namespace field { static_assert( VectorField_T::F_SIZE == 3, "Only valid for Fields with 3 components (F_SIZE==3)" ); static_assert( std::is_same< typename VectorField_T::value_type, real_t >::value, "Only works for real valued fields" ); - typedef Vector3<real_t> vector_or_constRefVector; + using vector_or_constRefVector = Vector3<real_t>; static vector_or_constRefVector get( const VectorField_T * f, cell_idx_t x, cell_idx_t y, cell_idx_t z ) { @@ -56,7 +56,7 @@ namespace field { typename std::enable_if< std::is_same< typename VectorField_T::value_type, Vector3<real_t> >::value >::type > { - typedef const Vector3<real_t> & vector_or_constRefVector; + using vector_or_constRefVector = const Vector3<real_t> &; static vector_or_constRefVector get( const VectorField_T * f, cell_idx_t x, cell_idx_t y, cell_idx_t z ) { diff --git a/src/field/blockforest/BlockDataHandling.h b/src/field/blockforest/BlockDataHandling.h index e0caa9869a6360d1e8e045c50869f447709d3e4f..2939352343ca8b3b6d3ed2b98bfa111f9b9e75f5 100644 --- a/src/field/blockforest/BlockDataHandling.h +++ b/src/field/blockforest/BlockDataHandling.h @@ -42,8 +42,8 @@ class BlockDataHandling : public blockforest::BlockDataHandling< Field_T > { public: - typedef typename Field_T::value_type Value_T; - typedef std::function< void ( Field_T * field, IBlock * const block ) > InitializationFunction_T; + using Value_T = typename Field_T::value_type; + using InitializationFunction_T = std::function<void (Field_T *, IBlock *const)>; ~BlockDataHandling() override = default; @@ -398,7 +398,7 @@ class DefaultBlockDataHandling : public BlockDataHandling< GhostLayerField_T > { public: - typedef typename GhostLayerField_T::value_type Value_T; + using Value_T = typename GhostLayerField_T::value_type; DefaultBlockDataHandling( const weak_ptr< StructuredBlockStorage > & blocks, const std::function< Vector3< uint_t > ( const shared_ptr< StructuredBlockStorage > &, IBlock * const ) > calculateSize = internal::defaultSize ) : @@ -460,8 +460,8 @@ class AlwaysInitializeBlockDataHandling : public blockforest::AlwaysInitializeBl { public: - typedef typename GhostLayerField_T::value_type Value_T; - typedef std::function< void ( GhostLayerField_T * field, IBlock * const block ) > InitializationFunction_T; + using Value_T = typename GhostLayerField_T::value_type; + using InitializationFunction_T = std::function<void (GhostLayerField_T *, IBlock *const)>; AlwaysInitializeBlockDataHandling( const weak_ptr< StructuredBlockStorage > & blocks, const std::function< Vector3< uint_t > ( const shared_ptr< StructuredBlockStorage > &, IBlock * const ) > calculateSize = internal::defaultSize ) : diff --git a/src/field/communication/MPIDatatypes.impl.h b/src/field/communication/MPIDatatypes.impl.h index 1bb4bf3a6bf5c8ff35d335dc20d2365c04de931e..a21ac75bd6a150fb14bae781bd3cdb5d9a66f22d 100644 --- a/src/field/communication/MPIDatatypes.impl.h +++ b/src/field/communication/MPIDatatypes.impl.h @@ -33,7 +33,7 @@ MPI_Datatype mpiDatatypeSlice( const Field_T & field, const cell_idx_t xBeg, const cell_idx_t yBeg, const cell_idx_t zBeg, const cell_idx_t fBeg, const cell_idx_t xEnd, const cell_idx_t yEnd, const cell_idx_t zEnd, const cell_idx_t fEnd ) { - typedef typename Field_T::value_type T; + using T = typename Field_T::value_type; int sizes[4]; int subsizes[4]; int starts[4]; @@ -133,7 +133,7 @@ MPI_Datatype mpiDatatypeSliceXYZ( const Field_T & field, const CellInterval & in template<typename Field_T> MPI_Datatype mpiDatatypeSliceXYZ( const Field_T & field, const CellInterval & interval, const std::set<cell_idx_t> & fs ) { - typedef typename Field_T::value_type T; + using T = typename Field_T::value_type; MPI_Datatype newType = MPI_DATATYPE_NULL; diff --git a/src/field/communication/PackInfo.h b/src/field/communication/PackInfo.h index a8e95ce75ad707776f1ce90a7fbdc9a5cfe1f0d9..108860eb3af81bf8c6fa74786fadd58b3b7d2150 100644 --- a/src/field/communication/PackInfo.h +++ b/src/field/communication/PackInfo.h @@ -42,7 +42,7 @@ template<typename GhostLayerField_T> class PackInfo : public walberla::communication::UniformPackInfo { public: - typedef typename GhostLayerField_T::value_type T; + using T = typename GhostLayerField_T::value_type; PackInfo( const BlockDataID & bdId ) : bdId_( bdId ), communicateAllGhostLayers_( true ), numberOfGhostLayers_( 0 ) {} diff --git a/src/field/communication/ReducePackInfo.h b/src/field/communication/ReducePackInfo.h index 135574dcd37aec91dfea6aa0e009da926ba07c47..532b437246bedb88e2ba13f80605432888f08d44 100644 --- a/src/field/communication/ReducePackInfo.h +++ b/src/field/communication/ReducePackInfo.h @@ -42,7 +42,7 @@ template< template<typename> class ReduceOperation, typename GhostLayerField_T > class ReducePackInfo : public walberla::communication::ReducePackInfo { public: - typedef typename GhostLayerField_T::value_type T; + using T = typename GhostLayerField_T::value_type; ReducePackInfo( const BlockDataID & bdId, T init ) : bdId_(bdId), diff --git a/src/field/communication/UniformPullReductionPackInfo.h b/src/field/communication/UniformPullReductionPackInfo.h index 4233a3d2352ccd130d9cd8fca3d43fa86ad5f324..aa7ffe1a906c81733f0c8b36f53532637b2f2993 100644 --- a/src/field/communication/UniformPullReductionPackInfo.h +++ b/src/field/communication/UniformPullReductionPackInfo.h @@ -49,7 +49,7 @@ template< template<typename> class ReduceOperation, typename GhostLayerField_T > class UniformPullReductionPackInfo : public walberla::communication::UniformPackInfo { public: - typedef typename GhostLayerField_T::value_type T; + using T = typename GhostLayerField_T::value_type; UniformPullReductionPackInfo( const BlockDataID & bdID ) : bdID_( bdID ), communicateAllGhostLayers_( true ), numberOfGhostLayers_( 0 ) {} diff --git a/src/field/distributors/DistributorCreators.h b/src/field/distributors/DistributorCreators.h index ab555911c6a5224f8d985aeaa534a704f7c87c50..2ff45e304a5c68a2997cb8f654fb49096a361c99 100644 --- a/src/field/distributors/DistributorCreators.h +++ b/src/field/distributors/DistributorCreators.h @@ -67,8 +67,8 @@ public: Distributor_T * initialize( IBlock * const block ) override { - typedef typename Distributor_T::BaseField_T DistributionDestinationField_T; - typedef typename FlagField_T::flag_t flag_t; + using DistributionDestinationField_T = typename Distributor_T::BaseField_T; + using flag_t = typename FlagField_T::flag_t; DistributionDestinationField_T * distributionDestinationField = block->getData< DistributionDestinationField_T >( distributionDestinationFieldID_ ); const FlagField_T * flagField = block->getData< FlagField_T >( flagFieldID_ ); diff --git a/src/field/distributors/KernelDistributor.h b/src/field/distributors/KernelDistributor.h index 1aed2f2ea3c801998114723c8a8ac127d708ac33..712d9a7b7e32ae96b0d259873d102166675b22b3 100644 --- a/src/field/distributors/KernelDistributor.h +++ b/src/field/distributors/KernelDistributor.h @@ -50,9 +50,9 @@ public: static const uint_t F_SIZE = Field_T::F_SIZE; - typedef Field_T BaseField_T; - typedef typename FlagField_T::flag_t flag_t; - typedef KernelDistributor<Field_T,FlagField_T> OwnType; + using BaseField_T = Field_T; + using flag_t = typename FlagField_T::flag_t; + using OwnType = KernelDistributor<Field_T, FlagField_T>; KernelDistributor( const weak_ptr<StructuredBlockStorage> & blockStorage, const IBlock & block, BaseField_T & baseField, const FlagField_T & flagField, diff --git a/src/field/distributors/NearestNeighborDistributor.h b/src/field/distributors/NearestNeighborDistributor.h index 6aa4ba2958864e0be6de91c487566b787f5eaaf9..932f443b3e30af9ab6a2bc4f6c6f3f585e485473 100644 --- a/src/field/distributors/NearestNeighborDistributor.h +++ b/src/field/distributors/NearestNeighborDistributor.h @@ -49,9 +49,9 @@ public: static const uint_t F_SIZE = Field_T::F_SIZE; - typedef Field_T BaseField_T; - typedef typename FlagField_T::flag_t flag_t; - typedef NearestNeighborDistributor<Field_T,FlagField_T> OwnType; + using BaseField_T = Field_T; + using flag_t = typename FlagField_T::flag_t; + using OwnType = NearestNeighborDistributor<Field_T, FlagField_T>; NearestNeighborDistributor( const weak_ptr<StructuredBlockStorage> & blockStorage, const IBlock & block, BaseField_T & baseField, const FlagField_T & flagField, diff --git a/src/field/interpolators/FieldInterpolatorCreators.h b/src/field/interpolators/FieldInterpolatorCreators.h index 760db9b7c74ed62890b874dbf68ce8a11e9171ac..c4bcfafc3683886e57bf167ae5fcf7cf912d57da 100644 --- a/src/field/interpolators/FieldInterpolatorCreators.h +++ b/src/field/interpolators/FieldInterpolatorCreators.h @@ -66,8 +66,8 @@ public: Interpolator_T * initialize( IBlock * const block ) override { - typedef typename Interpolator_T::BaseField_T InterpolatedField_T; - typedef typename FlagField_T::flag_t flag_t; + using InterpolatedField_T = typename Interpolator_T::BaseField_T; + using flag_t = typename FlagField_T::flag_t; const InterpolatedField_T * interpolatedField = block->getData< InterpolatedField_T >( interpolatedFieldID_ ); const FlagField_T * flagField = block->getData< FlagField_T >( flagFieldID_ ); diff --git a/src/field/interpolators/KernelFieldInterpolator.h b/src/field/interpolators/KernelFieldInterpolator.h index 50dfde0fc9a370fb1e4b8af95b37ccfe3bae9d4d..0e59fabf21dfd4899e62ca29961811a0e99e59d9 100644 --- a/src/field/interpolators/KernelFieldInterpolator.h +++ b/src/field/interpolators/KernelFieldInterpolator.h @@ -92,9 +92,9 @@ public: static const uint_t F_SIZE = Field_T::F_SIZE; - typedef Field_T BaseField_T; - typedef typename FlagField_T::flag_t flag_t; - typedef KernelFieldInterpolator<Field_T,FlagField_T> OwnType; + using BaseField_T = Field_T; + using flag_t = typename FlagField_T::flag_t; + using OwnType = KernelFieldInterpolator<Field_T, FlagField_T>; KernelFieldInterpolator( const weak_ptr<StructuredBlockStorage> & blockStorage, const IBlock & block, const BaseField_T & baseField, const FlagField_T & flagField, diff --git a/src/field/interpolators/NearestNeighborFieldInterpolator.h b/src/field/interpolators/NearestNeighborFieldInterpolator.h index 975c55edb4c52d0ea197391a88b271588bbf7729..b5b5cba7f65a3e06517356933d157108ba81e90c 100644 --- a/src/field/interpolators/NearestNeighborFieldInterpolator.h +++ b/src/field/interpolators/NearestNeighborFieldInterpolator.h @@ -46,9 +46,9 @@ public: static const uint_t F_SIZE = Field_T::F_SIZE; - typedef Field_T BaseField_T; - typedef typename FlagField_T::flag_t flag_t; - typedef NearestNeighborFieldInterpolator<Field_T,FlagField_T> OwnType; + using BaseField_T = Field_T; + using flag_t = typename FlagField_T::flag_t; + using OwnType = NearestNeighborFieldInterpolator<Field_T, FlagField_T>; NearestNeighborFieldInterpolator( const weak_ptr<StructuredBlockStorage> & blockStorage, const IBlock & block, const BaseField_T & baseField, const FlagField_T & flagField, diff --git a/src/field/interpolators/NearestNeighborInterpolator.h b/src/field/interpolators/NearestNeighborInterpolator.h index 0a609dc68ae89036cfc28a006829ce0dc618bb88..b76c61fa5f8d711cf0a1b17e6ec9a94a93039a20 100644 --- a/src/field/interpolators/NearestNeighborInterpolator.h +++ b/src/field/interpolators/NearestNeighborInterpolator.h @@ -53,7 +53,7 @@ namespace field { public: static const uint_t F_SIZE = GlField::F_SIZE; - typedef typename GlField::value_type value_type; + using value_type = typename GlField::value_type; NearestNeighborInterpolator( const GlField & fieldToInterpolate ) : field_( fieldToInterpolate ) diff --git a/src/field/interpolators/TrilinearFieldInterpolator.h b/src/field/interpolators/TrilinearFieldInterpolator.h index bdac4ff1a6d752b6d5d898139de421fb5793f43b..8eb24a4cf0877e0692f6e963fc8a01f5a47db9b4 100644 --- a/src/field/interpolators/TrilinearFieldInterpolator.h +++ b/src/field/interpolators/TrilinearFieldInterpolator.h @@ -48,9 +48,9 @@ public: static const uint_t F_SIZE = Field_T::F_SIZE; - typedef Field_T BaseField_T; - typedef typename FlagField_T::flag_t flag_t; - typedef TrilinearFieldInterpolator<Field_T,FlagField_T> OwnType; + using BaseField_T = Field_T; + using flag_t = typename FlagField_T::flag_t; + using OwnType = TrilinearFieldInterpolator<Field_T, FlagField_T>; TrilinearFieldInterpolator( const weak_ptr<StructuredBlockStorage> & blockStorage, const IBlock & block, const BaseField_T & baseField, const FlagField_T & flagField, diff --git a/src/field/iterators/FieldIterator.h b/src/field/iterators/FieldIterator.h index faecf98228c877b22d49325384e53fb1bee35e9d..7557fea2af83b9c6b880dab2abc73a9eb9ec07f7 100644 --- a/src/field/iterators/FieldIterator.h +++ b/src/field/iterators/FieldIterator.h @@ -75,7 +75,7 @@ namespace field { using pointer = T*; using reference = T&; - typedef Field<typename std::remove_const<T>::type, fieldFSize> FieldType; + using FieldType = Field<typename std::remove_const<T>::type, fieldFSize>; static const uint_t F_SIZE = fieldFSize; @@ -219,8 +219,8 @@ namespace field { class ForwardFieldIterator : public FieldIterator<T,fieldFSize> { public: - typedef FieldIterator<T,fieldFSize> Parent; - typedef Field<typename std::remove_const<T>::type, fieldFSize> FieldType; + using Parent = FieldIterator<T, fieldFSize>; + using FieldType = Field<typename std::remove_const<T>::type, fieldFSize>; //**Constructor/Destructor**************************************************************************************** /*!\name Constructor/Destructor */ @@ -262,8 +262,8 @@ namespace field { class ReverseFieldIterator : public FieldIterator<T,fieldFSize> { public: - typedef FieldIterator<T,fieldFSize> Parent; - typedef Field<typename std::remove_const<T>::type, fieldFSize> FieldType; + using Parent = FieldIterator<T, fieldFSize>; + using FieldType = Field<typename std::remove_const<T>::type, fieldFSize>; //**Constructor/Destructor**************************************************************************************** /*!\name Constructor/Destructor */ diff --git a/src/field/iterators/FieldIterator.impl.h b/src/field/iterators/FieldIterator.impl.h index a643984c8cdc657d6f0ad496e0db4f4a8842a2eb..d2184e9a8201fbd12a6ca90e6aac9e016ec8ec83 100644 --- a/src/field/iterators/FieldIterator.impl.h +++ b/src/field/iterators/FieldIterator.impl.h @@ -47,7 +47,7 @@ FieldIterator<T,fs>::FieldIterator( const typename FieldIterator<T,fs>::FieldTyp return; } - typedef typename std::remove_const<T>::type NonConstT; + using NonConstT = typename std::remove_const<T>::type; cur_[0] = cur_[1] = cur_[2] = 0; if( f_->layout() == fzyx ) diff --git a/src/field/iterators/FieldNeighborPointer.h b/src/field/iterators/FieldNeighborPointer.h index 9d483d1e90456e33ea224fce0c8775fd11cb2e6f..4ab5a13c04c618d54f24f82aef8b30de0a273373 100644 --- a/src/field/iterators/FieldNeighborPointer.h +++ b/src/field/iterators/FieldNeighborPointer.h @@ -61,7 +61,7 @@ namespace field { { public: - typedef Value_T value_type; + using value_type = Value_T; static const uint_t F_SIZE = Field_T::F_SIZE; FieldNeighborPointer( FieldMember & field, cell_idx_t _x, cell_idx_t _y, cell_idx_t _z, cell_idx_t _f = 0 ) diff --git a/src/field/iterators/FieldPointer.h b/src/field/iterators/FieldPointer.h index ba027faadb30672769b055dbe66dd5e52d570c50..b36a19af5d57181215a05e3a856b181d8554d13b 100644 --- a/src/field/iterators/FieldPointer.h +++ b/src/field/iterators/FieldPointer.h @@ -63,7 +63,7 @@ namespace field { class FieldPointer { public: - typedef Value_T value_type; + using value_type = Value_T; static const uint_t F_SIZE = Field_T::F_SIZE; FieldPointer( FieldMember & field, cell_idx_t _x, cell_idx_t _y, cell_idx_t _z, cell_idx_t _f = 0 ) diff --git a/src/field/vtk/FlagFieldCellFilter.h b/src/field/vtk/FlagFieldCellFilter.h index 708c5234ee6a446fbfa273a1c13992009b8a6de4..d82c3a13e82cbab5851f7572ef44c02a9bb186f5 100644 --- a/src/field/vtk/FlagFieldCellFilter.h +++ b/src/field/vtk/FlagFieldCellFilter.h @@ -35,7 +35,7 @@ namespace field { template< typename FlagField_T > class FlagFieldCellFilter { private: - typedef typename FlagField_T::flag_t flag_t; + using flag_t = typename FlagField_T::flag_t; public: FlagFieldCellFilter( const ConstBlockDataID flags ) : flagField_( flags ) {} diff --git a/src/field/vtk/FlagFieldMapping.h b/src/field/vtk/FlagFieldMapping.h index e496657df43277c3bd79392036400362630ecfb1..f8cb572b5682f4faaed44832758f45efb5886fa8 100644 --- a/src/field/vtk/FlagFieldMapping.h +++ b/src/field/vtk/FlagFieldMapping.h @@ -34,7 +34,7 @@ template< typename FlagField_T, typename T > class FlagFieldMapping : public vtk::BlockCellDataWriter<T,1> { private: - typedef typename FlagField_T::flag_t flag_t; + using flag_t = typename FlagField_T::flag_t; public: FlagFieldMapping( const ConstBlockDataID flagId, const std::string& id ) : @@ -86,7 +86,7 @@ protected: template<typename FieldType, typename TargetType=uint8_t> class BinarizationFieldWriter : public vtk::BlockCellDataWriter<TargetType,1> { - typedef typename FieldType::value_type SrcType; + using SrcType = typename FieldType::value_type; public: BinarizationFieldWriter( const ConstBlockDataID fieldID, const std::string& id, SrcType mask) : diff --git a/src/field/vtk/VTKWriter.h b/src/field/vtk/VTKWriter.h index a86d8fa52cd63fd74e8c1d6e4bd84a0ab2a7b8aa..513b920e1b1334cf19c3816cba394496b750e2d1 100644 --- a/src/field/vtk/VTKWriter.h +++ b/src/field/vtk/VTKWriter.h @@ -103,9 +103,9 @@ class VTKWriter : public vtk::BlockCellDataWriter< OutputType, VectorTrait<typename Field_T::value_type>::F_SIZE * Field_T::F_SIZE > { public: - typedef VectorTrait<typename Field_T::value_type > OutputTrait; + using OutputTrait = VectorTrait<typename Field_T::value_type>; - typedef vtk::BlockCellDataWriter<OutputType, OutputTrait::F_SIZE * Field_T::F_SIZE> base_t; + using base_t = vtk::BlockCellDataWriter<OutputType, OutputTrait::F_SIZE * Field_T::F_SIZE>; VTKWriter( const ConstBlockDataID bdid, const std::string& id ) : base_t( id ), bdid_( bdid ), field_( nullptr ) {} @@ -192,7 +192,7 @@ inline vtk::VTKOutput::Write createVTKOutput ( const ConstBlockDataID & fieldId const Set<SUID>& incompatibleStates = Set<SUID>::emptySet(), bool useMPIIO = true, const uint_t initialExecutionCount = 0 ) { - typedef typename VectorTrait<typename Field_T::value_type >::OutputType OutputType; + using OutputType = typename VectorTrait<typename Field_T::value_type>::OutputType; return createVTKOutput<Field_T, OutputType> ( fieldId, blocks, identifier, writeFrequency, ghostLayers, forcePVTU, baseFolder,executionFolder, @@ -247,7 +247,7 @@ inline vtk::VTKOutput::Write createScalingVTKOutput ( const ConstBlockDataID & const Set<SUID>& incompatibleStates = Set<SUID>::emptySet(), bool useMPIIO = true, const uint_t initialExecutionCount = 0 ) { - typedef typename VectorTrait<typename Field_T::value_type >::OutputType OutputType; + using OutputType = typename VectorTrait<typename Field_T::value_type>::OutputType; return createScalingVTKOutput<Field_T, OutputType> ( fieldId, blocks, identifier, writeFrequency, factor, ghostLayers, forcePVTU, baseFolder,executionFolder, diff --git a/src/gather/FileGatherScheme.h b/src/gather/FileGatherScheme.h index b7409573f706fe66d02dbe5e829daf28159176b4..7a48b0f10cc831bdc670139620a7d327d6f5425c 100644 --- a/src/gather/FileGatherScheme.h +++ b/src/gather/FileGatherScheme.h @@ -106,7 +106,7 @@ namespace gather domain_decomposition::BlockStorage & blocks_; - typedef std::vector<shared_ptr<GatherPackInfo> > PackInfoVector; + using PackInfoVector = std::vector<shared_ptr<GatherPackInfo>>; PackInfoVector packInfos_; ///< all registered PackInfos /// To generated unique filenames for every FileCollectorScheme diff --git a/src/gather/MPIGatherScheme.h b/src/gather/MPIGatherScheme.h index 3d06db3cabd5df2481ae986fa3f2a93ceff5d665..e9270289ba1a1b4ff4b5d445e91fd679cc450b01 100644 --- a/src/gather/MPIGatherScheme.h +++ b/src/gather/MPIGatherScheme.h @@ -102,7 +102,7 @@ class MPIGatherScheme private: - typedef std::vector<shared_ptr<GatherPackInfo> > PackInfoVector; + using PackInfoVector = std::vector<shared_ptr<GatherPackInfo>>; domain_decomposition::BlockStorage & blocks_; PackInfoVector packInfos_; ///< all registered PackInfos diff --git a/src/geometry/InitBoundaryHandling.h b/src/geometry/InitBoundaryHandling.h index 7be3b02710ad675f91a8906e67f34b28a0b3bd74..fe6817d3ead08c2b7bb144f9564dd8ea8d03809d 100644 --- a/src/geometry/InitBoundaryHandling.h +++ b/src/geometry/InitBoundaryHandling.h @@ -87,12 +87,12 @@ void initBoundaryHandling( StructuredBlockStorage & blocks, BlockDataID boundary using namespace geometry; using namespace initializer; - typedef BoundaryFromCellInterval <BoundaryHandling> FromCellInterval; - typedef BoundaryFromDomainBorder <BoundaryHandling> FromBorder; - typedef BoundaryFromVoxelFile <BoundaryHandling> FromVoxelFile; - typedef BoundaryFromBody <BoundaryHandling> FromBody; - typedef BoundaryFromImage <BoundaryHandling, GrayScaleImage> FromGrayScaleImage; - typedef BoundaryFromImage <BoundaryHandling, RGBAImage> FromRGBAImage; + using FromCellInterval = BoundaryFromCellInterval<BoundaryHandling>; + using FromBorder = BoundaryFromDomainBorder<BoundaryHandling>; + using FromVoxelFile = BoundaryFromVoxelFile<BoundaryHandling>; + using FromBody = BoundaryFromBody<BoundaryHandling>; + using FromGrayScaleImage = BoundaryFromImage<BoundaryHandling, GrayScaleImage>; + using FromRGBAImage = BoundaryFromImage<BoundaryHandling, RGBAImage>; InitializationManager initManager( blocks.getBlockStorage() ); diff --git a/src/geometry/containment_octree/BranchNode.h b/src/geometry/containment_octree/BranchNode.h index fd5d950774a8486a20d561aad6bc3ed112e58bc8..2b160ad5b3641e5adcbcdba3c6c245bcbc2f89c8 100644 --- a/src/geometry/containment_octree/BranchNode.h +++ b/src/geometry/containment_octree/BranchNode.h @@ -36,12 +36,12 @@ template< typename ContainmentOctreeT > class BranchNode : public Node<ContainmentOctreeT> { public: - typedef typename Node<ContainmentOctreeT>::DistanceObject DistanceObject; - typedef typename Node<ContainmentOctreeT>::Scalar Scalar; - typedef typename Node<ContainmentOctreeT>::Point Point; - typedef typename Node<ContainmentOctreeT>::AABB AABB; + using DistanceObject = typename Node<ContainmentOctreeT>::DistanceObject; + using Scalar = typename Node<ContainmentOctreeT>::Scalar; + using Point = typename Node<ContainmentOctreeT>::Point; + using AABB = typename Node<ContainmentOctreeT>::AABB; - typedef typename Node<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; + using KahanAccumulator = typename Node<ContainmentOctreeT>::KahanAccumulator; inline BranchNode( const shared_ptr<const DistanceObject> & distanceObject, const AABB & aabb, const Scalar epsilon, const uint_t maxDepth, const Scalar minAABBVolume ); diff --git a/src/geometry/containment_octree/ContainmentOctree.h b/src/geometry/containment_octree/ContainmentOctree.h index 96d091c006d8554a4af79a374e1c589ad7097813..d95fa55ceb59b1be675ded5b180e4434941cfd99 100644 --- a/src/geometry/containment_octree/ContainmentOctree.h +++ b/src/geometry/containment_octree/ContainmentOctree.h @@ -42,18 +42,18 @@ template< typename DistanceObjectT > class ContainmentOctree { public: - typedef typename DistanceObjectT::Scalar Scalar; - typedef typename DistanceObjectT::Point Point; - typedef math::GenericAABB<Scalar> AABB; - - typedef math::KahanAccumulator<Scalar> KahanAccumulator; - typedef DistanceObjectT DistanceObject; - - typedef containment_octree::Node<ContainmentOctree> Node; - typedef containment_octree::InsideLeafNode<ContainmentOctree> InsideLeafNode; - typedef containment_octree::OutsideLeafNode<ContainmentOctree> OutsideLeafNode; - typedef containment_octree::IndeterminateLeafNode<ContainmentOctree> IndeterminateLeafNode; - typedef containment_octree::BranchNode<ContainmentOctree> BranchNode; + using Scalar = typename DistanceObjectT::Scalar; + using Point = typename DistanceObjectT::Point; + using AABB = math::GenericAABB<Scalar>; + + using KahanAccumulator = math::KahanAccumulator<Scalar>; + using DistanceObject = DistanceObjectT; + + using Node = containment_octree::Node<ContainmentOctree>; + using InsideLeafNode = containment_octree::InsideLeafNode<ContainmentOctree>; + using OutsideLeafNode = containment_octree::OutsideLeafNode<ContainmentOctree>; + using IndeterminateLeafNode = containment_octree::IndeterminateLeafNode<ContainmentOctree>; + using BranchNode = containment_octree::BranchNode<ContainmentOctree>; inline ContainmentOctree( const shared_ptr<const DistanceObject> & distanceObject, const Scalar epsilon = Scalar(0), const uint_t maxDepth = 6u, const Scalar minAABBVolume = Scalar(0) ); diff --git a/src/geometry/containment_octree/IndeterminateLeafNode.h b/src/geometry/containment_octree/IndeterminateLeafNode.h index 977c0a1cb0522bee1a5f7f7c11aa90e876884513..382620f5767bbc746dbc7873448c42532a24aa46 100644 --- a/src/geometry/containment_octree/IndeterminateLeafNode.h +++ b/src/geometry/containment_octree/IndeterminateLeafNode.h @@ -34,12 +34,12 @@ class IndeterminateLeafNode : public LeafNode<ContainmentOctreeT> { public: using LeafNode<ContainmentOctreeT>::numNodes; - typedef typename LeafNode<ContainmentOctreeT>::DistanceObject DistanceObject; - typedef typename LeafNode<ContainmentOctreeT>::Scalar Scalar; - typedef typename LeafNode<ContainmentOctreeT>::Point Point; - typedef typename LeafNode<ContainmentOctreeT>::AABB AABB; + using DistanceObject = typename LeafNode<ContainmentOctreeT>::DistanceObject; + using Scalar = typename LeafNode<ContainmentOctreeT>::Scalar; + using Point = typename LeafNode<ContainmentOctreeT>::Point; + using AABB = typename LeafNode<ContainmentOctreeT>::AABB; - typedef typename LeafNode<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; + using KahanAccumulator = typename LeafNode<ContainmentOctreeT>::KahanAccumulator; IndeterminateLeafNode( const shared_ptr<const DistanceObject> & distanceObject, const Scalar epsilon ) : distanceObject_( distanceObject ), sqEpsilon_( epsilon * epsilon ) { } diff --git a/src/geometry/containment_octree/InsideLeafNode.h b/src/geometry/containment_octree/InsideLeafNode.h index b673d61e1941b644c68826c1ba5c61156be5fb01..0c46290f13148bcd3d2451301512d6ae5a62df0d 100644 --- a/src/geometry/containment_octree/InsideLeafNode.h +++ b/src/geometry/containment_octree/InsideLeafNode.h @@ -34,12 +34,12 @@ class InsideLeafNode : public LeafNode<ContainmentOctreeT> { public: using LeafNode<ContainmentOctreeT>::numNodes; - typedef typename LeafNode<ContainmentOctreeT>::DistanceObject DistanceObject; - typedef typename LeafNode<ContainmentOctreeT>::Scalar Scalar; - typedef typename LeafNode<ContainmentOctreeT>::Point Point; - typedef typename LeafNode<ContainmentOctreeT>::AABB AABB; + using DistanceObject = typename LeafNode<ContainmentOctreeT>::DistanceObject; + using Scalar = typename LeafNode<ContainmentOctreeT>::Scalar; + using Point = typename LeafNode<ContainmentOctreeT>::Point; + using AABB = typename LeafNode<ContainmentOctreeT>::AABB; - typedef typename LeafNode<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; + using KahanAccumulator = typename LeafNode<ContainmentOctreeT>::KahanAccumulator; virtual ~InsideLeafNode() = default; diff --git a/src/geometry/containment_octree/LeafNode.h b/src/geometry/containment_octree/LeafNode.h index 47223f8b5d886230ea8044b3b7146200f97743c3..177a352dc1f07300f09f6058df8755b98d57e96f 100644 --- a/src/geometry/containment_octree/LeafNode.h +++ b/src/geometry/containment_octree/LeafNode.h @@ -35,12 +35,12 @@ class LeafNode : public Node<ContainmentOctreeT> { public: using Node<ContainmentOctreeT>::numNodes; - typedef typename Node<ContainmentOctreeT>::DistanceObject DistanceObject; - typedef typename Node<ContainmentOctreeT>::Scalar Scalar; - typedef typename Node<ContainmentOctreeT>::Point Point; - typedef typename Node<ContainmentOctreeT>::AABB AABB; + using DistanceObject = typename Node<ContainmentOctreeT>::DistanceObject; + using Scalar = typename Node<ContainmentOctreeT>::Scalar; + using Point = typename Node<ContainmentOctreeT>::Point; + using AABB = typename Node<ContainmentOctreeT>::AABB; - typedef typename Node<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; + using KahanAccumulator = typename Node<ContainmentOctreeT>::KahanAccumulator; virtual ~LeafNode() = default; diff --git a/src/geometry/containment_octree/Node.h b/src/geometry/containment_octree/Node.h index a1bc9325f5a495c0dbf3b3c97af04e395a753d7e..ddc3e15ecd657d515d8898994d2d357359b13052 100644 --- a/src/geometry/containment_octree/Node.h +++ b/src/geometry/containment_octree/Node.h @@ -33,12 +33,12 @@ template< typename ContainmentOctreeT > class Node { public: - typedef typename ContainmentOctreeT::Point Point; - typedef typename ContainmentOctreeT::Scalar Scalar; - typedef typename ContainmentOctreeT::AABB AABB; + using Point = typename ContainmentOctreeT::Point; + using Scalar = typename ContainmentOctreeT::Scalar; + using AABB = typename ContainmentOctreeT::AABB; - typedef typename ContainmentOctreeT::DistanceObject DistanceObject; - typedef typename ContainmentOctreeT::KahanAccumulator KahanAccumulator; + using DistanceObject = typename ContainmentOctreeT::DistanceObject; + using KahanAccumulator = typename ContainmentOctreeT::KahanAccumulator; virtual ~Node() = default; virtual bool contains( const Point & p ) const = 0; diff --git a/src/geometry/containment_octree/OutsideLeafNode.h b/src/geometry/containment_octree/OutsideLeafNode.h index b5fc618133157323f873a9b2e6b408978027873a..6328ce593bfa29ad81ec0414f816eadc7580296f 100644 --- a/src/geometry/containment_octree/OutsideLeafNode.h +++ b/src/geometry/containment_octree/OutsideLeafNode.h @@ -35,12 +35,12 @@ class OutsideLeafNode : public LeafNode<ContainmentOctreeT> public: using LeafNode<ContainmentOctreeT>::numNodes; - typedef typename LeafNode<ContainmentOctreeT>::DistanceObject DistanceObject; - typedef typename LeafNode<ContainmentOctreeT>::Scalar Scalar; - typedef typename LeafNode<ContainmentOctreeT>::Point Point; - typedef typename LeafNode<ContainmentOctreeT>::AABB AABB; + using DistanceObject = typename LeafNode<ContainmentOctreeT>::DistanceObject; + using Scalar = typename LeafNode<ContainmentOctreeT>::Scalar; + using Point = typename LeafNode<ContainmentOctreeT>::Point; + using AABB = typename LeafNode<ContainmentOctreeT>::AABB; - typedef typename LeafNode<ContainmentOctreeT>::KahanAccumulator KahanAccumulator; + using KahanAccumulator = typename LeafNode<ContainmentOctreeT>::KahanAccumulator; virtual ~OutsideLeafNode() = default; diff --git a/src/geometry/initializer/BoundaryFromImage.h b/src/geometry/initializer/BoundaryFromImage.h index d19f4dcbe939f2bb3a8d6f622850102c26cab48e..466af7431b1aac361c72c202f1ddad3745440324 100644 --- a/src/geometry/initializer/BoundaryFromImage.h +++ b/src/geometry/initializer/BoundaryFromImage.h @@ -87,8 +87,8 @@ namespace initializer { class BoundaryFromImage : public Initializer { public: - typedef typename Image_T::pixel_t pixel_t; - typedef std::map<pixel_t, BoundarySetter<BoundaryHandling_T> > BoundarySetters; + using pixel_t = typename Image_T::pixel_t; + using BoundarySetters = std::map<pixel_t, BoundarySetter<BoundaryHandling_T>>; BoundaryFromImage( StructuredBlockStorage & blocks, BlockDataID handlerBlockDataID ); diff --git a/src/geometry/initializer/BoundaryFromVoxelFile.h b/src/geometry/initializer/BoundaryFromVoxelFile.h index 3b0640e33052f59d5094539b8a061acae196b376..7987f77f9444a6e64f0c4e125dd0462279e3dc89 100644 --- a/src/geometry/initializer/BoundaryFromVoxelFile.h +++ b/src/geometry/initializer/BoundaryFromVoxelFile.h @@ -58,8 +58,8 @@ struct IBlockIDPtrCompare { bool operator()( const IBlockID * lhs, const IBlockID * rhs ) const; }; -typedef std::map<const IBlockID*, CellInterval, IBlockIDPtrCompare> CellIntervalMap; -typedef std::map<const IBlockID*, std::pair<CellInterval, std::vector<uint8_t> >, IBlockIDPtrCompare> CellIntervalDataMap; +using CellIntervalMap = std::map<const IBlockID *, CellInterval, IBlockIDPtrCompare>; +using CellIntervalDataMap = std::map<const IBlockID *, std::pair<CellInterval, std::vector<uint8_t>>, IBlockIDPtrCompare>; //******************************************************************************************************************* diff --git a/src/geometry/initializer/InitializationManager.h b/src/geometry/initializer/InitializationManager.h index 7c9ac444b8ecd6000cf573bb9985386bcfb0be9a..81ed7d68cf4565810ba1d079c95b7a1366b0141a 100644 --- a/src/geometry/initializer/InitializationManager.h +++ b/src/geometry/initializer/InitializationManager.h @@ -44,7 +44,7 @@ namespace initializer { class Initializer; class InitializerUIDGenerator; - typedef uid::UID< InitializerUIDGenerator > InitializerUID; + using InitializerUID = uid::UID<InitializerUIDGenerator>; //******************************************************************************************************************* diff --git a/src/geometry/initializer/ScalarFieldFromBody.h b/src/geometry/initializer/ScalarFieldFromBody.h index 97ef3cc95d4709e3d70207c01ad36d58db261b94..617097ad85d1e79b5c98046101a4c7f59425b0e7 100644 --- a/src/geometry/initializer/ScalarFieldFromBody.h +++ b/src/geometry/initializer/ScalarFieldFromBody.h @@ -77,7 +77,7 @@ namespace initializer { class ScalarFieldFromBody : public Initializer { public: - typedef typename Field_T::value_type Value_T; + using Value_T = typename Field_T::value_type; /*************************************************************************************************************//** * Constructor diff --git a/src/geometry/mesh/TriangleMesh.h b/src/geometry/mesh/TriangleMesh.h index 12501c96ced95ca771de61ae485cdbbccdf98125..8f6817c41100d6609187250d51858746463c4ebd 100644 --- a/src/geometry/mesh/TriangleMesh.h +++ b/src/geometry/mesh/TriangleMesh.h @@ -54,12 +54,12 @@ namespace geometry { class TriangleMesh { public: - typedef uint32_t index_t; + using index_t = uint32_t; template<typename T> static index_t index_c( T x ) { return numeric_cast<index_t>(x); } - typedef Vector3<real_t> vertex_t; - typedef Vector3<real_t> normal_t; - typedef Vector3<float> color_t; + using vertex_t = Vector3<real_t>; + using normal_t = Vector3<real_t>; + using color_t = Vector3<float>; //** Size Information ******************************************************************************************* /*! \name Size Information */ diff --git a/src/geometry/structured/GrayScaleImage.h b/src/geometry/structured/GrayScaleImage.h index 3361cc90e18c9300e7d0c2f1b656062ab1aea3c5..43e39359b3ce578e7114de1dd3b6f9e69db8879b 100644 --- a/src/geometry/structured/GrayScaleImage.h +++ b/src/geometry/structured/GrayScaleImage.h @@ -44,7 +44,7 @@ namespace geometry { class GrayScaleImage { public: - typedef unsigned char pixel_t; + using pixel_t = unsigned char; GrayScaleImage( uint_t _width, uint_t _height ); GrayScaleImage( const std::string & pngFilename ); diff --git a/src/gui/Gui.h b/src/gui/Gui.h index 1332bb8dccda6574013f348140f941974ccd3ce8..799060b7a2f0c7021c9ec4dca5f8930d14074097 100644 --- a/src/gui/Gui.h +++ b/src/gui/Gui.h @@ -52,7 +52,7 @@ namespace gui { void registerPropertyTree( const shared_ptr<PropertyTree>& propertyTree ); - typedef std::function< DisplayAdaptor * ( const IBlock &, ConstBlockDataID ) > DisplayAdaptorCreatorFunc; + using DisplayAdaptorCreatorFunc = std::function<DisplayAdaptor *(const IBlock &, ConstBlockDataID)>; void registerDisplayAdaptorCreator( const DisplayAdaptorCreatorFunc & creatorFunc ); static void breakpoint( const std::string & comment, const std::string & file, int line ); diff --git a/src/gui/PropertyTree.h b/src/gui/PropertyTree.h index df1965d7e511a8bea275688a316a780fc9dded74..30bb247e3ccbe156e0b87e452daf9c8d2f1fa3eb 100644 --- a/src/gui/PropertyTree.h +++ b/src/gui/PropertyTree.h @@ -52,7 +52,7 @@ namespace gui { # ifdef WALBERLA_ENABLE_GUI typedef QStandardItem* ItemID; # else - typedef void * ItemID; + using ItemID = void *; # endif PropertyTree(); diff --git a/src/lbm/MassEvaluation.h b/src/lbm/MassEvaluation.h index 5a12f9c1329fb0f09bdcd81e92490919b5d7c274..9757137db90342d2fc4f34505dcefb064eb73432 100644 --- a/src/lbm/MassEvaluation.h +++ b/src/lbm/MassEvaluation.h @@ -96,7 +96,7 @@ shared_ptr< walberla::field::MassEvaluation< DensityField_T > > makeMassEvaluati const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef walberla::field::MassEvaluation< DensityField_T > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); evaluation->setDomainNormalization( internal::massEvaluationDomain( blocks, level ) ); return evaluation; @@ -111,7 +111,7 @@ makeMassEvaluation( const shared_ptr< StructuredBlockStorage > & blocks, const u const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef walberla::field::MassEvaluation< DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T> > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T>>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, walberla::field::FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, fluid ), plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); evaluation->setDomainNormalization( internal::massEvaluationDomain( blocks, level ) ); @@ -126,7 +126,7 @@ shared_ptr< walberla::field::MassEvaluation< DensityField_T, Filter_T > > makeMa const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef walberla::field::MassEvaluation< DensityField_T, Filter_T > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, Filter_T>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, filter, plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); evaluation->setDomainNormalization( internal::massEvaluationDomain( blocks, level ) ); return evaluation; @@ -143,7 +143,7 @@ makeMassEvaluation( const shared_ptr< StructuredBlockStorage > & blocks, const u const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef walberla::field::MassEvaluation< DensityField_T, field::DefaultEvaluationFilter, Pseudo2D > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, field::DefaultEvaluationFilter, Pseudo2D>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); evaluation->setDomainNormalization( internal::massEvaluationDomain( blocks, level ) ); return evaluation; @@ -158,7 +158,7 @@ makeMassEvaluation( const shared_ptr< StructuredBlockStorage > & blocks, const u const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef walberla::field::MassEvaluation< DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T>, Pseudo2D > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T>, Pseudo2D>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, walberla::field::FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, fluid ), plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); evaluation->setDomainNormalization( internal::massEvaluationDomain( blocks, level ) ); @@ -174,7 +174,7 @@ makeMassEvaluation( const shared_ptr< StructuredBlockStorage > & blocks, const u const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { - typedef walberla::field::MassEvaluation< DensityField_T, Filter_T, Pseudo2D > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, Filter_T, Pseudo2D>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, filter, plotFrequency, logFrequency, filename, requiredSelectors, incompatibleSelectors ) ); evaluation->setDomainNormalization( internal::massEvaluationDomain( blocks, level ) ); return evaluation; @@ -202,7 +202,7 @@ shared_ptr< walberla::field::MassEvaluation< DensityField_T > > makeMassEvaluati const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_LBM_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef walberla::field::MassEvaluation< DensityField_T > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() } @@ -217,7 +217,7 @@ makeMassEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_LBM_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef walberla::field::MassEvaluation< DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T> > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T>>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, walberla::field::FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, fluid ), defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() @@ -232,7 +232,7 @@ shared_ptr< walberla::field::MassEvaluation< DensityField_T, Filter_T > > makeMa const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_LBM_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef walberla::field::MassEvaluation< DensityField_T, Filter_T > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, Filter_T>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, filter, defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() } @@ -249,7 +249,7 @@ makeMassEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_LBM_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef walberla::field::MassEvaluation< DensityField_T, field::DefaultEvaluationFilter, Pseudo2D > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, field::DefaultEvaluationFilter, Pseudo2D>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() } @@ -264,7 +264,7 @@ makeMassEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_LBM_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef walberla::field::MassEvaluation< DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T>, Pseudo2D > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, walberla::field::FlagFieldEvaluationFilter<FlagField_T>, Pseudo2D>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, walberla::field::FlagFieldEvaluationFilter<FlagField_T>( flagFieldId, fluid ), defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() @@ -280,7 +280,7 @@ makeMassEvaluation( const Config_T & config, const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) { WALBERLA_LBM_MAKE_MASS_EVALUATION_CONFIG_PARSER( config ) - typedef walberla::field::MassEvaluation< DensityField_T, Filter_T, Pseudo2D > ME_T; + using ME_T = walberla::field::MassEvaluation<DensityField_T, Filter_T, Pseudo2D>; auto evaluation = shared_ptr< ME_T >( new ME_T( blocks, fieldId, filter, defaultPlotFrequency, defaultLogFrequency, defaultFilename, requiredSelectors, incompatibleSelectors ) ); WALBERLA_FIELD_MAKE_MASS_EVALUATION_SET_AND_RETURN() } diff --git a/src/lbm/blockforest/PostProcessing.h b/src/lbm/blockforest/PostProcessing.h index 361303cc1f079a558ae8b53e2e673f2ec27e7125..e0037f50605aac9ab5fb5dd5487c50b2c60096b5 100644 --- a/src/lbm/blockforest/PostProcessing.h +++ b/src/lbm/blockforest/PostProcessing.h @@ -36,7 +36,7 @@ namespace lbm { namespace internal { - typedef field::Field< uint8_t, 1 > MarkerField_T; + using MarkerField_T = field::Field<uint8_t, 1>; } @@ -47,9 +47,9 @@ class PostProcessing { public: - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; - typedef typename NeighborsStencil<LatticeModel_T>::type NeighborsStencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; + using NeighborsStencil_T = typename NeighborsStencil<LatticeModel_T>::type; PostProcessing( const BlockDataID & pdfFieldId, const BlockDataID & markerFieldId, const Filter_T & filter ) : pdfFieldId_( pdfFieldId ), markerFieldId_( markerFieldId ), filter_( filter ) @@ -316,7 +316,7 @@ class MarkerFieldGenerator { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; MarkerFieldGenerator( const BlockDataID & pdfFieldId, const BlockDataID & markerFieldId, const Filter_T & filter ) : pdfFieldId_( pdfFieldId ), markerFieldId_( markerFieldId ), filter_( filter ) @@ -371,7 +371,7 @@ class MarkerData : public blockforest::BlockDataHandling< internal::MarkerField_ { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; MarkerData( const BlockDataID & pdfFieldId, const Filter_T & filter ) : pdfFieldId_( pdfFieldId ), filter_( filter ) diff --git a/src/lbm/boundary/Curved.h b/src/lbm/boundary/Curved.h index 045a02398e12cfc252521ebed6190f4e8e94c99c..9275543895ba067d7d89b9b5659a0956b852d2d6 100644 --- a/src/lbm/boundary/Curved.h +++ b/src/lbm/boundary/Curved.h @@ -48,11 +48,11 @@ namespace lbm { template< typename LatticeModel_T, typename FlagField_T > class Curved : public Boundary< typename FlagField_T::flag_t > { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; - typedef typename FlagField_T::flag_t flag_t; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; + using flag_t = typename FlagField_T::flag_t; - typedef GhostLayerField< shared_ptr< std::array<real_t, Stencil::Size> >, 1 > WeightField; + using WeightField = GhostLayerField<shared_ptr<std::array<real_t, Stencil::Size>>, 1>; public: diff --git a/src/lbm/boundary/DiffusionDirichlet.h b/src/lbm/boundary/DiffusionDirichlet.h index 96a5600850a7eef45f583c20446894512642a24d..643027743f14683e830cc9015d633fa5e1b8997c 100644 --- a/src/lbm/boundary/DiffusionDirichlet.h +++ b/src/lbm/boundary/DiffusionDirichlet.h @@ -51,10 +51,10 @@ class DiffusionDirichlet : public Boundary<flag_t> static_assert( LatticeModel_T::compressible, "Only works with compressible models!" ); //static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< real_t, 1 > ScalarField; + using ScalarField = GhostLayerField<real_t, 1>; public: diff --git a/src/lbm/boundary/DynamicUBB.h b/src/lbm/boundary/DynamicUBB.h index 945cc36f3b895c2013ff9df7c68fd89ce99d6313..07aac83ceda73ecfc7ba6bca30938af327b50294 100644 --- a/src/lbm/boundary/DynamicUBB.h +++ b/src/lbm/boundary/DynamicUBB.h @@ -54,10 +54,10 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t, typename VelocityFunctor_T, bool AdaptVelocityToExternalForce = false, bool StoreForce = false > class DynamicUBB : public Boundary<flag_t> { - typedef lbm::PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = lbm::PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField; + using ForceField = GhostLayerField<Vector3<real_t>, 1>; public: diff --git a/src/lbm/boundary/FreeDiffusion.h b/src/lbm/boundary/FreeDiffusion.h index d264eda6dbe3d2a13d502defd5df2a1ba04fa83d..4e7aab582535a91c994c9c055f3f9e05804d87dd 100644 --- a/src/lbm/boundary/FreeDiffusion.h +++ b/src/lbm/boundary/FreeDiffusion.h @@ -33,8 +33,8 @@ namespace lbm { template< typename LatticeModel_T, typename FlagField_T > class FreeDiffusion : public FreeSlip< LatticeModel_T, FlagField_T > { protected: - typedef typename FreeSlip< LatticeModel_T, FlagField_T >::flag_t flag_t; - typedef typename FreeSlip< LatticeModel_T, FlagField_T >::PDFField PDFField; + using flag_t = typename FreeSlip<LatticeModel_T, FlagField_T>::flag_t; + using PDFField = typename FreeSlip<LatticeModel_T, FlagField_T>::PDFField; public: FreeDiffusion( const BoundaryUID& boundaryUID, const FlagUID& uid, PDFField* const pdfField, const FlagField_T* const flagField, const flag_t domain ) diff --git a/src/lbm/boundary/FreeSlip.h b/src/lbm/boundary/FreeSlip.h index 14d3cd0f15b1a53b0d9428e6ec1b818a6d5e5cb4..1f5a35be99f545273b271a6631c2be6e67e10e6f 100644 --- a/src/lbm/boundary/FreeSlip.h +++ b/src/lbm/boundary/FreeSlip.h @@ -46,9 +46,9 @@ template< typename LatticeModel_T, typename FlagField_T > class FreeSlip : public Boundary< typename FlagField_T::flag_t > { protected: - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; - typedef typename FlagField_T::flag_t flag_t; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; + using flag_t = typename FlagField_T::flag_t; public: diff --git a/src/lbm/boundary/NoDiffusion.h b/src/lbm/boundary/NoDiffusion.h index f6bbec40b8b8e23c1d116a9031ad80458ebc2bb3..fb0e295ce14f685db37e6b18ee77c95a97315943 100644 --- a/src/lbm/boundary/NoDiffusion.h +++ b/src/lbm/boundary/NoDiffusion.h @@ -33,7 +33,7 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t > class NoDiffusion : public NoSlip< LatticeModel_T, flag_t > { protected: - typedef typename NoSlip< LatticeModel_T, flag_t >::PDFField PDFField; + using PDFField = typename NoSlip<LatticeModel_T, flag_t>::PDFField; public: NoDiffusion( const BoundaryUID& boundaryUID, const FlagUID& uid, PDFField* const pdfField ) diff --git a/src/lbm/boundary/NoSlip.h b/src/lbm/boundary/NoSlip.h index dc769d345453d523e7f68902eac7cbec2e040dcd..3c52f58729e68ee8098b0d3aff2db8231b462275 100644 --- a/src/lbm/boundary/NoSlip.h +++ b/src/lbm/boundary/NoSlip.h @@ -47,10 +47,10 @@ class NoSlip : public Boundary<flag_t> { protected: - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField; + using ForceField = GhostLayerField<Vector3<real_t>, 1>; public: diff --git a/src/lbm/boundary/Outlet.h b/src/lbm/boundary/Outlet.h index da59ec47cd9b05e80c61c440af145a1a9119ba22..c512345b7afb2b86d1d5a536a25dc793af16bd35 100644 --- a/src/lbm/boundary/Outlet.h +++ b/src/lbm/boundary/Outlet.h @@ -47,9 +47,9 @@ template< typename LatticeModel_T, typename FlagField_T, int Numerator = 2, int class Outlet : public Boundary< typename FlagField_T::flag_t > { protected: - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; - typedef typename FlagField_T::flag_t flag_t; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; + using flag_t = typename FlagField_T::flag_t; public: diff --git a/src/lbm/boundary/ParserUBB.h b/src/lbm/boundary/ParserUBB.h index 2ef68c194d80636f53a55567190aa62c17d9700b..98aae788e9fef206999376fcc26f038df4b94a67 100644 --- a/src/lbm/boundary/ParserUBB.h +++ b/src/lbm/boundary/ParserUBB.h @@ -50,10 +50,10 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t, bool AdaptVelocityToExternalForce = false, bool StoreForce = false > class ParserUBB : public Boundary<flag_t> { - typedef lbm::PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = lbm::PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField; + using ForceField = GhostLayerField<Vector3<real_t>, 1>; public: @@ -108,8 +108,8 @@ public: return velocity != nullptr; } - typedef GhostLayerField< shared_ptr<Parser>, 1 > ParserField; - typedef GhostLayerField< Vector3<real_t>, 1 > VelocityField; + using ParserField = GhostLayerField<shared_ptr<Parser>, 1>; + using VelocityField = GhostLayerField<Vector3<real_t>, 1>; static shared_ptr<Parser> createConfiguration( const Config::BlockHandle & config ) { return make_shared<Parser>( config ); } diff --git a/src/lbm/boundary/Pressure.h b/src/lbm/boundary/Pressure.h index 8dafb7e46b84f95afd3585efe1338cd3fd51388e..bbb93f77099983e9cd2aee69411c5c2b0fabe131 100644 --- a/src/lbm/boundary/Pressure.h +++ b/src/lbm/boundary/Pressure.h @@ -48,10 +48,10 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t > class Pressure : public Boundary<flag_t> { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< real_t, 1 > LatticeDensityField; + using LatticeDensityField = GhostLayerField<real_t, 1>; public: diff --git a/src/lbm/boundary/SimpleDiffusionDirichlet.h b/src/lbm/boundary/SimpleDiffusionDirichlet.h index 1aca569bb201764765954b6a1b9c2471a7322262..e3a6dde2fefc7a201b49ba05c8d6bfe9ce7f50cd 100644 --- a/src/lbm/boundary/SimpleDiffusionDirichlet.h +++ b/src/lbm/boundary/SimpleDiffusionDirichlet.h @@ -51,8 +51,8 @@ class SimpleDiffusionDirichlet : public Boundary<flag_t> static_assert( LatticeModel_T::compressible, "Only works with compressible models!" ); //static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; public: diff --git a/src/lbm/boundary/SimplePAB.h b/src/lbm/boundary/SimplePAB.h index b4cd589cf04de8c5d5b448ea6ae2f31e16bcd182..f35429958cd172fe15a0dca4c9a3cb02bd5cc718 100644 --- a/src/lbm/boundary/SimplePAB.h +++ b/src/lbm/boundary/SimplePAB.h @@ -57,11 +57,11 @@ class SimplePAB : public Boundary<typename FlagFieldT::flag_t> static_assert( LatticeModel_T::compressible == false, "Only works with incompressible models!" ); static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; - typedef typename FlagFieldT::flag_t flag_t; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; + using flag_t = typename FlagFieldT::flag_t; - typedef Vector3<real_t> Vec3Real; + using Vec3Real = Vector3<real_t>; public: diff --git a/src/lbm/boundary/SimplePressure.h b/src/lbm/boundary/SimplePressure.h index d7b39045fa775c6de9712184237775241513a17c..543360d91cf473de727aa38e7e9be6c17db0e368 100644 --- a/src/lbm/boundary/SimplePressure.h +++ b/src/lbm/boundary/SimplePressure.h @@ -48,10 +48,10 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t > class SimplePressure : public Boundary<flag_t> { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef Vector3<real_t> Vec3Real; + using Vec3Real = Vector3<real_t>; public: diff --git a/src/lbm/boundary/SimpleUBB.h b/src/lbm/boundary/SimpleUBB.h index ba07eedc41cd4da531372b3db8f2b7fd5f141f49..8c1c93af05c78372adb27f5b553baa5495372663 100644 --- a/src/lbm/boundary/SimpleUBB.h +++ b/src/lbm/boundary/SimpleUBB.h @@ -48,10 +48,10 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t, bool AdaptVelocityToExternalForce = false, bool StoreForce = false > class SimpleUBB : public Boundary<flag_t> { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField; + using ForceField = GhostLayerField<Vector3<real_t>, 1>; public: diff --git a/src/lbm/boundary/SimpleVelocityBoundary.h b/src/lbm/boundary/SimpleVelocityBoundary.h index edb6a4d94afd242801ee6d66feb9a900c61945a8..1eda8237c1fb00a29912750f35848a2cb2a0de86 100644 --- a/src/lbm/boundary/SimpleVelocityBoundary.h +++ b/src/lbm/boundary/SimpleVelocityBoundary.h @@ -47,8 +47,8 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t > class SimpleVelocityBoundary : public Boundary<flag_t> { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; public: diff --git a/src/lbm/boundary/UBB.h b/src/lbm/boundary/UBB.h index e2621fb2f30784b7c13e08ceef60888f0deab0df..c866776d2cba47c20107a83b531bbb21c35c78e2 100644 --- a/src/lbm/boundary/UBB.h +++ b/src/lbm/boundary/UBB.h @@ -49,12 +49,12 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t, bool AdaptVelocityToExternalForce = false, bool StoreForce = false > class UBB : public Boundary<flag_t> { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< Vector3<real_t>, 1 > VelField; + using VelField = GhostLayerField<Vector3<real_t>, 1>; - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField; + using ForceField = GhostLayerField<Vector3<real_t>, 1>; public: diff --git a/src/lbm/boundary/VelocityBoundary.h b/src/lbm/boundary/VelocityBoundary.h index 0673f5a28bad937a51444fb93a582b46f940855d..c5be0e0a6370c9cd029dce73ac0df51b59c728bf 100644 --- a/src/lbm/boundary/VelocityBoundary.h +++ b/src/lbm/boundary/VelocityBoundary.h @@ -48,10 +48,10 @@ namespace lbm { template< typename LatticeModel_T, typename flag_t > class VelocityBoundary : public Boundary<flag_t> { - typedef PdfField< LatticeModel_T > PDFField; - typedef typename LatticeModel_T::Stencil Stencil; + using PDFField = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; - typedef GhostLayerField< shared_ptr< std::vector<real_t> >, 1 > VelField; + using VelField = GhostLayerField<shared_ptr<std::vector<real_t>>, 1>; public: diff --git a/src/lbm/boundary/factories/DefaultBoundaryHandling.h b/src/lbm/boundary/factories/DefaultBoundaryHandling.h index 328bd1aacddc3a5ae9835659b527c63a60ab2b2a..bdd2fb493326ca19af173aae9c1a4c769b97c319 100644 --- a/src/lbm/boundary/factories/DefaultBoundaryHandling.h +++ b/src/lbm/boundary/factories/DefaultBoundaryHandling.h @@ -71,16 +71,16 @@ template <typename LatticeModel, typename FlagFieldT > class DefaultBoundaryHandlingFactory { public: - typedef typename FlagFieldT::flag_t flag_t; - typedef typename LatticeModel::Stencil Stencil; - typedef NoSlip< LatticeModel, flag_t > BcNoSlip; - typedef FreeSlip< LatticeModel, FlagFieldT > BcFreeSlip; - typedef SimpleUBB< LatticeModel, flag_t > BcSimpleUBB; - typedef SimplePressure< LatticeModel, flag_t > BcSimplePressure; - typedef Vector3<real_t> Velocity; - typedef PdfField< LatticeModel > PdfFieldLM; - - typedef walberla::boundary::BoundaryHandling< FlagFieldT, Stencil, BcNoSlip, BcFreeSlip, BcSimpleUBB, BcSimpleUBB, BcSimplePressure, BcSimplePressure > BoundaryHandling; + using flag_t = typename FlagFieldT::flag_t; + using Stencil = typename LatticeModel::Stencil; + using BcNoSlip = NoSlip<LatticeModel, flag_t>; + using BcFreeSlip = FreeSlip<LatticeModel, FlagFieldT>; + using BcSimpleUBB = SimpleUBB<LatticeModel, flag_t>; + using BcSimplePressure = SimplePressure<LatticeModel, flag_t>; + using Velocity = Vector3<real_t>; + using PdfFieldLM = PdfField<LatticeModel>; + + using BoundaryHandling = walberla::boundary::BoundaryHandling<FlagFieldT, Stencil, BcNoSlip, BcFreeSlip, BcSimpleUBB, BcSimpleUBB, BcSimplePressure, BcSimplePressure>; static BlockDataID addBoundaryHandlingToStorage( const shared_ptr< StructuredBlockStorage > & bs, const std::string & identifier, BlockDataID flagFieldID, BlockDataID pdfFieldID, const Set< FlagUID > & flagUIDSet, diff --git a/src/lbm/boundary/factories/DefaultBoundaryHandlingCollection.h b/src/lbm/boundary/factories/DefaultBoundaryHandlingCollection.h index 54aafd3345681bea2ea7776ae6decfd98a0361f3..49e77691a8781bbd980faadca3a0fd422bb497b5 100644 --- a/src/lbm/boundary/factories/DefaultBoundaryHandlingCollection.h +++ b/src/lbm/boundary/factories/DefaultBoundaryHandlingCollection.h @@ -37,11 +37,11 @@ template< typename LatticeModel_T, typename DiffusionLatticeModel_T, typename Fl class DefaultBoundaryHandlingCollectionFactory { private: - typedef typename DefaultBoundaryHandlingFactory < LatticeModel_T, FlagField_T >::BoundaryHandling DefaultBoundaryHandling_T; - typedef typename DefaultDiffusionBoundaryHandlingFactory< DiffusionLatticeModel_T, FlagField_T >::BoundaryHandling_T DefaultDiffusionBoundaryHandlingFactory_T; + using DefaultBoundaryHandling_T = typename DefaultBoundaryHandlingFactory<LatticeModel_T, FlagField_T>::BoundaryHandling; + using DefaultDiffusionBoundaryHandlingFactory_T = typename DefaultDiffusionBoundaryHandlingFactory<DiffusionLatticeModel_T, FlagField_T>::BoundaryHandling_T; public: - typedef BoundaryHandlingCollection< FlagField_T, DefaultBoundaryHandling_T &, DefaultDiffusionBoundaryHandlingFactory_T & > BoundaryHandlingCollection_T; + using BoundaryHandlingCollection_T = BoundaryHandlingCollection<FlagField_T, DefaultBoundaryHandling_T &, DefaultDiffusionBoundaryHandlingFactory_T &>; private: diff --git a/src/lbm/boundary/factories/DefaultDiffusionBoundaryHandling.h b/src/lbm/boundary/factories/DefaultDiffusionBoundaryHandling.h index e32559776caa7bf309cb6d723ecf0d7be605d086..99754f88f35bdee443837684147be01822dced28 100644 --- a/src/lbm/boundary/factories/DefaultDiffusionBoundaryHandling.h +++ b/src/lbm/boundary/factories/DefaultDiffusionBoundaryHandling.h @@ -44,19 +44,19 @@ template< typename LatticeModel_T, typename FlagField_T > class DefaultDiffusionBoundaryHandlingFactory { private: - typedef typename FlagField_T::flag_t flag_t; + using flag_t = typename FlagField_T::flag_t; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; public: - typedef lbm::DiffusionDirichlet < LatticeModel_T, flag_t > DiffusionDirichlet_T; - typedef lbm::SimpleDiffusionDirichlet< LatticeModel_T, flag_t > SimpleDiffusionDirichlet_T; - typedef lbm::NoDiffusion < LatticeModel_T, flag_t > NoDiffusion_T; - typedef lbm::FreeDiffusion < LatticeModel_T, FlagField_T > FreeDiffusion_T; + using DiffusionDirichlet_T = lbm::DiffusionDirichlet<LatticeModel_T, flag_t>; + using SimpleDiffusionDirichlet_T = lbm::SimpleDiffusionDirichlet<LatticeModel_T, flag_t>; + using NoDiffusion_T = lbm::NoDiffusion<LatticeModel_T, flag_t>; + using FreeDiffusion_T = lbm::FreeDiffusion<LatticeModel_T, FlagField_T>; public: - typedef walberla::boundary::BoundaryHandling< FlagField_T, Stencil, DiffusionDirichlet_T, SimpleDiffusionDirichlet_T, NoDiffusion_T, FreeDiffusion_T, SimpleDiffusionDirichlet_T, SimpleDiffusionDirichlet_T > BoundaryHandling_T; - typedef BoundaryHandling_T BoundaryHandling; + using BoundaryHandling_T = walberla::boundary::BoundaryHandling<FlagField_T, Stencil, DiffusionDirichlet_T, SimpleDiffusionDirichlet_T, NoDiffusion_T, FreeDiffusion_T, SimpleDiffusionDirichlet_T, SimpleDiffusionDirichlet_T>; + using BoundaryHandling = BoundaryHandling_T; const static FlagUID& getDiffusionDirichletFlagUID() { static FlagUID uid( "DiffusionDirichlet" ); return uid; } const static FlagUID& getSimpleDiffusionDirichletFlagUID() { static FlagUID uid( "SimpleDiffusionDirichlet" ); return uid; } @@ -87,7 +87,7 @@ private: static BoundaryHandling_T* createDefaultDiffusionBoundaryHandlingFactory( IBlock* const block, const StructuredBlockStorage* const /*bs*/, const BlockDataID& flagFieldID, const Set< FlagUID > & domainFlagUIDs, const BlockDataID& pdfFieldID, const Set< FlagUID > & initFlagUIDs ) { - typedef lbm::PdfField< LatticeModel_T > PDFField_T; + using PDFField_T = lbm::PdfField<LatticeModel_T>; WALBERLA_ASSERT_NOT_NULLPTR( block ); diff --git a/src/lbm/boundary/factories/ExtendedBoundaryHandlingFactory.h b/src/lbm/boundary/factories/ExtendedBoundaryHandlingFactory.h index 118065cff9670fa67b3c4055b9199e56087930bc..730ceb008f7897c0d608119ad925940517d28421 100644 --- a/src/lbm/boundary/factories/ExtendedBoundaryHandlingFactory.h +++ b/src/lbm/boundary/factories/ExtendedBoundaryHandlingFactory.h @@ -72,19 +72,19 @@ template <typename LatticeModel, typename FlagFieldT > class ExtendedBoundaryHandlingFactory { public: - typedef typename FlagFieldT::flag_t flag_t; - typedef typename LatticeModel::Stencil Stencil; - typedef Vector3<real_t> Velocity; - typedef PdfField< LatticeModel > PdfFieldLM; - - typedef NoSlip< LatticeModel, flag_t > BcNoSlip; - typedef FreeSlip< LatticeModel, FlagFieldT > BcFreeSlip; - typedef Pressure< LatticeModel, flag_t > BcPressure; - typedef ParserUBB<LatticeModel, flag_t> BcUBB; - typedef Outlet<LatticeModel, FlagFieldT > BcOutlet; - typedef Curved<LatticeModel, FlagFieldT > BcCurved; - - typedef walberla::boundary::BoundaryHandling< FlagFieldT, Stencil, BcNoSlip, BcFreeSlip, BcPressure, BcUBB, BcOutlet, BcCurved > BoundaryHandling; + using flag_t = typename FlagFieldT::flag_t; + using Stencil = typename LatticeModel::Stencil; + using Velocity = Vector3<real_t>; + using PdfFieldLM = PdfField<LatticeModel>; + + using BcNoSlip = NoSlip<LatticeModel, flag_t>; + using BcFreeSlip = FreeSlip<LatticeModel, FlagFieldT>; + using BcPressure = Pressure<LatticeModel, flag_t>; + using BcUBB = ParserUBB<LatticeModel, flag_t>; + using BcOutlet = Outlet<LatticeModel, FlagFieldT>; + using BcCurved = Curved<LatticeModel, FlagFieldT>; + + using BoundaryHandling = walberla::boundary::BoundaryHandling<FlagFieldT, Stencil, BcNoSlip, BcFreeSlip, BcPressure, BcUBB, BcOutlet, BcCurved>; static BlockDataID addBoundaryHandlingToStorage( const shared_ptr< StructuredBlockStorage > & bs, const std::string & identifier, BlockDataID flagFieldID, BlockDataID pdfFieldID, const Set< FlagUID > & flagUIDSet) diff --git a/src/lbm/evaluations/Permeability.h b/src/lbm/evaluations/Permeability.h index 997bda395c7f048c020f8773b801a45e18cd2aee..94e146f24b63d806fa90e2cc916608a91e0a9501 100644 --- a/src/lbm/evaluations/Permeability.h +++ b/src/lbm/evaluations/Permeability.h @@ -43,12 +43,12 @@ class Permeability { public: - typedef PdfField_T PdfField; - typedef BoundaryHandling_T BoundaryHandling; + using PdfField = PdfField_T; + using BoundaryHandling = BoundaryHandling_T; - typedef typename PdfField_T::LatticeModel LatticeModel; - typedef typename BoundaryHandling_T::FlagField FlagField; - typedef typename FlagField::flag_t flag_t; + using LatticeModel = typename PdfField_T::LatticeModel; + using FlagField = typename BoundaryHandling_T::FlagField; + using flag_t = typename FlagField::flag_t; Permeability( real_t viscosity, const BlockDataID & pdfFieldId, const BlockDataID & boundaryHandlingId, const FlagUID & fluid, const shared_ptr<blockforest::StructuredBlockForest> blocks ); diff --git a/src/lbm/field/Adaptors.h b/src/lbm/field/Adaptors.h index 4bb36ca5cb6bb10d578ecbe4ec5f1f3f02c99733..f0c7ee17287c024639309af217d6aa16c44ffa20 100644 --- a/src/lbm/field/Adaptors.h +++ b/src/lbm/field/Adaptors.h @@ -37,9 +37,9 @@ template< typename LatticeModel_T > class DensityAdaptionFunction { public: - typedef PdfField< LatticeModel_T > basefield_t; - typedef typename basefield_t::const_base_iterator basefield_iterator; - typedef real_t value_type; + using basefield_t = PdfField<LatticeModel_T>; + using basefield_iterator = typename basefield_t::const_base_iterator; + using value_type = real_t; static const uint_t F_SIZE = 1u; @@ -62,9 +62,9 @@ template< typename LatticeModel_T > class VelocityVectorAdaptionFunction { public: - typedef PdfField< LatticeModel_T > basefield_t; - typedef typename basefield_t::const_base_iterator basefield_iterator; - typedef Vector3<real_t> value_type; + using basefield_t = PdfField<LatticeModel_T>; + using basefield_iterator = typename basefield_t::const_base_iterator; + using value_type = Vector3<real_t>; static const uint_t F_SIZE = 1u; @@ -86,11 +86,11 @@ template< typename LatticeModel_T, bool stream = false > class MomentumDensityVectorAdaptionFunction { public: - typedef PdfField< LatticeModel_T > basefield_t; - typedef typename basefield_t::const_base_iterator basefield_iterator; - typedef Vector3<real_t> value_type; + using basefield_t = PdfField<LatticeModel_T>; + using basefield_iterator = typename basefield_t::const_base_iterator; + using value_type = Vector3<real_t>; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static const uint_t F_SIZE = 1u; @@ -114,9 +114,9 @@ template< typename LatticeModel_T > class VelocityAdaptionFunction { public: - typedef PdfField< LatticeModel_T > basefield_t; - typedef typename basefield_t::const_base_iterator basefield_iterator; - typedef real_t value_type; + using basefield_t = PdfField<LatticeModel_T>; + using basefield_iterator = typename basefield_t::const_base_iterator; + using value_type = real_t; static const uint_t F_SIZE = 3u; @@ -142,11 +142,11 @@ template< typename LatticeModel_T, bool stream = false > class MomentumDensityAdaptionFunction { public: - typedef PdfField< LatticeModel_T > basefield_t; - typedef typename basefield_t::const_base_iterator basefield_iterator; - typedef real_t value_type; + using basefield_t = PdfField<LatticeModel_T>; + using basefield_iterator = typename basefield_t::const_base_iterator; + using value_type = real_t; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static const uint_t F_SIZE = 3u; @@ -173,9 +173,9 @@ template< typename LatticeModel_T > class ShearRateAdaptionFunction { public: - typedef PdfField< LatticeModel_T > basefield_t; - typedef typename basefield_t::const_base_iterator basefield_iterator; - typedef real_t value_type; + using basefield_t = PdfField<LatticeModel_T>; + using basefield_iterator = typename basefield_t::const_base_iterator; + using value_type = real_t; static const uint_t F_SIZE = 1u; @@ -199,15 +199,15 @@ public: template< typename LatticeModel_T > struct Adaptor { - typedef field::GhostLayerFieldAdaptor<DensityAdaptionFunction <LatticeModel_T>, 0> Density; - typedef field::GhostLayerFieldAdaptor<VelocityVectorAdaptionFunction<LatticeModel_T>, 0> VelocityVector; - typedef field::GhostLayerFieldAdaptor<VelocityAdaptionFunction <LatticeModel_T>, 0> Velocity; - typedef field::GhostLayerFieldAdaptor<ShearRateAdaptionFunction <LatticeModel_T>, 0> ShearRate; - - typedef field::GhostLayerFieldAdaptor<MomentumDensityVectorAdaptionFunction<LatticeModel_T, true >, 1> StreamMomentumDensityVector; - typedef field::GhostLayerFieldAdaptor<MomentumDensityAdaptionFunction <LatticeModel_T, true >, 1> StreamMomentumDensity; - typedef field::GhostLayerFieldAdaptor<MomentumDensityVectorAdaptionFunction<LatticeModel_T, false>, 0> CollideMomentumDensityVector; - typedef field::GhostLayerFieldAdaptor<MomentumDensityAdaptionFunction <LatticeModel_T, false>, 0> CollideMomentumDensity; + using Density = field::GhostLayerFieldAdaptor<DensityAdaptionFunction<LatticeModel_T>, 0>; + using VelocityVector = field::GhostLayerFieldAdaptor<VelocityVectorAdaptionFunction<LatticeModel_T>, 0>; + using Velocity = field::GhostLayerFieldAdaptor<VelocityAdaptionFunction<LatticeModel_T>, 0>; + using ShearRate = field::GhostLayerFieldAdaptor<ShearRateAdaptionFunction<LatticeModel_T>, 0>; + + using StreamMomentumDensityVector = field::GhostLayerFieldAdaptor<MomentumDensityVectorAdaptionFunction<LatticeModel_T, true>, 1>; + using StreamMomentumDensity = field::GhostLayerFieldAdaptor<MomentumDensityAdaptionFunction<LatticeModel_T, true>, 1>; + using CollideMomentumDensityVector = field::GhostLayerFieldAdaptor<MomentumDensityVectorAdaptionFunction<LatticeModel_T, false>, 0>; + using CollideMomentumDensity = field::GhostLayerFieldAdaptor<MomentumDensityAdaptionFunction<LatticeModel_T, false>, 0>; }; diff --git a/src/lbm/field/AddToStorage.h b/src/lbm/field/AddToStorage.h index 287673ad4c5ef53c1f2689ec3f4552d0e4b2d95f..cd3319a8b0d3305217523ed11ff54bbd0e82a9ee 100644 --- a/src/lbm/field/AddToStorage.h +++ b/src/lbm/field/AddToStorage.h @@ -40,8 +40,8 @@ class PdfFieldHandling : public field::BlockDataHandling< PdfField<LatticeModel_ { public: - typedef PdfField<LatticeModel_T> PdfField_T; - typedef field::BlockDataHandling< PdfField_T, LatticeModel_T::Stencil::D == 2 > Base_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Base_T = field::BlockDataHandling<PdfField_T, LatticeModel_T::Stencil::D == 2>; PdfFieldHandling( const weak_ptr< StructuredBlockStorage > & blocks, const LatticeModel_T & latticeModel, const bool _initialize, const Vector3<real_t> & initialVelocity, const real_t initialDensity, diff --git a/src/lbm/field/DensityAndMomentumDensity.h b/src/lbm/field/DensityAndMomentumDensity.h index db732eb01596c5913f96d6c89f581009f68abd27..5a1d139b9140281b35a43ad1d59395c7e39fb799 100644 --- a/src/lbm/field/DensityAndMomentumDensity.h +++ b/src/lbm/field/DensityAndMomentumDensity.h @@ -112,7 +112,7 @@ real_t getDensityAndMomentumDensityD3Q19( Vector3< real_t > & momentumDensity, c static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "This function works with D3Q19 stencils only!" ); using namespace stencil; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; momentumDensity[0] = it[ Stencil::idx[E] ] + it[ Stencil::idx[NE] ] + it[ Stencil::idx[SE] ] + it[ Stencil::idx[TE] ] + it[ Stencil::idx[BE] ] ; momentumDensity[1] = it[ Stencil::idx[N] ] + it[ Stencil::idx[NW] ] + it[ Stencil::idx[TN] ] + it[ Stencil::idx[BN] ]; @@ -138,7 +138,7 @@ real_t getDensityAndMomentumDensityD3Q19( Vector3< real_t > & momentumDensity, c static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "This function works with D3Q19 stencils only!" ); using namespace stencil; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; const auto & xyz0 = pdf(x,y,z,0); diff --git a/src/lbm/field/Equilibrium.h b/src/lbm/field/Equilibrium.h index 8b6635431de998b1b13fb1eb26861d2c1a297b0f..1fcd480335763de54b7499403f16d1df25a37f42 100644 --- a/src/lbm/field/Equilibrium.h +++ b/src/lbm/field/Equilibrium.h @@ -210,7 +210,7 @@ struct Equilibrium< LatticeModel_T, typename std::enable_if< std::is_same< typen static_assert( LatticeModel_T::compressible == false, "Only works with incompressible models!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; template< typename FieldPtrOrIterator > static void set( FieldPtrOrIterator & it, @@ -359,7 +359,7 @@ struct Equilibrium< LatticeModel_T, typename std::enable_if< std::is_same< typen static_assert( LatticeModel_T::compressible, "Only works with compressible models!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; template< typename FieldPtrOrIterator > static void set( FieldPtrOrIterator & it, diff --git a/src/lbm/field/MomentumDensity.h b/src/lbm/field/MomentumDensity.h index 782e82ef42f1d16e788245ebe548de3bb8ca94ed..0a79a0fdca59bf03437b4e8f96718588d31dba77 100644 --- a/src/lbm/field/MomentumDensity.h +++ b/src/lbm/field/MomentumDensity.h @@ -103,7 +103,7 @@ void getMomentumDensityD3Q19( Vector3< real_t > & momentumDensity, const FieldPt static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "This function works with D3Q19 stencils only!" ); using namespace stencil; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; momentumDensity[0] = it[ Stencil::idx[E] ] + it[ Stencil::idx[NE] ] + it[ Stencil::idx[SE] ] + it[ Stencil::idx[TE] ] + it[ Stencil::idx[BE] ] - it[ Stencil::idx[W] ] - it[ Stencil::idx[NW] ] - it[ Stencil::idx[SW] ] - it[ Stencil::idx[TW] ] - it[ Stencil::idx[BW] ]; @@ -120,7 +120,7 @@ void getMomentumDensityD3Q19( Vector3< real_t > & momentumDensity, const PdfFiel static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "This function works with D3Q19 stencils only!" ); using namespace stencil; - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; const auto & xyz0 = pdf(x,y,z,0); diff --git a/src/lbm/field/PdfField.h b/src/lbm/field/PdfField.h index a9438e42b6d2f255f4349f7ba13926cdd20136d3..178804a8888d83d648e7c06a64dbe8951b5919fe 100644 --- a/src/lbm/field/PdfField.h +++ b/src/lbm/field/PdfField.h @@ -78,22 +78,22 @@ public: //** Type Definitions ********************************************************************************************** /*! \name Type Definitions */ //@{ - typedef LatticeModel_T LatticeModel; - typedef typename LatticeModel_T::Stencil Stencil; + using LatticeModel = LatticeModel_T; + using Stencil = typename LatticeModel_T::Stencil; - typedef typename GhostLayerField< real_t, Stencil::Size >::value_type value_type; + using value_type = typename GhostLayerField<real_t, Stencil::Size>::value_type; - typedef typename GhostLayerField< real_t, Stencil::Size >::iterator iterator; - typedef typename GhostLayerField< real_t, Stencil::Size >::const_iterator const_iterator; + using iterator = typename GhostLayerField<real_t, Stencil::Size>::iterator; + using const_iterator = typename GhostLayerField<real_t, Stencil::Size>::const_iterator; - typedef typename GhostLayerField< real_t, Stencil::Size >::reverse_iterator reverse_iterator; - typedef typename GhostLayerField< real_t, Stencil::Size >::const_reverse_iterator const_reverse_iterator; + using reverse_iterator = typename GhostLayerField<real_t, Stencil::Size>::reverse_iterator; + using const_reverse_iterator = typename GhostLayerField<real_t, Stencil::Size>::const_reverse_iterator; - typedef typename GhostLayerField< real_t, Stencil::Size >::base_iterator base_iterator; - typedef typename GhostLayerField< real_t, Stencil::Size >::const_base_iterator const_base_iterator; + using base_iterator = typename GhostLayerField<real_t, Stencil::Size>::base_iterator; + using const_base_iterator = typename GhostLayerField<real_t, Stencil::Size>::const_base_iterator; - typedef typename GhostLayerField< real_t, Stencil::Size >::Ptr Ptr; - typedef typename GhostLayerField< real_t, Stencil::Size >::ConstPtr ConstPtr; + using Ptr = typename GhostLayerField<real_t, Stencil::Size>::Ptr; + using ConstPtr = typename GhostLayerField<real_t, Stencil::Size>::ConstPtr; //@} //******************************************************************************************************************* diff --git a/src/lbm/field/ShearRate.h b/src/lbm/field/ShearRate.h index 2352a9782cb9fd0c87bf231a64f0f11c8a285308..d98a169a9f7c27348218d2629f9c5ffa15aad0ad 100644 --- a/src/lbm/field/ShearRate.h +++ b/src/lbm/field/ShearRate.h @@ -89,8 +89,8 @@ namespace internal { template< typename LatticeModel_T > struct ShearRate { - typedef typename LatticeModel_T::Stencil Stencil; - typedef typename internal::ShearRelaxationParameter<typename LatticeModel_T::CollisionModel> ShearRelaxationParameter; + using Stencil = typename LatticeModel_T::Stencil; + using ShearRelaxationParameter = typename internal::ShearRelaxationParameter<typename LatticeModel_T::CollisionModel>; template< typename FieldPtrOrIterator > static inline real_t get( const LatticeModel_T & latticeModel, const FieldPtrOrIterator & it, diff --git a/src/lbm/field/initializer/ExprSystemInitFunction.h b/src/lbm/field/initializer/ExprSystemInitFunction.h index 4d8557f7c1ebc4c68e8cc382c93b904744cad0c8..32d91f43f98fe9a632c83e6e2e2396c8b27999ba 100644 --- a/src/lbm/field/initializer/ExprSystemInitFunction.h +++ b/src/lbm/field/initializer/ExprSystemInitFunction.h @@ -43,9 +43,9 @@ class ExprSystemInitFunction { public: - typedef exprtk::symbol_table<real_t> SymbolTable; - typedef exprtk::expression<real_t> Expression; - typedef std::map<std::string, Expression> ExprSystem; + using SymbolTable = exprtk::symbol_table<real_t>; + using Expression = exprtk::expression<real_t>; + using ExprSystem = std::map<std::string, Expression>; ExprSystemInitFunction( const shared_ptr<StructuredBlockForest> & blocks ); ~ExprSystemInitFunction(); diff --git a/src/lbm/field/initializer/PdfFieldInitializer.h b/src/lbm/field/initializer/PdfFieldInitializer.h index 0558b1b5279af9b50293cc9516da13a2118cba12..5a718f8d77af614d9397967c9f159a3814f4587c 100644 --- a/src/lbm/field/initializer/PdfFieldInitializer.h +++ b/src/lbm/field/initializer/PdfFieldInitializer.h @@ -55,7 +55,7 @@ public: private: - typedef lbm::PdfField<LatticeModel_T> PdfField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; const BlockDataID pdfFieldId_; const shared_ptr<StructuredBlockForest> blocks_; diff --git a/src/lbm/geometry/initializer/PoiseuilleInitializer.h b/src/lbm/geometry/initializer/PoiseuilleInitializer.h index 8f8898556a6016ae0ce2a3435fac4aa60f8ce4aa..fa6677a447ce3e5a6a253a6e93ce167bd02ab36b 100644 --- a/src/lbm/geometry/initializer/PoiseuilleInitializer.h +++ b/src/lbm/geometry/initializer/PoiseuilleInitializer.h @@ -82,7 +82,7 @@ namespace initializer { Z_AXIS=2, INVALID_AXIS=3 };*/ - typedef uint_t Axis; + using Axis = uint_t; static const uint_t X_AXIS; static const uint_t Y_AXIS; static const uint_t Z_AXIS; diff --git a/src/lbm/lattice_model/CollisionModel.h b/src/lbm/lattice_model/CollisionModel.h index c3077e97f66bbd20555b5c274af772541c72c502..bd521e042dedf772992dbf110d8751be30c95570 100644 --- a/src/lbm/lattice_model/CollisionModel.h +++ b/src/lbm/lattice_model/CollisionModel.h @@ -81,7 +81,7 @@ class SRT { public: - typedef SRT_tag tag; + using tag = SRT_tag; static const bool constant = true; SRT( const real_t _omega, const uint_t _level = uint_t(0) ) : @@ -138,7 +138,7 @@ class SRTField { public: - typedef SRT_tag tag; + using tag = SRT_tag; static const bool constant = false; SRTField() : @@ -212,7 +212,7 @@ class TRT { public: - typedef TRT_tag tag; + using tag = TRT_tag; static const real_t threeSixteenth; @@ -332,7 +332,7 @@ class D3Q19MRT { public: - typedef MRT_tag tag; + using tag = MRT_tag; static const real_t threeSixteenth; @@ -581,7 +581,7 @@ class D3Q27Cumulant { public: - typedef Cumulant_tag tag; + using tag = Cumulant_tag; /// Initializes all omegas to one except omega1 D3Q27Cumulant( const real_t _omega1, const uint_t _level = uint_t(0) ) : diff --git a/src/lbm/lattice_model/D2Q9.h b/src/lbm/lattice_model/D2Q9.h index 4fe777ead18a54f878d127cbd69873dab643120c..831159c8fedf611f766ac10d2676c86b72162025 100644 --- a/src/lbm/lattice_model/D2Q9.h +++ b/src/lbm/lattice_model/D2Q9.h @@ -39,11 +39,11 @@ public: static_assert( ( ! std::is_same< CollisionModel_T, collision_model::D3Q19MRT >::value), "D3Q19MRT only works with D3Q19!" ); - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::CollisionModel CollisionModel; - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::ForceModel ForceModel; + using CollisionModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::CollisionModel; + using ForceModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::ForceModel; - typedef stencil::D2Q9 Stencil; - typedef stencil::D2Q9 CommunicationStencil; + using Stencil = stencil::D2Q9; + using CommunicationStencil = stencil::D2Q9; static const char * NAME; diff --git a/src/lbm/lattice_model/D3Q15.h b/src/lbm/lattice_model/D3Q15.h index a946fce3d93941cf37b953b0561c5b8a03c4c7f2..42dc975fd76ab5d6d14d0ce6a8806aa3d9028e4b 100644 --- a/src/lbm/lattice_model/D3Q15.h +++ b/src/lbm/lattice_model/D3Q15.h @@ -38,11 +38,11 @@ class D3Q15 : public LatticeModelBase< CollisionModel_T, Compressible, ForceMode { public: - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::CollisionModel CollisionModel; - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::ForceModel ForceModel; + using CollisionModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::CollisionModel; + using ForceModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::ForceModel; - typedef stencil::D3Q15 Stencil; - typedef stencil::D3Q27 CommunicationStencil; + using Stencil = stencil::D3Q15; + using CommunicationStencil = stencil::D3Q27; static const char * NAME; diff --git a/src/lbm/lattice_model/D3Q19.h b/src/lbm/lattice_model/D3Q19.h index d8cfc3dbc8a68c750de54c05acd53d46681826f2..f6decf3cff344f9f00971e476a0a72d1b716ebc0 100644 --- a/src/lbm/lattice_model/D3Q19.h +++ b/src/lbm/lattice_model/D3Q19.h @@ -37,11 +37,11 @@ class D3Q19 : public LatticeModelBase< CollisionModel_T, Compressible, ForceMode { public: - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::CollisionModel CollisionModel; - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::ForceModel ForceModel; + using CollisionModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::CollisionModel; + using ForceModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::ForceModel; - typedef stencil::D3Q19 Stencil; - typedef stencil::D3Q19 CommunicationStencil; + using Stencil = stencil::D3Q19; + using CommunicationStencil = stencil::D3Q19; static const char * NAME; diff --git a/src/lbm/lattice_model/D3Q27.h b/src/lbm/lattice_model/D3Q27.h index fb8289cbf7274b459b81a594c1123a721268e3ba..e90c078c76b7507bc4d9b3732d93ff0a8fe012c8 100644 --- a/src/lbm/lattice_model/D3Q27.h +++ b/src/lbm/lattice_model/D3Q27.h @@ -39,11 +39,11 @@ public: static_assert( ( ! std::is_same< CollisionModel_T, collision_model::D3Q19MRT >::value), "D3Q19MRT only works with D3Q19!" ); - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::CollisionModel CollisionModel; - typedef typename LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::ForceModel ForceModel; + using CollisionModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::CollisionModel; + using ForceModel = typename LatticeModelBase<CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder>::ForceModel; - typedef stencil::D3Q27 Stencil; - typedef stencil::D3Q27 CommunicationStencil; + using Stencil = stencil::D3Q27; + using CommunicationStencil = stencil::D3Q27; static const char * NAME; diff --git a/src/lbm/lattice_model/EquilibriumDistribution.h b/src/lbm/lattice_model/EquilibriumDistribution.h index 31daeb24681a6a0cc3f0391ca1946f85cb5273ea..48eab60f5a4c5f4f41fab494fd9ac09b427ecf70 100644 --- a/src/lbm/lattice_model/EquilibriumDistribution.h +++ b/src/lbm/lattice_model/EquilibriumDistribution.h @@ -71,7 +71,7 @@ public: static_assert( LatticeModel_T::compressible == false, "Only works with incompressible models!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static real_t get( const real_t cx, const real_t cy, const real_t cz, const real_t w, const Vector3< real_t > & velocity = Vector3< real_t >( real_t(0.0) ), const real_t rho = real_t(1.0) ) @@ -127,7 +127,7 @@ public: static_assert( LatticeModel_T::compressible == false, "Only works with incompressible models!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 1, "Only works for lattice models that require the equilibrium distribution to be order 1 accurate!" ); - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static real_t get( const real_t cx, const real_t cy, const real_t cz, const real_t w, const Vector3< real_t > & velocity = Vector3< real_t >( real_t(0.0) ), const real_t rho = real_t(1.0) ) @@ -176,7 +176,7 @@ public: static_assert( LatticeModel_T::compressible, "Only works with compressible models!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static real_t get( const real_t cx, const real_t cy, const real_t cz, const real_t w, const Vector3< real_t > & velocity = Vector3< real_t >( real_t(0.0) ), const real_t rho = real_t(1.0) ) @@ -231,7 +231,7 @@ public: static_assert( LatticeModel_T::compressible, "Only works with compressible models!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 1, "Only works for lattice models that require the equilibrium distribution to be order 1 accurate!" ); - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static real_t get( const real_t cx, const real_t cy, const real_t cz, const real_t w, const Vector3< real_t > & velocity = Vector3< real_t >( real_t(0.0) ), const real_t rho = real_t(1.0) ) diff --git a/src/lbm/lattice_model/ForceModel.h b/src/lbm/lattice_model/ForceModel.h index b82f05634be375d463c8b16ffea423ae571cbc3e..0c30441cae6c4bb32ebcb826c68909225e203863 100644 --- a/src/lbm/lattice_model/ForceModel.h +++ b/src/lbm/lattice_model/ForceModel.h @@ -143,8 +143,8 @@ class None { public: - typedef None_tag tag; - typedef NoDirectionIndependentTerms DirectionIndependentTerms_T; + using tag = None_tag; + using DirectionIndependentTerms_T = NoDirectionIndependentTerms; static const bool shiftMacVel = false; static const bool shiftEquVel = false; @@ -180,8 +180,8 @@ class SimpleConstant { public: - typedef Simple_tag tag; - typedef NoDirectionIndependentTerms DirectionIndependentTerms_T; + using tag = Simple_tag; + using DirectionIndependentTerms_T = NoDirectionIndependentTerms; static const bool shiftMacVel = true; static const bool shiftEquVel = false; @@ -277,9 +277,9 @@ private: public: - typedef EDM_tag tag; - typedef real_t DirectionIndependentTerms_T; - typedef ForceField_T ForceField; + using tag = EDM_tag; + using DirectionIndependentTerms_T = real_t; + using ForceField = ForceField_T; static const bool shiftMacVel = true; static const bool shiftEquVel = false; @@ -337,8 +337,8 @@ class LuoConstant { public: - typedef Luo_tag tag; - typedef NoDirectionIndependentTerms DirectionIndependentTerms_T; + using tag = Luo_tag; + using DirectionIndependentTerms_T = NoDirectionIndependentTerms; static const bool shiftMacVel = true; static const bool shiftEquVel = false; @@ -404,9 +404,9 @@ class LuoField { public: - typedef Luo_tag tag; - typedef NoDirectionIndependentTerms DirectionIndependentTerms_T; - typedef ForceField_T ForceField; + using tag = Luo_tag; + using DirectionIndependentTerms_T = NoDirectionIndependentTerms; + using ForceField = ForceField_T; static const bool shiftMacVel = true; static const bool shiftEquVel = false; @@ -460,8 +460,8 @@ class GuoConstant { public: - typedef Guo_tag tag; - typedef Matrix3<real_t> DirectionIndependentTerms_T; + using tag = Guo_tag; + using DirectionIndependentTerms_T = Matrix3<real_t>; static const bool shiftMacVel = true; static const bool shiftEquVel = true; @@ -553,9 +553,9 @@ class GuoField { public: - typedef Guo_tag tag; - typedef Matrix3<real_t> DirectionIndependentTerms_T; - typedef ForceField_T ForceField; + using tag = Guo_tag; + using DirectionIndependentTerms_T = Matrix3<real_t>; + using ForceField = ForceField_T; static const bool shiftMacVel = true; static const bool shiftEquVel = true; @@ -635,8 +635,8 @@ class Correction { public: - typedef Correction_tag tag; - typedef Vector3<real_t> DirectionIndependentTerms_T; + using tag = Correction_tag; + using DirectionIndependentTerms_T = Vector3<real_t>; static const bool shiftMacVel = false; static const bool shiftEquVel = false; diff --git a/src/lbm/lattice_model/LatticeModelBase.h b/src/lbm/lattice_model/LatticeModelBase.h index 82039ee3a550b44dd62e00a6512479b4c51564b0..3ded2ae7e4b3aecd09547c25265a4c1cfeed9678 100644 --- a/src/lbm/lattice_model/LatticeModelBase.h +++ b/src/lbm/lattice_model/LatticeModelBase.h @@ -71,8 +71,8 @@ class LatticeModelBase { public: - typedef CollisionModel_T CollisionModel; - typedef ForceModel_T ForceModel; + using CollisionModel = CollisionModel_T; + using ForceModel = ForceModel_T; static const bool compressible = Compressible; static const int equilibriumAccuracyOrder = EquilibriumAccuracyOrder; diff --git a/src/lbm/lattice_model/NeighborsStencil.h b/src/lbm/lattice_model/NeighborsStencil.h index 32badbbd354f5b87e97a865bc8f33b7ee438232b..823b45383483172ac1864f31cb47109f4ef0cad4 100644 --- a/src/lbm/lattice_model/NeighborsStencil.h +++ b/src/lbm/lattice_model/NeighborsStencil.h @@ -39,13 +39,13 @@ struct NeighborsStencil; template< typename LatticeModel_T > struct NeighborsStencil< LatticeModel_T, typename std::enable_if< LatticeModel_T::Stencil::D == 2 >::type > { - typedef stencil::D2Q9 type; + using type = stencil::D2Q9; }; template< typename LatticeModel_T > struct NeighborsStencil< LatticeModel_T, typename std::enable_if< LatticeModel_T::Stencil::D == 3 >::type > { - typedef stencil::D3Q27 type; + using type = stencil::D3Q27; }; diff --git a/src/lbm/lattice_model/SmagorinskyLES.h b/src/lbm/lattice_model/SmagorinskyLES.h index 169439e77c9d4341c86654f70756ee193797ec16..167f88e4fea0eb4b0d0b79ede397fbada33350ae 100644 --- a/src/lbm/lattice_model/SmagorinskyLES.h +++ b/src/lbm/lattice_model/SmagorinskyLES.h @@ -44,9 +44,9 @@ class SmagorinskyLES { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef GhostLayerField< real_t, 1 > ScalarField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using ScalarField_T = GhostLayerField<real_t, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; SmagorinskyLES( weak_ptr< StructuredBlockStorage > blocks, const ConstBlockDataID & pdfFieldId, const BlockDataID & omegaFieldId, const real_t & kinematicViscosity, const real_t & smagorinskyConstant, diff --git a/src/lbm/refinement/CurlBasedLevelDetermination.h b/src/lbm/refinement/CurlBasedLevelDetermination.h index d384449fbe13b9dfef1a5358199cdbe0315a801f..7e9157c31c59c59bcd2f806285725cedc00aa493 100644 --- a/src/lbm/refinement/CurlBasedLevelDetermination.h +++ b/src/lbm/refinement/CurlBasedLevelDetermination.h @@ -52,7 +52,7 @@ class CurlBasedLevelDetermination // used as a 'BlockForest::RefreshMinTargetLev public: - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; CurlBasedLevelDetermination(const ConstBlockDataID & fieldID, const StructuredBlockForest & structuredBlockForest, const Filter_T & filter, const uint_t maxLevel, diff --git a/src/lbm/refinement/EqualLevelBorderStreamCorrection.h b/src/lbm/refinement/EqualLevelBorderStreamCorrection.h index 2cc428b98c35add1263d4a988d72287cab414b46..957b99adc87e34f56437a9111d5373cdf8eec03f 100644 --- a/src/lbm/refinement/EqualLevelBorderStreamCorrection.h +++ b/src/lbm/refinement/EqualLevelBorderStreamCorrection.h @@ -47,12 +47,12 @@ struct EdgeCornerStencil; template< typename LatticeModel_T > struct EdgeCornerStencil< LatticeModel_T, typename std::enable_if< LatticeModel_T::Stencil::D == 2 >::type > { - typedef stencil::D2CornerStencil type; + using type = stencil::D2CornerStencil; }; template< typename LatticeModel_T > struct EdgeCornerStencil< LatticeModel_T, typename std::enable_if< LatticeModel_T::Stencil::D == 3 >::type > { - typedef stencil::D3EdgeCornerStencil type; + using type = stencil::D3EdgeCornerStencil; }; } @@ -63,8 +63,8 @@ class EqualLevelBorderStreamCorrection { public: - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename internal::EdgeCornerStencil< LatticeModel_T >::type EdgeCornerStencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using EdgeCornerStencil_T = typename internal::EdgeCornerStencil<LatticeModel_T>::type; EqualLevelBorderStreamCorrection( const BlockDataID & pdfFieldId ) : pdfFieldId_( pdfFieldId ) {} diff --git a/src/lbm/refinement/LinearExplosion.h b/src/lbm/refinement/LinearExplosion.h index c70b7befe7296d10b6d9caec91ded7d1532b3d4f..a43f079239b9658234a3be7aaf0cd19f9422a6f4 100644 --- a/src/lbm/refinement/LinearExplosion.h +++ b/src/lbm/refinement/LinearExplosion.h @@ -67,12 +67,12 @@ class LinearExplosion { private: - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; - typedef field::GhostLayerField< typename PdfField_T::value_type, PdfField_T::F_SIZE > CoarseField; - typedef field::GhostLayerField< bool, 1 > BoolField; + using CoarseField = field::GhostLayerField<typename PdfField_T::value_type, PdfField_T::F_SIZE>; + using BoolField = field::GhostLayerField<bool, 1>; public: diff --git a/src/lbm/refinement/PdfFieldPackInfo.h b/src/lbm/refinement/PdfFieldPackInfo.h index 7117c64cd69dd297ccf2dbd5771bdcfc22aa801b..1c1202e4f7f1f4aa499b63af2d9983fdcdb04e71 100644 --- a/src/lbm/refinement/PdfFieldPackInfo.h +++ b/src/lbm/refinement/PdfFieldPackInfo.h @@ -44,8 +44,8 @@ class PdfFieldPackInfo : public TimeStepPdfPackInfo { public: - typedef PdfField<LatticeModel_T> PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; #ifdef NDEBUG PdfFieldPackInfo( const BlockDataID & pdfFieldId, const bool _optimizedEqualLevelCommunication = true, diff --git a/src/lbm/refinement/TimeStep.h b/src/lbm/refinement/TimeStep.h index 84189ba4b0a286a158c29249ecb3df414fd903c9..bafcdcc04363a620bf8323c4ee809f369bea5a5e 100644 --- a/src/lbm/refinement/TimeStep.h +++ b/src/lbm/refinement/TimeStep.h @@ -53,10 +53,10 @@ class TimeStep { public: - typedef typename NeighborsStencil<LatticeModel_T>::type CommunicationStencil_T; + using CommunicationStencil_T = typename NeighborsStencil<LatticeModel_T>::type; - typedef std::function< void ( const uint_t, const uint_t ) > VoidFunction; // parameters: level, execution count - typedef std::function< void ( IBlock *, const uint_t, const uint_t ) > BlockFunction; // parameters: block, level, execution count + using VoidFunction = std::function<void (const uint_t, const uint_t)>; // parameters: level, execution count + using BlockFunction = std::function<void (IBlock *, const uint_t, const uint_t)>; // parameters: block, level, execution count private: @@ -110,7 +110,7 @@ private: public: - typedef typename LatticeModel_T::Stencil Stencil; + using Stencil = typename LatticeModel_T::Stencil; static const uint_t StreamIncludedGhostLayers = 2; @@ -1726,7 +1726,7 @@ makeTimeStep( weak_ptr< StructuredBlockForest > blocks, shared_ptr< Sweep_T > & const Set<SUID> & requiredBlockSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleBlockSelectors = Set<SUID>::emptySet() ) { - typedef TimeStep< LatticeModel_T, Sweep_T, BoundaryHandling_T > TS_T; + using TS_T = TimeStep<LatticeModel_T, Sweep_T, BoundaryHandling_T>; return shared_ptr< TS_T >( new TS_T( blocks, sweep, pdfFieldId, boundaryHandlingId, requiredBlockSelectors, incompatibleBlockSelectors ) ); } @@ -1740,7 +1740,7 @@ makeTimeStep( weak_ptr< StructuredBlockForest > blocks, shared_ptr< Sweep_T > & const Set<SUID> & requiredBlockSelectors = Set<SUID>::emptySet(), const Set<SUID> & incompatibleBlockSelectors = Set<SUID>::emptySet() ) { - typedef TimeStep< LatticeModel_T, Sweep_T, BoundaryHandling_T > TS_T; + using TS_T = TimeStep<LatticeModel_T, Sweep_T, BoundaryHandling_T>; return shared_ptr< TS_T >( new TS_T( blocks, sweep, pdfFieldId, boundaryHandlingId, pdfPackInfo, requiredBlockSelectors, incompatibleBlockSelectors ) ); } diff --git a/src/lbm/refinement/VorticityBasedLevelDetermination.h b/src/lbm/refinement/VorticityBasedLevelDetermination.h index c3f4ee20d66f3840876c685a148af3d49d6b3156..2be753c0ce9be6f7c15010c1875ed1f8d69b516a 100644 --- a/src/lbm/refinement/VorticityBasedLevelDetermination.h +++ b/src/lbm/refinement/VorticityBasedLevelDetermination.h @@ -49,7 +49,7 @@ class VorticityBasedLevelDetermination // used as a 'BlockForest::RefreshMinTarg public: - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; VorticityBasedLevelDetermination( const ConstBlockDataID & fieldID, const Filter_T & filter, const real_t upperLimit, const real_t lowerLimit, const uint_t maxLevel ) : diff --git a/src/lbm/srt/SplitPureSweep.impl.h b/src/lbm/srt/SplitPureSweep.impl.h index 3c716216cbba6fb0c05a718be8929773a9ea1d09..e1cfe424b7abca3506f077e290e0389233cefe00 100644 --- a/src/lbm/srt/SplitPureSweep.impl.h +++ b/src/lbm/srt/SplitPureSweep.impl.h @@ -73,8 +73,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename SweepBase<LatticeModel_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename SweepBase<LatticeModel_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field SplitPureSweep( const BlockDataID & pdfField ) : @@ -768,8 +768,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename SweepBase<LatticeModel_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename SweepBase<LatticeModel_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field SplitPureSweep( const BlockDataID & pdfField ) : diff --git a/src/lbm/srt/SplitSweep.impl.h b/src/lbm/srt/SplitSweep.impl.h index e86dc16b234e0b1e046cb30cc818d3979c8ec15a..b5f6b68fbe6eb8eaa852bfb9b0e7264dde24bf98 100644 --- a/src/lbm/srt/SplitSweep.impl.h +++ b/src/lbm/srt/SplitSweep.impl.h @@ -67,8 +67,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename FlagFieldSweepBase<LatticeModel_T,FlagField_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename FlagFieldSweepBase<LatticeModel_T, FlagField_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field, lbm mask consists of multiple flags SplitSweep( const BlockDataID & pdfField, const ConstBlockDataID & flagField, const Set< FlagUID > & lbmMask ) : @@ -902,8 +902,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename FlagFieldSweepBase<LatticeModel_T,FlagField_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename FlagFieldSweepBase<LatticeModel_T, FlagField_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field, lbm mask consists of multiple flags SplitSweep( const BlockDataID & pdfField, const ConstBlockDataID & flagField, const Set< FlagUID > & lbmMask ) : diff --git a/src/lbm/srt/cell_operations/AdvectionDiffusionCellOperation.impl.h b/src/lbm/srt/cell_operations/AdvectionDiffusionCellOperation.impl.h index 44883340ff6eaed38c053c6f9391c8171537e02d..f638cf3c9f870cf759465f5a1eed2dbf75edbdef 100644 --- a/src/lbm/srt/cell_operations/AdvectionDiffusionCellOperation.impl.h +++ b/src/lbm/srt/cell_operations/AdvectionDiffusionCellOperation.impl.h @@ -63,9 +63,9 @@ public: static_assert( LM_AdvDiff::compressible, "Only works with compressible models!" ); static_assert( (std::is_same< typename LM_AdvDiff::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); - typedef PdfField< LM_AdvDiff > AdvDiffPdfField_T; - typedef PdfField< LM_Hydro > HydroPdfField_T; - typedef typename LM_AdvDiff::Stencil Stencil; + using AdvDiffPdfField_T = PdfField<LM_AdvDiff>; + using HydroPdfField_T = PdfField<LM_Hydro>; + using Stencil = typename LM_AdvDiff::Stencil; AdvectionDiffusionCellOperation() : omega_( real_t(0) ), advDiffLatticeModel_( NULL ), hydroLatticeModel_(NULL) {} @@ -138,9 +138,9 @@ public: static_assert( LM_AdvDiff::compressible, "Only works with compressible models!" ); static_assert( (std::is_same< typename LM_AdvDiff::ForceModel::tag, force_model::Correction_tag >::value), "Only works with correction force!" ); - typedef PdfField< LM_AdvDiff > AdvDiffPdfField_T; - typedef PdfField< LM_Hydro > HydroPdfField_T; - typedef typename LM_AdvDiff::Stencil Stencil; + using AdvDiffPdfField_T = PdfField<LM_AdvDiff>; + using HydroPdfField_T = PdfField<LM_Hydro>; + using Stencil = typename LM_AdvDiff::Stencil; AdvectionDiffusionCellOperation() : omega_( real_t(0) ), advDiffLatticeModel_( NULL ), hydroLatticeModel_(NULL) {} diff --git a/src/lbm/srt/cell_operations/DefaultCellOperation.impl.h b/src/lbm/srt/cell_operations/DefaultCellOperation.impl.h index 7f1086e77cc77a89360e1ce8a5f87dcfb4054fee..0cf052e6b5ea7f04dbb5cbec8af475002d3b67d5 100644 --- a/src/lbm/srt/cell_operations/DefaultCellOperation.impl.h +++ b/src/lbm/srt/cell_operations/DefaultCellOperation.impl.h @@ -65,8 +65,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : omega_( real_t(0) ), latticeModel_( NULL ) {} @@ -136,8 +136,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::Guo_tag >::value), "Only works with Guo constant force model !" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : omega_( real_t(0) ), latticeModel_( NULL ) {} @@ -230,8 +230,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : omega_trm_( real_t(0) ), omega_w0_( real_t(0) ), omega_w1_( real_t(0) ), omega_w2_( real_t(0) ) {} @@ -476,8 +476,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : omega_trm_( real_t(0) ), omega_w0_( real_t(0) ), omega_w1_( real_t(0) ), omega_w2_( real_t(0) ) {} diff --git a/src/lbm/sweeps/ActiveCellSweep.h b/src/lbm/sweeps/ActiveCellSweep.h index cfc3b6d3519e5d03b48cee0d280d02ea7df8b443..4874c36af4fc4c666aaef3f37610d8faeded25c6 100644 --- a/src/lbm/sweeps/ActiveCellSweep.h +++ b/src/lbm/sweeps/ActiveCellSweep.h @@ -35,7 +35,7 @@ class ActiveCellSweep : FlagFieldSweepBase< LatticeModel_T, FlagField_T > { public: - typedef typename FlagFieldSweepBase<LatticeModel_T,FlagField_T>::PdfField_T PdfField_T; + using PdfField_T = typename FlagFieldSweepBase<LatticeModel_T, FlagField_T>::PdfField_T; // block has NO dst pdf field, lbm mask consists of multiple flags ActiveCellSweep( const CellOperation & op, const BlockDataID & pdfField, const ConstBlockDataID & flagField, diff --git a/src/lbm/sweeps/CellwiseSweep.h b/src/lbm/sweeps/CellwiseSweep.h index 2879f19ae2c56d5244706ec8c3cd9be5f6e852ae..e35e32f64b630a998edff5829c7d2f961b707618 100644 --- a/src/lbm/sweeps/CellwiseSweep.h +++ b/src/lbm/sweeps/CellwiseSweep.h @@ -410,7 +410,7 @@ shared_ptr< CellwiseSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, Densit makeCellwiseSweep( const BlockDataID & pdfFieldId, const Filter_T & filter, const DensityVelocityIn_T & densityVelocityIn, const DensityVelocityOut_T & densityVelocityOut ) { - typedef CellwiseSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T > CS_T; + using CS_T = CellwiseSweep<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T>; return shared_ptr< CS_T >( new CS_T( pdfFieldId, filter, densityVelocityIn, densityVelocityOut ) ); } @@ -419,7 +419,7 @@ shared_ptr< CellwiseSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, Densit makeCellwiseSweep( const BlockDataID & src, const BlockDataID & dst, const Filter_T & filter, const DensityVelocityIn_T & densityVelocityIn, const DensityVelocityOut_T & densityVelocityOut ) { - typedef CellwiseSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T > CS_T; + using CS_T = CellwiseSweep<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T>; return shared_ptr< CS_T >( new CS_T( src, dst, filter, densityVelocityIn, densityVelocityOut ) ); } @@ -520,7 +520,7 @@ shared_ptr< CellwiseSweep< LatticeModel_T, Filter_T, AdvectionDiffusionDensityEq makeCellwiseAdvectionDiffusionSweep( const BlockDataID & pdfFieldId, const ConstBlockDataID & velocityFieldId, const Filter_T & filter, const DensityVelocityOut_T & densityVelocityOut ) { - typedef CellwiseSweep< LatticeModel_T, Filter_T, AdvectionDiffusionDensityEquilibriumVelocityCalculation<VelocityField_T>, DensityVelocityOut_T > CS_T; + using CS_T = CellwiseSweep<LatticeModel_T, Filter_T, AdvectionDiffusionDensityEquilibriumVelocityCalculation<VelocityField_T>, DensityVelocityOut_T>; return shared_ptr< CS_T >( new CS_T( pdfFieldId, filter, AdvectionDiffusionDensityEquilibriumVelocityCalculation<VelocityField_T>( velocityFieldId ), densityVelocityOut ) ); } @@ -530,7 +530,7 @@ shared_ptr< CellwiseSweep< LatticeModel_T, Filter_T, AdvectionDiffusionDensityEq makeCellwiseAdvectionDiffusionSweep( const BlockDataID & src, const BlockDataID & dst, const ConstBlockDataID & velocityFieldId, const Filter_T & filter, const DensityVelocityOut_T & densityVelocityOut ) { - typedef CellwiseSweep< LatticeModel_T, Filter_T, AdvectionDiffusionDensityEquilibriumVelocityCalculation<VelocityField_T>, DensityVelocityOut_T > CS_T; + using CS_T = CellwiseSweep<LatticeModel_T, Filter_T, AdvectionDiffusionDensityEquilibriumVelocityCalculation<VelocityField_T>, DensityVelocityOut_T>; return shared_ptr< CS_T >( new CS_T( src, dst, filter, AdvectionDiffusionDensityEquilibriumVelocityCalculation<VelocityField_T>( velocityFieldId ), densityVelocityOut ) ); } diff --git a/src/lbm/sweeps/FlagFieldSweepBase.h b/src/lbm/sweeps/FlagFieldSweepBase.h index 3df1dcf959d4b1ea4aecfc9ca3b560aea04e9ef5..edf5ed56be0593cb744d01536e2f82e143846c2c 100644 --- a/src/lbm/sweeps/FlagFieldSweepBase.h +++ b/src/lbm/sweeps/FlagFieldSweepBase.h @@ -35,8 +35,8 @@ class FlagFieldSweepBase : public SweepBase<LatticeModel_T> { public: - typedef typename SweepBase< LatticeModel_T >::PdfField_T PdfField_T; - typedef typename FlagField_T::flag_t flag_t; + using PdfField_T = typename SweepBase<LatticeModel_T>::PdfField_T; + using flag_t = typename FlagField_T::flag_t; // block has NO dst pdf field, lbm mask consists of multiple flags FlagFieldSweepBase( const BlockDataID & pdfField, const ConstBlockDataID & flagField, const Set< FlagUID > & lbmMask ) : diff --git a/src/lbm/sweeps/StreamPull.h b/src/lbm/sweeps/StreamPull.h index 136712f8bcd8cc09ceb3dc25db0d89bf1caf7fe5..fba95f580d56366b29111307bfd965038ff98fc9 100644 --- a/src/lbm/sweeps/StreamPull.h +++ b/src/lbm/sweeps/StreamPull.h @@ -62,8 +62,8 @@ struct StreamPullEverything static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value == false), "There is a specialization for D3Q19!" ); static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q27 >::value == false), "There is a specialization for D3Q27!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); }; @@ -114,8 +114,8 @@ struct StreamPullEverything< LatticeModel_T, typename std::enable_if< std::is_sa { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D2Q9 >::value), "Only works with D2Q9!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); }; @@ -177,8 +177,8 @@ struct StreamPullEverything< LatticeModel_T, typename std::enable_if< std::is_sa { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "Only works with D3Q19!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); }; @@ -250,8 +250,8 @@ struct StreamPullEverything< LatticeModel_T, typename std::enable_if< std::is_sa { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q27 >::value), "Only works with D3Q27!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); }; @@ -334,8 +334,8 @@ struct StreamPull static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value == false), "There is a specialization for D3Q19!" ); static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q27 >::value == false), "There is a specialization for D3Q27!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; template< typename Filter_T > static inline void execute( PdfField_T * src, PdfField_T * dst, IBlock * block, Filter_T & filter, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); @@ -392,8 +392,8 @@ struct StreamPull< LatticeModel_T, typename std::enable_if< std::is_same< typena { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D2Q9 >::value), "Only works with D2Q9!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; template< typename Filter_T > static void execute( PdfField_T * src, PdfField_T * dst, IBlock * block, Filter_T & filter, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); @@ -464,8 +464,8 @@ struct StreamPull< LatticeModel_T, typename std::enable_if< std::is_same< typena { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "Only works with D3Q19!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; template< typename Filter_T > static void execute( PdfField_T * src, PdfField_T * dst, IBlock * block, Filter_T & filter, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); @@ -546,8 +546,8 @@ struct StreamPull< LatticeModel_T, typename std::enable_if< std::is_same< typena { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q27 >::value), "Only works with D3Q27!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; template< typename Filter_T > static void execute( PdfField_T * src, PdfField_T * dst, IBlock * block, Filter_T & filter, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); diff --git a/src/lbm/sweeps/Streaming.h b/src/lbm/sweeps/Streaming.h index f4d87fe4a4427591f7873d61d2a24932efe71902..b331e72f4b5cf9bf3b96b781be64d17ac5c70e0e 100644 --- a/src/lbm/sweeps/Streaming.h +++ b/src/lbm/sweeps/Streaming.h @@ -57,8 +57,8 @@ struct Stream< LatticeModel_T, FlagField_T, typename std::enable_if< ! std::is_s { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value == false), "There is a specialization for D3Q19!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const FlagField_T * flagField, const typename FlagField_T::flag_t lbm, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); @@ -99,8 +99,8 @@ struct Stream< LatticeModel_T, FlagField_T, typename std::enable_if< std::is_sam { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "Only works with D3Q19!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const FlagField_T * flagField, const typename FlagField_T::flag_t lbm, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); @@ -164,8 +164,8 @@ struct StreamEverything< LatticeModel_T, typename std::enable_if< ! std::is_same { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value == false), "There is a specialization for D3Q19!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); }; @@ -216,8 +216,8 @@ struct StreamEverything< LatticeModel_T, typename std::enable_if< std::is_same< { static_assert( (std::is_same< typename LatticeModel_T::Stencil, stencil::D3Q19 >::value), "Only works with D3Q19!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; static void execute( PdfField_T * src, PdfField_T * dst, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); }; diff --git a/src/lbm/sweeps/SweepBase.h b/src/lbm/sweeps/SweepBase.h index d3389cc60e612975851b885922f2dfd91279abb0..f7dbddd12448eedea7a182da302a475a91dd905b 100644 --- a/src/lbm/sweeps/SweepBase.h +++ b/src/lbm/sweeps/SweepBase.h @@ -47,7 +47,7 @@ class SweepBase { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; // block has NO dst pdf field SweepBase( const BlockDataID & pdfField, diff --git a/src/lbm/trt/SplitPureSweep.impl.h b/src/lbm/trt/SplitPureSweep.impl.h index 84104e0922756f7be9d21ed7c519f9c9713967f5..3594863a90d565a7722601bf99699ac760ba358b 100644 --- a/src/lbm/trt/SplitPureSweep.impl.h +++ b/src/lbm/trt/SplitPureSweep.impl.h @@ -73,8 +73,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename SweepBase<LatticeModel_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename SweepBase<LatticeModel_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field SplitPureSweep( const BlockDataID & pdfField ) : @@ -866,8 +866,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename SweepBase<LatticeModel_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename SweepBase<LatticeModel_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field SplitPureSweep( const BlockDataID & pdfField ) : diff --git a/src/lbm/trt/SplitSweep.impl.h b/src/lbm/trt/SplitSweep.impl.h index 4439727cacb0aedc42df2cf5abef9b05574170bc..c46db20a7a356dcba14adb78023d99c7bd9a26cd 100644 --- a/src/lbm/trt/SplitSweep.impl.h +++ b/src/lbm/trt/SplitSweep.impl.h @@ -68,8 +68,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename FlagFieldSweepBase<LatticeModel_T,FlagField_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename FlagFieldSweepBase<LatticeModel_T, FlagField_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field, lbm mask consists of multiple flags SplitSweep( const BlockDataID & pdfField, const ConstBlockDataID & flagField, const Set< FlagUID > & lbmMask ) : @@ -1005,8 +1005,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef typename FlagFieldSweepBase<LatticeModel_T,FlagField_T>::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = typename FlagFieldSweepBase<LatticeModel_T, FlagField_T>::PdfField_T; + using Stencil = typename LatticeModel_T::Stencil; // block has NO dst pdf field, lbm mask consists of multiple flags SplitSweep( const BlockDataID & pdfField, const ConstBlockDataID & flagField, const Set< FlagUID > & lbmMask ) : diff --git a/src/lbm/trt/cell_operations/DefaultCellOperation.impl.h b/src/lbm/trt/cell_operations/DefaultCellOperation.impl.h index 0950f0cca8bcdf68c1775ee1058719f253b6c3e2..165e47f68f5637a1962e3f8d2b7a3ab9533cc42b 100644 --- a/src/lbm/trt/cell_operations/DefaultCellOperation.impl.h +++ b/src/lbm/trt/cell_operations/DefaultCellOperation.impl.h @@ -63,8 +63,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : lambda_e_( real_t(0) ), lambda_d_( real_t(0) ), latticeModel_( NULL ) {} @@ -179,8 +179,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : lambda_e_( real_t(0) ), lambda_e_scaled_( real_t(0) ), lambda_d_scaled_( real_t(0) ), @@ -431,8 +431,8 @@ public: static_assert( (std::is_same< typename LatticeModel_T::ForceModel::tag, force_model::None_tag >::value), "Only works without additional forces!" ); static_assert( LatticeModel_T::equilibriumAccuracyOrder == 2, "Only works for lattice models that require the equilibrium distribution to be order 2 accurate!" ); - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; DefaultCellOperation() : lambda_e_( real_t(0) ), lambda_e_scaled_( real_t(0) ), lambda_d_scaled_( real_t(0) ), diff --git a/src/lbm/vtk/Density.h b/src/lbm/vtk/Density.h index 6b7e4ee51de568f6441666171d5b120963595ab4..f40bc63599f003a7a13cb2303d256651b336d6dd 100644 --- a/src/lbm/vtk/Density.h +++ b/src/lbm/vtk/Density.h @@ -36,7 +36,7 @@ class DensityVTKWriter : public vtk::BlockCellDataWriter< OutputType > { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; DensityVTKWriter( const ConstBlockDataID & pdf, const std::string & id ) : vtk::BlockCellDataWriter< OutputType >( id ), bdid_( pdf ), pdf_( nullptr ) {} @@ -63,7 +63,7 @@ class DensitySIVTKWriter : public vtk::BlockCellDataWriter< OutputType > { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; DensitySIVTKWriter( const ConstBlockDataID & pdf, const real_t rho_SI, const std::string & id ) : vtk::BlockCellDataWriter< OutputType >( id ), bdid_( pdf ), pdf_( NULL ), rho_SI_( rho_SI ) {} diff --git a/src/lbm/vtk/NonEquilibrium.h b/src/lbm/vtk/NonEquilibrium.h index 3754c58ddc9c669f73a494d4ed00494fbead04af..4a756dba9651096f677b12627305b6e7f68b238b 100644 --- a/src/lbm/vtk/NonEquilibrium.h +++ b/src/lbm/vtk/NonEquilibrium.h @@ -41,8 +41,8 @@ class NonEqulibriumVTKWriter : public vtk::BlockCellDataWriter< OutputType, Latt { public: - typedef PdfField< LatticeModel_T > PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil; + using PdfField_T = PdfField<LatticeModel_T>; + using Stencil = typename LatticeModel_T::Stencil; NonEqulibriumVTKWriter( const ConstBlockDataID & pdf, const std::string & id ) : vtk::BlockCellDataWriter< OutputType, Stencil::Size >( id ), bdid_( pdf ), pdf_( nullptr ) {} diff --git a/src/lbm/vtk/PressureTensor.h b/src/lbm/vtk/PressureTensor.h index da09d6664412ea537d72463d651a756e3cd895c0..60c3afe53ce06253e5d689f489f0ddf9d119b2c7 100644 --- a/src/lbm/vtk/PressureTensor.h +++ b/src/lbm/vtk/PressureTensor.h @@ -36,7 +36,7 @@ class PressureTensorVTKWriter : public vtk::BlockCellDataWriter< OutputType, 9 > { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; PressureTensorVTKWriter( const ConstBlockDataID & pdfFieldId, const std::string & id ) : vtk::BlockCellDataWriter< OutputType, 9 >( id ), bdid_( pdfFieldId ), pdf_( NULL ) {} diff --git a/src/lbm/vtk/VTKOutput.h b/src/lbm/vtk/VTKOutput.h index e42fb6bd927628fc7b64f1e9ba78d33c66fa4063..9e58cf06f49d214d9c50f3d0b9cd55c01d681fd4 100644 --- a/src/lbm/vtk/VTKOutput.h +++ b/src/lbm/vtk/VTKOutput.h @@ -79,8 +79,8 @@ class VTKOutput { public: - typedef typename FlagFieldT::flag_t flag_t; - typedef std::map<FlagUID, flag_t> FlagMap; + using flag_t = typename FlagFieldT::flag_t; + using FlagMap = std::map<FlagUID, flag_t>; VTKOutput( const ConstBlockDataID & pdfField, const ConstBlockDataID & flagField, const FlagUID & domainFlagUID, const vtk::VTKOutput::BeforeFunction & ghostLayerSyncFunction, @@ -196,7 +196,7 @@ void VTKOutput<LatticeModel, FlagFieldT>::addToTimeloop( Timeloop & timeloop, co const FlagUID & domainFlagUID, const FlagMap & flagFieldMapping ) { - typedef PdfField< LatticeModel > PdfField_t; + using PdfField_t = PdfField<LatticeModel>; blockforest::communication::UniformBufferedScheme< stencil::D3Q27 > pdfGhostLayerSync( blocks ); pdfGhostLayerSync.addPackInfo( make_shared< field::communication::PackInfo< PdfField_t > >( pdfField ) ); diff --git a/src/lbm/vtk/Velocity.h b/src/lbm/vtk/Velocity.h index 10957ee4ac08c8acdc799be4d224fc77624347bb..8a31c07d2ec5cb4c73f354e2d27daf11b0ceb9ad 100644 --- a/src/lbm/vtk/Velocity.h +++ b/src/lbm/vtk/Velocity.h @@ -36,7 +36,7 @@ class VelocityVTKWriter : public vtk::BlockCellDataWriter< OutputType, 3 > { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; VelocityVTKWriter( const ConstBlockDataID & pdfFieldId, const std::string & id ) : vtk::BlockCellDataWriter< OutputType, 3 >( id ), bdid_( pdfFieldId ), pdf_( nullptr ) {} @@ -63,7 +63,7 @@ class VelocityMagnitudeVTKWriter : public vtk::BlockCellDataWriter< OutputType, { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; VelocityMagnitudeVTKWriter( const ConstBlockDataID & pdfFieldId, const std::string & id ) : vtk::BlockCellDataWriter< OutputType, 1 >( id ), bdid_( pdfFieldId ), pdf_( nullptr ) {} @@ -90,7 +90,7 @@ class VelocitySIVTKWriter : public vtk::BlockCellDataWriter< OutputType, 3 > { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; VelocitySIVTKWriter( const ConstBlockDataID & pdfFieldId, const real_t dx_SI, const real_t dt_SI, const std::string & id ) : vtk::BlockCellDataWriter< OutputType, 3 >( id ), bdid_( pdfFieldId ), pdf_( NULL ), dxDividedByDt_SI_( dx_SI / dt_SI ) {} @@ -118,7 +118,7 @@ class VelocitySIMagnitudeVTKWriter : public vtk::BlockCellDataWriter< OutputType { public: - typedef PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = PdfField<LatticeModel_T>; VelocitySIMagnitudeVTKWriter( const ConstBlockDataID & pdfFieldId, const real_t dx_SI, const real_t dt_SI, const std::string & id ) : vtk::BlockCellDataWriter< OutputType, 1 >( id ), bdid_( pdfFieldId ), pdf_( NULL ), dxDividedByDt_SI_( dx_SI / dt_SI ) {} diff --git a/src/lbm_mesapd_coupling/utility/SubCyclingManager.h b/src/lbm_mesapd_coupling/utility/SubCyclingManager.h index d001a43ba0e4a12de553a228716869c311c2c4b9..b46ed444b60757f36628ea1f996f9d3fb7a1517c 100644 --- a/src/lbm_mesapd_coupling/utility/SubCyclingManager.h +++ b/src/lbm_mesapd_coupling/utility/SubCyclingManager.h @@ -34,7 +34,7 @@ namespace lbm_mesapd_coupling { class SubCyclingManager { public: - typedef std::function<void ()> VoidVoidFunc; + using VoidVoidFunc = std::function<void ()>; /*! \name Construction & Destruction */ //@{ @@ -45,7 +45,7 @@ public: /*! \name Registration Functions */ //@{ - typedef size_t FuncHandle; + using FuncHandle = size_t; FuncHandle addFuncBeforeSubCycles(const VoidVoidFunc &f, const std::string &identifier = "Other"); FuncHandle addFuncDuringSubCycles(const VoidVoidFunc &f, const std::string &identifier = "Other"); @@ -64,7 +64,7 @@ public: //@} private: - typedef std::pair<std::string, VoidVoidFunc> IdentifiedFunc; + using IdentifiedFunc = std::pair<std::string, VoidVoidFunc>; inline void executeBeforeFunctions(); inline void executeDuringFunctions(); diff --git a/src/mesa_pd/collision_detection/EPA.h b/src/mesa_pd/collision_detection/EPA.h index 781196f62123d8d6383a90efd1a1dc58480c30db..052f6cdf89d71733580f4fc013630b2f76a07e04 100644 --- a/src/mesa_pd/collision_detection/EPA.h +++ b/src/mesa_pd/collision_detection/EPA.h @@ -48,9 +48,9 @@ private : class EPA_Triangle; class EPA_TriangleComp; - typedef std::vector<EPA_Triangle> EPA_EntryBuffer; - typedef std::vector<EPA_Triangle*> EPA_EntryHeap; - typedef std::vector<EPA_Edge> EPA_EdgeBuffer; + using EPA_EntryBuffer = std::vector<EPA_Triangle>; + using EPA_EntryHeap = std::vector<EPA_Triangle *>; + using EPA_EdgeBuffer = std::vector<EPA_Edge>; //********************************************************************************************** public: diff --git a/src/pde/sweeps/SweepBase.h b/src/pde/sweeps/SweepBase.h index 031a3ee5917697b56697ca723d1bdb79406cc900..e8fe9fb43509ef9af54080146f6fcc310955cc03 100644 --- a/src/pde/sweeps/SweepBase.h +++ b/src/pde/sweeps/SweepBase.h @@ -39,7 +39,7 @@ class SweepBase { public: - typedef GhostLayerField< real_t, 1 > Field_T; + using Field_T = GhostLayerField<real_t, 1>; // block has NO dst u field SweepBase( const BlockDataID & uFieldId, const BlockDataID & fFieldId ) : diff --git a/src/pe/Materials.h b/src/pe/Materials.h index d4d54b96ccc08740b6cbc6222f2d09da763cb819..15863462f6de1e896f2f034c605c11ae100e2179 100644 --- a/src/pe/Materials.h +++ b/src/pe/Materials.h @@ -95,7 +95,7 @@ class WALBERLA_PUBLIC Material { private: //**Type definitions**************************************************************************** - typedef Materials::size_type SizeType; //!< Size type of the Material class. + using SizeType = Materials::size_type; //!< Size type of the Material class. //********************************************************************************************** public: diff --git a/src/pe/Types.h b/src/pe/Types.h index d66c9df9235bbde5948fb5e32320b01e6f14cf55..645f167807a17bdc2862590ba739fc8eb83d5c1e 100644 --- a/src/pe/Types.h +++ b/src/pe/Types.h @@ -42,12 +42,12 @@ template<typename T> class MatrixMxN; } namespace pe{ -typedef math::Vector2<real_t> Vec2; -typedef math::Vector3<real_t> Vec3; -typedef math::Matrix2<real_t> Mat2; -typedef math::Matrix3<real_t> Mat3; -typedef math::Quaternion<real_t> Quat; -typedef math::MatrixMxN<real_t> MatN; +using Vec2 = math::Vector2<real_t>; +using Vec3 = math::Vector3<real_t>; +using Mat2 = math::Matrix2<real_t>; +using Mat3 = math::Matrix3<real_t>; +using Quat = math::Quaternion<real_t>; +using MatN = math::MatrixMxN<real_t>; using math::AABB; @@ -77,67 +77,67 @@ class TriangleMesh; template <typename... BodyTypes> class Union; -typedef RigidBody BodyType; //!< Type of the rigid bodies. -typedef RigidBody* BodyID; //!< Handle for a rigid body. -typedef const RigidBody* ConstBodyID; //!< Handle for a constant rigid body. +using BodyType = RigidBody; //!< Type of the rigid bodies. +using BodyID = RigidBody *; //!< Handle for a rigid body. +using ConstBodyID = const RigidBody *; //!< Handle for a constant rigid body. using BodyPtr = std::unique_ptr<RigidBody>; -typedef GeomPrimitive* GeomID; -typedef const GeomPrimitive* ConstGeomID; +using GeomID = GeomPrimitive *; +using ConstGeomID = const GeomPrimitive *; -typedef Box BoxType; //!< Type of the box geometric primitive. -typedef Box* BoxID; //!< Handle for a box primitive. -typedef const Box* ConstBoxID; //!< Handle for a constant box primitive. +using BoxType = Box; //!< Type of the box geometric primitive. +using BoxID = Box *; //!< Handle for a box primitive. +using ConstBoxID = const Box *; //!< Handle for a constant box primitive. using BoxPtr = std::unique_ptr<Box>; -typedef Capsule CapsuleType; //!< Type of the capsule geometric primitive. -typedef Capsule* CapsuleID; //!< Handle for a capsule primitive. -typedef const Capsule* ConstCapsuleID; //!< Handle for a constant capsule primitive. +using CapsuleType = Capsule; //!< Type of the capsule geometric primitive. +using CapsuleID = Capsule *; //!< Handle for a capsule primitive. +using ConstCapsuleID = const Capsule *; //!< Handle for a constant capsule primitive. using CapsulePtr = std::unique_ptr<Capsule>; -typedef Cylinder CylinderType; //!< Type of the cylinder geometric primitive. -typedef Cylinder* CylinderID; //!< Handle for a cylinder primitive. -typedef const Cylinder* ConstCylinderID; //!< Handle for a constant cylinder primitive. +using CylinderType = Cylinder; //!< Type of the cylinder geometric primitive. +using CylinderID = Cylinder *; //!< Handle for a cylinder primitive. +using ConstCylinderID = const Cylinder *; //!< Handle for a constant cylinder primitive. using CylinderPtr = std::unique_ptr<Cylinder>; -typedef CylindricalBoundary CylindricalBoundaryType; //!< Type of the cylindrical boundary geometric primitive. -typedef CylindricalBoundary* CylindricalBoundaryID; //!< Handle for a cylindrical boundary primitive. -typedef const CylindricalBoundary* ConstCylindricalBoundaryID; //!< Handle for a constant cylindrical boundary primitive. +using CylindricalBoundaryType = CylindricalBoundary; //!< Type of the cylindrical boundary geometric primitive. +using CylindricalBoundaryID = CylindricalBoundary *; //!< Handle for a cylindrical boundary primitive. +using ConstCylindricalBoundaryID = const CylindricalBoundary *; //!< Handle for a constant cylindrical boundary primitive. using CylindricalBoundaryPtr = std::unique_ptr<CylindricalBoundary>; -typedef Ellipsoid EllipsoidType; //!< Type of the ellipsoid geometric primitive. -typedef Ellipsoid* EllipsoidID; //!< Handle for a ellipsoid primitive. -typedef const Ellipsoid* ConstEllipsoidID; //!< Handle for a constant ellipsoid primitive. +using EllipsoidType = Ellipsoid; //!< Type of the ellipsoid geometric primitive. +using EllipsoidID = Ellipsoid *; //!< Handle for a ellipsoid primitive. +using ConstEllipsoidID = const Ellipsoid *; //!< Handle for a constant ellipsoid primitive. using EllipsoidPtr = std::unique_ptr<Ellipsoid>; -typedef Plane PlaneType; //!< Type of the plane geometric primitive. -typedef Plane* PlaneID; //!< Handle for a plane primitive. -typedef const Plane* ConstPlaneID; //!< Handle for a constant plane primitive. +using PlaneType = Plane; //!< Type of the plane geometric primitive. +using PlaneID = Plane *; //!< Handle for a plane primitive. +using ConstPlaneID = const Plane *; //!< Handle for a constant plane primitive. using PlanePtr = std::unique_ptr<Plane>; -typedef Sphere SphereType; //!< Type of the sphere geometric primitive. -typedef Sphere* SphereID; //!< Handle for a sphere primitive. -typedef const Sphere* ConstSphereID; //!< Handle for a constant sphere primitive. +using SphereType = Sphere; //!< Type of the sphere geometric primitive. +using SphereID = Sphere *; //!< Handle for a sphere primitive. +using ConstSphereID = const Sphere *; //!< Handle for a constant sphere primitive. using SpherePtr = std::unique_ptr<Sphere>; -typedef Squirmer SquirmerType; //!< Type of the squirmer geometric primitive. -typedef Squirmer* SquirmerID; //!< Handle for a squirmer primitive. -typedef const Squirmer* ConstSquirmerID; //!< Handle for a constant squirmer primitive. +using SquirmerType = Squirmer; //!< Type of the squirmer geometric primitive. +using SquirmerID = Squirmer *; //!< Handle for a squirmer primitive. +using ConstSquirmerID = const Squirmer *; //!< Handle for a constant squirmer primitive. using SquirmerPtr = std::unique_ptr<Squirmer>; -typedef TriangleMesh MeshType; //!< Type of the triangle mesh geometric primitive. -typedef TriangleMesh* MeshID; //!< Handle for a triangle mesh primitive. -typedef const TriangleMesh* ConstMeshID; //!< Handle for a constant triangle mesh primitive. +using MeshType = TriangleMesh; //!< Type of the triangle mesh geometric primitive. +using MeshID = TriangleMesh *; //!< Handle for a triangle mesh primitive. +using ConstMeshID = const TriangleMesh *; //!< Handle for a constant triangle mesh primitive. using TriangleMeshPtr = std::unique_ptr<TriangleMesh>; -typedef Contact ContactType; //!< Type of the contacts. -typedef Contact* ContactID; //!< Handle for a contact. -typedef const Contact* ConstContactID; //!< Handle for a constant contact. +using ContactType = Contact; //!< Type of the contacts. +using ContactID = Contact *; //!< Handle for a contact. +using ConstContactID = const Contact *; //!< Handle for a constant contact. -typedef BodyManager* ManagerID; //!< Handle for a BodyManager. -typedef const BodyManager* ConstManagerID; //!< Handle for a constant BodyManager. +using ManagerID = BodyManager *; //!< Handle for a BodyManager. +using ConstManagerID = const BodyManager *; //!< Handle for a constant BodyManager. -typedef std::vector<Material> Materials; //!< Vector for materials. +using Materials = std::vector<Material>; //!< Vector for materials. //************************************************************************************************* @@ -156,14 +156,14 @@ typedef std::vector<Material> Materials; //!< Vector for materials. MaterialID myMaterial = createMaterial( "myMaterial", real_c(2.54), real_c(0.8), real_c(0.1), real_c(0.05) ); \endcode */ -typedef Materials::size_type MaterialID; +using MaterialID = Materials::size_type; //************************************************************************************************* ///Output data type of coarse collision detection module -typedef std::vector<std::pair<BodyID, BodyID> > PossibleContacts; +using PossibleContacts = std::vector<std::pair<BodyID, BodyID>>; ///Output data type of fine collision detection module -typedef std::vector< Contact > Contacts; +using Contacts = std::vector<Contact>; ///Class enum for BodyStorages /// \see Storage @@ -187,7 +187,7 @@ struct StorageSelect }; ///Container for local and shadow body storage -typedef std::array<BodyStorage, 2> Storage; +using Storage = std::array<BodyStorage, 2>; } // namespace pe } // namespace walberla diff --git a/src/pe/amr/weight_assignment/MetisAssignmentFunctor.h b/src/pe/amr/weight_assignment/MetisAssignmentFunctor.h index 4d0aeb411c46a77749f8a13226d9dac4824ca245..f0797401ed1eb68c002fe905722746661c755ced 100644 --- a/src/pe/amr/weight_assignment/MetisAssignmentFunctor.h +++ b/src/pe/amr/weight_assignment/MetisAssignmentFunctor.h @@ -40,9 +40,9 @@ class MetisAssignmentFunctor { public: ///Convenience typedef to be used as PhantomBlock weight in conjunction with this weight assignment functor. - typedef blockforest::DynamicParMetisBlockInfo PhantomBlockWeight; + using PhantomBlockWeight = blockforest::DynamicParMetisBlockInfo; ///Convenience typdef for pack and unpack functions to be used in conjunction with PhantomBlockWeight. - typedef blockforest::DynamicParMetisBlockInfoPackUnpack PhantomBlockWeightPackUnpackFunctor; + using PhantomBlockWeightPackUnpackFunctor = blockforest::DynamicParMetisBlockInfoPackUnpack; MetisAssignmentFunctor( shared_ptr<blockforest::InfoCollection>& ic, const real_t baseWeight = real_t(10.0) ) : ic_(ic), baseWeight_(baseWeight) {} diff --git a/src/pe/amr/weight_assignment/WeightAssignmentFunctor.h b/src/pe/amr/weight_assignment/WeightAssignmentFunctor.h index 66f267af0510bce6cb60ce4d74fb30d5594d9e7c..069efae7e14d587208d50558e3f4d3180ca47d7b 100644 --- a/src/pe/amr/weight_assignment/WeightAssignmentFunctor.h +++ b/src/pe/amr/weight_assignment/WeightAssignmentFunctor.h @@ -38,9 +38,9 @@ class WeightAssignmentFunctor { public: ///Convenience typedef to be used as PhantomBlock weight in conjunction with this weight assignment functor. - typedef walberla::blockforest::PODPhantomWeight<double> PhantomBlockWeight; + using PhantomBlockWeight = walberla::blockforest::PODPhantomWeight<double>; ///Convenience typdef for pack and unpack functions to be used in conjunction with PhantomBlockWeight. - typedef walberla::blockforest::PODPhantomWeightPackUnpack<double> PhantomBlockWeightPackUnpackFunctor; + using PhantomBlockWeightPackUnpackFunctor = walberla::blockforest::PODPhantomWeightPackUnpack<double>; WeightAssignmentFunctor( shared_ptr<blockforest::InfoCollection>& ic, const real_t baseWeight = real_t(10.0) ) : ic_(ic), baseWeight_(baseWeight) {} diff --git a/src/pe/ccd/HashGrids.h b/src/pe/ccd/HashGrids.h index 15b2968e3907ca575a2ef6fa821f5080335b9756..cbfe0471da80d0ced8bc6851b884b7cc34034ffa 100644 --- a/src/pe/ccd/HashGrids.h +++ b/src/pe/ccd/HashGrids.h @@ -103,7 +103,7 @@ public: private: //**Type definitions**************************************************************************** //! Vector for storing (handles to) rigid bodies. - typedef std::vector<BodyID> BodyVector; + using BodyVector = std::vector<BodyID>; //********************************************************************************************** //********************************************************************************************** @@ -114,7 +114,7 @@ private: private: //**Type definitions************************************************************************* //! The signed integer type that is used for storing offsets to neighboring cells. - typedef long offset_t; + using offset_t = long; //******************************************************************************************* //******************************************************************************************* @@ -139,7 +139,7 @@ private: //**Type definitions************************************************************************* //! Vector for storing pointers to (body-occupied) cells. - typedef std::vector<Cell*> CellVector; + using CellVector = std::vector<Cell *>; //******************************************************************************************* public: @@ -262,7 +262,7 @@ private: //! List for storing all the hash grids that are in use. /*! This data structure is used to represent the grid hierarchy. All hash grids are stored in ascending order by the size of their cells. */ - typedef std::list<HashGrid*> GridList; + using GridList = std::list<HashGrid *>; //********************************************************************************************** public: diff --git a/src/pe/collision/EPA.h b/src/pe/collision/EPA.h index a318e7e578323e4237e51492b3ef250d7838427c..7bc5840d1311ceec2c21f2054f86ca25a7773a98 100644 --- a/src/pe/collision/EPA.h +++ b/src/pe/collision/EPA.h @@ -64,9 +64,9 @@ private : class EPA_Triangle; class EPA_TriangleComp; - typedef std::vector<EPA_Triangle> EPA_EntryBuffer; - typedef std::vector<EPA_Triangle*> EPA_EntryHeap; - typedef std::vector<EPA_Edge> EPA_EdgeBuffer; + using EPA_EntryBuffer = std::vector<EPA_Triangle>; + using EPA_EntryHeap = std::vector<EPA_Triangle *>; + using EPA_EdgeBuffer = std::vector<EPA_Edge>; //********************************************************************************************** public: diff --git a/src/pe/cr/HCSITS.h b/src/pe/cr/HCSITS.h index 8cf803c466fb0ec96d1af889802f44551dd216db..93da3f0f2abc075eb768d3d2745c04117ea8eaf6 100644 --- a/src/pe/cr/HCSITS.h +++ b/src/pe/cr/HCSITS.h @@ -270,7 +270,7 @@ private: }; //************************************************************************************************* -typedef HardContactSemiImplicitTimesteppingSolvers HCSITS; +using HCSITS = HardContactSemiImplicitTimesteppingSolvers; //================================================================================================= // diff --git a/src/pe/rigidbody/MPIRigidBodyTrait.h b/src/pe/rigidbody/MPIRigidBodyTrait.h index a8a055e1eeae6de8df7a6188a43d5c453b712d27..5e24baa2947156c93904054ae12d8bbc0b33a13b 100644 --- a/src/pe/rigidbody/MPIRigidBodyTrait.h +++ b/src/pe/rigidbody/MPIRigidBodyTrait.h @@ -47,15 +47,15 @@ class MPIRigidBodyTrait { protected: //**Type definitions**************************************************************************** - typedef std::vector<Owner> ShadowOwners; //!< Vector for remote MPI processes the rigid body is contained in. - typedef std::set<BlockID> BlockStates; //!< Stores the information if neighbor block knows about object. + using ShadowOwners = std::vector<Owner>; //!< Vector for remote MPI processes the rigid body is contained in. + using BlockStates = std::set<BlockID>; //!< Stores the information if neighbor block knows about object. //********************************************************************************************** public: //**Type definitions**************************************************************************** - typedef ShadowOwners::iterator ShadowOwnersIterator; //!< Iterator over the connected processes. - typedef ShadowOwners::const_iterator ConstShadowOwnersIterator; //!< ConstIterator over the connected processes. - typedef size_t SizeType; + using ShadowOwnersIterator = ShadowOwners::iterator; //!< Iterator over the connected processes. + using ConstShadowOwnersIterator = ShadowOwners::const_iterator; //!< ConstIterator over the connected processes. + using SizeType = size_t; //********************************************************************************************** //**Constructor********************************************************************************* diff --git a/src/pe_coupling/amr/InfoCollection.h b/src/pe_coupling/amr/InfoCollection.h index 86e508e87e9e183fab6464eae655dbd6372984b1..c39d41a6da015a91f64450c4db8654644bc8db9b 100644 --- a/src/pe_coupling/amr/InfoCollection.h +++ b/src/pe_coupling/amr/InfoCollection.h @@ -35,8 +35,8 @@ namespace walberla { namespace pe_coupling { -typedef std::map<blockforest::BlockID, BlockInfo> InfoCollection; -typedef std::pair<blockforest::BlockID, BlockInfo> InfoCollectionPair; +using InfoCollection = std::map<blockforest::BlockID, BlockInfo>; +using InfoCollectionPair = std::pair<blockforest::BlockID, BlockInfo>; template <typename BoundaryHandling_T> void createWithNeighborhood(BlockForest& bf, const BlockDataID boundaryHandlingID, diff --git a/src/pe_coupling/amr/weight_assignment/WeightAssignmentFunctor.h b/src/pe_coupling/amr/weight_assignment/WeightAssignmentFunctor.h index 5fa776362e591d01a5286eb7922b179875bfbe06..ad5aa44893869bc0283fec46a6eb1146b22bdfa5 100644 --- a/src/pe_coupling/amr/weight_assignment/WeightAssignmentFunctor.h +++ b/src/pe_coupling/amr/weight_assignment/WeightAssignmentFunctor.h @@ -34,7 +34,7 @@ namespace amr { class WeightAssignmentFunctor { public: - typedef walberla::blockforest::PODPhantomWeight<double> PhantomBlockWeight; + using PhantomBlockWeight = walberla::blockforest::PODPhantomWeight<double>; WeightAssignmentFunctor( const shared_ptr<InfoCollection>& ic, const std::function<real_t(const BlockInfo&)> & weightEvaluationFct ) : diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/AddedMassForceEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/AddedMassForceEvaluator.h index c452f886443049220e2529456a8fc5673175bd98..c441e90090d655c91d72ffab35d8babe1f41dba1 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/AddedMassForceEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/AddedMassForceEvaluator.h @@ -70,9 +70,9 @@ class AddedMassForceEvaluator public: - typedef GhostLayerField< Vector3<real_t>, 1> Vec3Field_T; - typedef FieldInterpolator_T<Vec3Field_T, FlagField_T> Vec3FieldInterpolator_T; - typedef Distributor_T<Vec3Field_T, FlagField_T> ForceDistributor_T; + using Vec3Field_T = GhostLayerField<Vector3<real_t>, 1>; + using Vec3FieldInterpolator_T = FieldInterpolator_T<Vec3Field_T, FlagField_T>; + using ForceDistributor_T = Distributor_T<Vec3Field_T, FlagField_T>; AddedMassForceEvaluator( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & forceFieldID, const BlockDataID & bodyStorageID, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/EffectiveViscosityFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/EffectiveViscosityFieldEvaluator.h index fc10c9b975cf8e5845432f62d439b354fefb6f3f..f8039c7e6382121f7e19417476a188ca8cbe8914 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/EffectiveViscosityFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/EffectiveViscosityFieldEvaluator.h @@ -62,7 +62,7 @@ real_t calculateEilersEffectiveViscosity( real_t fluidViscosity, real_t porosity class EffectiveViscosityFieldEvaluator { public: - typedef GhostLayerField< real_t, 1 > ScalarField_T; + using ScalarField_T = GhostLayerField<real_t, 1>; EffectiveViscosityFieldEvaluator( const BlockDataID & omegaFieldID, const ConstBlockDataID & solidVolumeFractionFieldID, const real_t & fluidViscosity, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/InteractionForceEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/InteractionForceEvaluator.h index 11709d1e8f4c1dc0c182f64e51e5203db20d85e8..9f5125fc866cad39248a7d553eaca116bb709af1 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/InteractionForceEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/InteractionForceEvaluator.h @@ -78,11 +78,11 @@ class InteractionForceEvaluator public: - typedef GhostLayerField< Vector3<real_t>, 1> Vec3Field_T; - typedef GhostLayerField< real_t, 1> ScalarField_T; - typedef FieldInterpolator_T<Vec3Field_T, FlagField_T> Vec3FieldInterpolator_T; - typedef FieldInterpolator_T<ScalarField_T, FlagField_T> ScalarFieldInterpolator_T; - typedef Distributor_T<Vec3Field_T, FlagField_T> ForceDistributor_T; + using Vec3Field_T = GhostLayerField<Vector3<real_t>, 1>; + using ScalarField_T = GhostLayerField<real_t, 1>; + using Vec3FieldInterpolator_T = FieldInterpolator_T<Vec3Field_T, FlagField_T>; + using ScalarFieldInterpolator_T = FieldInterpolator_T<ScalarField_T, FlagField_T>; + using ForceDistributor_T = Distributor_T<Vec3Field_T, FlagField_T>; InteractionForceEvaluator( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & forceFieldID, const BlockDataID & bodyStorageID, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/LiftForceEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/LiftForceEvaluator.h index de8518349033f98cfddec3c1bd1f5678b440c151..3243b32bec50af012e8c9465aa27fac3bcc010b4 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/LiftForceEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/LiftForceEvaluator.h @@ -65,9 +65,9 @@ class LiftForceEvaluator public: - typedef GhostLayerField< Vector3<real_t>, 1> Vec3Field_T; - typedef FieldInterpolator_T<Vec3Field_T, FlagField_T> Vec3FieldInterpolator_T; - typedef Distributor_T<Vec3Field_T, FlagField_T> ForceDistributor_T; + using Vec3Field_T = GhostLayerField<Vector3<real_t>, 1>; + using Vec3FieldInterpolator_T = FieldInterpolator_T<Vec3Field_T, FlagField_T>; + using ForceDistributor_T = Distributor_T<Vec3Field_T, FlagField_T>; LiftForceEvaluator( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & forceFieldID, const BlockDataID & bodyStorageID, const BlockDataID & flagFieldID, const Set< FlagUID > & domainFlags, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/PressureFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/PressureFieldEvaluator.h index 61998ae6dc80918604a101a9eed28a5d6f6cf8df..f7a639e55cf57b0121a8778285a5d2300040224f 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/PressureFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/PressureFieldEvaluator.h @@ -39,8 +39,8 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class PressureFieldEvaluator { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef GhostLayerField< real_t, 1 > ScalarField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using ScalarField_T = GhostLayerField<real_t, 1>; PressureFieldEvaluator( const BlockDataID & pressureFieldID, const ConstBlockDataID & pdfFieldID, const ConstBlockDataID & boundaryHandlingID ) : pressureFieldID_( pressureFieldID ), pdfFieldID_( pdfFieldID ), boundaryHandlingID_( boundaryHandlingID ) diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/PressureGradientFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/PressureGradientFieldEvaluator.h index 2e8511fca1720e12df06cf04bde7c267fba6bb0e..a206b32ed67ea2164b007726bb838af2dc91ffc5 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/PressureGradientFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/PressureGradientFieldEvaluator.h @@ -42,9 +42,9 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class PressureGradientFieldEvaluator { public: - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; - typedef GhostLayerField< real_t, 1> ScalarField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; + using ScalarField_T = GhostLayerField<real_t, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; PressureGradientFieldEvaluator( const BlockDataID & pressureGradientFieldID, const ConstBlockDataID & pressureFieldID, const ConstBlockDataID & boundaryHandlingID ) diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/SolidVolumeFractionFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/SolidVolumeFractionFieldEvaluator.h index 586b51bc25d29259c632ed1bb76dcfc4cd08c43b..0ba419f468597ee31d8655e1530d09244c2d4dfb 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/SolidVolumeFractionFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/SolidVolumeFractionFieldEvaluator.h @@ -62,8 +62,8 @@ class SolidVolumeFractionFieldEvaluator { public: - typedef GhostLayerField< real_t, 1 > ScalarField_T; - typedef Distributor_T<ScalarField_T, FlagField_T> ScalarDistributor_T; + using ScalarField_T = GhostLayerField<real_t, 1>; + using ScalarDistributor_T = Distributor_T<ScalarField_T, FlagField_T>; SolidVolumeFractionFieldEvaluator( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & solidVolumeFractionFieldID, const BlockDataID & bodyStorageID, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/StressTensorGradientFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/StressTensorGradientFieldEvaluator.h index 29dce0a61dbaccc8245379b21784b271017c8dbe..613e2a7c35afed6b6318daa0a2138bdae242b25a 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/StressTensorGradientFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/StressTensorGradientFieldEvaluator.h @@ -43,9 +43,9 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class StressTensorGradientFieldEvaluator { public: - typedef GhostLayerField< Matrix3< real_t >, 1> TensorField_T; - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using TensorField_T = GhostLayerField<Matrix3<real_t>, 1>; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; StressTensorGradientFieldEvaluator( const BlockDataID & stressTensorGradientFieldID, const ConstBlockDataID & velocityGradientFieldID, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityCurlFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityCurlFieldEvaluator.h index 0442814dbaa2881004ca675da1fa8af03895bbc3..ed693ff86a278b6687418294d6164dd32ad1d569 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityCurlFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityCurlFieldEvaluator.h @@ -42,8 +42,8 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class VelocityCurlFieldEvaluator { public: - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; VelocityCurlFieldEvaluator( const BlockDataID & velocityCurlFieldID, const ConstBlockDataID & velocityFieldID, const ConstBlockDataID & boundaryHandlingID ) diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityFieldEvaluator.h index 70d62853b3fce1c5a88defc46d8c9a0fcd5c48d8..b82f8fac30ef71d07b8e877264295c065eb013d0 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityFieldEvaluator.h @@ -44,8 +44,8 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class VelocityFieldEvaluator { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef GhostLayerField< Vector3<real_t>, 1 > VelocityField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using VelocityField_T = GhostLayerField<Vector3<real_t>, 1>; VelocityFieldEvaluator( const BlockDataID & velocityFieldID, const ConstBlockDataID & pdfFieldID, const ConstBlockDataID & boundaryHandlingID ) diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityGradientFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityGradientFieldEvaluator.h index 9e0397a5ab328b563e3e909801c7857b99ae07b1..0f85958ad8b683cfca4152796d050bf20d5107af 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityGradientFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityGradientFieldEvaluator.h @@ -44,9 +44,9 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class VelocityGradientFieldEvaluator { public: - typedef GhostLayerField< Matrix3< real_t >, 1> TensorField_T; - typedef GhostLayerField< Vector3<real_t>, 1 > VectorField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using TensorField_T = GhostLayerField<Matrix3<real_t>, 1>; + using VectorField_T = GhostLayerField<Vector3<real_t>, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; VelocityGradientFieldEvaluator( const BlockDataID & velocityGradientFieldID, const ConstBlockDataID & velocityFieldID, diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityTotalTimeDerivativeFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityTotalTimeDerivativeFieldEvaluator.h index 62e70f9736d34333d272aa91288bfe4bdced4e11..2bcbba9995d66b4294e921d398f5feb15b8ecd5b 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/VelocityTotalTimeDerivativeFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/VelocityTotalTimeDerivativeFieldEvaluator.h @@ -46,8 +46,8 @@ using math::Vector3; class VelocityTotalTimeDerivativeFieldEvaluator { public: - typedef GhostLayerField< Vector3<real_t>, 1 > VelocityField_T; - typedef GhostLayerField< Matrix3< real_t >, 1> TensorField_T; + using VelocityField_T = GhostLayerField<Vector3<real_t>, 1>; + using TensorField_T = GhostLayerField<Matrix3<real_t>, 1>; VelocityTotalTimeDerivativeFieldEvaluator( const BlockDataID & totalTimeDerivativeVelocityFieldID, const ConstBlockDataID & currentVelocityFieldID, diff --git a/src/pe_coupling/discrete_particle_methods/gns_lbm/GNSSweep.h b/src/pe_coupling/discrete_particle_methods/gns_lbm/GNSSweep.h index 7c62ccb5b44ddf2217e76951f332dbadb993444d..a36e475ef06c216441d20894c6db17fd0670b22e 100644 --- a/src/pe_coupling/discrete_particle_methods/gns_lbm/GNSSweep.h +++ b/src/pe_coupling/discrete_particle_methods/gns_lbm/GNSSweep.h @@ -53,9 +53,9 @@ class GNSSweep { public: - typedef typename lbm::SweepBase< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T >::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; - typedef GhostLayerField< real_t, 1> ScalarField_T; + using PdfField_T = typename lbm::SweepBase<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T>::PdfField_T; + using Stencil_T = typename LatticeModel_T::Stencil; + using ScalarField_T = GhostLayerField<real_t, 1>; static_assert( LatticeModel_T::ForceModel::constant == false, "Only works with non-constant force models!" ); static_assert( LatticeModel_T::compressible == false, "Only works with incompressible models!" ); @@ -257,7 +257,7 @@ shared_ptr< GNSSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelo makeGNSSweep( const BlockDataID & pdfFieldID, const BlockDataID & solidVolumeFractionFieldID, const Filter_T & filter, const DensityVelocityIn_T & densityVelocityIn, const DensityVelocityOut_T & densityVelocityOut ) { - typedef GNSSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T > Sweep_T; + using Sweep_T = GNSSweep<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T>; return shared_ptr< Sweep_T >( new Sweep_T( pdfFieldID, solidVolumeFractionFieldID, filter, densityVelocityIn, densityVelocityOut ) ); } @@ -266,7 +266,7 @@ shared_ptr< GNSSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelo makeGNSSweep( const BlockDataID & srcID, const BlockDataID & dstID, const BlockDataID & solidVolumeFractionFieldID, const Filter_T & filter, const DensityVelocityIn_T & densityVelocityIn, const DensityVelocityOut_T & densityVelocityOut ) { - typedef GNSSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T > Sweep_T; + using Sweep_T = GNSSweep<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T>; return shared_ptr< Sweep_T >( new Sweep_T( srcID, dstID, solidVolumeFractionFieldID, filter, densityVelocityIn, densityVelocityOut ) ); } diff --git a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSExternalForceToForceFieldAdder.h b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSExternalForceToForceFieldAdder.h index 73fc6f5474635b7307cecbf184988a8e31acc236..9517c8b609770496abdf15ab8c0ca44913ffcd66 100644 --- a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSExternalForceToForceFieldAdder.h +++ b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSExternalForceToForceFieldAdder.h @@ -41,8 +41,8 @@ using math::Vector3; class GNSExternalForceToForceFieldAdder { public: - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField_T; - typedef GhostLayerField< real_t, 1 > ScalarField_T; + using ForceField_T = GhostLayerField<Vector3<real_t>, 1>; + using ScalarField_T = GhostLayerField<real_t, 1>; GNSExternalForceToForceFieldAdder( const BlockDataID & forceFieldID, const ConstBlockDataID & solidVolumeFractionFieldID, const Vector3<real_t> & externalForce ) : forceFieldID_( forceFieldID ), solidVolumeFractionFieldID_( solidVolumeFractionFieldID ), externalForce_( externalForce ) diff --git a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSPressureFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSPressureFieldEvaluator.h index c284db5fd20767aedd66df9b3bad60a73e8fd7bf..8ff05a9537d79a9b4af2f2524b0b781d8ef0477b 100644 --- a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSPressureFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSPressureFieldEvaluator.h @@ -36,8 +36,8 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class GNSPressureFieldEvaluator { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef GhostLayerField< real_t, 1 > ScalarField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using ScalarField_T = GhostLayerField<real_t, 1>; GNSPressureFieldEvaluator( const BlockDataID & pressureFieldID, const ConstBlockDataID & pdfFieldID, const ConstBlockDataID & solidVolumeFractionFieldID, const ConstBlockDataID & boundaryHandlingID ) diff --git a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSSmagorinskyLESField.h b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSSmagorinskyLESField.h index 4ae1a67dfa9d6b6cb5ccbc048da7907e3262893a..f4d8fd414f9df5a18725ee24acdcc419e18f7f50 100644 --- a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSSmagorinskyLESField.h +++ b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSSmagorinskyLESField.h @@ -64,9 +64,9 @@ class GNSSmagorinskyLESField { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef GhostLayerField< real_t, 1 > ScalarField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using ScalarField_T = GhostLayerField<real_t, 1>; + using Stencil_T = typename LatticeModel_T::Stencil; static_assert( LatticeModel_T::CollisionModel::constant == false, "Only works with non-constant relaxation time fields!" ); static_assert( LatticeModel_T::compressible == false, "Only works with incompressible models!" ); diff --git a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSVelocityFieldEvaluator.h b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSVelocityFieldEvaluator.h index 157c812b7788617cfe659c72a4ba966aa3083dfa..d0fcdf110989add176173580f8f365d970d0750e 100644 --- a/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSVelocityFieldEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/gns_lbm/utility/GNSVelocityFieldEvaluator.h @@ -48,9 +48,9 @@ template <typename LatticeModel_T, typename BoundaryHandling_T> class GNSVelocityFieldEvaluator { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef GhostLayerField< Vector3<real_t>, 1 > VelocityField_T; - typedef GhostLayerField< real_t, 1 > ScalarField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using VelocityField_T = GhostLayerField<Vector3<real_t>, 1>; + using ScalarField_T = GhostLayerField<real_t, 1>; GNSVelocityFieldEvaluator( const BlockDataID & velocityFieldID, const ConstBlockDataID & pdfFieldID, const ConstBlockDataID & solidVolumeFractionFieldID, const ConstBlockDataID & boundaryHandlingID ) diff --git a/src/pe_coupling/discrete_particle_methods/utility/AveragedInteractionForceFieldToForceFieldAdder.h b/src/pe_coupling/discrete_particle_methods/utility/AveragedInteractionForceFieldToForceFieldAdder.h index bffee15731a24711405afab296683ba4d5ed29c5..9d8d5a2081ac012db519d293beb16e20fcbd2f87 100644 --- a/src/pe_coupling/discrete_particle_methods/utility/AveragedInteractionForceFieldToForceFieldAdder.h +++ b/src/pe_coupling/discrete_particle_methods/utility/AveragedInteractionForceFieldToForceFieldAdder.h @@ -48,7 +48,7 @@ using math::Vector3; class AveragedInteractionForceFieldToForceFieldAdder { public: - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField_T; + using ForceField_T = GhostLayerField<Vector3<real_t>, 1>; AveragedInteractionForceFieldToForceFieldAdder( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & forceFieldID, const ConstBlockDataID & interactionForceFieldID, uint_t maximumAveragingSteps ) diff --git a/src/pe_coupling/discrete_particle_methods/utility/BodyVelocityInitializer.h b/src/pe_coupling/discrete_particle_methods/utility/BodyVelocityInitializer.h index 6ff059c619d50779203ae57d7bba4babbee82d1b..575f4cec859840fc248138e4d203b3b5a2a9e437 100644 --- a/src/pe_coupling/discrete_particle_methods/utility/BodyVelocityInitializer.h +++ b/src/pe_coupling/discrete_particle_methods/utility/BodyVelocityInitializer.h @@ -60,8 +60,8 @@ class BodyVelocityInitializer public: - typedef GhostLayerField< Vector3<real_t>, 1> Vec3Field_T; - typedef FieldInterpolator_T<Vec3Field_T, FlagField_T> Vec3FieldInterpolator_T; + using Vec3Field_T = GhostLayerField<Vector3<real_t>, 1>; + using Vec3FieldInterpolator_T = FieldInterpolator_T<Vec3Field_T, FlagField_T>; BodyVelocityInitializer( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & bodyStorageID, const BlockDataID & flagFieldID, const Set< FlagUID > & domainFlags, diff --git a/src/pe_coupling/discrete_particle_methods/utility/ExternalForceToForceFieldAdder.h b/src/pe_coupling/discrete_particle_methods/utility/ExternalForceToForceFieldAdder.h index f5e27bc315afe6fd349eb52c1438772b4c7e496b..b833cae930cdee1b120b3ac40e95daa5b397e10d 100644 --- a/src/pe_coupling/discrete_particle_methods/utility/ExternalForceToForceFieldAdder.h +++ b/src/pe_coupling/discrete_particle_methods/utility/ExternalForceToForceFieldAdder.h @@ -39,7 +39,7 @@ using math::Vector3; class ExternalForceToForceFieldAdder { public: - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField_T; + using ForceField_T = GhostLayerField<Vector3<real_t>, 1>; ExternalForceToForceFieldAdder( const BlockDataID & forceFieldID, const Vector3<real_t> & externalForce ) : forceFieldID_( forceFieldID ), externalForce_( externalForce ) diff --git a/src/pe_coupling/discrete_particle_methods/utility/ForceFieldResetter.h b/src/pe_coupling/discrete_particle_methods/utility/ForceFieldResetter.h index d58e30d51e2abe08298ba3b688b4cc909c124a28..17278887e1d18dd546ece9ba27511971f240e728 100644 --- a/src/pe_coupling/discrete_particle_methods/utility/ForceFieldResetter.h +++ b/src/pe_coupling/discrete_particle_methods/utility/ForceFieldResetter.h @@ -36,7 +36,7 @@ using math::Vector3; class ForceFieldResetter { public: - typedef GhostLayerField< Vector3<real_t>, 1 > ForceField_T; + using ForceField_T = GhostLayerField<Vector3<real_t>, 1>; ForceFieldResetter( const BlockDataID & forceFieldID ) : forceFieldID_( forceFieldID ) diff --git a/src/pe_coupling/momentum_exchange_method/BodyMapping.h b/src/pe_coupling/momentum_exchange_method/BodyMapping.h index 96cfd127602147cd22489767e35d0d9ea0b0b7b2..c3addc45724c71c6c1cc052dcefb62d7e83020f2 100644 --- a/src/pe_coupling/momentum_exchange_method/BodyMapping.h +++ b/src/pe_coupling/momentum_exchange_method/BodyMapping.h @@ -61,10 +61,10 @@ class BodyMapping { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef typename BoundaryHandling_T::FlagField FlagField_T; - typedef typename BoundaryHandling_T::flag_t flag_t; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using FlagField_T = typename BoundaryHandling_T::FlagField; + using flag_t = typename BoundaryHandling_T::flag_t; + using BodyField_T = Field<pe::BodyID, 1>; BodyMapping( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & pdfFieldID, @@ -250,7 +250,7 @@ template< typename BoundaryHandling_T > void mapMovingBody( pe::BodyID body, IBlock & block, StructuredBlockStorage & blockStorage, const BlockDataID & boundaryHandlingID, const BlockDataID & bodyFieldID, const FlagUID & obstacle ) { - typedef Field< pe::BodyID, 1 > BodyField_T; + using BodyField_T = Field<pe::BodyID, 1>; WALBERLA_ASSERT_EQUAL( &block.getBlockStorage(), &(blockStorage.getBlockStorage()) ); diff --git a/src/pe_coupling/momentum_exchange_method/boundary/CurvedLinear.h b/src/pe_coupling/momentum_exchange_method/boundary/CurvedLinear.h index 05fee404db1b0cb47a1d1a28216ee7de481dca1d..41dcdf79a3b14df14a9aa2e1b92a4a0ed342f4ba 100644 --- a/src/pe_coupling/momentum_exchange_method/boundary/CurvedLinear.h +++ b/src/pe_coupling/momentum_exchange_method/boundary/CurvedLinear.h @@ -64,10 +64,10 @@ namespace pe_coupling { template< typename LatticeModel_T, typename FlagField_T > class CurvedLinear : public Boundary< typename FlagField_T::flag_t > { - typedef lbm::PdfField< LatticeModel_T > PDFField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; - typedef typename FlagField_T::flag_t flag_t; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PDFField_T = lbm::PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; + using flag_t = typename FlagField_T::flag_t; + using BodyField_T = Field<pe::BodyID, 1>; public: diff --git a/src/pe_coupling/momentum_exchange_method/boundary/CurvedQuadratic.h b/src/pe_coupling/momentum_exchange_method/boundary/CurvedQuadratic.h index 3ba15e91923e1a2034d3e21ae8c148aee47e8f64..4e5e4f9b4ddd8bb4fe2f6b72342a7383153ed506 100644 --- a/src/pe_coupling/momentum_exchange_method/boundary/CurvedQuadratic.h +++ b/src/pe_coupling/momentum_exchange_method/boundary/CurvedQuadratic.h @@ -75,10 +75,10 @@ class CurvedQuadratic : public Boundary< typename FlagField_T::flag_t > { static_assert( (std::is_same< typename LatticeModel_T::CollisionModel::tag, lbm::collision_model::TRT_tag >::value), "Only works with TRT!" ); // to access lambda_d - typedef lbm::PdfField< LatticeModel_T > PDFField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; - typedef typename FlagField_T::flag_t flag_t; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PDFField_T = lbm::PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; + using flag_t = typename FlagField_T::flag_t; + using BodyField_T = Field<pe::BodyID, 1>; public: diff --git a/src/pe_coupling/momentum_exchange_method/boundary/SimpleBB.h b/src/pe_coupling/momentum_exchange_method/boundary/SimpleBB.h index 0d7af9d9ae3f9817147bbfdf4ed294c8f85ac848..d3ee85dec238d013089bbaabe865a8e0555c2450 100644 --- a/src/pe_coupling/momentum_exchange_method/boundary/SimpleBB.h +++ b/src/pe_coupling/momentum_exchange_method/boundary/SimpleBB.h @@ -59,11 +59,11 @@ namespace pe_coupling { template< typename LatticeModel_T, typename FlagField_T > class SimpleBB : public Boundary< typename FlagField_T::flag_t > { - typedef lbm::PdfField< LatticeModel_T > PDFField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; - typedef typename FlagField_T::flag_t flag_t; + using PDFField_T = lbm::PdfField<LatticeModel_T>; + using Stencil_T = typename LatticeModel_T::Stencil; + using flag_t = typename FlagField_T::flag_t; - typedef Field< pe::BodyID, 1 > BodyField; + using BodyField = Field<pe::BodyID, 1>; public: diff --git a/src/pe_coupling/momentum_exchange_method/destruction/Destroyer.h b/src/pe_coupling/momentum_exchange_method/destruction/Destroyer.h index 68d9ae2a3a3c6fdb3a903181c5243e4ff24cd9aa..f1f5a366c3d480079757a1a234f71b2f75f02bdf 100644 --- a/src/pe_coupling/momentum_exchange_method/destruction/Destroyer.h +++ b/src/pe_coupling/momentum_exchange_method/destruction/Destroyer.h @@ -33,7 +33,7 @@ class NaNDestroyer { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; void operator()( const cell_idx_t & x, const cell_idx_t & y, const cell_idx_t & z, IBlock * const /*block*/, PdfField_T * const pdfField ) { for (auto d = uint_t(0); d < LatticeModel_T::Stencil::Size; ++d) diff --git a/src/pe_coupling/momentum_exchange_method/restoration/ExtrapolationDirectionFinder.h b/src/pe_coupling/momentum_exchange_method/restoration/ExtrapolationDirectionFinder.h index 7e9968d83b16e7070931e6be79f7e79a92efba53..1cdab1b9c50d52d2be5a2ccdacfce395e170d073 100644 --- a/src/pe_coupling/momentum_exchange_method/restoration/ExtrapolationDirectionFinder.h +++ b/src/pe_coupling/momentum_exchange_method/restoration/ExtrapolationDirectionFinder.h @@ -118,7 +118,7 @@ class SphereNormalExtrapolationDirectionFinder { public: - typedef Field< pe::BodyID, 1 > BodyField_T; + using BodyField_T = Field<pe::BodyID, 1>; SphereNormalExtrapolationDirectionFinder( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & bodyFieldID ) : blockStorage_( blockStorage ), bodyFieldID_( bodyFieldID ) diff --git a/src/pe_coupling/momentum_exchange_method/restoration/PDFReconstruction.h b/src/pe_coupling/momentum_exchange_method/restoration/PDFReconstruction.h index 0d6dcfe12768327003ee06bbb17a9b4fba69278f..6de45fbca37be5c7315311469438c4df5b65c9e9 100644 --- a/src/pe_coupling/momentum_exchange_method/restoration/PDFReconstruction.h +++ b/src/pe_coupling/momentum_exchange_method/restoration/PDFReconstruction.h @@ -60,10 +60,10 @@ class PDFReconstruction { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef typename BoundaryHandling_T::FlagField FlagField_T; - typedef typename BoundaryHandling_T::flag_t flag_t; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using FlagField_T = typename BoundaryHandling_T::FlagField; + using flag_t = typename BoundaryHandling_T::flag_t; + using BodyField_T = Field<pe::BodyID, 1>; inline PDFReconstruction( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & pdfFieldID, diff --git a/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h b/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h index ad2b8adfac23e84cda40401867b158d31814d50c..c8ebb191f06d8ab16e3173a8d4e9591717add806 100644 --- a/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h +++ b/src/pe_coupling/momentum_exchange_method/restoration/Reconstructor.h @@ -73,8 +73,8 @@ class EquilibriumReconstructor { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using BodyField_T = Field<pe::BodyID, 1>; EquilibriumReconstructor( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & boundaryHandlingID, const BlockDataID & bodyFieldID ) @@ -168,8 +168,8 @@ class EquilibriumAndNonEquilibriumReconstructor { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using BodyField_T = Field<pe::BodyID, 1>; EquilibriumAndNonEquilibriumReconstructor( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & boundaryHandlingID, const BlockDataID & bodyFieldID, @@ -259,8 +259,8 @@ class ExtrapolationReconstructor { public: - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef Field< pe::BodyID, 1 > BodyField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using BodyField_T = Field<pe::BodyID, 1>; ExtrapolationReconstructor( const shared_ptr<StructuredBlockStorage> & blockStorage, const BlockDataID & boundaryHandlingID, const BlockDataID & bodyFieldID, diff --git a/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp b/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp index d0d36a921672c5cc6793d4e1bc6739dc08b444e4..9d6511d4d69502d07115d5c15cf673cc1ccf624b 100644 --- a/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp +++ b/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.cpp @@ -35,8 +35,8 @@ namespace pe_coupling { void mapPSMBodyAndVolumeFraction( const pe::BodyID body, IBlock & block, StructuredBlockStorage & blockStorage, const BlockDataID bodyAndVolumeFractionFieldID ) { - typedef std::pair< pe::BodyID, real_t > BodyAndVolumeFraction_T; - typedef GhostLayerField< std::vector< BodyAndVolumeFraction_T >, 1 > BodyAndVolumeFractionField_T; + using BodyAndVolumeFraction_T = std::pair<pe::BodyID, real_t>; + using BodyAndVolumeFractionField_T = GhostLayerField<std::vector<BodyAndVolumeFraction_T>, 1>; BodyAndVolumeFractionField_T * bodyAndVolumeFractionField = block.getData< BodyAndVolumeFractionField_T >( bodyAndVolumeFractionFieldID ); WALBERLA_ASSERT_NOT_NULLPTR( bodyAndVolumeFractionField ); diff --git a/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.h b/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.h index 59fb85590fd9db424523e3f2c6cf6db0d9d84bef..56faedf94759b7aa528c27ee4d2685fa41dfccd4 100644 --- a/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.h +++ b/src/pe_coupling/partially_saturated_cells_method/BodyAndVolumeFractionMapping.h @@ -66,8 +66,8 @@ class BodyAndVolumeFractionMapping { public: - typedef std::pair< pe::BodyID, real_t > BodyAndVolumeFraction_T; - typedef GhostLayerField< std::vector< BodyAndVolumeFraction_T >, 1 > BodyAndVolumeFractionField_T; + using BodyAndVolumeFraction_T = std::pair<pe::BodyID, real_t>; + using BodyAndVolumeFractionField_T = GhostLayerField<std::vector<BodyAndVolumeFraction_T>, 1>; BodyAndVolumeFractionMapping( const shared_ptr<StructuredBlockStorage> & blockStorage, const shared_ptr<pe::BodyStorage> & globalBodyStorage, diff --git a/src/pe_coupling/partially_saturated_cells_method/PSMSweep.h b/src/pe_coupling/partially_saturated_cells_method/PSMSweep.h index 66992d54d1b0298efee12c172ad833b45452c02d..2b326f116aac44498e61010ae8a2987e8c212505 100644 --- a/src/pe_coupling/partially_saturated_cells_method/PSMSweep.h +++ b/src/pe_coupling/partially_saturated_cells_method/PSMSweep.h @@ -66,10 +66,10 @@ class PSMSweep { public: - typedef typename lbm::SweepBase< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T >::PdfField_T PdfField_T; - typedef typename LatticeModel_T::Stencil Stencil_T; - typedef std::pair< pe::BodyID, real_t > BodyAndVolumeFraction_T; - typedef Field< std::vector< BodyAndVolumeFraction_T >, 1 > BodyAndVolumeFractionField_T; + using PdfField_T = typename lbm::SweepBase<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T>::PdfField_T; + using Stencil_T = typename LatticeModel_T::Stencil; + using BodyAndVolumeFraction_T = std::pair<pe::BodyID, real_t>; + using BodyAndVolumeFractionField_T = Field<std::vector<BodyAndVolumeFraction_T>, 1>; PSMSweep( const BlockDataID & pdfFieldID, const BlockDataID & bodyAndVolumeFractionFieldID, @@ -441,7 +441,7 @@ shared_ptr< PSMSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelo makePSMSweep( const BlockDataID & pdfFieldID, const BlockDataID & bodyAndVolumeFractionFieldID, const shared_ptr<StructuredBlockStorage> & blockStorage, const Filter_T & filter, const DensityVelocityIn_T & densityVelocityIn, const DensityVelocityOut_T & densityVelocityOut ) { - typedef PSMSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T, SolidCollision_T, Weighting_T > PSMS_T; + using PSMS_T = PSMSweep<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T, SolidCollision_T, Weighting_T>; return shared_ptr< PSMS_T >( new PSMS_T( pdfFieldID, bodyAndVolumeFractionFieldID, blockStorage, filter, densityVelocityIn, densityVelocityOut ) ); } @@ -450,7 +450,7 @@ shared_ptr< PSMSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelo makePSMSweep( const BlockDataID & srcID, const BlockDataID & dstID, const BlockDataID & bodyAndVolumeFractionFieldID, const shared_ptr<StructuredBlockStorage> & blockStorage, const Filter_T & filter, const DensityVelocityIn_T & densityVelocityIn, const DensityVelocityOut_T & densityVelocityOut ) { - typedef PSMSweep< LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T, SolidCollision_T, Weighting_T > PSMS_T; + using PSMS_T = PSMSweep<LatticeModel_T, Filter_T, DensityVelocityIn_T, DensityVelocityOut_T, SolidCollision_T, Weighting_T>; return shared_ptr< PSMS_T >( new PSMS_T( srcID, dstID, bodyAndVolumeFractionFieldID, blockStorage, filter, densityVelocityIn, densityVelocityOut ) ); } diff --git a/src/pe_coupling/partially_saturated_cells_method/PSMUtility.h b/src/pe_coupling/partially_saturated_cells_method/PSMUtility.h index e39c3b7b227a252f5e45b96e23d591eb717ad2aa..b78a4e45f94dcbe31c2741ebadc55e27ebcbb4c6 100644 --- a/src/pe_coupling/partially_saturated_cells_method/PSMUtility.h +++ b/src/pe_coupling/partially_saturated_cells_method/PSMUtility.h @@ -92,9 +92,9 @@ template < typename LatticeModel_T, int Weighting_T > void initializeDomainForPSM( StructuredBlockStorage & blockStorage, const BlockDataID & pdfFieldID, const BlockDataID & bodyAndVolumeFractionFieldID ) { - typedef lbm::PdfField< LatticeModel_T > PdfField_T; - typedef std::pair< pe::BodyID, real_t > BodyAndVolumeFraction_T; - typedef GhostLayerField< std::vector< BodyAndVolumeFraction_T >, 1 > BodyAndVolumeFractionField_T; + using PdfField_T = lbm::PdfField<LatticeModel_T>; + using BodyAndVolumeFraction_T = std::pair<pe::BodyID, real_t>; + using BodyAndVolumeFractionField_T = GhostLayerField<std::vector<BodyAndVolumeFraction_T>, 1>; // iterate all blocks with an iterator 'block' for( auto blockIt = blockStorage.begin(); blockIt != blockStorage.end(); ++blockIt ) diff --git a/src/pe_coupling/utility/BodiesForceTorqueContainer.h b/src/pe_coupling/utility/BodiesForceTorqueContainer.h index b18d4ec0dd655a6c85648e4676a677850a5249ee..72f6dcc2c9a1bf5298110b8983d0407f9c3f5ba6 100644 --- a/src/pe_coupling/utility/BodiesForceTorqueContainer.h +++ b/src/pe_coupling/utility/BodiesForceTorqueContainer.h @@ -34,7 +34,7 @@ class BodiesForceTorqueContainer { public: - typedef std::map< walberla::id_t, std::array<real_t,6> > ForceTorqueStorage_T; + using ForceTorqueStorage_T = std::map<walberla::id_t, std::array<real_t, 6>>; BodiesForceTorqueContainer( const shared_ptr<StructuredBlockForest> & blockForest, const BlockDataID & bodyStorageID, const std::function<bool( pe::BodyID)> &bodySelectorFct = selectRegularBodies) diff --git a/src/postprocessing/MarchingCubes.impl.h b/src/postprocessing/MarchingCubes.impl.h index 6f4538742a7368703e0a186a70df95b344b1c50d..29f22544f82f2a01eb6196aad0b1c215405b85ff 100644 --- a/src/postprocessing/MarchingCubes.impl.h +++ b/src/postprocessing/MarchingCubes.impl.h @@ -378,7 +378,7 @@ void generateIsoSurface_internal( const Field_T & f, real_t threshold, - typedef Vector3<real_t> RealVec3; + using RealVec3 = Vector3<real_t>; // the field store for every edge the index of the vertex that was computed on it // or -1 for "not yet computed" diff --git a/src/stencil/D2CornerStencil.h b/src/stencil/D2CornerStencil.h index 574da37bc28cdd0e8f678d03d16d23da58e6be34..9d1716100079943e2229f7418c0c47c0ad2ebc3d 100644 --- a/src/stencil/D2CornerStencil.h +++ b/src/stencil/D2CornerStencil.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D2CornerStencil> iterator; + using iterator = stencil::Iterator<D2CornerStencil>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D2CornerStencil<> D2CornerStencil; + using D2CornerStencil = internal::D2CornerStencil<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D2Q4.h b/src/stencil/D2Q4.h index 26131a49ac1407e0c0000ee7d64b2c517937113e..9c1f9b7b7f6da572bdb1f7d88963ec0ee94d19da 100644 --- a/src/stencil/D2Q4.h +++ b/src/stencil/D2Q4.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D2Q4> iterator; + using iterator = stencil::Iterator<D2Q4>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D2Q4<> D2Q4; + using D2Q4 = internal::D2Q4<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D2Q5.h b/src/stencil/D2Q5.h index 8547a4747508e87075aaaa102ec3851ab7da929f..98cfbb0099d1cfdbee82a3ff74c5b5b6d50de15c 100644 --- a/src/stencil/D2Q5.h +++ b/src/stencil/D2Q5.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D2Q5> iterator; + using iterator = stencil::Iterator<D2Q5>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D2Q5<> D2Q5; + using D2Q5 = internal::D2Q5<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D2Q9.h b/src/stencil/D2Q9.h index 4e79ab2feba545ae2640564710c8bd35986215f4..4c3dc0cd9948536a4d13473b57a04dd63f928365 100644 --- a/src/stencil/D2Q9.h +++ b/src/stencil/D2Q9.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D2Q9> iterator; + using iterator = stencil::Iterator<D2Q9>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D2Q9<> D2Q9; + using D2Q9 = internal::D2Q9<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3CornerStencil.h b/src/stencil/D3CornerStencil.h index 21ba0f491b9fafa388ab85bd440bf3ae6c8df0ac..b234a89d09776919e0c008391cd699ef72a2b9ef 100644 --- a/src/stencil/D3CornerStencil.h +++ b/src/stencil/D3CornerStencil.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3CornerStencil> iterator; + using iterator = stencil::Iterator<D3CornerStencil>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3CornerStencil<> D3CornerStencil; + using D3CornerStencil = internal::D3CornerStencil<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3EdgeCornerStencil.h b/src/stencil/D3EdgeCornerStencil.h index 8e1045b25fb97108edb9d8877f1cf6da810d50ad..e3e6a2832a025c39d9427cd14234ba3910fd5df5 100644 --- a/src/stencil/D3EdgeCornerStencil.h +++ b/src/stencil/D3EdgeCornerStencil.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3EdgeCornerStencil> iterator; + using iterator = stencil::Iterator<D3EdgeCornerStencil>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3EdgeCornerStencil<> D3EdgeCornerStencil; + using D3EdgeCornerStencil = internal::D3EdgeCornerStencil<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3Q15.h b/src/stencil/D3Q15.h index ba7fecb5c5f9eb499955ae2379345836bf5bf9a1..896c8c49b912752204af227920e53e56ba42a798 100644 --- a/src/stencil/D3Q15.h +++ b/src/stencil/D3Q15.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3Q15> iterator; + using iterator = stencil::Iterator<D3Q15>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3Q15<> D3Q15; + using D3Q15 = internal::D3Q15<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3Q19.h b/src/stencil/D3Q19.h index 0d4ca0fb87a334d496c2d99549769527a7c68a09..a7a520f69b4cd2d59e6b03f9ceffa186e5c5bb5a 100644 --- a/src/stencil/D3Q19.h +++ b/src/stencil/D3Q19.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3Q19> iterator; + using iterator = stencil::Iterator<D3Q19>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3Q19<> D3Q19; + using D3Q19 = internal::D3Q19<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3Q27.h b/src/stencil/D3Q27.h index 644ba99fe3a7fa570ec6cc21afc83b57cbb0a079..6ba403bd579e77ecc6b324538eeaa44e83ad64ad 100644 --- a/src/stencil/D3Q27.h +++ b/src/stencil/D3Q27.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3Q27> iterator; + using iterator = stencil::Iterator<D3Q27>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3Q27<> D3Q27; + using D3Q27 = internal::D3Q27<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3Q6.h b/src/stencil/D3Q6.h index 5567a7d79ce80fcb395094b4ea1543efd706f533..8b9f81d3ad1cea8de9ca2991a1de327514d90699 100644 --- a/src/stencil/D3Q6.h +++ b/src/stencil/D3Q6.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3Q6> iterator; + using iterator = stencil::Iterator<D3Q6>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3Q6<> D3Q6; + using D3Q6 = internal::D3Q6<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/D3Q7.h b/src/stencil/D3Q7.h index 672afa9e8240a1772008430ab52fdd6e17104fb9..8e14c9b001d47f384c466c5bd7e0c9a60775581e 100644 --- a/src/stencil/D3Q7.h +++ b/src/stencil/D3Q7.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<D3Q7> iterator; + using iterator = stencil::Iterator<D3Q7>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::D3Q7<> D3Q7; + using D3Q7 = internal::D3Q7<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/EdgeStencil.h b/src/stencil/EdgeStencil.h index fb35bd94831996a3b8bc8a5272c93f68d3f9ed84..1c4982c995ffa520a81cdf22ff0442dc30ff1bd6 100644 --- a/src/stencil/EdgeStencil.h +++ b/src/stencil/EdgeStencil.h @@ -88,7 +88,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<EdgeStencil> iterator; + using iterator = stencil::Iterator<EdgeStencil>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -239,7 +239,7 @@ namespace stencil { } // namespace internal - typedef internal::EdgeStencil<> EdgeStencil; + using EdgeStencil = internal::EdgeStencil<>; } // namespace stencil } // namespace walberla diff --git a/src/timeloop/PerformanceMeter.cpp b/src/timeloop/PerformanceMeter.cpp index d7986320312cac1969331a2a8678821d09960873..98a6fc350569c876ce9440ef205d90e35be3819c 100644 --- a/src/timeloop/PerformanceMeter.cpp +++ b/src/timeloop/PerformanceMeter.cpp @@ -179,7 +179,7 @@ namespace timeloop { *******************************************************************************************************************/ shared_ptr< std::map<std::string, real_t> > PerformanceMeter::getReduced ( int targetRank ) { - typedef std::map<std::string, real_t> ResultMap; + using ResultMap = std::map<std::string, real_t>; shared_ptr < ResultMap > res; std::vector<real_t> totalNrCells; diff --git a/src/timeloop/PerformanceMeter.h b/src/timeloop/PerformanceMeter.h index 0efac6514774670b2efae9f08274be25a3e4ebb0..e5ccee05930623e27b390692df8f8606da2b4c35 100644 --- a/src/timeloop/PerformanceMeter.h +++ b/src/timeloop/PerformanceMeter.h @@ -70,7 +70,7 @@ namespace timeloop { class PerformanceMeter { public: - typedef std::function< uint_t(const IBlock &) > CountFunction; + using CountFunction = std::function<uint_t (const IBlock &)>; PerformanceMeter( StructuredBlockStorage & blockStorage ); diff --git a/src/timeloop/SelectableFunctionCreators.h b/src/timeloop/SelectableFunctionCreators.h index e3a29325cab6d0b78b17c96e94a686b792c073eb..965faf62731b49e438a85fe8ab5148e9be61fe28 100644 --- a/src/timeloop/SelectableFunctionCreators.h +++ b/src/timeloop/SelectableFunctionCreators.h @@ -128,7 +128,7 @@ namespace timeloop { Set<SUID> incompatibleSelectors_; }; - typedef FuncCreator<void (IBlock*) > Sweep; + using Sweep = FuncCreator<void (IBlock *)>; template<typename SweepClass> diff --git a/src/timeloop/Timeloop.h b/src/timeloop/Timeloop.h index f1430ec63778173d0f6248ca9410763697695fa1..48b7de6ce88342e04c7aac2472f09fd6b566773f 100644 --- a/src/timeloop/Timeloop.h +++ b/src/timeloop/Timeloop.h @@ -36,7 +36,7 @@ namespace walberla { namespace timeloop { -typedef std::function<void ()> VoidFctNoArguments; +using VoidFctNoArguments = std::function<void ()>; //******************************************************************************************************************* @@ -140,7 +140,7 @@ public: //** Registration Functions ************************************************************************************** /*! \name Registration Functions */ //@{ - typedef size_t FctHandle; + using FctHandle = size_t; FctHandle addFuncBeforeTimeStep(const VoidFctNoArguments & f, @@ -198,7 +198,7 @@ protected: uint_t curTimeStep_; ///< current time step uint_t nrOfTimeSteps_; ///< total number of time steps - typedef selectable::SetSelectableObject<VoidFctNoArguments, SUID> SelectableFunc; + using SelectableFunc = selectable::SetSelectableObject<VoidFctNoArguments, SUID>; std::vector<SelectableFunc> beforeFunctions_; std::vector<SelectableFunc> afterFunctions_; diff --git a/src/vtk/BlockCellDataWriter.h b/src/vtk/BlockCellDataWriter.h index cac2599c72c83cda8dcdf8820448813b8221d8ea..877b5543b5905a34813febd98c90ff76a81ddf9a 100644 --- a/src/vtk/BlockCellDataWriter.h +++ b/src/vtk/BlockCellDataWriter.h @@ -197,7 +197,7 @@ inline void BlockCellDataWriter::push( Base64Writer& b64, const cell_idx_t x, co } // namespace internal -typedef internal::BlockCellDataWriter BlockCellDataWriterInterface; +using BlockCellDataWriterInterface = internal::BlockCellDataWriter; @@ -219,7 +219,7 @@ class BlockCellDataWriter : public BlockCellDataWriterInterface public: - typedef T value_type; + using value_type = T; static const uint_t F_SIZE = F_SIZE_ARG; @@ -285,7 +285,7 @@ template< typename T > class BlockCellDataWriterScalingAdapter : public T { public: - typedef typename T::value_type value_type; + using value_type = typename T::value_type; static const uint_t F_SIZE = T::F_SIZE; BlockCellDataWriterScalingAdapter( const std::string& id, const T & base, value_type factor ) diff --git a/src/vtk/ChainedFilter.h b/src/vtk/ChainedFilter.h index 573fff5c160854ac95cc72880f3b2c192c8e82c6..187486a7459089f44647bcb9935846b1f6544fd8 100644 --- a/src/vtk/ChainedFilter.h +++ b/src/vtk/ChainedFilter.h @@ -37,7 +37,7 @@ class ChainedFilter { public: - typedef std::function< void ( CellSet& filteredCells, const IBlock& block, const StructuredBlockStorage& storage, const uint_t ghostLayers ) > CellFilter; + using CellFilter = std::function<void (CellSet &, const IBlock &, const StructuredBlockStorage &, const uint_t)>; void addFilter( const CellFilter& filter ) { filters_.push_back( filter ); } diff --git a/src/vtk/Initialization.h b/src/vtk/Initialization.h index 50fd523c360e25eaaaf1004d25e4bd8f942fad24..43304eac26ce9b0cb1a1b30c0c6246634079018f 100644 --- a/src/vtk/Initialization.h +++ b/src/vtk/Initialization.h @@ -37,7 +37,7 @@ namespace vtk { // For documentation see the documentation of function "initializeVTKOutput" in Initialization.cpp -typedef std::function< void () > OutputFunction; +using OutputFunction = std::function<void ()>; struct SelectableOutputFunction { @@ -76,9 +76,7 @@ void initializeVTKOutput( std::map< std::string, SelectableOutputFunction > & ou const std::map< std::string, VTKOutput::CellFilter > & filters, const std::map< std::string, VTKOutput::BeforeFunction > & beforeFunctions ); -typedef std::function< void ( std::vector< shared_ptr< BlockCellDataWriterInterface > > & writers, - std::map< std::string, VTKOutput::CellFilter > & filters, - std::map< std::string, VTKOutput::BeforeFunction > & beforeFunctions ) > RegisterVTKOutputFunction; +using RegisterVTKOutputFunction = std::function<void (std::vector<shared_ptr<BlockCellDataWriterInterface>> &, std::map<std::string, VTKOutput::CellFilter> &, std::map<std::string, VTKOutput::BeforeFunction> &)>; void initializeVTKOutput( std::map< std::string, SelectableOutputFunction > & outputFunctions, const RegisterVTKOutputFunction& registerVTKOutputFunction, const shared_ptr< const StructuredBlockStorage > & storage, const shared_ptr< Config > & config, diff --git a/src/vtk/PolylineDataSource.h b/src/vtk/PolylineDataSource.h index c3b39a18d806cec201e736dc9f2ea5aadf184091..af4b8dbafa9bb9877d08b7041a76313be4235102 100644 --- a/src/vtk/PolylineDataSource.h +++ b/src/vtk/PolylineDataSource.h @@ -49,7 +49,7 @@ public: uint_t components; }; - typedef std::vector< Vector3< real_t > > Polyline; + using Polyline = std::vector<Vector3<real_t>>; virtual ~PolylineDataSource() = default; diff --git a/src/vtk/VTKOutput.h b/src/vtk/VTKOutput.h index dc36ae003f322ac667f64d8e0d24041705e1fe67..d90586b5ca9d3cb5bf516733e4be98254a015768 100644 --- a/src/vtk/VTKOutput.h +++ b/src/vtk/VTKOutput.h @@ -52,12 +52,12 @@ class VTKOutput : public NonCopyable { private: class VTKGEN : public uid::IndexGenerator< VTKGEN, size_t >{}; - typedef UID< VTKGEN > VTKUID; + using VTKUID = UID<VTKGEN>; // types used during vertex-index mapping procedure when writing (P)VTU files - typedef std::tuple< cell_idx_t, cell_idx_t, cell_idx_t > Vertex; - typedef std::tuple< real_t, real_t, real_t > VertexCoord; - typedef int32_t Index; + using Vertex = std::tuple<cell_idx_t, cell_idx_t, cell_idx_t>; + using VertexCoord = std::tuple<real_t, real_t, real_t>; + using Index = int32_t; struct VertexCompare { bool operator()( const Vertex& lhs, const Vertex& rhs ) const @@ -141,9 +141,8 @@ public: const bool continuousNumbering, const bool binary, const bool littleEndian, const bool useMPIIO, const uint_t initialExecutionCount ); - typedef std::function< void () > BeforeFunction; - typedef std::function< void ( CellSet& filteredCells, const IBlock& block, - const StructuredBlockStorage& storage, const uint_t ghostLayers ) > CellFilter; + using BeforeFunction = std::function<void ()>; + using CellFilter = std::function<void (CellSet &, const IBlock &, const StructuredBlockStorage &, const uint_t)>; ~VTKOutput();