From ac4f310e18109efa414d473c9688ae94a00b2f8a Mon Sep 17 00:00:00 2001 From: Dave Moxey <d.moxey@imperial.ac.uk> Date: Mon, 13 Nov 2023 09:58:08 +0000 Subject: [PATCH] Add clang-tidy to implement some C++17 language features --- .clang-format | 2 +- .clang-tidy | 6 + .gitignore | 1 + .gitlab-ci.yml | 38 +- .gitlab-ci/build-and-test.sh | 24 +- CHANGELOG.md | 2 + CMakeLists.txt | 7 +- cmake/ThirdPartyArpack.cmake | 2 + cmake/ThirdPartyBlasLapack.cmake | 2 + cmake/ThirdPartyBoost.cmake | 1 + cmake/ThirdPartyCCM.cmake | 2 + cmake/ThirdPartyCwipi.cmake | 10 +- cmake/ThirdPartyFFTW.cmake | 2 + cmake/ThirdPartyHDF5.cmake | 2 + cmake/ThirdPartyMPI.cmake | 2 + cmake/ThirdPartyMetis.cmake | 2 + cmake/ThirdPartyOCE.cmake | 2 + cmake/ThirdPartyPETSc.cmake | 2 + cmake/ThirdPartyPython.cmake | 2 + cmake/ThirdPartyScotch.cmake | 2 + cmake/ThirdPartyTetGen.cmake | 2 + cmake/ThirdPartyTinyxml.cmake | 2 + cmake/ThirdPartyTriangle.cmake | 2 + cmake/ThirdPartyVTK.cmake | 1 + cmake/ThirdPartyZlib.cmake | 2 + docker/nektar-env/jammy_default_packages.txt | 4 + library/Collections/BwdTrans.cpp | 82 ++-- library/Collections/CoalescedGeomData.cpp | 7 +- library/Collections/CoalescedGeomData.h | 7 +- library/Collections/Collection.cpp | 7 +- library/Collections/Collection.h | 7 +- .../Collections/CollectionOptimisation.cpp | 7 +- library/Collections/CollectionOptimisation.h | 7 +- library/Collections/Helmholtz.cpp | 31 +- library/Collections/IProduct.cpp | 7 +- library/Collections/IProduct.h | 7 +- library/Collections/IProductWRTBase.cpp | 103 ++--- library/Collections/IProductWRTDerivBase.cpp | 95 ++-- library/Collections/MatrixFreeBase.h | 7 +- library/Collections/Operator.cpp | 7 +- library/Collections/Operator.h | 8 +- library/Collections/PhysDeriv.cpp | 95 ++-- library/Demos/LibUtilities/ErrorStream.cpp | 2 +- .../Demos/LibUtilities/FieldIOBenchmarker.cpp | 4 + library/Demos/LibUtilities/NodalDemo.cpp | 2 +- .../LibUtilities/TimeIntegrationDemo.cpp | 28 +- .../Demos/SpatialDomains/PartitionAnalyse.cpp | 6 +- library/FieldUtils/Field.hpp | 7 +- library/FieldUtils/FieldConvertComm.hpp | 19 +- library/FieldUtils/InputModules/InputDat.cpp | 7 +- library/FieldUtils/InputModules/InputDat.h | 17 +- library/FieldUtils/InputModules/InputFld.cpp | 7 +- library/FieldUtils/InputModules/InputFld.h | 17 +- .../FieldUtils/InputModules/InputNek5000.cpp | 7 +- .../FieldUtils/InputModules/InputNek5000.h | 17 +- library/FieldUtils/InputModules/InputPts.cpp | 7 +- library/FieldUtils/InputModules/InputPts.h | 17 +- .../FieldUtils/InputModules/InputSemtex.cpp | 7 +- library/FieldUtils/InputModules/InputSemtex.h | 17 +- library/FieldUtils/InputModules/InputXml.cpp | 7 +- library/FieldUtils/InputModules/InputXml.h | 17 +- library/FieldUtils/Interpolator.cpp | 7 +- library/FieldUtils/Interpolator.h | 7 +- library/FieldUtils/Module.cpp | 7 +- library/FieldUtils/Module.h | 7 +- library/FieldUtils/Octree.cpp | 7 +- library/FieldUtils/Octree.h | 7 +- .../OutputModules/OutputFileBase.cpp | 7 +- .../FieldUtils/OutputModules/OutputFileBase.h | 17 +- .../FieldUtils/OutputModules/OutputFld.cpp | 7 +- library/FieldUtils/OutputModules/OutputFld.h | 24 +- .../FieldUtils/OutputModules/OutputInfo.cpp | 7 +- library/FieldUtils/OutputModules/OutputInfo.h | 17 +- .../FieldUtils/OutputModules/OutputPts.cpp | 7 +- library/FieldUtils/OutputModules/OutputPts.h | 24 +- .../FieldUtils/OutputModules/OutputStdOut.cpp | 7 +- .../FieldUtils/OutputModules/OutputStdOut.h | 17 +- .../OutputModules/OutputTecplot.cpp | 7 +- .../FieldUtils/OutputModules/OutputTecplot.h | 36 +- .../FieldUtils/OutputModules/OutputVtk.cpp | 13 +- library/FieldUtils/OutputModules/OutputVtk.h | 15 +- .../OutputModules/OutputVtkBase.cpp | 33 +- .../FieldUtils/OutputModules/OutputVtkBase.h | 24 +- .../FieldUtils/OutputModules/OutputXml.cpp | 7 +- library/FieldUtils/OutputModules/OutputXml.h | 17 +- .../ProcessModules/ProcessAddCompositeID.cpp | 7 +- .../ProcessModules/ProcessAddCompositeID.h | 17 +- .../ProcessModules/ProcessAddFld.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessAddFld.h | 19 +- .../ProcessModules/ProcessAverageFld.cpp | 7 +- .../ProcessModules/ProcessAverageFld.h | 17 +- .../ProcessBodyFittedVelocity.cpp | 7 +- .../ProcessBodyFittedVelocity.h | 15 +- .../ProcessModules/ProcessBoundaryExtract.cpp | 7 +- .../ProcessModules/ProcessBoundaryExtract.h | 17 +- .../ProcessModules/ProcessC0Projection.cpp | 7 +- .../ProcessModules/ProcessC0Projection.h | 17 +- .../FieldUtils/ProcessModules/ProcessCFL.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessCFL.h | 17 +- .../ProcessModules/ProcessCombineAvg.cpp | 7 +- .../ProcessModules/ProcessCombineAvg.h | 17 +- .../ProcessModules/ProcessConcatenateFld.cpp | 7 +- .../ProcessModules/ProcessConcatenateFld.h | 17 +- .../ProcessModules/ProcessCreateExp.cpp | 7 +- .../ProcessModules/ProcessCreateExp.h | 17 +- .../FieldUtils/ProcessModules/ProcessDOF.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessDOF.h | 17 +- .../ProcessModules/ProcessDeform.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessDeform.h | 17 +- .../ProcessModules/ProcessDisplacement.cpp | 9 +- .../ProcessModules/ProcessDisplacement.h | 15 +- .../ProcessEquiSpacedOutput.cpp | 7 +- .../ProcessModules/ProcessEquiSpacedOutput.h | 17 +- .../ProcessModules/ProcessFieldFromString.cpp | 7 +- .../ProcessModules/ProcessFieldFromString.h | 17 +- .../FieldUtils/ProcessModules/ProcessGrad.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessGrad.h | 17 +- .../ProcessHalfModeToFourier.cpp | 7 +- .../ProcessModules/ProcessHalfModeToFourier.h | 17 +- .../ProcessHomogeneousPlane.cpp | 7 +- .../ProcessModules/ProcessHomogeneousPlane.h | 17 +- .../ProcessHomogeneousStretch.cpp | 7 +- .../ProcessHomogeneousStretch.h | 17 +- .../ProcessModules/ProcessInnerProduct.cpp | 7 +- .../ProcessModules/ProcessInnerProduct.h | 17 +- .../ProcessModules/ProcessInterpField.cpp | 7 +- .../ProcessModules/ProcessInterpField.h | 17 +- .../ProcessInterpPointDataToFld.cpp | 7 +- .../ProcessInterpPointDataToFld.h | 17 +- .../ProcessModules/ProcessInterpPoints.cpp | 7 +- .../ProcessModules/ProcessInterpPoints.h | 17 +- .../ProcessModules/ProcessInterpPtsToPts.cpp | 7 +- .../ProcessModules/ProcessInterpPtsToPts.h | 17 +- .../ProcessModules/ProcessIsoContour.cpp | 13 +- .../ProcessModules/ProcessIsoContour.h | 17 +- .../ProcessModules/ProcessJacobianEnergy.cpp | 7 +- .../ProcessModules/ProcessJacobianEnergy.h | 17 +- .../ProcessModules/ProcessL2Criterion.cpp | 7 +- .../ProcessModules/ProcessL2Criterion.h | 17 +- .../ProcessModules/ProcessMapping.cpp | 7 +- .../ProcessModules/ProcessMapping.h | 17 +- .../FieldUtils/ProcessModules/ProcessMean.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessMean.h | 17 +- .../ProcessModules/ProcessMeanMode.cpp | 7 +- .../ProcessModules/ProcessMeanMode.h | 17 +- .../ProcessModules/ProcessMultiShear.cpp | 7 +- .../ProcessModules/ProcessMultiShear.h | 17 +- .../ProcessModules/ProcessNumModes.cpp | 7 +- .../ProcessModules/ProcessNumModes.h | 17 +- .../ProcessModules/ProcessPhiFromFile.cpp | 7 +- .../ProcessModules/ProcessPhiFromFile.h | 17 +- .../ProcessModules/ProcessPointDataToFld.cpp | 7 +- .../ProcessModules/ProcessPointDataToFld.h | 17 +- .../ProcessModules/ProcessPowerSpectrum.cpp | 7 +- .../ProcessModules/ProcessPowerSpectrum.h | 17 +- .../ProcessModules/ProcessPrintFldNorms.cpp | 7 +- .../ProcessModules/ProcessPrintFldNorms.h | 17 +- .../ProcessModules/ProcessQCriterion.cpp | 7 +- .../ProcessModules/ProcessQCriterion.h | 17 +- .../ProcessModules/ProcessQualityMetric.cpp | 7 +- .../ProcessModules/ProcessQualityMetric.h | 17 +- .../ProcessModules/ProcessRemoveField.cpp | 7 +- .../ProcessModules/ProcessRemoveField.h | 17 +- .../ProcessModules/ProcessScalGrad.cpp | 7 +- .../ProcessModules/ProcessScalGrad.h | 15 +- .../ProcessModules/ProcessScaleInFld.cpp | 7 +- .../ProcessModules/ProcessScaleInFld.h | 17 +- .../ProcessModules/ProcessStreamFunction.cpp | 7 +- .../ProcessModules/ProcessStreamFunction.h | 17 +- .../ProcessModules/ProcessSurfDistance.cpp | 7 +- .../ProcessModules/ProcessSurfDistance.h | 15 +- .../ProcessVelocityDivergence.cpp | 7 +- .../ProcessVelocityDivergence.h | 17 +- .../ProcessModules/ProcessVorticity.cpp | 7 +- .../ProcessModules/ProcessVorticity.h | 17 +- .../FieldUtils/ProcessModules/ProcessWSS.cpp | 7 +- .../FieldUtils/ProcessModules/ProcessWSS.h | 15 +- .../ProcessModules/ProcessWallNormalData.cpp | 7 +- .../ProcessModules/ProcessWallNormalData.h | 15 +- library/FieldUtils/Python/Field.cpp | 2 +- library/FieldUtils/Python/Module.cpp | 4 +- library/GlobalMapping/Deform.cpp | 9 +- library/GlobalMapping/Deform.h | 7 +- library/GlobalMapping/Mapping.cpp | 11 +- library/GlobalMapping/Mapping.h | 7 +- library/GlobalMapping/MappingGeneral.cpp | 7 +- library/GlobalMapping/MappingGeneral.h | 29 +- library/GlobalMapping/MappingTranslation.cpp | 7 +- library/GlobalMapping/MappingTranslation.h | 35 +- library/GlobalMapping/MappingXYofXY.cpp | 7 +- library/GlobalMapping/MappingXYofXY.h | 29 +- library/GlobalMapping/MappingXYofZ.cpp | 7 +- library/GlobalMapping/MappingXYofZ.h | 31 +- library/GlobalMapping/MappingXofXZ.cpp | 7 +- library/GlobalMapping/MappingXofXZ.h | 35 +- library/GlobalMapping/MappingXofZ.cpp | 7 +- library/GlobalMapping/MappingXofZ.h | 35 +- .../BasicConst/GitRevision.cpp.in | 15 +- .../BasicConst/NektarUnivConsts.hpp | 7 +- .../LibUtilities/BasicUtils/CheckedCast.hpp | 7 +- .../LibUtilities/BasicUtils/CompressData.cpp | 7 +- .../LibUtilities/BasicUtils/CompressData.h | 7 +- .../BasicUtils/ConsistentObjectAccess.hpp | 6 +- library/LibUtilities/BasicUtils/CsvIO.cpp | 7 +- library/LibUtilities/BasicUtils/CsvIO.h | 13 +- library/LibUtilities/BasicUtils/DomainRange.h | 8 +- library/LibUtilities/BasicUtils/Equation.cpp | 7 +- library/LibUtilities/BasicUtils/Equation.h | 7 +- library/LibUtilities/BasicUtils/FieldIO.cpp | 7 +- library/LibUtilities/BasicUtils/FieldIO.h | 7 +- .../LibUtilities/BasicUtils/FieldIOHdf5.cpp | 7 +- library/LibUtilities/BasicUtils/FieldIOHdf5.h | 25 +- .../LibUtilities/BasicUtils/FieldIOXml.cpp | 19 +- library/LibUtilities/BasicUtils/FieldIOXml.h | 24 +- .../LibUtilities/BasicUtils/FileSystem.cpp | 7 +- library/LibUtilities/BasicUtils/FileSystem.h | 7 +- library/LibUtilities/BasicUtils/H5.cpp | 28 +- library/LibUtilities/BasicUtils/H5.h | 48 +- .../LibUtilities/BasicUtils/Interpolator.cpp | 7 +- .../LibUtilities/BasicUtils/Interpolator.h | 7 +- .../LibUtilities/BasicUtils/NekFactory.hpp | 7 +- .../LibUtilities/BasicUtils/NekManager.hpp | 7 +- .../LibUtilities/BasicUtils/Progressbar.hpp | 7 +- library/LibUtilities/BasicUtils/PtsField.cpp | 7 +- library/LibUtilities/BasicUtils/PtsField.h | 7 +- library/LibUtilities/BasicUtils/PtsIO.cpp | 9 +- library/LibUtilities/BasicUtils/PtsIO.h | 11 +- .../BasicUtils/RealComparison.hpp | 7 +- .../LibUtilities/BasicUtils/SessionReader.cpp | 23 +- .../LibUtilities/BasicUtils/SessionReader.h | 7 +- library/LibUtilities/BasicUtils/ShapeType.hpp | 7 +- library/LibUtilities/BasicUtils/Thread.cpp | 7 +- library/LibUtilities/BasicUtils/Thread.h | 38 +- .../LibUtilities/BasicUtils/ThreadBoost.cpp | 7 +- library/LibUtilities/BasicUtils/ThreadBoost.h | 35 +- library/LibUtilities/BasicUtils/Timer.cpp | 9 +- library/LibUtilities/BasicUtils/Timer.h | 7 +- library/LibUtilities/BasicUtils/Vmath.cpp | 18 + library/LibUtilities/BasicUtils/VmathSIMD.hpp | 7 +- library/LibUtilities/Communication/Comm.cpp | 7 +- library/LibUtilities/Communication/Comm.h | 11 +- .../LibUtilities/Communication/CommCwipi.cpp | 7 +- .../LibUtilities/Communication/CommCwipi.h | 11 +- .../Communication/CommDataType.cpp | 7 +- .../LibUtilities/Communication/CommDataType.h | 7 +- .../LibUtilities/Communication/CommMpi.cpp | 7 +- library/LibUtilities/Communication/CommMpi.h | 149 +++--- .../LibUtilities/Communication/CommSerial.cpp | 7 +- .../LibUtilities/Communication/CommSerial.h | 187 ++++---- library/LibUtilities/Communication/GsLib.hpp | 4 +- .../Communication/Transposition.cpp | 7 +- .../Communication/Transposition.h | 14 +- library/LibUtilities/FFT/NekFFTW.cpp | 7 +- library/LibUtilities/FFT/NekFFTW.h | 10 +- library/LibUtilities/FFT/NektarFFT.cpp | 7 +- library/LibUtilities/Foundations/BLPoints.cpp | 7 +- library/LibUtilities/Foundations/BLPoints.h | 27 +- library/LibUtilities/Foundations/Basis.cpp | 30 +- library/LibUtilities/Foundations/Basis.h | 7 +- library/LibUtilities/Foundations/BasisType.h | 7 +- .../LibUtilities/Foundations/Foundations.hpp | 7 +- .../Foundations/FoundationsFwd.hpp | 7 +- .../Foundations/FourierPoints.cpp | 7 +- .../LibUtilities/Foundations/FourierPoints.h | 27 +- .../Foundations/FourierSingleModePoints.cpp | 7 +- .../Foundations/FourierSingleModePoints.h | 27 +- .../LibUtilities/Foundations/GaussPoints.cpp | 7 +- .../LibUtilities/Foundations/GaussPoints.h | 23 +- library/LibUtilities/Foundations/Graph.cpp | 7 +- library/LibUtilities/Foundations/Graph.h | 7 +- library/LibUtilities/Foundations/Interp.cpp | 7 +- library/LibUtilities/Foundations/Interp.h | 7 +- .../LibUtilities/Foundations/InterpCoeff.cpp | 7 +- .../LibUtilities/Foundations/InterpCoeff.h | 7 +- .../Foundations/ManagerAccess.cpp | 7 +- .../LibUtilities/Foundations/ManagerAccess.h | 7 +- .../LibUtilities/Foundations/NodalHexElec.cpp | 7 +- .../LibUtilities/Foundations/NodalHexElec.h | 15 +- .../Foundations/NodalPrismElec.cpp | 7 +- .../LibUtilities/Foundations/NodalPrismElec.h | 19 +- .../Foundations/NodalPrismEvenlySpaced.cpp | 7 +- .../Foundations/NodalPrismEvenlySpaced.h | 19 +- .../Foundations/NodalPrismSPI.cpp | 7 +- .../LibUtilities/Foundations/NodalPrismSPI.h | 15 +- .../Foundations/NodalQuadElec.cpp | 7 +- .../LibUtilities/Foundations/NodalQuadElec.h | 15 +- .../LibUtilities/Foundations/NodalTetElec.cpp | 7 +- .../LibUtilities/Foundations/NodalTetElec.h | 19 +- .../Foundations/NodalTetElecData.h | 7 +- .../Foundations/NodalTetEvenlySpaced.cpp | 7 +- .../Foundations/NodalTetEvenlySpaced.h | 19 +- .../LibUtilities/Foundations/NodalTetSPI.cpp | 7 +- .../LibUtilities/Foundations/NodalTetSPI.h | 15 +- .../Foundations/NodalTetSPIData.h | 7 +- .../LibUtilities/Foundations/NodalTriElec.cpp | 7 +- .../LibUtilities/Foundations/NodalTriElec.h | 19 +- .../Foundations/NodalTriElecData.h | 7 +- .../Foundations/NodalTriEvenlySpaced.cpp | 7 +- .../Foundations/NodalTriEvenlySpaced.h | 19 +- .../Foundations/NodalTriFekete.cpp | 7 +- .../LibUtilities/Foundations/NodalTriFekete.h | 19 +- .../Foundations/NodalTriFeketeData.h | 7 +- .../LibUtilities/Foundations/NodalTriSPI.cpp | 7 +- .../LibUtilities/Foundations/NodalTriSPI.h | 15 +- .../Foundations/NodalTriSPIData.h | 7 +- .../LibUtilities/Foundations/NodalUtil.cpp | 77 ++-- library/LibUtilities/Foundations/NodalUtil.h | 77 ++-- .../Foundations/PhysGalerkinProject.cpp | 7 +- .../Foundations/PhysGalerkinProject.h | 7 +- library/LibUtilities/Foundations/Points.cpp | 7 +- library/LibUtilities/Foundations/Points.h | 8 +- library/LibUtilities/Foundations/PointsType.h | 7 +- .../LibUtilities/Foundations/PolyEPoints.cpp | 8 +- .../LibUtilities/Foundations/PolyEPoints.h | 21 +- .../LibUtilities/Interpreter/Interpreter.cpp | 261 +++++++---- .../LibUtilities/Interpreter/Interpreter.h | 7 +- library/LibUtilities/Kernel/kernel.cpp | 432 ++++++++++++++++++ .../LinearAlgebra/BlockMatrix.cpp | 4 +- .../LinearAlgebra/BlockMatrix.hpp | 10 +- .../LibUtilities/LinearAlgebra/MatrixBase.hpp | 2 +- .../LinearAlgebra/MatrixOperations.hpp | 2 +- .../MatrixVectorMultiplication.cpp | 13 +- .../LinearAlgebra/NekLinSysIter.cpp | 7 +- .../LinearAlgebra/NekLinSysIter.h | 11 +- .../LinearAlgebra/NekLinSysIterCG.cpp | 7 +- .../LinearAlgebra/NekLinSysIterCG.h | 20 +- .../LinearAlgebra/NekLinSysIterCGLoc.cpp | 7 +- .../LinearAlgebra/NekLinSysIterCGLoc.h | 20 +- .../NekLinSysIterFixedpointJacobi.cpp | 7 +- .../NekLinSysIterFixedpointJacobi.h | 20 +- .../LinearAlgebra/NekLinSysIterGMRES.cpp | 7 +- .../LinearAlgebra/NekLinSysIterGMRES.h | 20 +- .../LinearAlgebra/NekLinSysIterGMRESLoc.cpp | 7 +- .../LinearAlgebra/NekLinSysIterGMRESLoc.h | 20 +- .../LinearAlgebra/NekNonlinSys.cpp | 7 +- .../LibUtilities/LinearAlgebra/NekNonlinSys.h | 13 +- .../LinearAlgebra/NekNonlinSysNewton.cpp | 7 +- .../LinearAlgebra/NekNonlinSysNewton.h | 33 +- library/LibUtilities/LinearAlgebra/NekSys.cpp | 7 +- library/LibUtilities/LinearAlgebra/NekSys.h | 7 +- .../LinearAlgebra/ScaledMatrix.hpp | 10 +- .../LinearAlgebra/SparseDiagBlkMatrix.cpp | 10 + .../LinearAlgebra/SparseMatrix.cpp | 4 + .../LinearAlgebra/StandardMatrix.hpp | 14 +- .../LinearAlgebra/StorageSmvBsr.cpp | 6 + .../LibUtilities/Memory/NekMemoryManager.hpp | 7 +- library/LibUtilities/Polylib/Polylib.cpp | 108 ++++- .../Python/BasicUtils/SessionReader.cpp | 2 +- .../Python/BasicUtils/SharedArray.cpp | 12 +- library/LibUtilities/Python/LibUtilities.cpp | 2 +- .../Python/LinearAlgebra/NekMatrix.cpp | 4 +- library/LibUtilities/SimdLib/avx2.hpp | 13 +- library/LibUtilities/SimdLib/avx512.hpp | 13 +- library/LibUtilities/SimdLib/sse2.hpp | 13 +- library/LibUtilities/SimdLib/sve.hpp | 15 +- .../AdamsBashforthTimeIntegrationSchemes.h | 13 +- .../AdamsMoultonTimeIntegrationSchemes.h | 13 +- .../BDFImplicitTimeIntegrationSchemes.h | 15 +- .../CNABTimeIntegrationScheme.h | 16 +- .../DIRKTimeIntegrationSchemes.h | 13 +- .../EulerExponentialTimeIntegrationSchemes.h | 14 +- .../EulerTimeIntegrationSchemes.h | 15 +- .../ExplicitTimeIntegrationSchemeSDC.h | 19 +- .../IMEXGearTimeIntegrationScheme.h | 13 +- .../IMEXTimeIntegrationSchemeSDC.h | 18 +- .../IMEXTimeIntegrationSchemes.h | 17 +- .../IMEXdirkTimeIntegrationSchemes.h | 31 +- .../ImplicitTimeIntegrationSchemeSDC.h | 19 +- .../MCNABTimeIntegrationScheme.h | 13 +- .../NoSchemeTimeIntegrationScheme.cpp | 7 +- .../NoSchemeTimeIntegrationScheme.h | 34 +- .../RungeKuttaTimeIntegrationSchemes.h | 13 +- .../TimeIntegration/SchemeInitializer.cpp | 7 +- .../TimeIntegrationAlgorithmGLM.cpp | 7 +- .../TimeIntegrationAlgorithmGLM.h | 7 +- .../TimeIntegration/TimeIntegrationScheme.cpp | 7 +- .../TimeIntegration/TimeIntegrationScheme.h | 7 +- .../TimeIntegrationSchemeFIT.cpp | 17 +- .../TimeIntegrationSchemeFIT.h | 41 +- .../TimeIntegrationSchemeGEM.cpp | 7 +- .../TimeIntegrationSchemeGEM.h | 42 +- .../TimeIntegrationSchemeGLM.cpp | 7 +- .../TimeIntegrationSchemeGLM.h | 38 +- .../TimeIntegrationSchemeOperators.h | 7 +- .../TimeIntegrationSchemeSDC.cpp | 7 +- .../TimeIntegrationSchemeSDC.h | 42 +- .../TimeIntegrationSolutionGLM.cpp | 7 +- .../TimeIntegrationSolutionGLM.h | 7 +- .../TimeIntegration/TimeIntegrationTypes.hpp | 7 +- library/LocalRegions/Expansion.cpp | 9 +- library/LocalRegions/Expansion.h | 25 +- library/LocalRegions/Expansion0D.cpp | 7 +- library/LocalRegions/Expansion0D.h | 9 +- library/LocalRegions/Expansion1D.cpp | 7 +- library/LocalRegions/Expansion1D.h | 33 +- library/LocalRegions/Expansion2D.cpp | 19 +- library/LocalRegions/Expansion2D.h | 73 ++- library/LocalRegions/Expansion3D.cpp | 15 +- library/LocalRegions/Expansion3D.h | 71 ++- library/LocalRegions/HexExp.cpp | 7 +- library/LocalRegions/HexExp.h | 109 +++-- library/LocalRegions/IndexMapKey.cpp | 7 +- library/LocalRegions/IndexMapKey.h | 7 +- library/LocalRegions/LocalRegions.hpp | 7 +- library/LocalRegions/MatrixKey.cpp | 7 +- library/LocalRegions/MatrixKey.h | 9 +- library/LocalRegions/NodalTetExp.cpp | 8 - library/LocalRegions/NodalTetExp.h | 9 +- library/LocalRegions/NodalTriExp.cpp | 7 +- library/LocalRegions/NodalTriExp.h | 102 ++--- library/LocalRegions/PointExp.cpp | 7 +- library/LocalRegions/PointExp.h | 20 +- library/LocalRegions/PrismExp.cpp | 7 +- library/LocalRegions/PrismExp.h | 89 ++-- library/LocalRegions/PyrExp.cpp | 7 +- library/LocalRegions/PyrExp.h | 73 ++- library/LocalRegions/QuadExp.cpp | 7 +- library/LocalRegions/QuadExp.h | 118 +++-- library/LocalRegions/SegExp.cpp | 7 +- library/LocalRegions/SegExp.h | 126 +++-- library/LocalRegions/TetExp.cpp | 7 +- library/LocalRegions/TetExp.h | 89 ++-- library/LocalRegions/TriExp.cpp | 7 +- library/LocalRegions/TriExp.h | 122 +++-- library/MatrixFreeOps/BwdTrans.h | 7 +- library/MatrixFreeOps/BwdTransKernels.hpp | 7 +- library/MatrixFreeOps/Helmholtz.h | 7 +- library/MatrixFreeOps/HelmholtzKernels.hpp | 7 +- library/MatrixFreeOps/IProduct.h | 7 +- library/MatrixFreeOps/IProductKernels.hpp | 7 +- library/MatrixFreeOps/IProductWRTDerivBase.h | 15 +- .../IProductWRTDerivBaseKernels.hpp | 13 +- library/MatrixFreeOps/Operator.cpp | 7 +- library/MatrixFreeOps/Operator.hpp | 37 +- library/MatrixFreeOps/OperatorImp.cpp.in | 7 +- library/MatrixFreeOps/PhysDeriv.h | 21 +- library/MatrixFreeOps/PhysDerivKernels.hpp | 7 +- .../AssemblyMap/AssemblyCommDG.cpp | 7 +- .../MultiRegions/AssemblyMap/AssemblyCommDG.h | 7 +- .../MultiRegions/AssemblyMap/AssemblyMap.cpp | 15 +- .../MultiRegions/AssemblyMap/AssemblyMap.h | 7 +- .../AssemblyMap/AssemblyMapCG.cpp | 7 +- .../MultiRegions/AssemblyMap/AssemblyMapCG.h | 76 ++- .../AssemblyMap/AssemblyMapDG.cpp | 7 +- .../MultiRegions/AssemblyMap/AssemblyMapDG.h | 54 +-- .../AssemblyMap/InterfaceMapDG.cpp | 7 +- .../MultiRegions/AssemblyMap/InterfaceMapDG.h | 7 +- .../AssemblyMap/LocTraceToTraceMap.cpp | 7 +- library/MultiRegions/ContField.cpp | 7 +- library/MultiRegions/ContField.h | 53 +-- .../MultiRegions/ContField3DHomogeneous1D.cpp | 7 +- .../MultiRegions/ContField3DHomogeneous1D.h | 44 +- .../MultiRegions/ContField3DHomogeneous2D.cpp | 7 +- .../MultiRegions/ContField3DHomogeneous2D.h | 33 +- library/MultiRegions/DisContField.cpp | 7 +- library/MultiRegions/DisContField.h | 140 +++--- .../DisContField3DHomogeneous1D.cpp | 7 +- .../DisContField3DHomogeneous1D.h | 78 ++-- .../DisContField3DHomogeneous2D.cpp | 7 +- .../DisContField3DHomogeneous2D.h | 52 +-- library/MultiRegions/ExpList.cpp | 19 +- library/MultiRegions/ExpList.h | 7 +- .../MultiRegions/ExpList2DHomogeneous1D.cpp | 15 +- library/MultiRegions/ExpList2DHomogeneous1D.h | 31 +- .../MultiRegions/ExpList2DHomogeneous2D.cpp | 15 +- library/MultiRegions/ExpList2DHomogeneous2D.h | 42 +- .../MultiRegions/ExpList3DHomogeneous1D.cpp | 15 +- library/MultiRegions/ExpList3DHomogeneous1D.h | 43 +- .../MultiRegions/ExpList3DHomogeneous2D.cpp | 15 +- library/MultiRegions/ExpList3DHomogeneous2D.h | 34 +- library/MultiRegions/ExpListHomogeneous1D.cpp | 9 +- library/MultiRegions/ExpListHomogeneous1D.h | 138 +++--- library/MultiRegions/ExpListHomogeneous2D.cpp | 9 +- library/MultiRegions/ExpListHomogeneous2D.h | 97 ++-- library/MultiRegions/GJPStabilisation.cpp | 7 +- library/MultiRegions/GJPStabilisation.h | 7 +- library/MultiRegions/GlobalLinSys.cpp | 7 +- library/MultiRegions/GlobalLinSys.h | 7 +- library/MultiRegions/GlobalLinSysDirect.cpp | 7 +- library/MultiRegions/GlobalLinSysDirect.h | 10 +- .../MultiRegions/GlobalLinSysDirectFull.cpp | 7 +- library/MultiRegions/GlobalLinSysDirectFull.h | 29 +- .../GlobalLinSysDirectStaticCond.cpp | 8 +- .../GlobalLinSysDirectStaticCond.h | 23 +- .../MultiRegions/GlobalLinSysIterative.cpp | 27 +- library/MultiRegions/GlobalLinSysIterative.h | 9 +- .../GlobalLinSysIterativeFull.cpp | 8 +- .../MultiRegions/GlobalLinSysIterativeFull.h | 35 +- .../GlobalLinSysIterativeStaticCond.cpp | 11 +- .../GlobalLinSysIterativeStaticCond.h | 45 +- library/MultiRegions/GlobalLinSysKey.cpp | 7 +- library/MultiRegions/GlobalLinSysKey.h | 9 +- library/MultiRegions/GlobalLinSysPETSc.cpp | 7 +- library/MultiRegions/GlobalLinSysPETSc.h | 19 +- .../MultiRegions/GlobalLinSysPETScFull.cpp | 7 +- library/MultiRegions/GlobalLinSysPETScFull.h | 23 +- .../GlobalLinSysPETScStaticCond.cpp | 7 +- .../GlobalLinSysPETScStaticCond.h | 43 +- .../MultiRegions/GlobalLinSysStaticCond.cpp | 7 +- library/MultiRegions/GlobalLinSysStaticCond.h | 26 +- library/MultiRegions/GlobalLinSysXxt.cpp | 9 +- library/MultiRegions/GlobalLinSysXxt.h | 9 +- library/MultiRegions/GlobalLinSysXxtFull.cpp | 7 +- library/MultiRegions/GlobalLinSysXxtFull.h | 29 +- .../GlobalLinSysXxtStaticCond.cpp | 8 +- .../MultiRegions/GlobalLinSysXxtStaticCond.h | 23 +- library/MultiRegions/GlobalMatrix.cpp | 17 +- library/MultiRegions/GlobalMatrix.h | 7 +- library/MultiRegions/GlobalMatrixKey.cpp | 7 +- library/MultiRegions/GlobalMatrixKey.h | 9 +- library/MultiRegions/MultiRegions.hpp | 7 +- library/MultiRegions/Preconditioner.cpp | 7 +- library/MultiRegions/Preconditioner.h | 7 +- library/MultiRegions/PreconditionerBlock.cpp | 7 +- library/MultiRegions/PreconditionerBlock.h | 19 +- .../MultiRegions/PreconditionerDiagonal.cpp | 7 +- library/MultiRegions/PreconditionerDiagonal.h | 43 +- library/MultiRegions/PreconditionerLinear.cpp | 9 +- library/MultiRegions/PreconditionerLinear.h | 21 +- .../PreconditionerLinearWithBlock.cpp | 7 +- .../PreconditionerLinearWithBlock.h | 19 +- .../PreconditionerLinearWithDiag.cpp | 7 +- .../PreconditionerLinearWithDiag.h | 19 +- .../PreconditionerLinearWithLowEnergy.cpp | 7 +- .../PreconditionerLinearWithLowEnergy.h | 30 +- .../MultiRegions/PreconditionerLowEnergy.h | 30 +- library/MultiRegions/SubStructuredGraph.cpp | 7 +- library/MultiRegions/SubStructuredGraph.h | 7 +- library/NekMesh/2DGenerator/2DGenerator.cpp | 7 +- library/NekMesh/2DGenerator/2DGenerator.h | 11 +- library/NekMesh/CADSystem/CADCurve.cpp | 7 +- library/NekMesh/CADSystem/CADCurve.h | 9 +- library/NekMesh/CADSystem/CADObject.h | 7 +- library/NekMesh/CADSystem/CADSurf.cpp | 7 +- library/NekMesh/CADSystem/CADSurf.h | 11 +- library/NekMesh/CADSystem/CADSystem.cpp | 7 +- library/NekMesh/CADSystem/CADSystem.h | 7 +- library/NekMesh/CADSystem/CADVert.cpp | 7 +- library/NekMesh/CADSystem/CADVert.h | 9 +- library/NekMesh/CADSystem/OCE/CADCurveOCE.cpp | 7 +- library/NekMesh/CADSystem/OCE/CADCurveOCE.h | 33 +- library/NekMesh/CADSystem/OCE/CADSurfOCE.cpp | 7 +- library/NekMesh/CADSystem/OCE/CADSurfOCE.h | 39 +- .../NekMesh/CADSystem/OCE/CADSystemOCE.cpp | 15 +- library/NekMesh/CADSystem/OCE/CADSystemOCE.h | 13 +- library/NekMesh/CADSystem/OCE/CADVertOCE.cpp | 7 +- library/NekMesh/CADSystem/OCE/CADVertOCE.h | 11 +- library/NekMesh/CADSystem/OCE/GeoParser.hpp | 7 +- .../CADSystem/OCE/TransfiniteSurface.h | 124 +++-- library/NekMesh/CADSystem/ProcessLoadCAD.cpp | 7 +- library/NekMesh/CADSystem/ProcessLoadCAD.h | 13 +- .../ExtLibInterface/TetGenInterface.cpp | 11 +- .../NekMesh/ExtLibInterface/TetGenInterface.h | 7 +- .../ExtLibInterface/TriangleInterface.cpp | 63 ++- .../ExtLibInterface/TriangleInterface.h | 9 +- .../NekMesh/MeshElements/BooleanOperators.cpp | 9 +- library/NekMesh/MeshElements/Composite.h | 7 +- library/NekMesh/MeshElements/Edge.cpp | 7 +- library/NekMesh/MeshElements/Edge.h | 7 +- library/NekMesh/MeshElements/Element.cpp | 7 +- library/NekMesh/MeshElements/Element.h | 29 +- library/NekMesh/MeshElements/ElementConfig.h | 7 +- library/NekMesh/MeshElements/Face.cpp | 7 +- library/NekMesh/MeshElements/Face.h | 7 +- library/NekMesh/MeshElements/HOAlignment.h | 7 +- library/NekMesh/MeshElements/Hexahedron.cpp | 13 +- library/NekMesh/MeshElements/Hexahedron.h | 27 +- library/NekMesh/MeshElements/Line.cpp | 7 +- library/NekMesh/MeshElements/Line.h | 25 +- library/NekMesh/MeshElements/Mesh.cpp | 9 +- library/NekMesh/MeshElements/Mesh.h | 7 +- library/NekMesh/MeshElements/Node.cpp | 7 +- library/NekMesh/MeshElements/Node.h | 9 +- library/NekMesh/MeshElements/Point.cpp | 7 +- library/NekMesh/MeshElements/Point.h | 9 +- library/NekMesh/MeshElements/Prism.cpp | 13 +- library/NekMesh/MeshElements/Prism.h | 31 +- library/NekMesh/MeshElements/Pyramid.cpp | 7 +- library/NekMesh/MeshElements/Pyramid.h | 15 +- .../NekMesh/MeshElements/Quadrilateral.cpp | 11 +- library/NekMesh/MeshElements/Quadrilateral.h | 29 +- library/NekMesh/MeshElements/Tetrahedron.cpp | 13 +- library/NekMesh/MeshElements/Tetrahedron.h | 31 +- library/NekMesh/MeshElements/Triangle.cpp | 11 +- library/NekMesh/MeshElements/Triangle.h | 31 +- .../NekMesh/Module/InputModules/InputGmsh.cpp | 7 +- .../NekMesh/Module/InputModules/InputGmsh.h | 13 +- .../NekMesh/Module/InputModules/InputMCF.cpp | 7 +- .../NekMesh/Module/InputModules/InputMCF.h | 13 +- .../NekMesh/Module/InputModules/InputNek.cpp | 7 +- .../NekMesh/Module/InputModules/InputNek.h | 13 +- .../Module/InputModules/InputNek5000.cpp | 7 +- .../Module/InputModules/InputNek5000.h | 13 +- .../Module/InputModules/InputNekpp.cpp | 7 +- .../NekMesh/Module/InputModules/InputNekpp.h | 13 +- .../NekMesh/Module/InputModules/InputPly.cpp | 7 +- .../NekMesh/Module/InputModules/InputPly.h | 13 +- .../NekMesh/Module/InputModules/InputSem.cpp | 9 +- .../NekMesh/Module/InputModules/InputSem.h | 13 +- .../NekMesh/Module/InputModules/InputStar.cpp | 29 +- .../NekMesh/Module/InputModules/InputStar.h | 13 +- .../Module/InputModules/InputStarTec.cpp | 7 +- .../Module/InputModules/InputStarTec.h | 13 +- .../NekMesh/Module/InputModules/InputSwan.cpp | 7 +- .../NekMesh/Module/InputModules/InputSwan.h | 13 +- .../NekMesh/Module/InputModules/InputVtk.cpp | 9 +- .../NekMesh/Module/InputModules/InputVtk.h | 13 +- library/NekMesh/Module/Log.hpp | 9 +- library/NekMesh/Module/Module.cpp | 11 +- library/NekMesh/Module/Module.h | 7 +- .../Module/OutputModules/OutputGmsh.cpp | 9 +- .../NekMesh/Module/OutputModules/OutputGmsh.h | 13 +- .../Module/OutputModules/OutputNekpp.cpp | 7 +- .../Module/OutputModules/OutputNekpp.h | 9 +- .../Module/OutputModules/OutputSTL.cpp | 7 +- .../NekMesh/Module/OutputModules/OutputSTL.h | 13 +- .../Module/OutputModules/OutputStdOut.cpp | 7 +- .../Module/OutputModules/OutputStdOut.h | 13 +- .../Module/OutputModules/OutputVtk.cpp | 7 +- .../NekMesh/Module/OutputModules/OutputVtk.h | 13 +- .../Module/ProcessModules/ProcessBL.cpp | 7 +- .../NekMesh/Module/ProcessModules/ProcessBL.h | 13 +- .../Module/ProcessModules/ProcessCurve.cpp | 7 +- .../Module/ProcessModules/ProcessCurve.h | 13 +- .../ProcessModules/ProcessCurvedEdges.cpp | 7 +- .../ProcessModules/ProcessCurvedEdges.h | 13 +- .../Module/ProcessModules/ProcessCyl.cpp | 7 +- .../Module/ProcessModules/ProcessCyl.h | 13 +- .../ProcessModules/ProcessDetectSurf.cpp | 7 +- .../Module/ProcessModules/ProcessDetectSurf.h | 13 +- .../ProcessModules/ProcessExtractSurf.cpp | 7 +- .../ProcessModules/ProcessExtractSurf.h | 13 +- .../ProcessExtractTetPrismInterface.cpp | 7 +- .../ProcessExtractTetPrismInterface.h | 13 +- .../Module/ProcessModules/ProcessExtrude.cpp | 7 +- .../Module/ProcessModules/ProcessExtrude.h | 13 +- .../ProcessModules/ProcessInsertSurface.cpp | 7 +- .../ProcessModules/ProcessInsertSurface.h | 13 +- .../Module/ProcessModules/ProcessJac.cpp | 7 +- .../Module/ProcessModules/ProcessJac.h | 9 +- .../Module/ProcessModules/ProcessLinear.cpp | 7 +- .../Module/ProcessModules/ProcessLinear.h | 13 +- .../ProcessModules/ProcessLinkCheck.cpp | 7 +- .../Module/ProcessModules/ProcessLinkCheck.h | 13 +- .../ProcessModules/ProcessOptiExtract.cpp | 7 +- .../ProcessModules/ProcessOptiExtract.h | 13 +- .../Module/ProcessModules/ProcessPerAlign.cpp | 7 +- .../Module/ProcessModules/ProcessPerAlign.h | 13 +- .../ProcessModules/ProcessProjectCAD.cpp | 7 +- .../Module/ProcessModules/ProcessProjectCAD.h | 13 +- .../Module/ProcessModules/ProcessScalar.cpp | 7 +- .../Module/ProcessModules/ProcessScalar.h | 13 +- .../ProcessModules/ProcessSpherigon.cpp | 7 +- .../Module/ProcessModules/ProcessSpherigon.h | 15 +- .../Module/ProcessModules/ProcessTetSplit.cpp | 7 +- .../Module/ProcessModules/ProcessTetSplit.h | 13 +- .../ProcessModules/ProcessVarOpti/ElUtil.cpp | 7 +- .../ProcessModules/ProcessVarOpti/ElUtil.h | 9 +- .../ProcessVarOpti/Evaluator.hxx | 5 +- .../ProcessModules/ProcessVarOpti/Hessian.hxx | 5 +- .../ProcessVarOpti/NodeOpti.cpp | 7 +- .../ProcessModules/ProcessVarOpti/NodeOpti.h | 17 +- .../ProcessVarOpti/NodeOptiCAD.cpp | 7 +- .../ProcessVarOpti/NodeOptiCAD.h | 19 +- .../ProcessVarOpti/PreProcessing.cpp | 9 +- .../ProcessVarOpti/ProcessVarOpti.cpp | 17 +- .../ProcessVarOpti/ProcessVarOpti.h | 13 +- library/NekMesh/Octree/Octant.cpp | 7 +- library/NekMesh/Octree/Octant.h | 7 +- library/NekMesh/Octree/Octree.cpp | 19 +- library/NekMesh/Octree/Octree.h | 7 +- library/NekMesh/Octree/ProcessLoadOctree.cpp | 7 +- library/NekMesh/Octree/ProcessLoadOctree.h | 13 +- library/NekMesh/Octree/SourcePoint.hpp | 37 +- library/NekMesh/Optimisation/BGFS-B.cpp | 7 +- library/NekMesh/Optimisation/BGFS-B.h | 7 +- library/NekMesh/Optimisation/OptimiseObj.h | 7 +- library/NekMesh/Python/Module.cpp | 6 +- library/NekMesh/Python/NekMesh.cpp | 2 +- library/NekMesh/SurfaceMeshing/CurveMesh.cpp | 7 +- library/NekMesh/SurfaceMeshing/CurveMesh.h | 7 +- library/NekMesh/SurfaceMeshing/FaceMesh.cpp | 9 +- library/NekMesh/SurfaceMeshing/FaceMesh.h | 7 +- .../NekMesh/SurfaceMeshing/HOSurfaceMesh.cpp | 9 +- .../NekMesh/SurfaceMeshing/HOSurfaceMesh.h | 13 +- .../SurfaceMeshing/OptimiseFunctions.cpp | 7 +- .../SurfaceMeshing/OptimiseFunctions.h | 21 +- .../NekMesh/SurfaceMeshing/SurfaceMesh.cpp | 7 +- library/NekMesh/SurfaceMeshing/SurfaceMesh.h | 13 +- .../VolumeMeshing/BLMeshing/BLMesh.cpp | 9 +- .../NekMesh/VolumeMeshing/BLMeshing/BLMesh.h | 7 +- .../VolumeMeshing/TetMeshing/TetMesh.cpp | 7 +- .../VolumeMeshing/TetMeshing/TetMesh.h | 7 +- library/NekMesh/VolumeMeshing/VolumeMesh.cpp | 7 +- library/NekMesh/VolumeMeshing/VolumeMesh.h | 13 +- library/SolverUtils/Advection/Advection.cpp | 7 +- library/SolverUtils/Advection/Advection.h | 7 +- .../Advection/Advection3DHomogeneous1D.cpp | 7 +- .../Advection/Advection3DHomogeneous1D.h | 29 +- library/SolverUtils/Advection/AdvectionFR.cpp | 7 +- library/SolverUtils/Advection/AdvectionFR.h | 29 +- .../Advection/AdvectionNonConservative.cpp | 7 +- .../Advection/AdvectionNonConservative.h | 29 +- .../SolverUtils/Advection/AdvectionWeakDG.cpp | 7 +- .../SolverUtils/Advection/AdvectionWeakDG.h | 25 +- .../Advection/HomogeneousRSScalar.hpp | 7 +- library/SolverUtils/AdvectionSystem.cpp | 7 +- library/SolverUtils/AdvectionSystem.h | 14 +- library/SolverUtils/Core/Coupling.cpp | 7 +- library/SolverUtils/Core/Coupling.h | 7 +- library/SolverUtils/Core/CouplingCwipi.cpp | 24 +- library/SolverUtils/Core/CouplingCwipi.h | 17 +- library/SolverUtils/Core/CouplingFile.cpp | 7 +- library/SolverUtils/Core/CouplingFile.h | 15 +- library/SolverUtils/Core/Misc.cpp | 7 +- library/SolverUtils/Core/Misc.h | 7 +- library/SolverUtils/Core/SessionFunction.cpp | 7 +- library/SolverUtils/Diffusion/Diffusion.cpp | 7 +- library/SolverUtils/Diffusion/Diffusion.h | 7 +- .../Diffusion/Diffusion3DHomogeneous1D.cpp | 7 +- .../Diffusion/Diffusion3DHomogeneous1D.h | 26 +- library/SolverUtils/Diffusion/DiffusionIP.cpp | 7 +- library/SolverUtils/Diffusion/DiffusionIP.h | 33 +- .../SolverUtils/Diffusion/DiffusionLDG.cpp | 7 +- library/SolverUtils/Diffusion/DiffusionLDG.h | 30 +- .../SolverUtils/Diffusion/DiffusionLFR.cpp | 7 +- library/SolverUtils/Diffusion/DiffusionLFR.h | 22 +- .../SolverUtils/Diffusion/DiffusionLFRNS.cpp | 7 +- .../SolverUtils/Diffusion/DiffusionLFRNS.h | 28 +- library/SolverUtils/Driver.cpp | 7 +- library/SolverUtils/Driver.h | 7 +- library/SolverUtils/DriverAdaptive.cpp | 7 +- library/SolverUtils/DriverAdaptive.h | 14 +- library/SolverUtils/DriverArnoldi.cpp | 9 +- library/SolverUtils/DriverArnoldi.h | 13 +- library/SolverUtils/DriverArpack.cpp | 9 +- library/SolverUtils/DriverArpack.h | 13 +- library/SolverUtils/DriverModifiedArnoldi.cpp | 11 +- library/SolverUtils/DriverModifiedArnoldi.h | 13 +- library/SolverUtils/DriverPFASST.cpp | 7 +- library/SolverUtils/DriverPFASST.h | 14 +- library/SolverUtils/DriverParallelInTime.cpp | 7 +- library/SolverUtils/DriverParallelInTime.h | 14 +- library/SolverUtils/DriverParareal.cpp | 7 +- library/SolverUtils/DriverParareal.h | 14 +- library/SolverUtils/DriverStandard.cpp | 7 +- library/SolverUtils/DriverStandard.h | 14 +- library/SolverUtils/DriverSteadyState.cpp | 7 +- library/SolverUtils/DriverSteadyState.h | 14 +- library/SolverUtils/EquationSystem.cpp | 7 +- library/SolverUtils/Filters/Filter.cpp | 7 +- library/SolverUtils/Filters/Filter.h | 7 +- .../SolverUtils/Filters/FilterAeroForces.cpp | 7 +- .../SolverUtils/Filters/FilterAeroForces.h | 10 +- .../Filters/FilterAverageFields.cpp | 7 +- .../SolverUtils/Filters/FilterAverageFields.h | 19 +- .../Filters/FilterBodyFittedVelocity.cpp | 7 +- .../Filters/FilterBodyFittedVelocity.h | 30 +- .../SolverUtils/Filters/FilterCheckpoint.cpp | 7 +- .../SolverUtils/Filters/FilterCheckpoint.h | 17 +- library/SolverUtils/Filters/FilterEnergy.cpp | 7 +- library/SolverUtils/Filters/FilterEnergy.h | 17 +- .../SolverUtils/Filters/FilterEnergy1D.cpp | 7 +- library/SolverUtils/Filters/FilterEnergy1D.h | 17 +- library/SolverUtils/Filters/FilterError.cpp | 7 +- library/SolverUtils/Filters/FilterError.h | 23 +- .../Filters/FilterFieldConvert.cpp | 7 +- .../SolverUtils/Filters/FilterFieldConvert.h | 17 +- .../Filters/FilterHistoryPoints.cpp | 7 +- .../SolverUtils/Filters/FilterHistoryPoints.h | 17 +- .../SolverUtils/Filters/FilterIntegral.cpp | 7 +- library/SolverUtils/Filters/FilterIntegral.h | 23 +- .../SolverUtils/Filters/FilterInterfaces.hpp | 7 +- .../Filters/FilterMaxMinFields.cpp | 7 +- .../SolverUtils/Filters/FilterMaxMinFields.h | 21 +- library/SolverUtils/Filters/FilterMean.cpp | 17 +- library/SolverUtils/Filters/FilterMean.h | 17 +- .../SolverUtils/Filters/FilterModalEnergy.cpp | 7 +- .../SolverUtils/Filters/FilterModalEnergy.h | 17 +- .../Filters/FilterMovingAverage.cpp | 7 +- .../SolverUtils/Filters/FilterMovingAverage.h | 13 +- .../Filters/FilterThresholdMax.cpp | 7 +- .../SolverUtils/Filters/FilterThresholdMax.h | 17 +- .../Filters/FilterThresholdMin.cpp | 7 +- .../SolverUtils/Filters/FilterThresholdMin.h | 17 +- library/SolverUtils/Forcing/Forcing.cpp | 7 +- library/SolverUtils/Forcing/Forcing.h | 7 +- .../SolverUtils/Forcing/ForcingAbsorption.cpp | 7 +- .../SolverUtils/Forcing/ForcingAbsorption.h | 16 +- library/SolverUtils/Forcing/ForcingBody.cpp | 7 +- library/SolverUtils/Forcing/ForcingBody.h | 15 +- .../Forcing/ForcingMovingReferenceFrame.cpp | 7 +- .../Forcing/ForcingMovingReferenceFrame.h | 15 +- library/SolverUtils/Forcing/ForcingNoise.cpp | 7 +- library/SolverUtils/Forcing/ForcingNoise.h | 13 +- .../Forcing/ForcingProgrammatic.cpp | 7 +- .../SolverUtils/Forcing/ForcingProgrammatic.h | 13 +- library/SolverUtils/MMFSystem.cpp | 23 +- library/SolverUtils/MMFSystem.h | 11 +- .../RiemannSolvers/RiemannSolver.cpp | 7 +- .../RiemannSolvers/UpwindSolver.cpp | 7 +- .../SolverUtils/RiemannSolvers/UpwindSolver.h | 15 +- library/SolverUtils/SolverUtils.hpp | 7 +- library/SolverUtils/UnsteadySystem.cpp | 9 +- library/SolverUtils/UnsteadySystem.h | 18 +- library/SpatialDomains/Conditions.cpp | 15 +- library/SpatialDomains/Curve.hpp | 7 +- library/SpatialDomains/GeomFactors.cpp | 7 +- library/SpatialDomains/GeomFactors.h | 7 +- library/SpatialDomains/Geometry.cpp | 7 +- library/SpatialDomains/Geometry.h | 8 +- library/SpatialDomains/Geometry0D.cpp | 7 +- library/SpatialDomains/Geometry0D.h | 17 +- library/SpatialDomains/Geometry1D.cpp | 7 +- library/SpatialDomains/Geometry1D.h | 15 +- library/SpatialDomains/Geometry2D.cpp | 7 +- library/SpatialDomains/Geometry2D.h | 37 +- library/SpatialDomains/Geometry3D.cpp | 7 +- library/SpatialDomains/Geometry3D.h | 45 +- library/SpatialDomains/HexGeom.cpp | 7 +- library/SpatialDomains/HexGeom.h | 26 +- library/SpatialDomains/MeshComponents.h | 7 +- library/SpatialDomains/MeshEntities.hpp | 7 +- library/SpatialDomains/MeshGraph.cpp | 11 +- library/SpatialDomains/MeshGraph.h | 12 +- library/SpatialDomains/MeshGraphHDF5.cpp | 9 +- library/SpatialDomains/MeshGraphHDF5.h | 15 +- library/SpatialDomains/MeshGraphXml.cpp | 15 +- library/SpatialDomains/MeshGraphXml.h | 15 +- .../SpatialDomains/MeshGraphXmlCompressed.cpp | 9 +- .../SpatialDomains/MeshGraphXmlCompressed.h | 47 +- library/SpatialDomains/MeshPartition.cpp | 7 +- library/SpatialDomains/MeshPartition.h | 7 +- .../SpatialDomains/MeshPartitionPtScotch.cpp | 10 +- .../SpatialDomains/MeshPartitionPtScotch.h | 24 +- .../SpatialDomains/MeshPartitionScotch.cpp | 41 +- library/SpatialDomains/MeshPartitionScotch.h | 24 +- .../Movement/InterfaceInterpolation.h | 8 +- library/SpatialDomains/Movement/Movement.cpp | 11 +- library/SpatialDomains/Movement/Movement.h | 8 +- library/SpatialDomains/Movement/Zones.cpp | 7 +- library/SpatialDomains/Movement/Zones.h | 24 +- library/SpatialDomains/PointGeom.cpp | 7 +- library/SpatialDomains/PointGeom.h | 14 +- library/SpatialDomains/PrismGeom.cpp | 7 +- library/SpatialDomains/PrismGeom.h | 26 +- library/SpatialDomains/PyrGeom.cpp | 7 +- library/SpatialDomains/PyrGeom.h | 19 +- library/SpatialDomains/QuadGeom.cpp | 7 +- library/SpatialDomains/QuadGeom.h | 25 +- library/SpatialDomains/RefRegion.cpp | 7 +- library/SpatialDomains/RefRegion.h | 7 +- library/SpatialDomains/RefRegionCylinder.cpp | 7 +- library/SpatialDomains/RefRegionCylinder.h | 9 +- library/SpatialDomains/RefRegionLine.cpp | 7 +- library/SpatialDomains/RefRegionLine.h | 9 +- .../SpatialDomains/RefRegionParallelogram.cpp | 7 +- .../SpatialDomains/RefRegionParallelogram.h | 9 +- library/SpatialDomains/RefRegionSphere.cpp | 7 +- library/SpatialDomains/RefRegionSphere.h | 9 +- library/SpatialDomains/SegGeom.cpp | 7 +- library/SpatialDomains/SegGeom.h | 30 +- library/SpatialDomains/SpatialDomains.hpp | 7 +- library/SpatialDomains/TetGeom.cpp | 7 +- library/SpatialDomains/TetGeom.h | 26 +- library/SpatialDomains/TriGeom.cpp | 7 +- library/SpatialDomains/TriGeom.h | 25 +- library/StdRegions/Python/VarCoeffEntry.cpp | 10 +- library/StdRegions/StdExpansion.cpp | 7 +- library/StdRegions/StdExpansion.h | 14 +- library/StdRegions/StdExpansion0D.cpp | 7 +- library/StdRegions/StdExpansion0D.h | 19 +- library/StdRegions/StdExpansion1D.cpp | 7 +- library/StdRegions/StdExpansion1D.h | 35 +- library/StdRegions/StdExpansion2D.cpp | 7 +- library/StdRegions/StdExpansion2D.h | 45 +- library/StdRegions/StdExpansion3D.cpp | 9 +- library/StdRegions/StdExpansion3D.h | 45 +- library/StdRegions/StdHexExp.cpp | 7 +- library/StdRegions/StdHexExp.h | 94 ++-- library/StdRegions/StdMatrixKey.cpp | 7 +- library/StdRegions/StdMatrixKey.h | 7 +- library/StdRegions/StdNodalPrismExp.cpp | 7 +- library/StdRegions/StdNodalPrismExp.h | 9 +- library/StdRegions/StdNodalTetExp.cpp | 7 +- library/StdRegions/StdNodalTetExp.h | 7 +- library/StdRegions/StdNodalTriExp.cpp | 7 +- library/StdRegions/StdNodalTriExp.h | 7 +- library/StdRegions/StdPointExp.cpp | 7 +- library/StdRegions/StdPointExp.h | 51 +-- library/StdRegions/StdPrismExp.cpp | 9 +- library/StdRegions/StdPrismExp.h | 110 +++-- library/StdRegions/StdPyrExp.cpp | 7 +- library/StdRegions/StdPyrExp.h | 7 +- library/StdRegions/StdQuadExp.cpp | 7 +- library/StdRegions/StdQuadExp.h | 108 ++--- library/StdRegions/StdRegions.hpp | 11 +- library/StdRegions/StdSegExp.cpp | 7 +- library/StdRegions/StdSegExp.h | 74 ++- library/StdRegions/StdTetExp.cpp | 7 +- library/StdRegions/StdTetExp.h | 92 ++-- library/StdRegions/StdTriExp.cpp | 7 +- library/StdRegions/StdTriExp.h | 104 ++--- library/UnitTests/BlockMatrixUnitTests.cpp | 7 +- .../Collections/TestHexCollection.cpp | 19 +- .../Collections/TestPrismCollection.cpp | 7 +- .../Collections/TestPyrCollection.cpp | 7 +- .../Collections/TestQuadCollection.cpp | 7 +- .../Collections/TestSegCollection.cpp | 8 +- .../Collections/TestTetCollection.cpp | 13 +- .../Collections/TestTriCollection.cpp | 7 +- .../TestBandedMatrixStoragePolicy.cpp | 7 +- .../LinearAlgebra/TestBlockMatrix.cpp | 7 +- .../TestDiagonalMatrixOperations.cpp | 7 +- .../TestDiagonalMatrixStoragePolicy.cpp | 7 +- .../TestFullMatrixOperations.cpp | 7 +- .../TestFullMatrixStoragePolicy.cpp | 7 +- .../TestLowerTriangularMatrix.cpp | 7 +- ...TestLowerTriangularMatrixStoragePolicy.cpp | 7 +- .../TestNekMatrixMultiplication.cpp | 11 +- .../LinearAlgebra/TestNekVector.cpp | 7 +- .../TestScaledBlockMatrixOperations.cpp | 7 +- .../LinearAlgebra/TestScaledMatrix.cpp | 7 +- .../TestSymmetricMatrixStoragePolicy.cpp | 7 +- .../TestTriangularMatrixOperations.cpp | 7 +- .../TestUpperTriangularMatrix.cpp | 7 +- ...TestUpperTriangularMatrixStoragePolicy.cpp | 7 +- .../LibUtilities/TestCheckedCast.cpp | 10 +- .../TestConsistentObjectAccess.cpp | 23 +- .../LibUtilities/TestInterpreter.cpp | 7 +- .../UnitTests/LibUtilities/TestPolylib.cpp | 9 +- .../LibUtilities/TestRealComparison.cpp | 7 +- .../LibUtilities/TestSharedArray.cpp | 7 +- .../UnitTests/LibUtilities/TestVmathSIMD.cpp | 7 +- .../UnitTests/LocalRegions/TestGetCoords.cpp | 7 +- .../LocalRegions/TestReOrientFacePhysMap.cpp | 7 +- .../UnitTests/Memory/TestNekMemoryManager.cpp | 15 +- .../MultiRegions/TestVarcoeffHashing.cpp | 7 +- library/UnitTests/SIMD/TestSimdLibDouble.cpp | 7 +- library/UnitTests/SIMD/TestSimdLibSingle.cpp | 7 +- library/UnitTests/ScaledMatrixUnitTests.cpp | 7 +- .../UnitTests/SpatialDomains/TestMovement.cpp | 7 +- library/UnitTests/testLinearSystem.cpp | 7 +- library/UnitTests/testNekLinAlgAlgorithms.cpp | 7 +- library/UnitTests/testNekPoint.cpp | 7 +- library/UnitTests/testNekSharedArray.cpp | 7 +- library/UnitTests/testNekVector.cpp | 7 +- library/UnitTests/util.cpp | 7 +- library/UnitTests/util.h | 7 +- .../EquationSystems/EigenValuesAdvection.h | 8 +- solvers/ADRSolver/EquationSystems/Helmholtz.h | 8 +- solvers/ADRSolver/EquationSystems/Laplace.h | 10 +- .../EquationSystems/MMFAdvection.cpp | 2 +- .../ADRSolver/EquationSystems/MMFAdvection.h | 20 +- solvers/ADRSolver/EquationSystems/Poisson.h | 8 +- .../ADRSolver/EquationSystems/Projection.h | 8 +- .../SteadyAdvectionDiffusion.h | 10 +- .../SteadyAdvectionDiffusionReaction.h | 6 +- .../EquationSystems/UnsteadyAdvection.h | 6 +- .../UnsteadyAdvectionDiffusion.h | 8 +- .../EquationSystems/UnsteadyDiffusion.h | 6 +- .../EquationSystems/UnsteadyInviscidBurger.h | 4 +- .../UnsteadyReactionDiffusion.h | 4 +- .../EquationSystems/UnsteadyViscousBurgers.h | 6 +- solvers/AcousticSolver/EquationSystems/APE.h | 8 +- .../EquationSystems/AcousticSystem.h | 15 +- solvers/AcousticSolver/EquationSystems/LEE.h | 13 +- .../RiemannSolvers/APELaxFriedrichsSolver.h | 17 +- .../RiemannSolvers/APEUpwindSolver.h | 17 +- .../RiemannSolvers/AcousticSolver.h | 8 +- .../RiemannSolvers/LEELaxFriedrichsSolver.h | 18 +- .../AcousticSolver/RiemannSolvers/LEESolver.h | 8 +- .../RiemannSolvers/LEEUpwindSolver.h | 18 +- .../CellModels/AlievPanfilov.h | 13 +- .../CellModels/CourtemancheRamirezNattel98.h | 15 +- .../CellModels/FentonKarma.cpp | 2 +- .../CardiacEPSolver/CellModels/FentonKarma.h | 15 +- .../CellModels/FitzhughNagumo.h | 13 +- solvers/CardiacEPSolver/CellModels/Fox02.h | 13 +- .../CardiacEPSolver/CellModels/LuoRudy91.h | 13 +- .../CellModels/TenTusscher06.h | 13 +- .../CardiacEPSolver/CellModels/Winslow99.h | 13 +- .../EquationSystems/Bidomain.h | 12 +- .../EquationSystems/BidomainRoth.h | 12 +- .../EquationSystems/Monodomain.h | 12 +- .../CardiacEPSolver/Filters/FilterBenchmark.h | 10 +- .../Filters/FilterCellHistoryPoints.h | 4 +- .../Filters/FilterCheckpointCellModel.h | 10 +- .../Filters/FilterElectrogram.h | 10 +- .../Filters/FilterHilbertFFTPhase.h | 16 +- .../Filters/FilterOffsetPhase.h | 16 +- solvers/CardiacEPSolver/Stimuli/ProtocolS1.h | 6 +- .../CardiacEPSolver/Stimuli/ProtocolS1S2.h | 6 +- .../CardiacEPSolver/Stimuli/ProtocolSingle.h | 6 +- .../CardiacEPSolver/Stimuli/StimulusCircle.h | 8 +- .../CardiacEPSolver/Stimuli/StimulusPoint.h | 8 +- .../CardiacEPSolver/Stimuli/StimulusRect.h | 8 +- .../NonSmoothShockCapture.h | 4 +- .../BoundaryConditions/ExtrapOrder0BC.h | 8 +- .../BoundaryConditions/IsentropicVortexBC.h | 8 +- .../BoundaryConditions/PressureInflowFileBC.h | 8 +- .../PressureMachTemperatureBC.h | 8 +- .../BoundaryConditions/PressureOutflowBC.h | 8 +- .../PressureOutflowNonReflectiveBC.h | 8 +- .../BoundaryConditions/RiemannInvariantBC.h | 8 +- .../BoundaryConditions/RinglebFlowBC.h | 8 +- .../BoundaryConditions/StagnationInflowBC.h | 8 +- .../BoundaryConditions/SymmetryBC.h | 8 +- .../BoundaryConditions/TimeDependentBC.h | 8 +- .../BoundaryConditions/WallBC.h | 8 +- .../BoundaryConditions/WallViscousBC.h | 8 +- .../Diffusion/DiffusionLDGNS.h | 28 +- .../EquationSystems/CompressibleFlowSystem.h | 40 +- .../CompressibleFlowSystemImplicit.h | 14 +- .../EquationSystems/EulerCFE.h | 15 +- .../EquationSystems/EulerImplicitCFE.h | 16 +- .../EquationSystems/NavierStokesCFE.h | 13 +- .../EquationSystems/NavierStokesCFEAxisym.h | 10 +- .../EquationSystems/NavierStokesImplicitCFE.h | 34 +- .../Forcing/ForcingAxiSymmetric.h | 11 +- .../Forcing/ForcingQuasi1D.h | 11 +- .../CompressibleFlowSolver/Misc/IdealGasEoS.h | 32 +- .../Misc/PengRobinsonEoS.h | 29 +- .../Misc/RedlichKwongEoS.h | 29 +- .../Misc/VanDerWaalsEoS.h | 29 +- .../Preconditioner/PreconCfsBRJ.h | 12 +- .../RiemannSolvers/AUSM0Solver.h | 10 +- .../RiemannSolvers/AUSM1Solver.h | 10 +- .../RiemannSolvers/AUSM2Solver.h | 10 +- .../RiemannSolvers/AUSM3Solver.h | 10 +- .../RiemannSolvers/AverageSolver.h | 7 +- .../RiemannSolvers/CompressibleSolver.h | 7 +- .../RiemannSolvers/ExactSolverToro.h | 12 +- .../RiemannSolvers/HLLCSolver.h | 12 +- .../RiemannSolvers/HLLSolver.h | 9 +- .../RiemannSolvers/LaxFriedrichsSolver.h | 10 +- .../RiemannSolvers/RoeSolver.h | 16 +- .../RiemannSolvers/RoeSolverSIMD.h | 7 +- .../RiemannSolvers/UnitTests/TestRiemann.cpp | 7 +- .../EquationSystems/MMFDiffusion.h | 18 +- solvers/DummySolver/EquationSystems/Dummy.h | 12 +- .../EquationSystems/ImageWarpingSystem.h | 6 +- .../AdvectionTerms/AdjointAdvection.h | 22 +- .../AdvectionTerms/AlternateSkewAdvection.h | 24 +- .../AdvectionTerms/LinearisedAdvection.h | 28 +- .../AdvectionTerms/NavierStokesAdvection.h | 24 +- .../AdvectionTerms/NoAdvection.h | 24 +- .../AdvectionTerms/SkewSymmetricAdvection.h | 24 +- .../EquationSystems/CoupledLinearNS.h | 18 +- .../EquationSystems/ImplicitExtrapolate.h | 4 +- .../EquationSystems/IncNavierStokes.h | 35 +- .../EquationSystems/MappingExtrapolate.h | 9 +- .../EquationSystems/SmoothedProfileMethod.h | 8 +- .../EquationSystems/StandardExtrapolate.h | 20 +- .../EquationSystems/SubSteppingExtrapolate.h | 19 +- .../SubSteppingExtrapolateWeakPressure.h | 9 +- .../EquationSystems/VCSMapping.h | 17 +- .../VelocityCorrectionScheme.h | 20 +- .../VelocityCorrectionSchemeImplicit.h | 19 +- .../VelocityCorrectionSchemeWeakPressure.h | 13 +- .../EquationSystems/WeakPressureExtrapolate.h | 14 +- .../Filters/FilterAeroForcesSPM.h | 10 +- .../Filters/FilterMovingBody.h | 10 +- .../Filters/FilterReynoldsStresses.cpp | 7 +- .../Filters/FilterReynoldsStresses.h | 21 +- .../Forcing/ForcingMovingBody.h | 11 +- .../Forcing/ForcingStabilityCoupledLNS.h | 11 +- .../Utilities/FldAddFalknerSkanBL.cpp | 8 + .../EquationSystems/IterativeElasticSystem.h | 6 +- .../EquationSystems/LinearElasticSystem.h | 11 +- .../MMFSolver/EquationSystems/MMFMaxwell.cpp | 2 +- .../MMFSolver/EquationSystems/MMFMaxwell.h | 20 +- .../PulseWaveSolver/EquationSystems/AInflow.h | 14 +- .../EquationSystems/BetaPressureArea.h | 69 ++- .../EquationSystems/EmpiricalPressureArea.h | 69 ++- .../EquationSystems/PowerPressureArea.h | 69 ++- .../EquationSystems/PulseWavePropagation.h | 6 +- .../EquationSystems/PulseWaveSystem.h | 18 +- .../PulseWaveSolver/EquationSystems/QInflow.h | 14 +- .../EquationSystems/RCROutflow.h | 14 +- .../EquationSystems/ROutflow.h | 14 +- .../EquationSystems/TerminalOutflow.h | 14 +- .../EquationSystems/TimeDependentInflow.h | 14 +- .../PulseWaveSolver/EquationSystems/UInflow.h | 14 +- .../EquationSystems/UndefinedInOutflow.h | 14 +- .../RiemannSolvers/UpwindPulseSolver.h | 8 +- .../EquationSystems/FileSolution.cpp | 5 +- .../EquationSystems/FileSolution.h | 11 +- .../EquationSystems/LinearSWE.h | 10 +- .../EquationSystems/MMFSWE.cpp | 18 +- .../EquationSystems/MMFSWE.h | 32 +- .../EquationSystems/NonlinearPeregrine.h | 16 +- .../EquationSystems/NonlinearSWE.h | 10 +- .../EquationSystems/ShallowWaterSystem.h | 6 +- .../RiemannSolvers/AverageSolver.h | 7 +- .../RiemannSolvers/HLLCSolver.cpp | 12 + .../RiemannSolvers/HLLCSolver.h | 7 +- .../RiemannSolvers/HLLSolver.cpp | 8 + .../RiemannSolvers/HLLSolver.h | 7 +- .../RiemannSolvers/LaxFriedrichsSolver.h | 7 +- .../RiemannSolvers/LinearAverageSolver.h | 7 +- .../RiemannSolvers/LinearHLLSolver.h | 7 +- .../RiemannSolvers/LinearSWESolver.h | 8 +- .../RiemannSolvers/NonlinearSWESolver.h | 8 +- .../VortexWaveInteractionSolver.cpp | 5 - .../utilities/MeshMove.cpp | 16 +- tests/MetricEigenvalue.cpp | 4 +- tests/MetricEigenvalue.h | 2 +- tests/MetricExecutionTime.cpp | 2 +- tests/MetricExecutionTime.h | 6 +- tests/MetricFile.h | 6 +- tests/MetricFileExists.h | 6 +- tests/MetricL2.h | 2 +- tests/MetricLInf.h | 2 +- tests/MetricNoWarning.h | 6 +- tests/MetricPrecon.h | 2 +- tests/MetricPyUnitTest.h | 2 +- tests/MetricRegex.h | 6 +- 1118 files changed, 7568 insertions(+), 9444 deletions(-) create mode 100644 .clang-tidy mode change 100755 => 100644 library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.h create mode 100644 library/LibUtilities/Kernel/kernel.cpp mode change 100755 => 100644 library/SolverUtils/Filters/FilterBodyFittedVelocity.h diff --git a/.clang-format b/.clang-format index 00b2824f52..26cd8bed53 100644 --- a/.clang-format +++ b/.clang-format @@ -11,7 +11,7 @@ AllowShortCaseLabelsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false IndentCaseLabels: true -Standard: Cpp11 +Standard: c++17 AccessModifierOffset: -4 BinPackParameters: true NamespaceIndentation: None diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000000..b20381a48c --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,6 @@ +Checks: "-*,\ +readability-braces-around-statements,\ +modernize-concat-nested-namespaces,\ +modernize-raw-string-literal,\ +modernize-use-nullptr,\ +modernize-use-override" diff --git a/.gitignore b/.gitignore index 54b93cb425..3c0b1e45bf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ !.gitlab-ci.yml !.gitattributes !.clang-format +!.clang-tidy !.dockerignore !.gitlab-ci # Ignore builds and ThirdParty directories diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 165096b795..4e6026a2c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -149,14 +149,39 @@ include: before_script: - apt-get update && apt-get install -y clang-format-$CL_F_VER git-core script: - - echo `which clang-format-$CL_F_VER` - - ln -s `which clang-format-$CL_F_VER` /usr/bin/clang-format - cd "$CI_PROJECT_DIR" - find $TARGETS -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" | - xargs clang-format-11 --dry-run -Werror + xargs clang-format-$CL_F_VER --dry-run -Werror allow_failure: true timeout: 15m +.clang-tidy-template: &clang-tidy-template + <<: *execution-conditions + image: $CI_REGISTRY_IMAGE:env-ubuntu-jammy-full + needs: ["ubuntu-jammy-full-build-env"] + stage: quality-checks + variables: + NUM_CPUS: 8 + CL_T_VER: 14 + CL_F_VER: 11 + TARGETS: library solvers templates tests utilities + before_script: + - git config --global --add safe.directory "$CI_PROJECT_DIR" + script: + - cd "$CI_PROJECT_DIR" + - EXPORT_COMPILE_COMMANDS=1 BUILD_TYPE=full bash -x .gitlab-ci/build-and-test.sh + - run-clang-tidy-$CL_T_VER -p build -header-filter='(library|solver|tests)' -j$NUM_CPUS -fix -clang-tidy-binary=clang-tidy-$CL_T_VER -clang-apply-replacements-binary=clang-apply-replacements-$CL_T_VER + - find $TARGETS -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" | xargs clang-format-$CL_F_VER -i + - git diff > clang-tidy.diff + - if [ -s clang-tidy.diff ]; then echo "Found changes in clang-tidy"; exit 1; fi + allow_failure: true + timeout: 1h + artifacts: + expire_in: 1 month + when: on_failure + paths: + - clang-tidy.diff + .header-format-template: &header-format-template <<: *execution-conditions image: debian:11-slim @@ -354,7 +379,6 @@ debian-bullseye-xml-format: <<: *xml-format-template needs: [] - # DOCUMENTATION debian-bookworm-documentation-build-env: <<: *execution-conditions @@ -533,7 +557,11 @@ ubuntu-bionic-full-warnings: <<: *compiler-warning-template needs: ["ubuntu-bionic-full-build-and-test"] - +## CLANG-TIDY +ubuntu-jammy-clang-tidy: + <<: *clang-tidy-template + needs: [] + ################################################ ################### FEDORA ################### ################################################ diff --git a/.gitlab-ci/build-and-test.sh b/.gitlab-ci/build-and-test.sh index 1bb67d9583..b9bbcddc06 100644 --- a/.gitlab-ci/build-and-test.sh +++ b/.gitlab-ci/build-and-test.sh @@ -43,6 +43,10 @@ else TEST_JOBS="1" fi +if [[ $EXPORT_COMPILE_COMMANDS != "" ]]; then + BUILD_OPTS="$BUILD_OPTS -DCMAKE_EXPORT_COMPILE_COMMANDS=ON" +fi + # Custom compiler if [[ $BUILD_CC != "" ]]; then BUILD_OPTS="$BUILD_OPTS -DCMAKE_C_COMPILER=${BUILD_CC}" @@ -54,14 +58,20 @@ if [[ $BUILD_FC != "" ]]; then BUILD_OPTS="$BUILD_OPTS -DCMAKE_Fortran_COMPILER=${BUILD_FC}" fi -rm -rf build && mkdir -p build && (cd build && cmake -G 'Unix Makefiles' $BUILD_OPTS ..) && \ - make -C build -j $NUM_CPUS all 2>&1 && \ - make -C build -j $NUM_CPUS install && \ - (cd build && ctest -j $TEST_JOBS --output-on-failure) +rm -rf build && mkdir -p build && (cd build && cmake -G 'Unix Makefiles' $BUILD_OPTS ..) + +if [[ $EXPORT_COMPILE_COMMANDS != "" ]]; then + # If we are just exporting compile commands for clang-tidy, just build any + # third-party dependencies that we need. + make -C build -j $NUM_CPUS thirdparty 2>&1 +else + # Otherwise build and test the code. + make -C build -j $NUM_CPUS all 2>&1 && make -C build -j $NUM_CPUS install && \ + (cd build && ctest -j $TEST_JOBS --output-on-failure) +fi exit_code=$? -if [[ $exit_code -ne 0 ]] -then +if [[ $exit_code -ne 0 ]]; then [[ $OS_VERSION != "macos" ]] && rm -rf build/dist exit $exit_code -fi \ No newline at end of file +fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ac033b9cc..23bda5b66c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ v5.5.0 - Update AssemblyMap to reduce verbosity when using parallel-in-time (!1651) - Tidy-up of Collection library (!1622) - Tidy-up of I/O in BasicUtils (!1623) +- Update to use C++17 nested namespaces (!1556) - Fix a minor bug in ProcessWallNormalData (!1663) - Fix Explist::v_GetNormals and GetElmtNormalLength (!1625) @@ -41,6 +42,7 @@ v5.5.0 **CI** - Disable macOS Intel runner (!1655) - Upgrade Win10 runners (!1656) +- Add `clang-tidy` support to CI for static analysis (!1556) **NekMesh** - Replace deprecated boost::filesystem functions (!1654) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab4d2a8a74..b5ef407082 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,8 +23,8 @@ IF (POLICY CMP0074) CMAKE_POLICY(SET CMP0074 OLD) ENDIF() -# Nektar++ requires C++14. -SET(CMAKE_CXX_STANDARD 14 CACHE STRING "Default value for CXX_STANDARD property of targets") +# Nektar++ requires C++17. +SET(CMAKE_CXX_STANDARD 17 CACHE STRING "Default value for CXX_STANDARD property of targets") SET(CMAKE_CXX_STANDARD_REQUIRED ON) SET(CMAKE_CXX_EXTENSIONS OFF) @@ -241,6 +241,9 @@ ENDIF() # Find ThirdParty libraries and headers. # -------------------------------------- +# Add custom target for third-party compilations. +ADD_CUSTOM_TARGET(thirdparty) + # Need to find MPI first, as other packages depend on the compiler wrappers INCLUDE (ThirdPartyMPI) INCLUDE (ThirdPartyTinyxml) diff --git a/cmake/ThirdPartyArpack.cmake b/cmake/ThirdPartyArpack.cmake index 74b5ff689a..c6a5a07454 100644 --- a/cmake/ThirdPartyArpack.cmake +++ b/cmake/ThirdPartyArpack.cmake @@ -59,6 +59,8 @@ IF (NEKTAR_USE_ARPACK) ELSE() ADD_CUSTOM_TARGET(arpack-ng-1.0 ALL) ENDIF() + + ADD_DEPENDENCIES(thirdparty arpack-ng-1.0) ENDIF() diff --git a/cmake/ThirdPartyBlasLapack.cmake b/cmake/ThirdPartyBlasLapack.cmake index 3017fb908e..d590c65a19 100644 --- a/cmake/ThirdPartyBlasLapack.cmake +++ b/cmake/ThirdPartyBlasLapack.cmake @@ -79,5 +79,7 @@ ELSE() THIRDPARTY_LIBRARY(BLAS_LAPACK SHARED blas lapack DESCRIPTION "BLAS and LAPACK libraries") MESSAGE(STATUS "Build BLAS/LAPACK: ${BLAS_LAPACK}") + + ADD_DEPENDENCIES(thirdparty lapack-3.7.1) ENDIF() ENDIF() diff --git a/cmake/ThirdPartyBoost.cmake b/cmake/ThirdPartyBoost.cmake index e4fd75664c..ff3dc85319 100644 --- a/cmake/ThirdPartyBoost.cmake +++ b/cmake/ThirdPartyBoost.cmake @@ -231,4 +231,5 @@ ELSE (THIRDPARTY_BUILD_BOOST) SET(Boost_CONFIG_LIBRARY_DIR ${Boost_LIBRARY_DIRS}) ENDIF (THIRDPARTY_BUILD_BOOST) +ADD_DEPENDENCIES(thirdparty boost) INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS}) diff --git a/cmake/ThirdPartyCCM.cmake b/cmake/ThirdPartyCCM.cmake index 8f1c2f60a5..984dc6255e 100644 --- a/cmake/ThirdPartyCCM.cmake +++ b/cmake/ThirdPartyCCM.cmake @@ -76,6 +76,8 @@ ELSE() INCLUDE_DIRECTORIES(SYSTEM NekMesh ${CCMIO_INCLUDE_DIR}) ENDIF (THIRDPARTY_BUILD_CCMIO) +ADD_DEPENDENCIES(thirdparty libccmio-2.6.1) + SET(CCMIO_LIBRARIES ${CCMIO_LIBRARY} ${CCMIO_ADF_LIBRARY}) MARK_AS_ADVANCED(CCMIO_INCLUDE_DIR) diff --git a/cmake/ThirdPartyCwipi.cmake b/cmake/ThirdPartyCwipi.cmake index 2ded1e2d6d..8465fda4f5 100644 --- a/cmake/ThirdPartyCwipi.cmake +++ b/cmake/ThirdPartyCwipi.cmake @@ -73,9 +73,11 @@ IF ( NEKTAR_USE_CWIPI ) MESSAGE(STATUS "Found CWIPI: ${CWIPI_LIBRARY}") SET(CWIPI_CONFIG_INCLUDE_DIR ${CWIPI_INCLUDE_DIR}) ENDIF() -ENDIF( NEKTAR_USE_CWIPI ) -INCLUDE_DIRECTORIES(SYSTEM ${CWIPI_INCLUDE_DIR}) + ADD_DEPENDENCIES(thirdparty cwipi-0.11.1) + + INCLUDE_DIRECTORIES(SYSTEM ${CWIPI_INCLUDE_DIR}) -MARK_AS_ADVANCED(CWIPI_LIBRARY) -MARK_AS_ADVANCED(CWIPI_INCLUDE_DIR) + MARK_AS_ADVANCED(CWIPI_LIBRARY) + MARK_AS_ADVANCED(CWIPI_INCLUDE_DIR) +ENDIF( NEKTAR_USE_CWIPI ) diff --git a/cmake/ThirdPartyFFTW.cmake b/cmake/ThirdPartyFFTW.cmake index f4e0d23e81..f1ede66170 100644 --- a/cmake/ThirdPartyFFTW.cmake +++ b/cmake/ThirdPartyFFTW.cmake @@ -62,6 +62,8 @@ IF (NEKTAR_USE_FFTW) SET(FFTW_CONFIG_INCLUDE_DIR ${FFTW_INCLUDE_DIR}) ENDIF() + ADD_DEPENDENCIES(thirdparty fftw-3.2.2) + # Test if FFTW path is a system path. Only add to include path if not an # implicitly defined CXX include path (due to GCC 6.x now providing its own # version of some C header files and -isystem reorders include paths). diff --git a/cmake/ThirdPartyHDF5.cmake b/cmake/ThirdPartyHDF5.cmake index 6d53afadbd..cb120c76e3 100644 --- a/cmake/ThirdPartyHDF5.cmake +++ b/cmake/ThirdPartyHDF5.cmake @@ -77,6 +77,8 @@ IF (NEKTAR_USE_HDF5) ENDIF() ENDIF() + ADD_DEPENDENCIES(thirdparty hdf5-1.8.16) + MARK_AS_ADVANCED(HDF5_LIBRARIES) MARK_AS_ADVANCED(HDF5_INCLUDE_DIRS) INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS}) diff --git a/cmake/ThirdPartyMPI.cmake b/cmake/ThirdPartyMPI.cmake index 093aefcf2f..d2407cfaea 100644 --- a/cmake/ThirdPartyMPI.cmake +++ b/cmake/ThirdPartyMPI.cmake @@ -75,6 +75,8 @@ IF( NEKTAR_USE_MPI ) MARK_AS_ADVANCED(XXT_LIBRARY) MESSAGE(STATUS "Build GSMPI: ${GSMPI_LIBRARY}") MESSAGE(STATUS "Build XXT: ${XXT_LIBRARY}") + + ADD_DEPENDENCIES(thirdparty gsmpi-1.2.1_2) ELSE (THIRDPARTY_BUILD_GSMPI) MESSAGE(FATAL_ERROR "Must build GSMPI and XXT") ENDIF (THIRDPARTY_BUILD_GSMPI) diff --git a/cmake/ThirdPartyMetis.cmake b/cmake/ThirdPartyMetis.cmake index 029b4e3a10..41427912c6 100644 --- a/cmake/ThirdPartyMetis.cmake +++ b/cmake/ThirdPartyMetis.cmake @@ -84,4 +84,6 @@ IF (NEKTAR_USE_METIS) MESSAGE(STATUS "Found Metis: ${METIS_LIBRARY}") SET(METIS_CONFIG_INCLUDE_DIR ${METIS_INCLUDE_DIR}) ENDIF() + + ADD_DEPENDENCIES(thirdparty metis-5.1.0) ENDIF() diff --git a/cmake/ThirdPartyOCE.cmake b/cmake/ThirdPartyOCE.cmake index fdd7d4521b..9c54206082 100644 --- a/cmake/ThirdPartyOCE.cmake +++ b/cmake/ThirdPartyOCE.cmake @@ -89,6 +89,8 @@ IF(NEKTAR_USE_MESHGEN) ELSE() ADD_CUSTOM_TARGET(oce-0.18.3 ALL) ENDIF() + + ADD_DEPENDENCIES(thirdparty oce-0.18.3) ENDIF() INCLUDE_DIRECTORIES(SYSTEM ${OCC_INCLUDE_DIR}) diff --git a/cmake/ThirdPartyPETSc.cmake b/cmake/ThirdPartyPETSc.cmake index 7662877bf8..9b27f9f18c 100644 --- a/cmake/ThirdPartyPETSc.cmake +++ b/cmake/ThirdPartyPETSc.cmake @@ -139,6 +139,8 @@ IF (NEKTAR_USE_PETSC) ADD_CUSTOM_TARGET(petsc-3.11.4 ALL) ENDIF (THIRDPARTY_BUILD_PETSC) + ADD_DEPENDENCIES(thirdparty petsc-3.11.4) + ADD_DEFINITIONS(-DNEKTAR_USING_PETSC) INCLUDE_DIRECTORIES(${PETSC_INCLUDE_DIRS}) IF (NOT NEKTAR_USE_MPI) diff --git a/cmake/ThirdPartyPython.cmake b/cmake/ThirdPartyPython.cmake index e37eab058e..4c682b48c3 100644 --- a/cmake/ThirdPartyPython.cmake +++ b/cmake/ThirdPartyPython.cmake @@ -149,6 +149,8 @@ IF (NEKTAR_BUILD_PYTHON) ADD_DEFINITIONS(-DBOOST_HAS_NUMPY) ENDIF() + ADD_DEPENDENCIES(thirdparty boost-numpy) + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/python/setup.py.in ${CMAKE_BINARY_DIR}/setup.py) ADD_CUSTOM_TARGET(nekpy-install-user diff --git a/cmake/ThirdPartyScotch.cmake b/cmake/ThirdPartyScotch.cmake index 88ee2774e5..c32b4c165c 100644 --- a/cmake/ThirdPartyScotch.cmake +++ b/cmake/ThirdPartyScotch.cmake @@ -148,6 +148,8 @@ IF (NEKTAR_USE_SCOTCH) SET(SCOTCH_CONFIG_INCLUDE_DIR ${SCOTCH_INCLUDE_DIR}) ENDIF (THIRDPARTY_BUILD_SCOTCH) + ADD_DEPENDENCIES(thirdparty scotch-6.0.4) + INCLUDE_DIRECTORIES(SYSTEM ${SCOTCH_INCLUDE_DIR} ${PTSCOTCH_INCLUDE_DIR}) MARK_AS_ADVANCED(SCOTCH_LIBRARY) diff --git a/cmake/ThirdPartyTetGen.cmake b/cmake/ThirdPartyTetGen.cmake index 7b509e3427..2b1dcecca3 100644 --- a/cmake/ThirdPartyTetGen.cmake +++ b/cmake/ThirdPartyTetGen.cmake @@ -80,6 +80,8 @@ IF(NEKTAR_USE_MESHGEN) ENDIF() ENDIF() + ADD_DEPENDENCIES(thirdparty tetgen-1.5) + MARK_AS_ADVANCED(TETGEN_LIBRARY) MARK_AS_ADVANCED(TETGEN_INCLUDE_DIR) INCLUDE_DIRECTORIES(${TETGEN_INCLUDE_DIR}) diff --git a/cmake/ThirdPartyTinyxml.cmake b/cmake/ThirdPartyTinyxml.cmake index fe48bc1dfa..4de5bd3ec5 100644 --- a/cmake/ThirdPartyTinyxml.cmake +++ b/cmake/ThirdPartyTinyxml.cmake @@ -85,6 +85,8 @@ ELSE() SET(TINYXML_CONFIG_INCLUDE_DIR ${TINYXML_INCLUDE_DIR}) ENDIF (THIRDPARTY_BUILD_TINYXML) +ADD_DEPENDENCIES(thirdparty tinyxml-2.6.2) + INCLUDE_DIRECTORIES(${TINYXML_INCLUDE_DIR}) MARK_AS_ADVANCED(TINYXML_INCLUDE_DIR) diff --git a/cmake/ThirdPartyTriangle.cmake b/cmake/ThirdPartyTriangle.cmake index e23f9e4d6f..40c68a34cc 100644 --- a/cmake/ThirdPartyTriangle.cmake +++ b/cmake/ThirdPartyTriangle.cmake @@ -55,4 +55,6 @@ IF(NEKTAR_USE_MESHGEN) MARK_AS_ADVANCED(TRIANGLE_LIBRARY) MARK_AS_ADVANCED(TRIANGLE_INCLUDE_DIR) INCLUDE_DIRECTORIES(${TRIANGLE_INCLUDE_DIR}) + + ADD_DEPENDENCIES(thirdparty triangle-1.6) ENDIF(NEKTAR_USE_MESHGEN) diff --git a/cmake/ThirdPartyVTK.cmake b/cmake/ThirdPartyVTK.cmake index 8312aece27..0569aa845e 100644 --- a/cmake/ThirdPartyVTK.cmake +++ b/cmake/ThirdPartyVTK.cmake @@ -32,6 +32,7 @@ IF( NEKTAR_USE_VTK ) SET(VTK_FOUND 1) SET(VTK_USE_FILE ${VTK_DIR}/UseVTK.cmake) INCLUDE (${VTK_DIR}/VTKConfig.cmake) + ADD_DEPENDENCIES(thirdparty vtk-5.10.1) ELSE() # VTK9 uses modified component names - VTK9 can still be discovered with # the old names but these are deprecated and produce a number of warnings. diff --git a/cmake/ThirdPartyZlib.cmake b/cmake/ThirdPartyZlib.cmake index 075b17fb8f..dd8c4811be 100644 --- a/cmake/ThirdPartyZlib.cmake +++ b/cmake/ThirdPartyZlib.cmake @@ -77,4 +77,6 @@ ELSE (THIRDPARTY_BUILD_ZLIB) SET(ZLIB_CONFIG_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS}) ENDIF (THIRDPARTY_BUILD_ZLIB) +ADD_DEPENDENCIES(thirdparty zlib-1.2.9) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) diff --git a/docker/nektar-env/jammy_default_packages.txt b/docker/nektar-env/jammy_default_packages.txt index dc9fdc996c..9d62e4ac9f 100644 --- a/docker/nektar-env/jammy_default_packages.txt +++ b/docker/nektar-env/jammy_default_packages.txt @@ -1,7 +1,11 @@ ccache clang-14 +clang-tidy-14 +clang-tools-14 +clang-format-11 cmake g++ +git-core libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev diff --git a/library/Collections/BwdTrans.cpp b/library/Collections/BwdTrans.cpp index 1d8dd6adf9..3ae318ca6c 100644 --- a/library/Collections/BwdTrans.cpp +++ b/library/Collections/BwdTrans.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { using LibUtilities::eHexahedron; @@ -78,14 +76,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -156,7 +154,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2, wsp); @@ -177,15 +175,15 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "BwdTrans_MatrixFree: Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -278,14 +276,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -365,14 +363,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -458,14 +456,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -559,14 +557,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -657,14 +655,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -765,14 +763,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -835,7 +833,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -935,14 +933,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1010,7 +1008,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -1080,14 +1078,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1154,7 +1152,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -1244,14 +1242,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); ASSERTL0(false, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1303,6 +1301,4 @@ OperatorKey BwdTrans_SumFac_Pyr::m_type = OperatorKey(ePyramid, eBwdTrans, eSumFac, false), BwdTrans_SumFac_Pyr::create, "BwdTrans_SumFac_Pyr"); -} // namespace Collections - -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/CoalescedGeomData.cpp b/library/Collections/CoalescedGeomData.cpp index 1e77186518..fdba5ca24b 100644 --- a/library/Collections/CoalescedGeomData.cpp +++ b/library/Collections/CoalescedGeomData.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { const Array<OneD, const NekDouble> &CoalescedGeomData::GetJac( @@ -367,5 +365,4 @@ bool CoalescedGeomData::IsDeformed( return lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed; } -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/CoalescedGeomData.h b/library/Collections/CoalescedGeomData.h index af2b984915..3d89e41273 100644 --- a/library/Collections/CoalescedGeomData.h +++ b/library/Collections/CoalescedGeomData.h @@ -40,9 +40,7 @@ #include <StdRegions/StdExpansion.h> -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { using namespace tinysimd; @@ -91,7 +89,6 @@ typedef std::shared_ptr<CoalescedGeomData> CoalescedGeomDataSharedPtr; static CoalescedGeomDataSharedPtr GeomDataNull; -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections #endif diff --git a/library/Collections/Collection.cpp b/library/Collections/Collection.cpp index 7b061f9545..1b657c4300 100644 --- a/library/Collections/Collection.cpp +++ b/library/Collections/Collection.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { /** @@ -90,5 +88,4 @@ void Collection::Initialise(const OperatorType opType, } } } -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/Collection.h b/library/Collections/Collection.h index 0e723cedbc..2b0359c2c0 100644 --- a/library/Collections/Collection.h +++ b/library/Collections/Collection.h @@ -44,9 +44,7 @@ #include <SpatialDomains/Geometry.h> #include <StdRegions/StdExpansion.h> -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { /** @@ -161,7 +159,6 @@ inline bool Collection::HasOperator(const OperatorType &op) return (m_ops.find(op) != m_ops.end()); } -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections #endif diff --git a/library/Collections/CollectionOptimisation.cpp b/library/Collections/CollectionOptimisation.cpp index a174ecdafd..3ea92971f0 100644 --- a/library/Collections/CollectionOptimisation.cpp +++ b/library/Collections/CollectionOptimisation.cpp @@ -46,9 +46,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { // static manager for Operator ImplementationMap @@ -697,5 +695,4 @@ void CollectionOptimisation::UpdateOptFile(std::string sessName, } } -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/CollectionOptimisation.h b/library/Collections/CollectionOptimisation.h index 7a079dc35e..7833f2e517 100644 --- a/library/Collections/CollectionOptimisation.h +++ b/library/Collections/CollectionOptimisation.h @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/SessionReader.h> #include <tinyxml.h> -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { class OpImpTimingKey @@ -172,6 +170,5 @@ private: void ReadCollOps(TiXmlElement *xmlCol, GlobalOpMap &global, bool verbose); }; -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections #endif diff --git a/library/Collections/Helmholtz.cpp b/library/Collections/Helmholtz.cpp index 2bb3075a52..81427e3db9 100644 --- a/library/Collections/Helmholtz.cpp +++ b/library/Collections/Helmholtz.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { using LibUtilities::eHexahedron; @@ -69,7 +67,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(entry2, entry3, wsp); @@ -88,14 +86,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(coll_phys_offset); m_factors = factors; @@ -168,7 +166,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -395,7 +393,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); @@ -407,8 +405,8 @@ public: * @param factors Map of factors * @param coll_phys_offset Unused */ - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(coll_phys_offset); @@ -552,7 +550,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2, wsp); @@ -571,7 +569,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); @@ -580,8 +578,8 @@ public: /** * */ - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(coll_phys_offset); @@ -732,5 +730,4 @@ OperatorKey Helmholtz_MatrixFree::m_typeArr[] = { Helmholtz_MatrixFree::create, "Helmholtz_MatrixFree_Tet"), }; -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/IProduct.cpp b/library/Collections/IProduct.cpp index 09ccc7960f..53d23a0109 100644 --- a/library/Collections/IProduct.cpp +++ b/library/Collections/IProduct.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { /** @@ -586,5 +584,4 @@ void TetIProduct(bool sortTopEdge, int numElmt, int nquad0, int nquad1, } } -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/IProduct.h b/library/Collections/IProduct.h index 09e04d798e..7565d22d99 100644 --- a/library/Collections/IProduct.h +++ b/library/Collections/IProduct.h @@ -36,9 +36,7 @@ #ifndef NEKTAR_LIBRARY_COLLECTIONS_IPRODUCT_H #define NEKTAR_LIBRARY_COLLECTIONS_IPRODUCT_H -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { void QuadIProduct(bool colldir0, bool colldir1, int numElmt, int nquad0, @@ -93,6 +91,5 @@ void TetIProduct(bool sortTopEdge, int numElmt, int nquad0, int nquad1, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &wsp); -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections #endif diff --git a/library/Collections/IProductWRTBase.cpp b/library/Collections/IProductWRTBase.cpp index a41a3078c4..81ea0a70e6 100644 --- a/library/Collections/IProductWRTBase.cpp +++ b/library/Collections/IProductWRTBase.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { using LibUtilities::eHexahedron; @@ -70,7 +68,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -98,14 +96,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -176,11 +174,11 @@ public: ~IProductWRTBase_MatrixFree() final = default; - virtual void operator()(const Array<OneD, const NekDouble> &input, - Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &output1, - Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + void operator()(const Array<OneD, const NekDouble> &input, + Array<OneD, NekDouble> &output, + Array<OneD, NekDouble> &output1, + Array<OneD, NekDouble> &output2, + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2, wsp); @@ -201,14 +199,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -289,7 +287,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -310,14 +308,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -391,7 +389,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2, wsp); @@ -408,14 +406,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -492,7 +490,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -514,14 +512,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -569,7 +567,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -582,14 +580,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -646,7 +644,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -659,14 +657,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -728,7 +726,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -741,14 +739,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -815,7 +813,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -828,14 +826,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -907,7 +905,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -920,14 +918,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -999,7 +997,7 @@ public: Array<OneD, NekDouble> &output, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(output1, output2); @@ -1012,14 +1010,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1077,5 +1075,4 @@ OperatorKey IProductWRTBase_SumFac_Pyr::m_type = OperatorKey(ePyramid, eIProductWRTBase, eSumFac, false), IProductWRTBase_SumFac_Pyr::create, "IProductWRTBase_SumFac_Pyr"); -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/IProductWRTDerivBase.cpp b/library/Collections/IProductWRTDerivBase.cpp index 0be67363a4..4449e614af 100644 --- a/library/Collections/IProductWRTDerivBase.cpp +++ b/library/Collections/IProductWRTDerivBase.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { using LibUtilities::eHexahedron; @@ -70,7 +68,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); @@ -164,14 +162,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -276,7 +274,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(wsp); @@ -345,14 +343,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -446,7 +444,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); @@ -543,14 +541,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -637,7 +635,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(wsp); @@ -673,14 +671,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -762,7 +760,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { Array<OneD, Array<OneD, const NekDouble>> in(3); Array<OneD, NekDouble> output; @@ -813,14 +811,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -871,7 +869,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); @@ -939,14 +937,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1043,7 +1041,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); @@ -1124,14 +1122,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1232,7 +1230,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); @@ -1310,14 +1308,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1444,7 +1442,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); @@ -1545,14 +1543,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1710,7 +1708,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); @@ -1798,14 +1796,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1962,7 +1960,7 @@ public: Array<OneD, NekDouble> &entry1, Array<OneD, NekDouble> &entry2, Array<OneD, NekDouble> &entry3, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { unsigned int nPhys = m_stdExp->GetTotPoints(); unsigned int ntot = m_numElmt * nPhys; @@ -2058,14 +2056,14 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(dir, input, output, wsp); NEKERROR(ErrorUtil::efatal, "Not valid for this operator."); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -2161,5 +2159,4 @@ OperatorKey IProductWRTDerivBase_SumFac_Pyr::m_type = IProductWRTDerivBase_SumFac_Pyr::create, "IProductWRTDerivBase_SumFac_Pyr"); -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/MatrixFreeBase.h b/library/Collections/MatrixFreeBase.h index ac8b1c1783..be92a53fa3 100644 --- a/library/Collections/MatrixFreeBase.h +++ b/library/Collections/MatrixFreeBase.h @@ -38,9 +38,7 @@ #include <StdRegions/StdExpansion.h> #include <boost/core/ignore_unused.hpp> -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { class MatrixFreeBase @@ -182,6 +180,5 @@ protected: Array<OneD, NekDouble> m_input; Array<OneD, Array<OneD, NekDouble>> m_output; }; -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections #endif // NEKTAR_LIBRARY_COLLECTIONS_MATRIXFREEBASE_H diff --git a/library/Collections/Operator.cpp b/library/Collections/Operator.cpp index 5567f8e911..71ff91688c 100644 --- a/library/Collections/Operator.cpp +++ b/library/Collections/Operator.cpp @@ -35,9 +35,7 @@ #include <Collections/Collection.h> #include <Collections/Operator.h> -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { /** @@ -129,5 +127,4 @@ std::ostream &operator<<(std::ostream &os, OperatorKey const &p) return os; } -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Collections/Operator.h b/library/Collections/Operator.h index 15dbe15950..6f77dd2d6c 100644 --- a/library/Collections/Operator.h +++ b/library/Collections/Operator.h @@ -55,9 +55,7 @@ factors); \ } -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { class CoalescedGeomData; @@ -192,6 +190,6 @@ bool operator<(OperatorKey const &p1, OperatorKey const &p2); /// Stream output operator for OperatorKey objects std::ostream &operator<<(std::ostream &os, OperatorKey const &p); -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections + #endif diff --git a/library/Collections/PhysDeriv.cpp b/library/Collections/PhysDeriv.cpp index f451faa68c..4407554ca3 100644 --- a/library/Collections/PhysDeriv.cpp +++ b/library/Collections/PhysDeriv.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace Collections +namespace Nektar::Collections { using LibUtilities::eHexahedron; @@ -69,7 +67,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); @@ -129,7 +127,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -175,8 +173,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -269,7 +267,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(wsp); @@ -309,7 +307,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(wsp); if (m_isPadded) @@ -325,8 +323,8 @@ public: Vmath::Vcopy(m_nOut, m_output[dir], 1, output, 1); } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -428,7 +426,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); @@ -490,7 +488,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -534,8 +532,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -608,7 +606,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(wsp); @@ -654,7 +652,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { boost::ignore_unused(wsp); @@ -669,8 +667,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -736,7 +734,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { const int nqcol = m_nquad0 * m_numElmt; @@ -796,7 +794,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { const int nqcol = m_nquad0 * m_numElmt; @@ -824,8 +822,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -873,7 +871,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { const int nqtot = m_nquad0 * m_nquad1; @@ -947,7 +945,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { const int nqtot = m_nquad0 * m_nquad1; const int nqcol = nqtot * m_numElmt; @@ -990,8 +988,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1043,7 +1041,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { const int nqtot = m_nquad0 * m_nquad1; @@ -1126,7 +1124,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { const int nqtot = m_nquad0 * m_nquad1; const int nqcol = nqtot * m_numElmt; @@ -1178,8 +1176,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1258,7 +1256,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); @@ -1334,7 +1332,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -1396,8 +1394,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1454,7 +1452,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -1556,7 +1554,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -1646,8 +1644,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1736,7 +1734,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -1823,7 +1821,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -1898,8 +1896,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -1976,7 +1974,7 @@ public: Array<OneD, NekDouble> &output0, Array<OneD, NekDouble> &output1, Array<OneD, NekDouble> &output2, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -2071,7 +2069,7 @@ public: void operator()(int dir, const Array<OneD, const NekDouble> &input, Array<OneD, NekDouble> &output, - Array<OneD, NekDouble> &wsp) override final + Array<OneD, NekDouble> &wsp) final { int nPhys = m_stdExp->GetTotPoints(); int ntot = m_numElmt * nPhys; @@ -2154,8 +2152,8 @@ public: } } - virtual void CheckFactors(StdRegions::FactorMap factors, - int coll_phys_offset) override + void CheckFactors(StdRegions::FactorMap factors, + int coll_phys_offset) override { boost::ignore_unused(factors, coll_phys_offset); ASSERTL0(false, "Not valid for this operator."); @@ -2223,5 +2221,4 @@ OperatorKey PhysDeriv_SumFac_Pyr::m_typeArr[] = { OperatorKey(ePyramid, ePhysDeriv, eSumFac, false), PhysDeriv_SumFac_Pyr::create, "PhysDeriv_SumFac_Pyr")}; -} // namespace Collections -} // namespace Nektar +} // namespace Nektar::Collections diff --git a/library/Demos/LibUtilities/ErrorStream.cpp b/library/Demos/LibUtilities/ErrorStream.cpp index be2d2a58b7..3fa0a2442a 100644 --- a/library/Demos/LibUtilities/ErrorStream.cpp +++ b/library/Demos/LibUtilities/ErrorStream.cpp @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) try { char *fake_argv[3] = {(char *)"ErrorStream", (char *)"missing.xml", - NULL}; + nullptr}; LibUtilities::SessionReaderSharedPtr session = LibUtilities::SessionReader::CreateInstance(2, fake_argv); session->InitSession(); diff --git a/library/Demos/LibUtilities/FieldIOBenchmarker.cpp b/library/Demos/LibUtilities/FieldIOBenchmarker.cpp index 6ae54b1ee7..85ec8a2443 100644 --- a/library/Demos/LibUtilities/FieldIOBenchmarker.cpp +++ b/library/Demos/LibUtilities/FieldIOBenchmarker.cpp @@ -245,7 +245,9 @@ Array<OneD, int> ReadIDsForThisRank(Experiment &exp, FieldIOSharedPtr fio) { // Find the index of the file that contains the element index we want while (!(elStartFile[iFile] <= iEl && iEl < elStopFile[iFile])) + { iFile++; + } unsigned startInFile = iEl - elStartFile[iFile]; unsigned stopInFile; @@ -471,7 +473,9 @@ Results TestRead(Experiment &exp) Results TestWrite(Experiment &exp) { if (exp.verbose) + { std::cout << "Reading in input: " << exp.dataSource << std::endl; + } std::vector<FieldDefinitionsSharedPtr> fielddefs; std::vector<std::vector<NekDouble>> fielddata; diff --git a/library/Demos/LibUtilities/NodalDemo.cpp b/library/Demos/LibUtilities/NodalDemo.cpp index 865cd51440..c228780e73 100644 --- a/library/Demos/LibUtilities/NodalDemo.cpp +++ b/library/Demos/LibUtilities/NodalDemo.cpp @@ -137,7 +137,7 @@ int main(int argc, char *argv[]) // Generate nodal utility. ShapeType shape = nodalTypes[pointsType]; - NodalUtil *util = NULL; + NodalUtil *util = nullptr; if (shape == eTriangle) { diff --git a/library/Demos/LibUtilities/TimeIntegrationDemo.cpp b/library/Demos/LibUtilities/TimeIntegrationDemo.cpp index 6657526f95..a957f05bbc 100644 --- a/library/Demos/LibUtilities/TimeIntegrationDemo.cpp +++ b/library/Demos/LibUtilities/TimeIntegrationDemo.cpp @@ -259,7 +259,7 @@ public: // ----------------------------------------------------------------- void EvaluateExactSolution(Array<OneD, Array<OneD, double>> &outarray, - const NekDouble time) const; + const NekDouble time) const override; // ----------------------------------------------------------------- @@ -305,9 +305,13 @@ public: // Initialize a random seed using the time. if (test) + { srand(0); + } else - srand(time(NULL)); + { + srand(time(nullptr)); + } // Randomly generate the jacobian in a way that essentially // ensures diagonalizability with real eigenvalues and @@ -369,7 +373,7 @@ public: // ----------------------------------------------------------------- void EvaluateExactSolution(Array<OneD, Array<OneD, double>> &outarray, - const NekDouble time) const; + const NekDouble time) const override; // ----------------------------------------------------------------- Array<OneD, std::complex<NekDouble>> &GetLambda() @@ -405,9 +409,13 @@ public: m_alpha = alpha; if (test) + { srand(0); + } else - srand(time(NULL)); + { + srand(time(nullptr)); + } // Initial values set to zero m_u0 = Array<OneD, Array<OneD, NekDouble>>(m_nVars); @@ -433,7 +441,7 @@ public: // ----------------------------------------------------------------- void EvaluateExactSolution(Array<OneD, Array<OneD, double>> &outarray, - const NekDouble time) const; + const NekDouble time) const override; // ----------------------------------------------------------------- private: @@ -798,8 +806,10 @@ int main(int argc, char *argv[]) // Write the time step and time if (printS || L2) + { std::cout << "Time step: " << timeStep << " " << "Time: " << time << std::endl; + } solverSharedPtr->GetMinMaxValues(exactSol, approxSol, printS); @@ -1169,26 +1179,34 @@ void DemoSolver::GenerateGnuplotScript(const std::string &method) const outfile << "set title 'Approximate vs exact solution using method "; if (m_nVars > 1) + { outfile << method << "'" << std::endl << "set xlabel 'variable'" << std::endl << "set ylabel 'u'" << std::endl; + } else + { outfile << method << "'" << std::endl << "set xlabel 'x'" << std::endl << "set ylabel 'u'" << std::endl; + } } else if (j == 0) { outfile << "set title 'Error using method "; if (m_nVars > 1) + { outfile << method << "'" << std::endl << "set xlabel 'variable'" << std::endl << "set ylabel 'u'" << std::endl; + } else + { outfile << method << "'" << std::endl << "set xlabel 'x'" << std::endl << "set ylabel 'u'" << std::endl; + } } else if (j == 1) { diff --git a/library/Demos/SpatialDomains/PartitionAnalyse.cpp b/library/Demos/SpatialDomains/PartitionAnalyse.cpp index 05e63fee63..431c336993 100644 --- a/library/Demos/SpatialDomains/PartitionAnalyse.cpp +++ b/library/Demos/SpatialDomains/PartitionAnalyse.cpp @@ -51,15 +51,15 @@ public: m_size = size; m_type = "Faux parallel"; } - FauxComm(int size) : CommSerial(0, NULL) + FauxComm(int size) : CommSerial(0, nullptr) { m_size = size; m_type = "Faux parallel"; } - virtual ~FauxComm() + ~FauxComm() override { } - void v_SplitComm(int pRows, int pColumns, int pTime) + void v_SplitComm(int pRows, int pColumns, int pTime) override { m_commRow = std::shared_ptr<FauxComm>(new FauxComm(pColumns)); m_commColumn = std::shared_ptr<FauxComm>(new FauxComm(pRows)); diff --git a/library/FieldUtils/Field.hpp b/library/FieldUtils/Field.hpp index 18b016ba2e..8fab36d12b 100644 --- a/library/FieldUtils/Field.hpp +++ b/library/FieldUtils/Field.hpp @@ -54,9 +54,7 @@ namespace po = boost::program_options; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { struct Field @@ -989,7 +987,6 @@ private: }; typedef std::shared_ptr<Field> FieldSharedPtr; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/FieldConvertComm.hpp b/library/FieldUtils/FieldConvertComm.hpp index f65b267585..70820b6c71 100644 --- a/library/FieldUtils/FieldConvertComm.hpp +++ b/library/FieldUtils/FieldConvertComm.hpp @@ -37,9 +37,7 @@ #include <LibUtilities/Communication/CommSerial.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class FieldConvertComm : public LibUtilities::CommSerial @@ -52,16 +50,16 @@ public: m_rank = rank; m_type = "FieldConvert parallel"; } - FieldConvertComm(int size, int rank) : CommSerial(0, NULL) + FieldConvertComm(int size, int rank) : CommSerial(0, nullptr) { m_size = size; m_rank = rank; m_type = "FieldConvert parallel"; } - virtual ~FieldConvertComm() + ~FieldConvertComm() override { } - void v_SplitComm(int pRows, int pColumns, int pTime) + void v_SplitComm(int pRows, int pColumns, int pTime) override { ASSERTL0(pTime == 1, "FieldConvertComm does not support parallel in time!"); @@ -73,17 +71,17 @@ public: } protected: - int v_GetRank(void) + int v_GetRank(void) override { return m_rank; } - bool v_TreatAsRankZero(void) + bool v_TreatAsRankZero(void) override { return true; } - bool v_IsSerial(void) + bool v_IsSerial(void) override { return true; } @@ -96,6 +94,5 @@ protected: private: int m_rank; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/InputModules/InputDat.cpp b/library/FieldUtils/InputModules/InputDat.cpp index 791d9f49d3..03752496f8 100644 --- a/library/FieldUtils/InputModules/InputDat.cpp +++ b/library/FieldUtils/InputModules/InputDat.cpp @@ -46,9 +46,7 @@ using namespace std; #include "InputDat.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey InputDat::m_className[1] = { @@ -219,5 +217,4 @@ void InputDat::ReadTecplotFEBlockZone(std::ifstream &datFile, string &line, getline(datFile, line); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/InputModules/InputDat.h b/library/FieldUtils/InputModules/InputDat.h index 228aed56fc..90c6278718 100644 --- a/library/FieldUtils/InputModules/InputDat.h +++ b/library/FieldUtils/InputModules/InputDat.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Input module for Xml files. @@ -47,7 +45,7 @@ class InputDat : public InputModule { public: InputDat(FieldSharedPtr f); - virtual ~InputDat(); + ~InputDat() override; /// Creates an instance of this class static ModuleSharedPtr create(FieldSharedPtr f) { @@ -57,19 +55,19 @@ public: static ModuleKey m_className[]; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "InputDat"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing input dat file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreatePts; } @@ -79,6 +77,5 @@ private: Array<OneD, Array<OneD, NekDouble>> &pts, std::vector<Array<OneD, int>> &ptsConn); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/InputModules/InputFld.cpp b/library/FieldUtils/InputModules/InputFld.cpp index a1f0b33862..86e2f99c7d 100644 --- a/library/FieldUtils/InputModules/InputFld.cpp +++ b/library/FieldUtils/InputModules/InputFld.cpp @@ -41,9 +41,7 @@ using namespace std; #include "InputFld.h" using namespace Nektar; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey InputFld::m_className[4] = { @@ -137,5 +135,4 @@ void InputFld::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/InputModules/InputFld.h b/library/FieldUtils/InputModules/InputFld.h index 321bc6dcb5..e63c927655 100644 --- a/library/FieldUtils/InputModules/InputFld.h +++ b/library/FieldUtils/InputModules/InputFld.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -49,7 +47,7 @@ class InputFld : public InputModule { public: InputFld(FieldSharedPtr f); - virtual ~InputFld(); + ~InputFld() override; /// Creates an instance of this class static ModuleSharedPtr create(FieldSharedPtr f) @@ -60,26 +58,25 @@ public: static ModuleKey m_className[]; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "InputFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing input fld file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreateFieldData; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/InputModules/InputNek5000.cpp b/library/FieldUtils/InputModules/InputNek5000.cpp index 2e7efc0d0d..a8b21b69e3 100644 --- a/library/FieldUtils/InputModules/InputNek5000.cpp +++ b/library/FieldUtils/InputModules/InputNek5000.cpp @@ -43,9 +43,7 @@ using namespace std; #include "InputNek5000.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey InputNek5000::m_className[1] = { @@ -273,5 +271,4 @@ void InputNek5000::v_Process(po::variables_map &vm) // save field names m_f->m_variables = m_f->m_fielddef[0]->m_fields; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/InputModules/InputNek5000.h b/library/FieldUtils/InputModules/InputNek5000.h index e030297c78..121786c7ff 100644 --- a/library/FieldUtils/InputModules/InputNek5000.h +++ b/library/FieldUtils/InputModules/InputNek5000.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -49,7 +47,7 @@ class InputNek5000 : public InputModule { public: InputNek5000(FieldSharedPtr f); - virtual ~InputNek5000(); + ~InputNek5000() override; /// Creates an instance of this class static ModuleSharedPtr create(FieldSharedPtr f) @@ -60,26 +58,25 @@ public: static ModuleKey m_className[]; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "InputNek5000"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing Nek5000 field file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreateFieldData; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/InputModules/InputPts.cpp b/library/FieldUtils/InputModules/InputPts.cpp index cbd49d9cd2..10bec6e4bb 100644 --- a/library/FieldUtils/InputModules/InputPts.cpp +++ b/library/FieldUtils/InputModules/InputPts.cpp @@ -46,9 +46,7 @@ using namespace std; #include "InputPts.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey InputPts::m_className[5] = { @@ -112,5 +110,4 @@ void InputPts::v_Process(po::variables_map &vm) m_f->m_variables.push_back(m_f->m_fieldPts->GetFieldName(j)); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/InputModules/InputPts.h b/library/FieldUtils/InputModules/InputPts.h index 7a0a60f3df..288fb33cd4 100644 --- a/library/FieldUtils/InputModules/InputPts.h +++ b/library/FieldUtils/InputModules/InputPts.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -49,7 +47,7 @@ class InputPts : public InputModule { public: InputPts(FieldSharedPtr f); - virtual ~InputPts(); + ~InputPts() override; /// Creates an instance of this class static ModuleSharedPtr create(FieldSharedPtr f) @@ -60,26 +58,25 @@ public: static ModuleKey m_className[]; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "InputPts"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing input pts file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreatePts; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/InputModules/InputSemtex.cpp b/library/FieldUtils/InputModules/InputSemtex.cpp index d4f528d1d5..adc2f30ff0 100644 --- a/library/FieldUtils/InputModules/InputSemtex.cpp +++ b/library/FieldUtils/InputModules/InputSemtex.cpp @@ -45,9 +45,7 @@ using namespace std; #include "InputSemtex.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey InputSemtex::m_className[1] = { @@ -276,5 +274,4 @@ void InputSemtex::v_Process(po::variables_map &vm) m_f->m_variables = m_f->m_fielddef[0]->m_fields; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/InputModules/InputSemtex.h b/library/FieldUtils/InputModules/InputSemtex.h index 33415b9714..66445975f8 100644 --- a/library/FieldUtils/InputModules/InputSemtex.h +++ b/library/FieldUtils/InputModules/InputSemtex.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -49,7 +47,7 @@ class InputSemtex : public InputModule { public: InputSemtex(FieldSharedPtr f); - virtual ~InputSemtex(); + ~InputSemtex() override; /// Creates an instance of this class static ModuleSharedPtr create(FieldSharedPtr f) @@ -60,26 +58,25 @@ public: static ModuleKey m_className[]; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "InputSemtex"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing Semtex field file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreateFieldData; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/InputModules/InputXml.cpp b/library/FieldUtils/InputModules/InputXml.cpp index f596c162d9..67e11f4fca 100644 --- a/library/FieldUtils/InputModules/InputXml.cpp +++ b/library/FieldUtils/InputModules/InputXml.cpp @@ -43,9 +43,7 @@ using namespace std; #include "InputXml.h" using namespace Nektar; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey InputXml::m_className[5] = { @@ -272,5 +270,4 @@ void InputXml::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/InputModules/InputXml.h b/library/FieldUtils/InputModules/InputXml.h index 3a78c280a9..a1bdfe1607 100644 --- a/library/FieldUtils/InputModules/InputXml.h +++ b/library/FieldUtils/InputModules/InputXml.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -49,7 +47,7 @@ class InputXml : public InputModule { public: InputXml(FieldSharedPtr f); - virtual ~InputXml(); + ~InputXml() override; /// Creates an instance of this class static ModuleSharedPtr create(FieldSharedPtr f) { @@ -59,26 +57,25 @@ public: static ModuleKey m_className[]; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "InputXml"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing input xml file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreateGraph; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/Interpolator.cpp b/library/FieldUtils/Interpolator.cpp index 46dcade91f..34cc8c9e69 100644 --- a/library/FieldUtils/Interpolator.cpp +++ b/library/FieldUtils/Interpolator.cpp @@ -41,9 +41,7 @@ using namespace std; namespace bg = boost::geometry; namespace bgi = boost::geometry::index; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -353,5 +351,4 @@ void Interpolator<T>::Interpolate( template class Interpolator<std::vector<MultiRegions::ExpListSharedPtr>>; template class Interpolator<Array<OneD, MultiRegions::ExpListSharedPtr>>; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/Interpolator.h b/library/FieldUtils/Interpolator.h index ca5ec81039..e755d6599b 100644 --- a/library/FieldUtils/Interpolator.h +++ b/library/FieldUtils/Interpolator.h @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/Interpolator.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// A class that contains algorithms for interpolation between pts fields, @@ -104,7 +102,6 @@ typedef std::shared_ptr< Interpolator<std::vector<MultiRegions::ExpListSharedPtr>>> InterpolatorSharedPtr; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/Module.cpp b/library/FieldUtils/Module.cpp index dcec64fa56..0d54356768 100644 --- a/library/FieldUtils/Module.cpp +++ b/library/FieldUtils/Module.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * Returns an instance of the module factory, held as a singleton. @@ -198,5 +196,4 @@ void InputModule::PrintSummary() cout << "Field size = " << m_f->m_data[0].size() * sizeof(NekDouble) << endl; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/Module.h b/library/FieldUtils/Module.h index a8f4ad6129..26662e8141 100644 --- a/library/FieldUtils/Module.h +++ b/library/FieldUtils/Module.h @@ -55,9 +55,7 @@ namespace po = boost::program_options; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * Denotes different types of mesh converter modules: so far only @@ -335,7 +333,6 @@ typedef LibUtilities::NekFactory<ModuleKey, Module, FieldSharedPtr> FIELD_UTILS_EXPORT ModuleFactory &GetModuleFactory(); -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/Octree.cpp b/library/FieldUtils/Octree.cpp index f31ab99ae2..f07548ae53 100644 --- a/library/FieldUtils/Octree.cpp +++ b/library/FieldUtils/Octree.cpp @@ -36,9 +36,7 @@ #include <cmath> #include <stdexcept> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -674,5 +672,4 @@ int Octree::Octant::GetLocInNode(const Array<OneD, NekDouble> &coords) return position; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/Octree.h b/library/FieldUtils/Octree.h index 33b259fded..4a0dad7cee 100644 --- a/library/FieldUtils/Octree.h +++ b/library/FieldUtils/Octree.h @@ -37,9 +37,7 @@ #include <memory> #include <vector> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class Octree @@ -208,5 +206,4 @@ private: void AdvanceToStats(int nodeID); void SetNeighbours(int nodeID); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputFileBase.cpp b/library/FieldUtils/OutputModules/OutputFileBase.cpp index 0f9ae76ecb..9472e64212 100644 --- a/library/FieldUtils/OutputModules/OutputFileBase.cpp +++ b/library/FieldUtils/OutputModules/OutputFileBase.cpp @@ -41,9 +41,7 @@ using namespace std; #include <boost/format.hpp> #include <iomanip> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { OutputFileBase::OutputFileBase(FieldSharedPtr f) : OutputModule(f) @@ -462,5 +460,4 @@ void OutputFileBase::PrintErrorFromExp() } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputFileBase.h b/library/FieldUtils/OutputModules/OutputFileBase.h index 427aebfc05..6fd2878845 100644 --- a/library/FieldUtils/OutputModules/OutputFileBase.h +++ b/library/FieldUtils/OutputModules/OutputFileBase.h @@ -38,9 +38,7 @@ #include "../Module.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Converter from fld to vtk. @@ -48,23 +46,23 @@ class OutputFileBase : public OutputModule { public: OutputFileBase(FieldSharedPtr f); - virtual ~OutputFileBase(); + ~OutputFileBase() override; protected: /// Write fld to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputFileBase"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Writing file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eOutput; } @@ -112,7 +110,6 @@ private: void PrintErrorFromExp(); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputFld.cpp b/library/FieldUtils/OutputModules/OutputFld.cpp index f00098df3b..1765516ffe 100644 --- a/library/FieldUtils/OutputModules/OutputFld.cpp +++ b/library/FieldUtils/OutputModules/OutputFld.cpp @@ -43,9 +43,7 @@ using namespace std; #include "OutputFld.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey OutputFld::m_className[2] = { @@ -190,5 +188,4 @@ std::string OutputFld::GetIOFormat() return iofmt; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputFld.h b/library/FieldUtils/OutputModules/OutputFld.h index b092c82455..2b255b6a4e 100644 --- a/library/FieldUtils/OutputModules/OutputFld.h +++ b/library/FieldUtils/OutputModules/OutputFld.h @@ -38,9 +38,7 @@ #include "OutputFileBase.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Output to fld format. @@ -55,33 +53,31 @@ public: static ModuleKey m_className[]; OutputFld(FieldSharedPtr f); - virtual ~OutputFld(); + ~OutputFld() override; protected: - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputFld"; } /// Write from pts to output file. - virtual void v_OutputFromPts(po::variables_map &vm) override; + void v_OutputFromPts(po::variables_map &vm) override; /// Write from m_exp to output file. - virtual void v_OutputFromExp(po::variables_map &vm) override; + void v_OutputFromExp(po::variables_map &vm) override; /// Write from data to output file. - virtual void v_OutputFromData(po::variables_map &vm) override; + void v_OutputFromData(po::variables_map &vm) override; - virtual fs::path v_GetPath(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetPath(std::string &filename, po::variables_map &vm) override; - virtual fs::path v_GetFullOutName(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetFullOutName(std::string &filename, + po::variables_map &vm) override; private: std::string GetIOFormat(); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputInfo.cpp b/library/FieldUtils/OutputModules/OutputInfo.cpp index e7cf6da40f..8de3adb204 100644 --- a/library/FieldUtils/OutputModules/OutputInfo.cpp +++ b/library/FieldUtils/OutputModules/OutputInfo.cpp @@ -44,9 +44,7 @@ using namespace std; #include "OutputInfo.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey OutputInfo::m_className = GetModuleFactory().RegisterCreatorFunction( @@ -128,5 +126,4 @@ void OutputInfo::v_Process(po::variables_map &vm) fldXml->WriteMultiFldFileIDs(infofile, filenames, ElementIDs); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputInfo.h b/library/FieldUtils/OutputModules/OutputInfo.h index 2d7d01b3fd..3f849f92d9 100644 --- a/library/FieldUtils/OutputModules/OutputInfo.h +++ b/library/FieldUtils/OutputModules/OutputInfo.h @@ -38,9 +38,7 @@ #include "../Module.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class OutputInfo : public OutputModule @@ -54,28 +52,27 @@ public: static ModuleKey m_className; OutputInfo(FieldSharedPtr f); - virtual ~OutputInfo(); + ~OutputInfo() override; protected: /// Write fld to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputInfo"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Writing Info file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eOutput; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputPts.cpp b/library/FieldUtils/OutputModules/OutputPts.cpp index 8b1b4897f2..6a4e6ac9e7 100644 --- a/library/FieldUtils/OutputModules/OutputPts.cpp +++ b/library/FieldUtils/OutputModules/OutputPts.cpp @@ -45,9 +45,7 @@ using namespace std; #include "OutputPts.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey OutputPts::m_className[5] = { @@ -141,5 +139,4 @@ fs::path OutputPts::v_GetFullOutName(std::string &filename, return fs::path(filename); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputPts.h b/library/FieldUtils/OutputModules/OutputPts.h index aca4add5ff..9c12d9a9c8 100644 --- a/library/FieldUtils/OutputModules/OutputPts.h +++ b/library/FieldUtils/OutputModules/OutputPts.h @@ -38,9 +38,7 @@ #include "OutputFileBase.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Converter from fld to pts. @@ -55,30 +53,28 @@ public: static ModuleKey m_className[]; OutputPts(FieldSharedPtr f); - virtual ~OutputPts(); + ~OutputPts() override; protected: - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputPts"; } /// Write from pts to output file. - virtual void v_OutputFromPts(po::variables_map &vm) override; + void v_OutputFromPts(po::variables_map &vm) override; /// Write from m_exp to output file. - virtual void v_OutputFromExp(po::variables_map &vm) override; + void v_OutputFromExp(po::variables_map &vm) override; /// Write from data to output file. - virtual void v_OutputFromData(po::variables_map &vm) override; + void v_OutputFromData(po::variables_map &vm) override; - virtual fs::path v_GetPath(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetPath(std::string &filename, po::variables_map &vm) override; - virtual fs::path v_GetFullOutName(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetFullOutName(std::string &filename, + po::variables_map &vm) override; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputStdOut.cpp b/library/FieldUtils/OutputModules/OutputStdOut.cpp index 353f651b7d..85845c3389 100644 --- a/library/FieldUtils/OutputModules/OutputStdOut.cpp +++ b/library/FieldUtils/OutputModules/OutputStdOut.cpp @@ -41,9 +41,7 @@ using namespace std; #include "OutputStdOut.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey OutputStdOut::m_className = @@ -64,5 +62,4 @@ void OutputStdOut::v_Process(po::variables_map &vm) boost::ignore_unused(vm); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputStdOut.h b/library/FieldUtils/OutputModules/OutputStdOut.h index 6c8d5e09ac..54634e0899 100644 --- a/library/FieldUtils/OutputModules/OutputStdOut.h +++ b/library/FieldUtils/OutputModules/OutputStdOut.h @@ -38,9 +38,7 @@ #include "../Module.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class OutputStdOut : public OutputModule @@ -54,28 +52,27 @@ public: static ModuleKey m_className; OutputStdOut(FieldSharedPtr f); - virtual ~OutputStdOut(); + ~OutputStdOut() override; protected: /// Write fld to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputStdOut"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Output written to StdOut"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eOutput; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputTecplot.cpp b/library/FieldUtils/OutputModules/OutputTecplot.cpp index ee33768871..8df4a113ca 100644 --- a/library/FieldUtils/OutputModules/OutputTecplot.cpp +++ b/library/FieldUtils/OutputModules/OutputTecplot.cpp @@ -44,9 +44,7 @@ using namespace std; #include "OutputTecplot.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { std::string TecplotZoneTypeMap[] = {"ORDERED", "LINESEG", "TRIANGLE", @@ -1148,5 +1146,4 @@ void OutputTecplot::CalculateConnectivity() } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputTecplot.h b/library/FieldUtils/OutputModules/OutputTecplot.h index 8c853ba7e2..52709e112f 100644 --- a/library/FieldUtils/OutputModules/OutputTecplot.h +++ b/library/FieldUtils/OutputModules/OutputTecplot.h @@ -38,9 +38,7 @@ #include "OutputFileBase.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { enum TecplotZoneType @@ -69,30 +67,29 @@ public: static ModuleKey m_className; OutputTecplot(FieldSharedPtr f); - virtual ~OutputTecplot(); + ~OutputTecplot() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputTecplot"; } /// Write from pts to output file. - virtual void v_OutputFromPts(po::variables_map &vm) override; + void v_OutputFromPts(po::variables_map &vm) override; /// Write from m_exp to output file. - virtual void v_OutputFromExp(po::variables_map &vm) override; + void v_OutputFromExp(po::variables_map &vm) override; /// Write from data to output file. - virtual void v_OutputFromData(po::variables_map &vm) override; + void v_OutputFromData(po::variables_map &vm) override; - virtual fs::path v_GetPath(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetPath(std::string &filename, po::variables_map &vm) override; - virtual fs::path v_GetFullOutName(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetFullOutName(std::string &filename, + po::variables_map &vm) override; /// True if writing binary field output bool m_binary; @@ -161,20 +158,19 @@ public: m_binary = true; } - virtual ~OutputTecplotBinary() + ~OutputTecplotBinary() override { } protected: void WriteDoubleOrFloat(std::ofstream &outfile, Array<OneD, NekDouble> &data); - virtual void v_WriteTecplotHeader(std::ofstream &outfile, - std::vector<std::string> &var) override; - virtual void v_WriteTecplotZone(std::ofstream &outfile) override; - virtual void v_WriteTecplotConnectivity(std::ofstream &outfile) override; + void v_WriteTecplotHeader(std::ofstream &outfile, + std::vector<std::string> &var) override; + void v_WriteTecplotZone(std::ofstream &outfile) override; + void v_WriteTecplotConnectivity(std::ofstream &outfile) override; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputVtk.cpp b/library/FieldUtils/OutputModules/OutputVtk.cpp index e0a7ebc913..9d130e6524 100644 --- a/library/FieldUtils/OutputModules/OutputVtk.cpp +++ b/library/FieldUtils/OutputModules/OutputVtk.cpp @@ -48,9 +48,7 @@ #include <vtkXMLMultiBlockDataWriter.h> #include <vtkXMLUnstructuredGridWriter.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey OutputVtk::m_className = GetModuleFactory().RegisterCreatorFunction( @@ -1535,7 +1533,7 @@ void OutputVtk::WritePVtu(po::variables_map &vm) LibUtilities::PortablePath(OutputVtkBase::v_GetPath(filename, vm)); outfile << "<?xml version=\"1.0\"?>" << endl; - outfile << "<VTKFile type=\"PUnstructuredGrid\" version=\"0.1\" " + outfile << R"(<VTKFile type="PUnstructuredGrid" version="0.1" )" << "byte_order=\"LittleEndian\">" << endl; outfile << " <PUnstructuredGrid GhostLevel=\"0\">" << endl; @@ -1553,7 +1551,7 @@ void OutputVtk::WritePVtu(po::variables_map &vm) // Add point coordinates outfile << " <PPoints> " << endl; - outfile << " <PDataArray type=\"Float64\" NumberOfComponents=\"" << 3 + outfile << R"( <PDataArray type="Float64" NumberOfComponents=")" << 3 << "\"/> " << endl; outfile << " </PPoints>" << endl; @@ -1574,7 +1572,7 @@ void OutputVtk::WritePVtu(po::variables_map &vm) outfile << " <PPointData>" << endl; for (auto &var : m_f->m_variables) { - outfile << " <PDataArray type=\"Float64\" Name=\"" << var << "\"/>" + outfile << R"( <PDataArray type="Float64" Name=")" << var << "\"/>" << endl; } outfile << " </PPointData>" << endl; @@ -1656,5 +1654,4 @@ void OutputVtk::v_OutputFromExp(po::variables_map &vm) } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputVtk.h b/library/FieldUtils/OutputModules/OutputVtk.h index abcf5ee5d0..9b08e83b99 100644 --- a/library/FieldUtils/OutputModules/OutputVtk.h +++ b/library/FieldUtils/OutputModules/OutputVtk.h @@ -42,9 +42,7 @@ #include <vtkSmartPointer.h> #include <vtkUnstructuredGrid.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Converter from fld to vtk. @@ -64,19 +62,19 @@ public: ~OutputVtk() final = default; protected: - virtual std::string v_GetModuleName() override final + std::string v_GetModuleName() final { return "OutputVtk"; } /// Write from pts to output file. - virtual void v_OutputFromPts(po::variables_map &vm) override final; + void v_OutputFromPts(po::variables_map &vm) final; /// Write from m_exp to output file. - virtual void v_OutputFromExp(po::variables_map &vm) override final; + void v_OutputFromExp(po::variables_map &vm) final; /// Write from data to output file. - virtual void v_OutputFromData(po::variables_map &vm) override final; + void v_OutputFromData(po::variables_map &vm) final; /// Cache file for unstructured grid VTK mesh data vtkSmartPointer<vtkUnstructuredGrid> m_vtkMesh; @@ -119,7 +117,6 @@ private: /// Write the parallel .pvtu file void WritePVtu(po::variables_map &vm); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputVtkBase.cpp b/library/FieldUtils/OutputModules/OutputVtkBase.cpp index 8048083fc0..b1e3893bfe 100644 --- a/library/FieldUtils/OutputModules/OutputVtkBase.cpp +++ b/library/FieldUtils/OutputModules/OutputVtkBase.cpp @@ -44,9 +44,7 @@ using namespace std; #include "OutputVtkBase.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { // Disable the base VTK factory if using the VTK library, this is so we can @@ -143,7 +141,7 @@ void OutputVtkBase::v_OutputFromPts(po::variables_map &vm) << numBlocks << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float64\" " - << "NumberOfComponents=\"" << 3 << "\" format=\"ascii\">" << endl; + << "NumberOfComponents=\"" << 3 << R"(" format="ascii">)" << endl; for (i = 0; i < nPts; ++i) { for (j = 0; j < dim; ++j) @@ -162,7 +160,7 @@ void OutputVtkBase::v_OutputFromPts(po::variables_map &vm) outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; // dump connectivity data if it exists outfile << " "; @@ -182,7 +180,7 @@ void OutputVtkBase::v_OutputFromPts(po::variables_map &vm) } outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; outfile << " "; for (i = 0; i < numBlocks; ++i) @@ -192,7 +190,7 @@ void OutputVtkBase::v_OutputFromPts(po::variables_map &vm) outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; outfile << " "; for (i = 0; i < numBlocks; ++i) { @@ -206,7 +204,7 @@ void OutputVtkBase::v_OutputFromPts(po::variables_map &vm) // printing the fields for (j = 0; j < nfields; ++j) { - outfile << " <DataArray type=\"Float64\" Name=\"" + outfile << R"( <DataArray type="Float64" Name=")" << m_f->m_variables[j] << "\">" << endl; outfile << " "; for (i = 0; i < fPts->GetNpoints(); ++i) @@ -335,7 +333,7 @@ fs::path OutputVtkBase::v_GetFullOutName(std::string &filename, void OutputVtkBase::WriteVtkHeader(std::ostream &outfile) { outfile << "<?xml version=\"1.0\"?>" << endl; - outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" " + outfile << R"(<VTKFile type="UnstructuredGrid" version="0.1" )" << "byte_order=\"LittleEndian\">" << endl; outfile << " <UnstructuredGrid>" << endl; } @@ -353,21 +351,21 @@ void OutputVtkBase::WriteEmptyVtkPiece(std::ofstream &outfile) << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float64\" " - << "NumberOfComponents=\"" << 3 << "\" format=\"ascii\">" << endl; + << "NumberOfComponents=\"" << 3 << R"(" format="ascii">)" << endl; outfile << " </DataArray>" << endl; outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; outfile << " "; outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; outfile << " "; outfile << endl; outfile << " </DataArray>" << endl; @@ -391,11 +389,11 @@ void OutputVtkBase::WritePVtu(po::variables_map &vm) string path = LibUtilities::PortablePath(GetPath(filename, vm)); outfile << "<?xml version=\"1.0\"?>" << endl; - outfile << "<VTKFile type=\"PUnstructuredGrid\" version=\"0.1\" " + outfile << R"(<VTKFile type="PUnstructuredGrid" version="0.1" )" << "byte_order=\"LittleEndian\">" << endl; outfile << "<PUnstructuredGrid GhostLevel=\"0\">" << endl; outfile << "<PPoints> " << endl; - outfile << "<PDataArray type=\"Float64\" NumberOfComponents=\"" << 3 + outfile << R"(<PDataArray type="Float64" NumberOfComponents=")" << 3 << "\"/> " << endl; outfile << "</PPoints>" << endl; outfile << "<PCells>" << endl; @@ -412,7 +410,7 @@ void OutputVtkBase::WritePVtu(po::variables_map &vm) outfile << "<PPointData Scalars=\"Material\">" << endl; for (int i = 0; i < m_f->m_variables.size(); ++i) { - outfile << "<PDataArray type=\"Float64\" Name=\"" << m_f->m_variables[i] + outfile << R"(<PDataArray type="Float64" Name=")" << m_f->m_variables[i] << "\"/>" << endl; } outfile << "</PPointData>" << endl; @@ -462,5 +460,4 @@ std::string OutputVtkBase::PrepareOutput(po::variables_map &vm) return filename; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputVtkBase.h b/library/FieldUtils/OutputModules/OutputVtkBase.h index 56af460bd6..b502917dd1 100644 --- a/library/FieldUtils/OutputModules/OutputVtkBase.h +++ b/library/FieldUtils/OutputModules/OutputVtkBase.h @@ -38,9 +38,7 @@ #include "OutputFileBase.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Converter from fld to vtk. @@ -55,28 +53,27 @@ public: static ModuleKey m_className; OutputVtkBase(FieldSharedPtr f); - virtual ~OutputVtkBase(); + ~OutputVtkBase() override; protected: - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputVtk"; } /// Write from pts to output file. - virtual void v_OutputFromPts(po::variables_map &vm) override; + void v_OutputFromPts(po::variables_map &vm) override; /// Write from m_exp to output file. - virtual void v_OutputFromExp(po::variables_map &vm) override; + void v_OutputFromExp(po::variables_map &vm) override; /// Write from data to output file. - virtual void v_OutputFromData(po::variables_map &vm) override; + void v_OutputFromData(po::variables_map &vm) override; - virtual fs::path v_GetPath(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetPath(std::string &filename, po::variables_map &vm) override; - virtual fs::path v_GetFullOutName(std::string &filename, - po::variables_map &vm) override; + fs::path v_GetFullOutName(std::string &filename, + po::variables_map &vm) override; std::string PrepareOutput(po::variables_map &vm); @@ -89,7 +86,6 @@ private: void WritePVtu(po::variables_map &vm); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/OutputModules/OutputXml.cpp b/library/FieldUtils/OutputModules/OutputXml.cpp index 6227f16a7d..bd092852b0 100644 --- a/library/FieldUtils/OutputModules/OutputXml.cpp +++ b/library/FieldUtils/OutputModules/OutputXml.cpp @@ -40,9 +40,7 @@ using namespace std; #include "OutputXml.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey OutputXml::m_className = GetModuleFactory().RegisterCreatorFunction( @@ -71,5 +69,4 @@ void OutputXml::v_Process(po::variables_map &vm) m_f->m_graph->WriteGeometry(filename); cout << "Written file: " << filename << endl; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/OutputModules/OutputXml.h b/library/FieldUtils/OutputModules/OutputXml.h index 76f3b2b0bc..74dfc20628 100644 --- a/library/FieldUtils/OutputModules/OutputXml.h +++ b/library/FieldUtils/OutputModules/OutputXml.h @@ -38,9 +38,7 @@ #include "../Module.h" #include <tinyxml.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// Converter from fld to vtk. class OutputXml : public OutputModule @@ -54,28 +52,27 @@ public: static ModuleKey m_className; OutputXml(FieldSharedPtr f); - virtual ~OutputXml(); + ~OutputXml() override; protected: /// Write fld to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "OutputXml"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Writing file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eOutput; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessAddCompositeID.cpp b/library/FieldUtils/ProcessModules/ProcessAddCompositeID.cpp index d2c5d66c7c..49deaad133 100644 --- a/library/FieldUtils/ProcessModules/ProcessAddCompositeID.cpp +++ b/library/FieldUtils/ProcessModules/ProcessAddCompositeID.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessAddCompositeID.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessAddCompositeID::className = @@ -125,5 +123,4 @@ void ProcessAddCompositeID::v_Process(po::variables_map &vm) // forward transform exp->FwdTransLocalElmt(exp->GetPhys(), exp->UpdateCoeffs()); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessAddCompositeID.h b/library/FieldUtils/ProcessModules/ProcessAddCompositeID.h index fa15da6bbf..50d201f9ad 100644 --- a/library/FieldUtils/ProcessModules/ProcessAddCompositeID.h +++ b/library/FieldUtils/ProcessModules/ProcessAddCompositeID.h @@ -37,9 +37,7 @@ #include <FieldUtils/Module.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,30 +55,29 @@ public: static ModuleKey className; ProcessAddCompositeID(FieldSharedPtr f); - virtual ~ProcessAddCompositeID(); + ~ProcessAddCompositeID() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessAddCompositeID"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Adding composite ID as a new field"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessAddFld.cpp b/library/FieldUtils/ProcessModules/ProcessAddFld.cpp index e8590bfec0..394950a48c 100644 --- a/library/FieldUtils/ProcessModules/ProcessAddFld.cpp +++ b/library/FieldUtils/ProcessModules/ProcessAddFld.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessAddFld.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessAddFld::className = GetModuleFactory().RegisterCreatorFunction( @@ -195,5 +193,4 @@ void ProcessAddFld::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessAddFld.h b/library/FieldUtils/ProcessModules/ProcessAddFld.h index fff4d90ce1..2157ee686c 100644 --- a/library/FieldUtils/ProcessModules/ProcessAddFld.h +++ b/library/FieldUtils/ProcessModules/ProcessAddFld.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,28 @@ public: static ModuleKey className; ProcessAddFld(FieldSharedPtr f); - virtual ~ProcessAddFld(); + ~ProcessAddFld() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessAddFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Adding new fld to input fld"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return m_priority; } - virtual std::vector<ModuleKey> v_GetModulePrerequisites() override + std::vector<ModuleKey> v_GetModulePrerequisites() override { return {{eProcessModule, "createExp"}}; } @@ -86,7 +84,6 @@ protected: private: ModulePriority m_priority; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessAverageFld.cpp b/library/FieldUtils/ProcessModules/ProcessAverageFld.cpp index 90fb267197..84c59b2ab4 100644 --- a/library/FieldUtils/ProcessModules/ProcessAverageFld.cpp +++ b/library/FieldUtils/ProcessModules/ProcessAverageFld.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessAverageFld.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessAverageFld::className = @@ -180,5 +178,4 @@ void ProcessAverageFld::v_Process(po::variables_map &vm) m_f->m_exp[j]->UpdatePhys()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessAverageFld.h b/library/FieldUtils/ProcessModules/ProcessAverageFld.h index b7b2e87ef2..c8fe136734 100644 --- a/library/FieldUtils/ProcessModules/ProcessAverageFld.h +++ b/library/FieldUtils/ProcessModules/ProcessAverageFld.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessAverageFld(FieldSharedPtr f); - virtual ~ProcessAverageFld(); + ~ProcessAverageFld() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessAverageFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Averaging input flds"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eFillExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.cpp b/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.cpp index 891497bdad..cf7b7827c9 100644 --- a/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.cpp +++ b/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.cpp @@ -49,9 +49,7 @@ using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessBodyFittedVelocity::className = @@ -905,5 +903,4 @@ void ProcessBodyFittedVelocity::GetVelAndConvertToCartSys( } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.h b/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.h old mode 100755 new mode 100644 index 483aa422ed..2b5e6b428f --- a/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.h +++ b/library/FieldUtils/ProcessModules/ProcessBodyFittedVelocity.h @@ -38,9 +38,7 @@ #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -58,18 +56,18 @@ public: static ModuleKey className; ProcessBodyFittedVelocity(FieldSharedPtr f); - virtual ~ProcessBodyFittedVelocity(); + ~ProcessBodyFittedVelocity() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessBodyFittedVelocity"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Get velocity in the body-fitted coordinate system."; } @@ -175,7 +173,6 @@ private: */ void GetVelAndConvertToCartSys(Array<OneD, Array<OneD, NekDouble>> &vel); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.cpp b/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.cpp index 69be0b1fb4..39381a4527 100644 --- a/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.cpp +++ b/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessBoundaryExtract::className = @@ -132,5 +130,4 @@ void ProcessBoundaryExtract::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.h b/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.h index 1f3382de28..2329e262cb 100644 --- a/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.h +++ b/library/FieldUtils/ProcessModules/ProcessBoundaryExtract.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -56,27 +54,26 @@ public: static ModuleKey className; ProcessBoundaryExtract(FieldSharedPtr f); - virtual ~ProcessBoundaryExtract(); + ~ProcessBoundaryExtract() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessBoundaryExtract"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Setting up boundary extraction"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eBndExtraction; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessC0Projection.cpp b/library/FieldUtils/ProcessModules/ProcessC0Projection.cpp index 8ad346f9bb..5cd70c04fe 100644 --- a/library/FieldUtils/ProcessModules/ProcessC0Projection.cpp +++ b/library/FieldUtils/ProcessModules/ProcessC0Projection.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessC0Projection.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessC0Projection::className = @@ -232,5 +230,4 @@ void ProcessC0Projection::v_Process(po::variables_map &vm) tmp = m_f->m_exp[processFields[i]]->UpdatePhys()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessC0Projection.h b/library/FieldUtils/ProcessModules/ProcessC0Projection.h index c1168dfbbe..802d732184 100644 --- a/library/FieldUtils/ProcessModules/ProcessC0Projection.h +++ b/library/FieldUtils/ProcessModules/ProcessC0Projection.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,30 +55,29 @@ public: static ModuleKey className; ProcessC0Projection(FieldSharedPtr f); - virtual ~ProcessC0Projection(); + ~ProcessC0Projection() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessC0Projection"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Projecting field into C0 space"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessCFL.cpp b/library/FieldUtils/ProcessModules/ProcessCFL.cpp index aac1fadede..2d40208dad 100644 --- a/library/FieldUtils/ProcessModules/ProcessCFL.cpp +++ b/library/FieldUtils/ProcessModules/ProcessCFL.cpp @@ -46,9 +46,7 @@ using namespace std; #include "ProcessCFL.h" #include "ProcessMapping.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessCFL::className = GetModuleFactory().RegisterCreatorFunction( @@ -275,5 +273,4 @@ Array<OneD, NekDouble> ProcessCFL::GetMaxStdVelocity( return maxV; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessCFL.h b/library/FieldUtils/ProcessModules/ProcessCFL.h index 9ca95d7b29..92c1c5346c 100644 --- a/library/FieldUtils/ProcessModules/ProcessCFL.h +++ b/library/FieldUtils/ProcessModules/ProcessCFL.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module calculates the CFL and adds it @@ -56,24 +54,24 @@ public: static ModuleKey className; ProcessCFL(FieldSharedPtr f); - virtual ~ProcessCFL(); + ~ProcessCFL() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessCFL"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating CFL number over the domain for the Incompressible " "flow simulation"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -86,7 +84,6 @@ protected: private: int m_spacedim; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessCombineAvg.cpp b/library/FieldUtils/ProcessModules/ProcessCombineAvg.cpp index d24454f7ef..29c7ad5b59 100644 --- a/library/FieldUtils/ProcessModules/ProcessCombineAvg.cpp +++ b/library/FieldUtils/ProcessModules/ProcessCombineAvg.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessCombineAvg.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessCombineAvg::className = @@ -238,5 +236,4 @@ void ProcessCombineAvg::v_Process(po::variables_map &vm) boost::lexical_cast<std::string>(finTime); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessCombineAvg.h b/library/FieldUtils/ProcessModules/ProcessCombineAvg.h index 3d5fb2ef90..1bdb87ff4c 100644 --- a/library/FieldUtils/ProcessModules/ProcessCombineAvg.h +++ b/library/FieldUtils/ProcessModules/ProcessCombineAvg.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -58,30 +56,29 @@ public: static ModuleKey className; ProcessCombineAvg(FieldSharedPtr f); - virtual ~ProcessCombineAvg(); + ~ProcessCombineAvg() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessCombineAvg"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Combining new fld into input avg fld"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessConcatenateFld.cpp b/library/FieldUtils/ProcessModules/ProcessConcatenateFld.cpp index 2e39d1af78..c531986af8 100644 --- a/library/FieldUtils/ProcessModules/ProcessConcatenateFld.cpp +++ b/library/FieldUtils/ProcessModules/ProcessConcatenateFld.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessConcatenateFld.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessConcatenateFld::className = @@ -71,5 +69,4 @@ void ProcessConcatenateFld::v_Process(po::variables_map &vm) << "\tFieldConvert file1.fld file2.fld file-conc.fld" << endl; } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessConcatenateFld.h b/library/FieldUtils/ProcessModules/ProcessConcatenateFld.h index f35249dc0a..e200682366 100644 --- a/library/FieldUtils/ProcessModules/ProcessConcatenateFld.h +++ b/library/FieldUtils/ProcessModules/ProcessConcatenateFld.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -56,27 +54,26 @@ public: static ModuleKey className; ProcessConcatenateFld(FieldSharedPtr f); - virtual ~ProcessConcatenateFld(); + ~ProcessConcatenateFld() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessConcatenateFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Concatenating field file"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyFieldData; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessCreateExp.cpp b/library/FieldUtils/ProcessModules/ProcessCreateExp.cpp index 6cbaa2c63a..dfc75cfd6a 100644 --- a/library/FieldUtils/ProcessModules/ProcessCreateExp.cpp +++ b/library/FieldUtils/ProcessModules/ProcessCreateExp.cpp @@ -41,9 +41,7 @@ using namespace std; #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/BasicUtils/Timer.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessCreateExp::className = @@ -260,5 +258,4 @@ void ProcessCreateExp::LoadFieldData(bool useSessionVariables) m_f->m_data = vector<std::vector<NekDouble>>(); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessCreateExp.h b/library/FieldUtils/ProcessModules/ProcessCreateExp.h index 3451ba512a..7292ba1e3c 100644 --- a/library/FieldUtils/ProcessModules/ProcessCreateExp.h +++ b/library/FieldUtils/ProcessModules/ProcessCreateExp.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,32 +55,31 @@ public: static ModuleKey className; ProcessCreateExp(FieldSharedPtr f); - virtual ~ProcessCreateExp(); + ~ProcessCreateExp() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; void LoadFieldData(bool useSessionVariables = false); - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessCreateExp"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Creating m_exp if needed"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreateExp; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessDOF.cpp b/library/FieldUtils/ProcessModules/ProcessDOF.cpp index 95f91b1b6c..407309f15e 100644 --- a/library/FieldUtils/ProcessModules/ProcessDOF.cpp +++ b/library/FieldUtils/ProcessModules/ProcessDOF.cpp @@ -40,9 +40,7 @@ using namespace std; #include "ProcessDOF.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessDOF::className = GetModuleFactory().RegisterCreatorFunction( @@ -69,5 +67,4 @@ void ProcessDOF::v_Process(po::variables_map &vm) cout << "Total number of DOF: " << nDOF << endl; } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessDOF.h b/library/FieldUtils/ProcessModules/ProcessDOF.h index d6f5164152..b0ca31ed68 100644 --- a/library/FieldUtils/ProcessModules/ProcessDOF.h +++ b/library/FieldUtils/ProcessModules/ProcessDOF.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module calculates the number of DOF. @@ -55,28 +53,27 @@ public: static ModuleKey className; ProcessDOF(FieldSharedPtr f); - virtual ~ProcessDOF(); + ~ProcessDOF() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessDOF"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating number of DOF"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessDeform.cpp b/library/FieldUtils/ProcessModules/ProcessDeform.cpp index 254d4e03ce..8e1771d0f2 100644 --- a/library/FieldUtils/ProcessModules/ProcessDeform.cpp +++ b/library/FieldUtils/ProcessModules/ProcessDeform.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessDeform.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessDeform::className = GetModuleFactory().RegisterCreatorFunction( ModuleKey(eProcessModule, "deform"), ProcessDeform::create, @@ -79,5 +77,4 @@ void ProcessDeform::v_Process(po::variables_map &vm) GlobalMapping::UpdateGeometry(m_f->m_graph, exp, phys, false); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessDeform.h b/library/FieldUtils/ProcessModules/ProcessDeform.h index a8db2087bc..83725dd372 100644 --- a/library/FieldUtils/ProcessModules/ProcessDeform.h +++ b/library/FieldUtils/ProcessModules/ProcessDeform.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class ProcessDeform : public ProcessModule @@ -53,28 +51,27 @@ public: static ModuleKey className; ProcessDeform(FieldSharedPtr f); - virtual ~ProcessDeform(); + ~ProcessDeform() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessDeform"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Deforming grid"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessDisplacement.cpp b/library/FieldUtils/ProcessModules/ProcessDisplacement.cpp index d2ede7bc63..6e7b6ff01b 100644 --- a/library/FieldUtils/ProcessModules/ProcessDisplacement.cpp +++ b/library/FieldUtils/ProcessModules/ProcessDisplacement.cpp @@ -46,9 +46,7 @@ using namespace std; #include <StdRegions/StdSegExp.h> #include <StdRegions/StdTriExp.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { struct TriFaceIDs { @@ -132,7 +130,7 @@ void ProcessDisplacement::v_Process(po::variables_map &vm) vector<string> files; files.push_back(toFile); LibUtilities::SessionReaderSharedPtr bndSession = - LibUtilities::SessionReader::CreateInstance(0, NULL, files); + LibUtilities::SessionReader::CreateInstance(0, nullptr, files); SpatialDomains::MeshGraphSharedPtr bndGraph = SpatialDomains::MeshGraph::Read(bndSession); @@ -301,5 +299,4 @@ void ProcessDisplacement::v_Process(po::variables_map &vm) bndCondExpW->UpdateCoeffs()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessDisplacement.h b/library/FieldUtils/ProcessModules/ProcessDisplacement.h index 3a80f95352..e70d5b5238 100644 --- a/library/FieldUtils/ProcessModules/ProcessDisplacement.h +++ b/library/FieldUtils/ProcessModules/ProcessDisplacement.h @@ -37,9 +37,7 @@ #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class ProcessDisplacement : public ProcessBoundaryExtract @@ -53,23 +51,22 @@ public: static ModuleKey className; ProcessDisplacement(FieldSharedPtr f); - virtual ~ProcessDisplacement(); + ~ProcessDisplacement() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessDisplacement"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating displacement"; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.cpp b/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.cpp index 8b927802c2..27e79d109e 100644 --- a/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.cpp +++ b/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.cpp @@ -45,9 +45,7 @@ using namespace std; #include "ProcessEquiSpacedOutput.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessEquiSpacedOutput::className = @@ -871,5 +869,4 @@ void ProcessEquiSpacedOutput::GenOrthoModes( break; } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.h b/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.h index d9c1791503..33b87b979e 100644 --- a/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.h +++ b/library/FieldUtils/ProcessModules/ProcessEquiSpacedOutput.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -56,23 +54,23 @@ public: static ModuleKey className; ProcessEquiSpacedOutput(FieldSharedPtr f); - virtual ~ProcessEquiSpacedOutput(); + ~ProcessEquiSpacedOutput() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessEquiSpacedOutput"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Interpolating fields to equispaced"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eConvertExpToPts; } @@ -84,7 +82,6 @@ protected: private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessFieldFromString.cpp b/library/FieldUtils/ProcessModules/ProcessFieldFromString.cpp index bc751cbcee..b806fdf2c4 100644 --- a/library/FieldUtils/ProcessModules/ProcessFieldFromString.cpp +++ b/library/FieldUtils/ProcessModules/ProcessFieldFromString.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessFieldFromString.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessFieldFromString::className = @@ -152,5 +150,4 @@ void ProcessFieldFromString::v_Process(po::variables_map &vm) m_f->m_exp[fieldID]->FwdTransLocalElmt(m_f->m_exp[fieldID]->GetPhys(), m_f->m_exp[fieldID]->UpdateCoeffs()); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessFieldFromString.h b/library/FieldUtils/ProcessModules/ProcessFieldFromString.h index 82343a8527..33b382b67d 100644 --- a/library/FieldUtils/ProcessModules/ProcessFieldFromString.h +++ b/library/FieldUtils/ProcessModules/ProcessFieldFromString.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -56,27 +54,26 @@ public: static ModuleKey className; ProcessFieldFromString(FieldSharedPtr f); - virtual ~ProcessFieldFromString(); + ~ProcessFieldFromString() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessFieldFromString"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating new field"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessGrad.cpp b/library/FieldUtils/ProcessModules/ProcessGrad.cpp index 129aee2077..ced11ee453 100644 --- a/library/FieldUtils/ProcessModules/ProcessGrad.cpp +++ b/library/FieldUtils/ProcessModules/ProcessGrad.cpp @@ -45,9 +45,7 @@ using namespace std; #include "ProcessGrad.h" #include "ProcessMapping.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessGrad::className = GetModuleFactory().RegisterCreatorFunction( @@ -256,5 +254,4 @@ void ProcessGrad::v_Process(po::variables_map &vm) grad[i], m_f->m_exp[nfields + i]->UpdateCoeffs()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessGrad.h b/library/FieldUtils/ProcessModules/ProcessGrad.h index 9acf738476..04ded6ee67 100644 --- a/library/FieldUtils/ProcessModules/ProcessGrad.h +++ b/library/FieldUtils/ProcessModules/ProcessGrad.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,23 +55,23 @@ public: static ModuleKey className; ProcessGrad(FieldSharedPtr f); - virtual ~ProcessGrad(); + ~ProcessGrad() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessGrad"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating gradients"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -85,7 +83,6 @@ private: std::set<int> m_selectedVars; std::set<int> m_directions; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.cpp b/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.cpp index df5b41406f..bdf9f1a3c2 100644 --- a/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.cpp +++ b/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessHalfModeToFourier.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessHalfModeToFourier::className = @@ -155,5 +153,4 @@ void ProcessHalfModeToFourier::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.h b/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.h index 1abc525f30..8b21af7fb2 100644 --- a/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.h +++ b/library/FieldUtils/ProcessModules/ProcessHalfModeToFourier.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,23 +55,23 @@ public: static ModuleKey className; ProcessHalfModeToFourier(FieldSharedPtr f); - virtual ~ProcessHalfModeToFourier(); + ~ProcessHalfModeToFourier() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessHalfModeToFourier"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Modify Fourier Half Mode to Fourier Expansion"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return m_priority; } @@ -81,7 +79,6 @@ protected: private: ModulePriority m_priority; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.cpp b/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.cpp index 066f0595de..60f4db0fc7 100644 --- a/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.cpp +++ b/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessHomogeneousPlane.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessHomogeneousPlane::className = @@ -168,5 +166,4 @@ void ProcessHomogeneousPlane::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.h b/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.h index 993c66ec40..af03ac8d5a 100644 --- a/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.h +++ b/library/FieldUtils/ProcessModules/ProcessHomogeneousPlane.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessHomogeneousPlane(FieldSharedPtr f); - virtual ~ProcessHomogeneousPlane(); + ~ProcessHomogeneousPlane() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessHomogeneousPlane"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Extracting plane"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.cpp b/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.cpp index d35c6be17d..56762e1385 100644 --- a/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.cpp +++ b/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessHomogeneousStretch.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessHomogeneousStretch::className = @@ -120,5 +118,4 @@ void ProcessHomogeneousStretch::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.h b/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.h index cf90c411fd..c920b971ca 100644 --- a/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.h +++ b/library/FieldUtils/ProcessModules/ProcessHomogeneousStretch.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessHomogeneousStretch(FieldSharedPtr f); - virtual ~ProcessHomogeneousStretch(); + ~ProcessHomogeneousStretch() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessHomogeneousStretch"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Stretching expansion"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessInnerProduct.cpp b/library/FieldUtils/ProcessModules/ProcessInnerProduct.cpp index ffc3289db0..748d481701 100644 --- a/library/FieldUtils/ProcessModules/ProcessInnerProduct.cpp +++ b/library/FieldUtils/ProcessModules/ProcessInnerProduct.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessInnerProduct.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessInnerProduct::className = @@ -248,5 +246,4 @@ NekDouble ProcessInnerProduct::IProduct( } return totiprod; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessInnerProduct.h b/library/FieldUtils/ProcessModules/ProcessInnerProduct.h index ce24d09175..fc402a5ef7 100644 --- a/library/FieldUtils/ProcessModules/ProcessInnerProduct.h +++ b/library/FieldUtils/ProcessModules/ProcessInnerProduct.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,23 +55,23 @@ public: static ModuleKey className; ProcessInnerProduct(FieldSharedPtr f); - virtual ~ProcessInnerProduct(); + ~ProcessInnerProduct() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessInnerProduct"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Evaluating inner product"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -83,7 +81,6 @@ private: FieldSharedPtr &fromField, Array<OneD, const Array<OneD, NekDouble>> &SaveFld); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessInterpField.cpp b/library/FieldUtils/ProcessModules/ProcessInterpField.cpp index 680d1c6376..202cf90c3a 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpField.cpp +++ b/library/FieldUtils/ProcessModules/ProcessInterpField.cpp @@ -49,9 +49,7 @@ using namespace std; namespace bg = boost::geometry; namespace bgi = boost::geometry::index; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessInterpField::className = @@ -288,5 +286,4 @@ void ProcessInterpField::PrintProgressbar(const int position, { LibUtilities::PrintProgressbar(position, goal, "Interpolating"); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessInterpField.h b/library/FieldUtils/ProcessModules/ProcessInterpField.h index 15a3ab5ddd..d0d276dc17 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpField.h +++ b/library/FieldUtils/ProcessModules/ProcessInterpField.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -56,30 +54,29 @@ public: static ModuleKey className; ProcessInterpField(FieldSharedPtr f); - virtual ~ProcessInterpField(); + ~ProcessInterpField() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; void PrintProgressbar(const int position, const int goal) const; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessInterpField"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Interpolating field"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eFillExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.cpp b/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.cpp index 2b9d4de0b1..b929e21967 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.cpp +++ b/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.cpp @@ -52,9 +52,7 @@ using namespace std; namespace bg = boost::geometry; namespace bgi = boost::geometry::index; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessInterpPointDataToFld::className = @@ -205,5 +203,4 @@ void ProcessInterpPointDataToFld::v_Process(po::variables_map &vm) m_f->m_variables.push_back(fieldPts->GetFieldName(j)); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.h b/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.h index 399fe3a74f..2f4e0ad9ec 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.h +++ b/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.h @@ -40,9 +40,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -59,23 +57,23 @@ public: static ModuleKey className; ProcessInterpPointDataToFld(FieldSharedPtr f); - virtual ~ProcessInterpPointDataToFld(); + ~ProcessInterpPointDataToFld() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessInterpPointDataToFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Interpolating data to field"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eFillExp; } @@ -87,7 +85,6 @@ protected: private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessInterpPoints.cpp b/library/FieldUtils/ProcessModules/ProcessInterpPoints.cpp index b2827508e5..3dec4f66fa 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpPoints.cpp +++ b/library/FieldUtils/ProcessModules/ProcessInterpPoints.cpp @@ -54,9 +54,7 @@ using namespace std; namespace bg = boost::geometry; namespace bgi = boost::geometry::index; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessInterpPoints::className = @@ -629,5 +627,4 @@ void ProcessInterpPoints::PrintProgressbar(const int position, { LibUtilities::PrintProgressbar(position, goal, "Interpolating"); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessInterpPoints.h b/library/FieldUtils/ProcessModules/ProcessInterpPoints.h index 48e8473bdc..744ade6e87 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpPoints.h +++ b/library/FieldUtils/ProcessModules/ProcessInterpPoints.h @@ -39,9 +39,7 @@ #include <LibUtilities/BasicUtils/PtsField.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -58,25 +56,25 @@ public: static ModuleKey className; ProcessInterpPoints(FieldSharedPtr f); - virtual ~ProcessInterpPoints(); + ~ProcessInterpPoints() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; void PrintProgressbar(const int position, const int goal) const; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessInterpPoints"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Interpolating to points"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eCreatePts; } @@ -91,7 +89,6 @@ private: void calcCp0(); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.cpp b/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.cpp index 9efb866ba7..05ec2dd6e5 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.cpp +++ b/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.cpp @@ -49,9 +49,7 @@ using namespace std; #include "ProcessInterpPtsToPts.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessInterpPtsToPts::className = @@ -487,5 +485,4 @@ void ProcessInterpPtsToPts::PrintProgressbar(const int position, { LibUtilities::PrintProgressbar(position, goal, "Interpolating"); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.h b/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.h index 757ec64243..8d2e17146f 100644 --- a/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.h +++ b/library/FieldUtils/ProcessModules/ProcessInterpPtsToPts.h @@ -39,9 +39,7 @@ #include <LibUtilities/BasicUtils/PtsField.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -58,25 +56,25 @@ public: static ModuleKey className; ProcessInterpPtsToPts(FieldSharedPtr f); - virtual ~ProcessInterpPtsToPts(); + ~ProcessInterpPtsToPts() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; void PrintProgressbar(const int position, const int goal) const; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessInterpPtsToPts"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Interpolating to points"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyPts; } @@ -91,7 +89,6 @@ private: void calcCp0(); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessIsoContour.cpp b/library/FieldUtils/ProcessModules/ProcessIsoContour.cpp index 67197f78f3..18a43fc6e3 100644 --- a/library/FieldUtils/ProcessModules/ProcessIsoContour.cpp +++ b/library/FieldUtils/ProcessModules/ProcessIsoContour.cpp @@ -52,9 +52,7 @@ namespace bgi = boost::geometry::index; using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessIsoContour::className = @@ -667,10 +665,14 @@ void Iso::Condense(void) vector<IsoVertex> vert; if (!m_ntris) + { return; + } if (m_condensed) + { return; + } m_condensed = true; vert.reserve(m_ntris / 6); @@ -779,7 +781,9 @@ void Iso::GlobalCondense(vector<IsoSharedPtr> &iso, bool verbose) Array<OneD, Array<OneD, int>> vidmap; if (m_condensed) + { return; + } m_condensed = true; vidmap = Array<OneD, Array<OneD, int>>(niso); @@ -1233,5 +1237,4 @@ void Iso::SeparateRegions(vector<IsoSharedPtr> &sep_iso, int minsize, } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessIsoContour.h b/library/FieldUtils/ProcessModules/ProcessIsoContour.h index 98eaae066c..1de923d2d7 100644 --- a/library/FieldUtils/ProcessModules/ProcessIsoContour.h +++ b/library/FieldUtils/ProcessModules/ProcessIsoContour.h @@ -38,9 +38,7 @@ #include "../Module.h" #include "ProcessEquiSpacedOutput.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { class Iso @@ -233,23 +231,23 @@ public: static ModuleKey className; ProcessIsoContour(FieldSharedPtr f); - virtual ~ProcessIsoContour(); + ~ProcessIsoContour() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessIsoContour"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Extracting contour"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyPts; } @@ -264,7 +262,6 @@ private: const NekDouble val); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.cpp b/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.cpp index b307ab4a0f..690da4734b 100644 --- a/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.cpp +++ b/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessJacobianEnergy.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessJacobianEnergy::className = @@ -133,5 +131,4 @@ void ProcessJacobianEnergy::v_Process(po::variables_map &vm) } exp->BwdTrans(coeffs, phys); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.h b/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.h index 31923889f5..c39406bd8c 100644 --- a/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.h +++ b/library/FieldUtils/ProcessModules/ProcessJacobianEnergy.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// This processing module scales the input fld file @@ -54,30 +52,29 @@ public: static ModuleKey className; ProcessJacobianEnergy(FieldSharedPtr f); - virtual ~ProcessJacobianEnergy(); + ~ProcessJacobianEnergy() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessJacobianEnergy"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing Jacobian"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessL2Criterion.cpp b/library/FieldUtils/ProcessModules/ProcessL2Criterion.cpp index d8501c79a1..6bfa8f902b 100644 --- a/library/FieldUtils/ProcessModules/ProcessL2Criterion.cpp +++ b/library/FieldUtils/ProcessModules/ProcessL2Criterion.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessL2Criterion.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessL2Criterion::className = @@ -244,5 +242,4 @@ void ProcessL2Criterion::v_Process(po::variables_map &vm) m_f->m_exp[fid]->UpdateCoeffs()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessL2Criterion.h b/library/FieldUtils/ProcessModules/ProcessL2Criterion.h index c65850f49f..e753b934eb 100644 --- a/library/FieldUtils/ProcessModules/ProcessL2Criterion.h +++ b/library/FieldUtils/ProcessModules/ProcessL2Criterion.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,27 +55,26 @@ public: static ModuleKey className; ProcessL2Criterion(FieldSharedPtr f); - virtual ~ProcessL2Criterion(); + ~ProcessL2Criterion() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessL2Criterion"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating Lambda 2 Criterion"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessMapping.cpp b/library/FieldUtils/ProcessModules/ProcessMapping.cpp index 151a32f889..7a5e4d6994 100644 --- a/library/FieldUtils/ProcessModules/ProcessMapping.cpp +++ b/library/FieldUtils/ProcessModules/ProcessMapping.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessMapping.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessMapping::className = GetModuleFactory().RegisterCreatorFunction( @@ -319,5 +317,4 @@ GlobalMapping::MappingSharedPtr ProcessMapping::GetMapping(FieldSharedPtr f) return mapping; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessMapping.h b/library/FieldUtils/ProcessModules/ProcessMapping.h index ef5e63bdab..4d9c6a1fe0 100644 --- a/library/FieldUtils/ProcessModules/ProcessMapping.h +++ b/library/FieldUtils/ProcessModules/ProcessMapping.h @@ -38,9 +38,7 @@ #include "../Module.h" #include <GlobalMapping/Mapping.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -58,30 +56,29 @@ public: static ModuleKey className; ProcessMapping(FieldSharedPtr f); - virtual ~ProcessMapping(); + ~ProcessMapping() override; static GlobalMapping::MappingSharedPtr GetMapping(FieldSharedPtr f); protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessMapping"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Applying mapping to field"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessMean.cpp b/library/FieldUtils/ProcessModules/ProcessMean.cpp index dde55cc09e..4efbfb1a28 100644 --- a/library/FieldUtils/ProcessModules/ProcessMean.cpp +++ b/library/FieldUtils/ProcessModules/ProcessMean.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessMean.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessMean::className = GetModuleFactory().RegisterCreatorFunction( @@ -89,5 +87,4 @@ void ProcessMean::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessMean.h b/library/FieldUtils/ProcessModules/ProcessMean.h index 7434f07227..1848b4253e 100644 --- a/library/FieldUtils/ProcessModules/ProcessMean.h +++ b/library/FieldUtils/ProcessModules/ProcessMean.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessMean(FieldSharedPtr f); - virtual ~ProcessMean(); + ~ProcessMean() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessMean"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Evaluating mean"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessMeanMode.cpp b/library/FieldUtils/ProcessModules/ProcessMeanMode.cpp index fca728ec0b..03ddeee7c0 100644 --- a/library/FieldUtils/ProcessModules/ProcessMeanMode.cpp +++ b/library/FieldUtils/ProcessModules/ProcessMeanMode.cpp @@ -40,9 +40,7 @@ using namespace std; #include <LibUtilities/BasicUtils/SharedArray.hpp> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessMeanMode::className = @@ -66,5 +64,4 @@ void ProcessMeanMode::v_Process(po::variables_map &vm) ProcessHomogeneousPlane::v_Process(vm); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessMeanMode.h b/library/FieldUtils/ProcessModules/ProcessMeanMode.h index 56ffb77ae6..e2e6ed2c1c 100644 --- a/library/FieldUtils/ProcessModules/ProcessMeanMode.h +++ b/library/FieldUtils/ProcessModules/ProcessMeanMode.h @@ -38,9 +38,7 @@ #include "../Module.h" #include "ProcessHomogeneousPlane.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module replaces all expansions by the mean mode from @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessMeanMode(FieldSharedPtr f); - virtual ~ProcessMeanMode(); + ~ProcessMeanMode() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessMeanMode"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Extracting mean mode"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessMultiShear.cpp b/library/FieldUtils/ProcessModules/ProcessMultiShear.cpp index 25d9bb12af..53d10f8667 100644 --- a/library/FieldUtils/ProcessModules/ProcessMultiShear.cpp +++ b/library/FieldUtils/ProcessModules/ProcessMultiShear.cpp @@ -44,9 +44,7 @@ using namespace std; #include "ProcessMultiShear.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessMultiShear::className = @@ -394,5 +392,4 @@ void ProcessMultiShear::v_Process(po::variables_map &vm) m_f->m_exp[i]->UpdatePhys()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessMultiShear.h b/library/FieldUtils/ProcessModules/ProcessMultiShear.h index cb875d6479..921360350e 100644 --- a/library/FieldUtils/ProcessModules/ProcessMultiShear.h +++ b/library/FieldUtils/ProcessModules/ProcessMultiShear.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessMultiShear(FieldSharedPtr f); - virtual ~ProcessMultiShear(); + ~ProcessMultiShear() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessMultiShear"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating shear stress metrics"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessNumModes.cpp b/library/FieldUtils/ProcessModules/ProcessNumModes.cpp index d3aa632044..580968b385 100644 --- a/library/FieldUtils/ProcessModules/ProcessNumModes.cpp +++ b/library/FieldUtils/ProcessModules/ProcessNumModes.cpp @@ -43,9 +43,7 @@ using namespace std; #include "ProcessNumModes.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessNumModes::className = @@ -137,5 +135,4 @@ void ProcessNumModes::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessNumModes.h b/library/FieldUtils/ProcessModules/ProcessNumModes.h index 491293dc4b..b514f405d3 100644 --- a/library/FieldUtils/ProcessModules/ProcessNumModes.h +++ b/library/FieldUtils/ProcessModules/ProcessNumModes.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module determine the number of modes and adds it @@ -56,28 +54,27 @@ public: static ModuleKey className; ProcessNumModes(FieldSharedPtr f); - virtual ~ProcessNumModes(); + ~ProcessNumModes() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessNumModes"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating number of modes"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessPhiFromFile.cpp b/library/FieldUtils/ProcessModules/ProcessPhiFromFile.cpp index 81c1ef4413..210066fa79 100644 --- a/library/FieldUtils/ProcessModules/ProcessPhiFromFile.cpp +++ b/library/FieldUtils/ProcessModules/ProcessPhiFromFile.cpp @@ -40,9 +40,7 @@ using namespace Nektar; using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessPhiFromFile::m_className = { @@ -620,5 +618,4 @@ Array<OneD, NekDouble> ProcessPhiFromFile::Vector2edge( return out; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessPhiFromFile.h b/library/FieldUtils/ProcessModules/ProcessPhiFromFile.h index ed63225bce..892fdbfa20 100644 --- a/library/FieldUtils/ProcessModules/ProcessPhiFromFile.h +++ b/library/FieldUtils/ProcessModules/ProcessPhiFromFile.h @@ -39,9 +39,7 @@ #include "../Octree.h" #include <random> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -59,22 +57,22 @@ public: static ModuleKey m_className; ProcessPhiFromFile(FieldSharedPtr f); - virtual ~ProcessPhiFromFile(); + ~ProcessPhiFromFile() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessPhiFromFile"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Processing input STL file to calculate Phi"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -135,7 +133,6 @@ protected: private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif // FIELDUTILS_PROCESSPHIFROMFILE diff --git a/library/FieldUtils/ProcessModules/ProcessPointDataToFld.cpp b/library/FieldUtils/ProcessModules/ProcessPointDataToFld.cpp index 5ba7cb8f32..0c5ce1c439 100644 --- a/library/FieldUtils/ProcessModules/ProcessPointDataToFld.cpp +++ b/library/FieldUtils/ProcessModules/ProcessPointDataToFld.cpp @@ -45,9 +45,7 @@ using namespace std; #include "ProcessPointDataToFld.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessPointDataToFld::className = @@ -229,5 +227,4 @@ void ProcessPointDataToFld::v_Process(po::variables_map &vm) m_f->m_variables.push_back(fieldPts->GetFieldName(j)); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessPointDataToFld.h b/library/FieldUtils/ProcessModules/ProcessPointDataToFld.h index 0939458224..1ea5416073 100644 --- a/library/FieldUtils/ProcessModules/ProcessPointDataToFld.h +++ b/library/FieldUtils/ProcessModules/ProcessPointDataToFld.h @@ -39,9 +39,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -58,30 +56,29 @@ public: static ModuleKey className; ProcessPointDataToFld(FieldSharedPtr f); - virtual ~ProcessPointDataToFld(); + ~ProcessPointDataToFld() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessPointDataToFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Projecting data to expansion"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eFillExp; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.cpp b/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.cpp index 157dabeb53..8b935732f2 100644 --- a/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.cpp +++ b/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessPowerSpectrum::className = @@ -202,5 +200,4 @@ void ProcessPowerSpectrum::v_Process(po::variables_map &vm) m_f->m_exp[nfields]->FwdTrans(m_f->m_exp[nfields]->GetPhys(), m_f->m_exp[nfields]->UpdateCoeffs()); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.h b/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.h index 1efd56403f..49fd969abc 100644 --- a/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.h +++ b/library/FieldUtils/ProcessModules/ProcessPowerSpectrum.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,27 +55,26 @@ public: static ModuleKey className; ProcessPowerSpectrum(FieldSharedPtr f); - virtual ~ProcessPowerSpectrum(); + ~ProcessPowerSpectrum() override; /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessPowerSpectrum"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Output power spectrum at given regions"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.cpp b/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.cpp index 191a281a55..0606f17d0f 100644 --- a/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.cpp +++ b/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessPrintFldNorms.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessPrintFldNorms::className = @@ -85,5 +83,4 @@ void ProcessPrintFldNorms::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.h b/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.h index 41ef515911..2e629068b3 100644 --- a/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.h +++ b/library/FieldUtils/ProcessModules/ProcessPrintFldNorms.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,27 +55,26 @@ public: static ModuleKey className; ProcessPrintFldNorms(FieldSharedPtr f); - virtual ~ProcessPrintFldNorms(); + ~ProcessPrintFldNorms() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessPrintFldNorms"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Printing norms"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessQCriterion.cpp b/library/FieldUtils/ProcessModules/ProcessQCriterion.cpp index d2a1a70845..b47fcf2006 100644 --- a/library/FieldUtils/ProcessModules/ProcessQCriterion.cpp +++ b/library/FieldUtils/ProcessModules/ProcessQCriterion.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessQCriterion.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessQCriterion::className = @@ -232,5 +230,4 @@ void ProcessQCriterion::v_Process(po::variables_map &vm) } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessQCriterion.h b/library/FieldUtils/ProcessModules/ProcessQCriterion.h index 3f4afc67b8..69db97cef1 100644 --- a/library/FieldUtils/ProcessModules/ProcessQCriterion.h +++ b/library/FieldUtils/ProcessModules/ProcessQCriterion.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,28 +55,27 @@ public: static ModuleKey className; ProcessQCriterion(FieldSharedPtr f); - virtual ~ProcessQCriterion(); + ~ProcessQCriterion() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessQCriterion"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating Q Criterion"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessQualityMetric.cpp b/library/FieldUtils/ProcessModules/ProcessQualityMetric.cpp index 3a2fa89e31..d7a049b5ea 100644 --- a/library/FieldUtils/ProcessModules/ProcessQualityMetric.cpp +++ b/library/FieldUtils/ProcessModules/ProcessQualityMetric.cpp @@ -48,9 +48,7 @@ using namespace std; #include "ProcessQualityMetric.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessQualityMetric::className = @@ -564,5 +562,4 @@ Array<OneD, NekDouble> ProcessQualityMetric::GetQ( return eta; } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessQualityMetric.h b/library/FieldUtils/ProcessModules/ProcessQualityMetric.h index 96c54f48c2..e1fb9a6e83 100644 --- a/library/FieldUtils/ProcessModules/ProcessQualityMetric.h +++ b/library/FieldUtils/ProcessModules/ProcessQualityMetric.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /// This processing module scales the input fld file @@ -54,23 +52,23 @@ public: static ModuleKey className; ProcessQualityMetric(FieldSharedPtr f); - virtual ~ProcessQualityMetric(); + ~ProcessQualityMetric() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessQualityMetric"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Adding quality metric to field"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -78,7 +76,6 @@ protected: private: Array<OneD, NekDouble> GetQ(LocalRegions::ExpansionSharedPtr e, bool s); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessRemoveField.cpp b/library/FieldUtils/ProcessModules/ProcessRemoveField.cpp index 1b52d30fbd..d46e156bc5 100644 --- a/library/FieldUtils/ProcessModules/ProcessRemoveField.cpp +++ b/library/FieldUtils/ProcessModules/ProcessRemoveField.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessRemoveField.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessRemoveField::className = @@ -94,5 +92,4 @@ void ProcessRemoveField::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessRemoveField.h b/library/FieldUtils/ProcessModules/ProcessRemoveField.h index ec0aa14e1d..ed0f92750f 100644 --- a/library/FieldUtils/ProcessModules/ProcessRemoveField.h +++ b/library/FieldUtils/ProcessModules/ProcessRemoveField.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -56,27 +54,26 @@ public: static ModuleKey className; ProcessRemoveField(FieldSharedPtr f); - virtual ~ProcessRemoveField(); + ~ProcessRemoveField() override; protected: - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessRemoveField"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Removes specific fields from .fld"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessScalGrad.cpp b/library/FieldUtils/ProcessModules/ProcessScalGrad.cpp index bc6d82492c..0f799cdc6b 100644 --- a/library/FieldUtils/ProcessModules/ProcessScalGrad.cpp +++ b/library/FieldUtils/ProcessModules/ProcessScalGrad.cpp @@ -41,9 +41,7 @@ using namespace std; #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessScalGrad::className = @@ -231,5 +229,4 @@ void ProcessScalGrad::v_Process(po::variables_map &vm) } } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessScalGrad.h b/library/FieldUtils/ProcessModules/ProcessScalGrad.h index 085187d834..a671002764 100644 --- a/library/FieldUtils/ProcessModules/ProcessScalGrad.h +++ b/library/FieldUtils/ProcessModules/ProcessScalGrad.h @@ -37,9 +37,7 @@ #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,23 +55,22 @@ public: static ModuleKey className; ProcessScalGrad(FieldSharedPtr f); - virtual ~ProcessScalGrad(); + ~ProcessScalGrad() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessScalGrad"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating scalar gradient"; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessScaleInFld.cpp b/library/FieldUtils/ProcessModules/ProcessScaleInFld.cpp index 8629264f87..9c63a8272f 100644 --- a/library/FieldUtils/ProcessModules/ProcessScaleInFld.cpp +++ b/library/FieldUtils/ProcessModules/ProcessScaleInFld.cpp @@ -42,9 +42,7 @@ using namespace std; #include "ProcessScaleInFld.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessScaleInFld::className = @@ -79,5 +77,4 @@ void ProcessScaleInFld::v_Process(po::variables_map &vm) &(m_f->m_data[i][0]), 1); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessScaleInFld.h b/library/FieldUtils/ProcessModules/ProcessScaleInFld.h index 9454b70207..eff6e6cccc 100644 --- a/library/FieldUtils/ProcessModules/ProcessScaleInFld.h +++ b/library/FieldUtils/ProcessModules/ProcessScaleInFld.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,30 +55,29 @@ public: static ModuleKey className; ProcessScaleInFld(FieldSharedPtr f); - virtual ~ProcessScaleInFld(); + ~ProcessScaleInFld() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessScaleInFld"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Rescaling input fld"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyFieldData; } private: }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessStreamFunction.cpp b/library/FieldUtils/ProcessModules/ProcessStreamFunction.cpp index 82c25687d1..9dd950779b 100644 --- a/library/FieldUtils/ProcessModules/ProcessStreamFunction.cpp +++ b/library/FieldUtils/ProcessModules/ProcessStreamFunction.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessStreamFunction::className = @@ -108,5 +106,4 @@ void ProcessStreamFunction::v_Process(po::variables_map &vm) m_f->m_exp[nfields]->UpdatePhys()); } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessStreamFunction.h b/library/FieldUtils/ProcessModules/ProcessStreamFunction.h index 638ae85fef..45614e7eb3 100644 --- a/library/FieldUtils/ProcessModules/ProcessStreamFunction.h +++ b/library/FieldUtils/ProcessModules/ProcessStreamFunction.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module calculates the stream function of a 2D field @@ -56,28 +54,27 @@ public: static ModuleKey className; ProcessStreamFunction(FieldSharedPtr f); - virtual ~ProcessStreamFunction(); + ~ProcessStreamFunction() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessStreamFunction"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating stream-function"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessSurfDistance.cpp b/library/FieldUtils/ProcessModules/ProcessSurfDistance.cpp index f32bf1bad7..1220a2dc38 100644 --- a/library/FieldUtils/ProcessModules/ProcessSurfDistance.cpp +++ b/library/FieldUtils/ProcessModules/ProcessSurfDistance.cpp @@ -38,9 +38,7 @@ using namespace std; #include "ProcessSurfDistance.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessSurfDistance::className = @@ -236,5 +234,4 @@ void ProcessSurfDistance::v_Process(po::variables_map &vm) BndExp[i]->UpdateCoeffs()); } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessSurfDistance.h b/library/FieldUtils/ProcessModules/ProcessSurfDistance.h index dc340968f5..df848fa7b4 100644 --- a/library/FieldUtils/ProcessModules/ProcessSurfDistance.h +++ b/library/FieldUtils/ProcessModules/ProcessSurfDistance.h @@ -37,9 +37,7 @@ #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,23 +55,22 @@ public: static ModuleKey className; ProcessSurfDistance(FieldSharedPtr f); - virtual ~ProcessSurfDistance(); + ~ProcessSurfDistance() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessSurfDistance"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating distance to surface"; } }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.cpp b/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.cpp index ed8475690d..63e4f9b165 100644 --- a/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.cpp +++ b/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.cpp @@ -44,9 +44,7 @@ using namespace std; #include "ProcessMapping.h" #include "ProcessVelocityDivergence.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessVelocityDivergence::className = @@ -231,5 +229,4 @@ void ProcessVelocityDivergence::GetVelocity( } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.h b/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.h index d6e42fb332..47ea6a2791 100644 --- a/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.h +++ b/library/FieldUtils/ProcessModules/ProcessVelocityDivergence.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module calculates the divergence of the velocity @@ -56,23 +54,23 @@ public: static ModuleKey className; ProcessVelocityDivergence(FieldSharedPtr f); - virtual ~ProcessVelocityDivergence(); + ~ProcessVelocityDivergence() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessVelocityDivergence"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating velocity divergence"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -82,7 +80,6 @@ protected: private: int m_spacedim; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessVorticity.cpp b/library/FieldUtils/ProcessModules/ProcessVorticity.cpp index b6398e0c07..4747eea4fc 100644 --- a/library/FieldUtils/ProcessModules/ProcessVorticity.cpp +++ b/library/FieldUtils/ProcessModules/ProcessVorticity.cpp @@ -44,9 +44,7 @@ using namespace std; #include "ProcessMapping.h" #include "ProcessVorticity.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessVorticity::className = @@ -254,5 +252,4 @@ void ProcessVorticity::GetVelocity(Array<OneD, Array<OneD, NekDouble>> &vel, } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessVorticity.h b/library/FieldUtils/ProcessModules/ProcessVorticity.h index e4936b740b..a959cd5f4b 100644 --- a/library/FieldUtils/ProcessModules/ProcessVorticity.h +++ b/library/FieldUtils/ProcessModules/ProcessVorticity.h @@ -37,9 +37,7 @@ #include "../Module.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** * @brief This processing module calculates the vorticity and adds it @@ -56,23 +54,23 @@ public: static ModuleKey className; ProcessVorticity(FieldSharedPtr f); - virtual ~ProcessVorticity(); + ~ProcessVorticity() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessVorticity"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating vorticity"; } - virtual ModulePriority v_GetModulePriority() override + ModulePriority v_GetModulePriority() override { return eModifyExp; } @@ -84,7 +82,6 @@ protected: private: int m_spacedim; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessWSS.cpp b/library/FieldUtils/ProcessModules/ProcessWSS.cpp index 83a177f3c1..dcf31871bb 100644 --- a/library/FieldUtils/ProcessModules/ProcessWSS.cpp +++ b/library/FieldUtils/ProcessModules/ProcessWSS.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessWSS::className = GetModuleFactory().RegisterCreatorFunction( @@ -442,5 +440,4 @@ void ProcessWSS::GetVelocity( } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessWSS.h b/library/FieldUtils/ProcessModules/ProcessWSS.h index c6be5e42d9..0e633757d4 100644 --- a/library/FieldUtils/ProcessModules/ProcessWSS.h +++ b/library/FieldUtils/ProcessModules/ProcessWSS.h @@ -37,9 +37,7 @@ #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,18 +55,18 @@ public: static ModuleKey className; ProcessWSS(FieldSharedPtr f); - virtual ~ProcessWSS(); + ~ProcessWSS() override; protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessWSS"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Calculating wall shear stress"; } @@ -84,7 +82,6 @@ protected: private: int m_spacedim; }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/ProcessModules/ProcessWallNormalData.cpp b/library/FieldUtils/ProcessModules/ProcessWallNormalData.cpp index 3fe62b47a9..b3a3b293b2 100644 --- a/library/FieldUtils/ProcessModules/ProcessWallNormalData.cpp +++ b/library/FieldUtils/ProcessModules/ProcessWallNormalData.cpp @@ -44,9 +44,7 @@ using namespace std; -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { ModuleKey ProcessWallNormalData::className = @@ -1016,5 +1014,4 @@ void ProcessWallNormalData::GetNormals( } } -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils diff --git a/library/FieldUtils/ProcessModules/ProcessWallNormalData.h b/library/FieldUtils/ProcessModules/ProcessWallNormalData.h index ebeb6c1858..6cfeecaba3 100644 --- a/library/FieldUtils/ProcessModules/ProcessWallNormalData.h +++ b/library/FieldUtils/ProcessModules/ProcessWallNormalData.h @@ -37,9 +37,7 @@ #include "ProcessBoundaryExtract.h" -namespace Nektar -{ -namespace FieldUtils +namespace Nektar::FieldUtils { /** @@ -57,7 +55,7 @@ public: static ModuleKey className; ProcessWallNormalData(FieldSharedPtr f); - virtual ~ProcessWallNormalData(); + ~ProcessWallNormalData() override; /** * @brief Get the normals for a given locCoord @@ -71,14 +69,14 @@ public: protected: /// Write mesh to output file. - virtual void v_Process(po::variables_map &vm) override; + void v_Process(po::variables_map &vm) override; - virtual std::string v_GetModuleName() override + std::string v_GetModuleName() override { return "ProcessWallNormalData"; } - virtual std::string v_GetModuleDescription() override + std::string v_GetModuleDescription() override { return "Get the wall-normal data at a given origin."; } @@ -193,7 +191,6 @@ private: const NekDouble maxDist = 1.0, const NekDouble iterTol = 1.0e-8); }; -} // namespace FieldUtils -} // namespace Nektar +} // namespace Nektar::FieldUtils #endif diff --git a/library/FieldUtils/Python/Field.cpp b/library/FieldUtils/Python/Field.cpp index 6f4a344b14..4ea965bf2b 100644 --- a/library/FieldUtils/Python/Field.cpp +++ b/library/FieldUtils/Python/Field.cpp @@ -61,7 +61,7 @@ char **ConvertCommandLine(py::list &py_argv) p += tmp.size() + 1; } - argv[argc] = NULL; + argv[argc] = nullptr; return argv; } diff --git a/library/FieldUtils/Python/Module.cpp b/library/FieldUtils/Python/Module.cpp index 7b4ebac4bb..11bd282523 100644 --- a/library/FieldUtils/Python/Module.cpp +++ b/library/FieldUtils/Python/Module.cpp @@ -307,7 +307,7 @@ void ModuleCapsuleDestructor(void *ptr) void ModuleCapsuleDestructor(PyObject *ptr) { ModuleRegisterHelper *tmp = - (ModuleRegisterHelper *)PyCapsule_GetPointer(ptr, 0); + (ModuleRegisterHelper *)PyCapsule_GetPointer(ptr, nullptr); delete tmp; } #endif @@ -358,7 +358,7 @@ void Module_Register(ModuleType const &modType, std::string const &modName, py::handle<>(PyCObject_FromVoidPtr(helper, ModuleCapsuleDestructor))); #else py::object capsule( - py::handle<>(PyCapsule_New(helper, 0, ModuleCapsuleDestructor))); + py::handle<>(PyCapsule_New(helper, nullptr, ModuleCapsuleDestructor))); #endif // Embed this in __main__. diff --git a/library/GlobalMapping/Deform.cpp b/library/GlobalMapping/Deform.cpp index 3b6d594cc7..a92b24658c 100644 --- a/library/GlobalMapping/Deform.cpp +++ b/library/GlobalMapping/Deform.cpp @@ -46,9 +46,7 @@ using namespace std; -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { /** @@ -237,7 +235,9 @@ void UpdateGeometry(SpatialDomains::MeshGraphSharedPtr graph, // points. int nq = max(nq0, nq1); if (!modal) + { nq--; + } LibUtilities::PointsKey edgePts( nq, LibUtilities::eGaussLobattoLegendre); @@ -405,5 +405,4 @@ void UpdateGeometry(SpatialDomains::MeshGraphSharedPtr graph, fields[i]->Reset(); } } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/Deform.h b/library/GlobalMapping/Deform.h index 4e9e97fdb5..d054c87143 100644 --- a/library/GlobalMapping/Deform.h +++ b/library/GlobalMapping/Deform.h @@ -42,9 +42,7 @@ #include <MultiRegions/ExpList.h> #include <SpatialDomains/MeshGraph.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { /// Adds a summary item to the summary info list @@ -53,7 +51,6 @@ GLOBAL_MAPPING_EXPORT void UpdateGeometry( Array<OneD, MultiRegions::ExpListSharedPtr> &fields, Array<OneD, Array<OneD, NekDouble>> &PhysVals, bool modal = true); -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/Mapping.cpp b/library/GlobalMapping/Mapping.cpp index 7a7791e0eb..1a97c24beb 100644 --- a/library/GlobalMapping/Mapping.cpp +++ b/library/GlobalMapping/Mapping.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { MappingSharedPtr Mapping::m_mappingPtr = MappingSharedPtr(); @@ -249,7 +247,7 @@ void Mapping::ReplaceField( { m_fields = pFields; - TiXmlElement *vMapping = NULL; + TiXmlElement *vMapping = nullptr; if (m_session->DefinesElement("Nektar/Mapping")) { @@ -275,7 +273,7 @@ MappingSharedPtr Mapping::Load( { if (!m_init) { - TiXmlElement *vMapping = NULL; + TiXmlElement *vMapping = nullptr; string vType; if (pSession->DefinesElement("Nektar/Mapping")) { @@ -1270,5 +1268,4 @@ void Mapping::v_UpdateMapping( UpdateGeomInfo(); } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/Mapping.h b/library/GlobalMapping/Mapping.h index 978620df06..800e4dd6e1 100644 --- a/library/GlobalMapping/Mapping.h +++ b/library/GlobalMapping/Mapping.h @@ -42,9 +42,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { // Forward declaration class Mapping; @@ -538,7 +536,6 @@ protected: GLOBAL_MAPPING_EXPORT virtual void v_UpdateBCs(const NekDouble time); }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/MappingGeneral.cpp b/library/GlobalMapping/MappingGeneral.cpp index 7be6176c44..4eb8191c62 100644 --- a/library/GlobalMapping/MappingGeneral.cpp +++ b/library/GlobalMapping/MappingGeneral.cpp @@ -36,9 +36,7 @@ #include <MultiRegions/ExpList.h> #include <iomanip> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { std::string MappingGeneral::className = @@ -453,5 +451,4 @@ void MappingGeneral::CalculateChristoffel() m_fields[0]->SetWaveSpace(waveSpace); } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/MappingGeneral.h b/library/GlobalMapping/MappingGeneral.h index af6216006f..7565faa2c5 100644 --- a/library/GlobalMapping/MappingGeneral.h +++ b/library/GlobalMapping/MappingGeneral.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { class MappingGeneral : public Mapping @@ -89,49 +87,48 @@ protected: // Virtual functions GLOBAL_MAPPING_EXPORT - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pMapping) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarToCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarToCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetJacobian( + GLOBAL_MAPPING_EXPORT void v_GetJacobian( Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetInvMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelContravar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelCovar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_UpdateGeomInfo() override; + GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override; private: }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/MappingTranslation.cpp b/library/GlobalMapping/MappingTranslation.cpp index 82f015c76f..ac5b3308f1 100644 --- a/library/GlobalMapping/MappingTranslation.cpp +++ b/library/GlobalMapping/MappingTranslation.cpp @@ -37,9 +37,7 @@ #include <GlobalMapping/MappingTranslation.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { std::string MappingTranslation::className = @@ -280,5 +278,4 @@ void MappingTranslation::v_UpdateGeomInfo() { } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/MappingTranslation.h b/library/GlobalMapping/MappingTranslation.h index dc5ddacbf8..2482ac9bf6 100644 --- a/library/GlobalMapping/MappingTranslation.h +++ b/library/GlobalMapping/MappingTranslation.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { class MappingTranslation : public Mapping @@ -81,61 +79,60 @@ protected: // Virtual functions GLOBAL_MAPPING_EXPORT - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pMapping) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarToCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarToCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetJacobian( + GLOBAL_MAPPING_EXPORT void v_GetJacobian( Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_DotGradJacobian( + GLOBAL_MAPPING_EXPORT void v_DotGradJacobian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetInvMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_LowerIndex( + GLOBAL_MAPPING_EXPORT void v_LowerIndex( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_RaiseIndex( + GLOBAL_MAPPING_EXPORT void v_RaiseIndex( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelContravar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelCovar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_UpdateGeomInfo() override; + GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override; private: }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/MappingXYofXY.cpp b/library/GlobalMapping/MappingXYofXY.cpp index 136b1a7bb2..b6f3b8d5b5 100644 --- a/library/GlobalMapping/MappingXYofXY.cpp +++ b/library/GlobalMapping/MappingXYofXY.cpp @@ -35,9 +35,7 @@ #include <GlobalMapping/MappingXYofXY.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { std::string MappingXYofXY::className = @@ -484,5 +482,4 @@ void MappingXYofXY::CalculateChristoffel() m_fields[0]->SetWaveSpace(waveSpace); } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/MappingXYofXY.h b/library/GlobalMapping/MappingXYofXY.h index 04eee6926e..6cd46e7400 100644 --- a/library/GlobalMapping/MappingXYofXY.h +++ b/library/GlobalMapping/MappingXYofXY.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { class MappingXYofXY : public Mapping @@ -85,49 +83,48 @@ protected: // Virtual functions GLOBAL_MAPPING_EXPORT - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pMapping) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarToCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarToCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetJacobian( + GLOBAL_MAPPING_EXPORT void v_GetJacobian( Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetInvMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelContravar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelCovar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_UpdateGeomInfo() override; + GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override; private: }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/MappingXYofZ.cpp b/library/GlobalMapping/MappingXYofZ.cpp index 4321604b57..0515ca0e83 100644 --- a/library/GlobalMapping/MappingXYofZ.cpp +++ b/library/GlobalMapping/MappingXYofZ.cpp @@ -37,9 +37,7 @@ #include <GlobalMapping/MappingXYofZ.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { std::string MappingXYofZ::className = @@ -333,5 +331,4 @@ void MappingXYofZ::v_UpdateGeomInfo() m_fields[0]->SetWaveSpace(waveSpace); } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/MappingXYofZ.h b/library/GlobalMapping/MappingXYofZ.h index b45dad925c..8de3917f54 100644 --- a/library/GlobalMapping/MappingXYofZ.h +++ b/library/GlobalMapping/MappingXYofZ.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { class MappingXYofZ : public Mapping { @@ -75,53 +73,52 @@ protected: // Virtual functions GLOBAL_MAPPING_EXPORT - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pMapping) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarToCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarToCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetJacobian( + GLOBAL_MAPPING_EXPORT void v_GetJacobian( Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_DotGradJacobian( + GLOBAL_MAPPING_EXPORT void v_DotGradJacobian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetInvMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelContravar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelCovar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_UpdateGeomInfo() override; + GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override; private: }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/MappingXofXZ.cpp b/library/GlobalMapping/MappingXofXZ.cpp index f2656eee21..6b24980e7b 100644 --- a/library/GlobalMapping/MappingXofXZ.cpp +++ b/library/GlobalMapping/MappingXofXZ.cpp @@ -35,9 +35,7 @@ #include <GlobalMapping/MappingXofXZ.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { std::string MappingXofXZ::className = @@ -389,5 +387,4 @@ void MappingXofXZ::v_UpdateGeomInfo() m_fields[0]->SetWaveSpace(waveSpace); } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/MappingXofXZ.h b/library/GlobalMapping/MappingXofXZ.h index eba457e1ac..748059d89f 100644 --- a/library/GlobalMapping/MappingXofXZ.h +++ b/library/GlobalMapping/MappingXofXZ.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { class MappingXofXZ : public Mapping @@ -76,61 +74,60 @@ protected: // Virtual functions GLOBAL_MAPPING_EXPORT - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pMapping) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarToCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarToCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetJacobian( + GLOBAL_MAPPING_EXPORT void v_GetJacobian( Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_DotGradJacobian( + GLOBAL_MAPPING_EXPORT void v_DotGradJacobian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetInvMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_LowerIndex( + GLOBAL_MAPPING_EXPORT void v_LowerIndex( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_RaiseIndex( + GLOBAL_MAPPING_EXPORT void v_RaiseIndex( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelContravar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelCovar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_UpdateGeomInfo() override; + GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override; private: }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/GlobalMapping/MappingXofZ.cpp b/library/GlobalMapping/MappingXofZ.cpp index 62fded5d5f..4c8950a822 100644 --- a/library/GlobalMapping/MappingXofZ.cpp +++ b/library/GlobalMapping/MappingXofZ.cpp @@ -37,9 +37,7 @@ #include <GlobalMapping/MappingXofZ.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { std::string MappingXofZ::className = @@ -337,5 +335,4 @@ void MappingXofZ::v_UpdateGeomInfo() m_fields[0]->SetWaveSpace(waveSpace); } -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping diff --git a/library/GlobalMapping/MappingXofZ.h b/library/GlobalMapping/MappingXofZ.h index a3ebf7cecc..8b58514d27 100644 --- a/library/GlobalMapping/MappingXofZ.h +++ b/library/GlobalMapping/MappingXofZ.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace GlobalMapping +namespace Nektar::GlobalMapping { class MappingXofZ : public Mapping @@ -76,61 +74,60 @@ protected: // Virtual functions GLOBAL_MAPPING_EXPORT - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pMapping) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarToCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarToCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarToCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ContravarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_ContravarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_CovarFromCartesian( + GLOBAL_MAPPING_EXPORT void v_CovarFromCartesian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetJacobian( + GLOBAL_MAPPING_EXPORT void v_GetJacobian( Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_DotGradJacobian( + GLOBAL_MAPPING_EXPORT void v_DotGradJacobian( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, NekDouble> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_GetInvMetricTensor( + GLOBAL_MAPPING_EXPORT void v_GetInvMetricTensor( Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_LowerIndex( + GLOBAL_MAPPING_EXPORT void v_LowerIndex( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_RaiseIndex( + GLOBAL_MAPPING_EXPORT void v_RaiseIndex( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelContravar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelContravar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_ApplyChristoffelCovar( + GLOBAL_MAPPING_EXPORT void v_ApplyChristoffelCovar( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - GLOBAL_MAPPING_EXPORT virtual void v_UpdateGeomInfo() override; + GLOBAL_MAPPING_EXPORT void v_UpdateGeomInfo() override; private: }; -} // namespace GlobalMapping -} // namespace Nektar +} // namespace Nektar::GlobalMapping #endif diff --git a/library/LibUtilities/BasicConst/GitRevision.cpp.in b/library/LibUtilities/BasicConst/GitRevision.cpp.in index 83d48429d2..e681512d00 100644 --- a/library/LibUtilities/BasicConst/GitRevision.cpp.in +++ b/library/LibUtilities/BasicConst/GitRevision.cpp.in @@ -32,19 +32,18 @@ // /////////////////////////////////////////////////////////////////////////////// -#ifndef GITREVISION_H -#define GITREVISION_H +#ifndef GITREVISION_H +#define GITREVISION_H #include <LibUtilities/BasicConst/GitRevision.h> #include <string> -namespace Nektar +namespace Nektar::NekConstants { - namespace NekConstants - { - extern const std::string kGitSha1 = "@GIT_SHA1@"; - extern const std::string kGitBranch = "@GIT_REFSPEC@"; - } + +extern const std::string kGitSha1 = "@GIT_SHA1@"; +extern const std::string kGitBranch = "@GIT_REFSPEC@"; + } #endif diff --git a/library/LibUtilities/BasicConst/NektarUnivConsts.hpp b/library/LibUtilities/BasicConst/NektarUnivConsts.hpp index 8af2bfc461..baf79ff89d 100644 --- a/library/LibUtilities/BasicConst/NektarUnivConsts.hpp +++ b/library/LibUtilities/BasicConst/NektarUnivConsts.hpp @@ -39,9 +39,7 @@ #include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp> -namespace Nektar -{ -namespace NekConstants +namespace Nektar::NekConstants { static const NekDouble kNekUnsetDouble = -9999; @@ -64,7 +62,6 @@ static const unsigned int kNekFloatCompFact = 4; // Constants for minimisation functions static const NekDouble kFindDistanceMin = 5e-05; static const unsigned int kNewtonIterations = 51; -} // namespace NekConstants -} // namespace Nektar +} // namespace Nektar::NekConstants #endif diff --git a/library/LibUtilities/BasicUtils/CheckedCast.hpp b/library/LibUtilities/BasicUtils/CheckedCast.hpp index 54404da283..5ad4b95df1 100644 --- a/library/LibUtilities/BasicUtils/CheckedCast.hpp +++ b/library/LibUtilities/BasicUtils/CheckedCast.hpp @@ -39,9 +39,7 @@ #include <limits> #include <type_traits> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// checked cast from float types only to int types template <class To, class Ti, @@ -59,7 +57,6 @@ inline To checked_cast(const Ti param) return static_cast<To>(param); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/CompressData.cpp b/library/LibUtilities/BasicUtils/CompressData.cpp index 5b8d26b649..9ab1dca393 100644 --- a/library/LibUtilities/BasicUtils/CompressData.cpp +++ b/library/LibUtilities/BasicUtils/CompressData.cpp @@ -56,9 +56,7 @@ #define NEKTAR_VERSION "Unknown" #endif -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -153,5 +151,4 @@ void Base64StrToBinaryStr(std::string &base64string, binary_t(base64string.end())); } } // namespace CompressData -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/CompressData.h b/library/LibUtilities/BasicUtils/CompressData.h index 76acc9db6b..14dcadc06e 100644 --- a/library/LibUtilities/BasicUtils/CompressData.h +++ b/library/LibUtilities/BasicUtils/CompressData.h @@ -42,9 +42,7 @@ // Buffer size for zlib compression/decompression #define CHUNK 16384 -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { enum EndianType @@ -226,6 +224,5 @@ int ZlibDecodeFromBase64Str(std::string &in64, std::vector<T> &out) } } // namespace CompressData -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/ConsistentObjectAccess.hpp b/library/LibUtilities/BasicUtils/ConsistentObjectAccess.hpp index 9e52a33e95..2afaf0062f 100644 --- a/library/LibUtilities/BasicUtils/ConsistentObjectAccess.hpp +++ b/library/LibUtilities/BasicUtils/ConsistentObjectAccess.hpp @@ -73,7 +73,7 @@ template <typename DataType> struct ConsistentObjectAccess<DataType *> { static const DataType &const_reference(DataType *o) { - ASSERTL1(o != 0, "Can't dereference null pointer."); + ASSERTL1(o != nullptr, "Can't dereference null pointer."); return *o; } static const DataType *const_pointer(DataType *o) @@ -82,12 +82,12 @@ template <typename DataType> struct ConsistentObjectAccess<DataType *> } static bool ReferencesObject(DataType *o) { - return o != 0; + return o != nullptr; } static DataType &reference(DataType *o) { - ASSERTL1(o != 0, "Can't dereference null pointer."); + ASSERTL1(o != nullptr, "Can't dereference null pointer."); return *o; } static DataType *pointer(DataType *o) diff --git a/library/LibUtilities/BasicUtils/CsvIO.cpp b/library/LibUtilities/BasicUtils/CsvIO.cpp index 66e0fb15ec..d6df22fdcc 100644 --- a/library/LibUtilities/BasicUtils/CsvIO.cpp +++ b/library/LibUtilities/BasicUtils/CsvIO.cpp @@ -51,9 +51,7 @@ #include <LibUtilities/BasicUtils/FileSystem.h> #include <LibUtilities/BasicUtils/ParseUtils.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { CsvIO::CsvIO(CommSharedPtr pComm, bool sharedFilesystem) @@ -282,5 +280,4 @@ std::string CsvIO::v_GetFileEnding() const return "csv"; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/CsvIO.h b/library/LibUtilities/BasicUtils/CsvIO.h index 2010fc546d..5748bf41ba 100644 --- a/library/LibUtilities/BasicUtils/CsvIO.h +++ b/library/LibUtilities/BasicUtils/CsvIO.h @@ -46,9 +46,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/Communication/Comm.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class CsvIO : public PtsIO @@ -57,7 +55,7 @@ public: LIB_UTILITIES_EXPORT CsvIO(LibUtilities::CommSharedPtr pComm, bool sharedFilesystem = false); - LIB_UTILITIES_EXPORT virtual ~CsvIO() + LIB_UTILITIES_EXPORT ~CsvIO() override { } @@ -66,14 +64,13 @@ public: const bool backup = false); protected: - LIB_UTILITIES_EXPORT virtual void v_ImportPtsFieldData( + LIB_UTILITIES_EXPORT void v_ImportPtsFieldData( const std::string inFile, PtsFieldSharedPtr &ptsField, DomainRangeShPtr &Range) override; - LIB_UTILITIES_EXPORT virtual std::string v_GetFileEnding() const override; + LIB_UTILITIES_EXPORT std::string v_GetFileEnding() const override; }; typedef std::shared_ptr<CsvIO> CsvIOSharedPtr; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/DomainRange.h b/library/LibUtilities/BasicUtils/DomainRange.h index 49a8f72b9c..c43f7a56cd 100644 --- a/library/LibUtilities/BasicUtils/DomainRange.h +++ b/library/LibUtilities/BasicUtils/DomainRange.h @@ -41,9 +41,7 @@ #include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp> #include <LibUtilities/BasicUtils/ShapeType.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // set restriction on domain range for post-processing. @@ -66,7 +64,5 @@ struct DomainRange typedef std::shared_ptr<DomainRange> DomainRangeShPtr; static DomainRangeShPtr NullDomainRangeShPtr; -} // namespace LibUtilities - -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/Equation.cpp b/library/LibUtilities/BasicUtils/Equation.cpp index d7401fa872..c9301358e6 100644 --- a/library/LibUtilities/BasicUtils/Equation.cpp +++ b/library/LibUtilities/BasicUtils/Equation.cpp @@ -37,9 +37,7 @@ #include <boost/algorithm/string/trim.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { Equation::Equation(InterpreterSharedPtr evaluator, const std::string &expr, @@ -229,5 +227,4 @@ NekDouble Equation::GetTime() const return m_evaluator->GetTime(); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/Equation.h b/library/LibUtilities/BasicUtils/Equation.h index a2d79036ed..ed251613ec 100644 --- a/library/LibUtilities/BasicUtils/Equation.h +++ b/library/LibUtilities/BasicUtils/Equation.h @@ -43,9 +43,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/Interpreter/Interpreter.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -128,7 +126,6 @@ private: typedef std::shared_ptr<Equation> EquationSharedPtr; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIBUTILITIES_EQUATION_HPP diff --git a/library/LibUtilities/BasicUtils/FieldIO.cpp b/library/LibUtilities/BasicUtils/FieldIO.cpp index d626839ecd..e9f14edaf5 100644 --- a/library/LibUtilities/BasicUtils/FieldIO.cpp +++ b/library/LibUtilities/BasicUtils/FieldIO.cpp @@ -58,9 +58,7 @@ namespace berrc = boost::system::errc; namespace ip = boost::asio::ip; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string fldCmdFormat = SessionReader::RegisterCmdLineArgument( @@ -824,5 +822,4 @@ int FieldIO::CheckFieldDefinition(const FieldDefinitionsSharedPtr &fielddefs) return (int)datasize; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/FieldIO.h b/library/LibUtilities/BasicUtils/FieldIO.h index c6d8ba4e94..4dd0ca175d 100644 --- a/library/LibUtilities/BasicUtils/FieldIO.h +++ b/library/LibUtilities/BasicUtils/FieldIO.h @@ -44,9 +44,7 @@ #include <LibUtilities/BasicUtils/NekFactory.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { typedef std::map<std::string, std::string> FieldMetaDataMap; @@ -373,6 +371,5 @@ inline DataSourceSharedPtr FieldIO::ImportFieldMetaData( return v_ImportFieldMetaData(filename, fieldmetadatamap); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp b/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp index 1270c36959..820111b6af 100644 --- a/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp +++ b/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp @@ -40,9 +40,7 @@ namespace berrc = boost::system::errc; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { namespace H5 { @@ -1362,5 +1360,4 @@ void FieldIOHdf5::ImportHDF5FieldMetaData(DataSourceSharedPtr dataSource, } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/FieldIOHdf5.h b/library/LibUtilities/BasicUtils/FieldIOHdf5.h index 30531fa98e..e86735899b 100644 --- a/library/LibUtilities/BasicUtils/FieldIOHdf5.h +++ b/library/LibUtilities/BasicUtils/FieldIOHdf5.h @@ -39,9 +39,7 @@ #include <LibUtilities/BasicUtils/FileSystem.h> #include <LibUtilities/BasicUtils/H5.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { namespace H5 @@ -100,14 +98,14 @@ public: protected: /// Add a child node. - TagWriterSharedPtr v_AddChild(const std::string &name) + TagWriterSharedPtr v_AddChild(const std::string &name) override { H5::GroupSharedPtr child = m_Group->CreateGroup(name); return TagWriterSharedPtr(new H5TagWriter(child)); } /// Set an attribute key/value pair on this tag. - void v_SetAttr(const std::string &key, const std::string &val) + void v_SetAttr(const std::string &key, const std::string &val) override { m_Group->SetAttribute(key, val); } @@ -216,19 +214,19 @@ public: LIB_UTILITIES_EXPORT FieldIOHdf5(LibUtilities::CommSharedPtr pComm, bool sharedFilesystem); - LIB_UTILITIES_EXPORT virtual ~FieldIOHdf5() + LIB_UTILITIES_EXPORT ~FieldIOHdf5() override { } protected: - LIB_UTILITIES_EXPORT virtual void v_Write( + LIB_UTILITIES_EXPORT void v_Write( const std::string &outFile, std::vector<FieldDefinitionsSharedPtr> &fielddefs, std::vector<std::vector<NekDouble>> &fielddata, const FieldMetaDataMap &fieldinfomap = NullFieldMetaDataMap, const bool backup = false) override; - LIB_UTILITIES_EXPORT virtual void v_Import( + LIB_UTILITIES_EXPORT void v_Import( const std::string &infilename, std::vector<FieldDefinitionsSharedPtr> &fielddefs, std::vector<std::vector<NekDouble>> &fielddata = @@ -236,11 +234,11 @@ protected: FieldMetaDataMap &fieldinfomap = NullFieldMetaDataMap, const Array<OneD, int> &ElementIDs = NullInt1DArray) override; - LIB_UTILITIES_EXPORT virtual DataSourceSharedPtr v_ImportFieldMetaData( - const std::string &filename, - FieldMetaDataMap &fieldmetadatamap) override; + LIB_UTILITIES_EXPORT DataSourceSharedPtr + v_ImportFieldMetaData(const std::string &filename, + FieldMetaDataMap &fieldmetadatamap) override; - virtual const std::string &v_GetClassName() const override; + const std::string &v_GetClassName() const override; private: struct OffsetHelper @@ -273,6 +271,5 @@ private: const FieldDefinitionsSharedPtr fielddef, std::vector<NekDouble> &fielddata); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/FieldIOXml.cpp b/library/LibUtilities/BasicUtils/FieldIOXml.cpp index efe56c9ffb..389c5d5e74 100644 --- a/library/LibUtilities/BasicUtils/FieldIOXml.cpp +++ b/library/LibUtilities/BasicUtils/FieldIOXml.cpp @@ -44,9 +44,7 @@ namespace berrc = boost::system::errc; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string FieldIOXml::className = GetFieldIOFactory().RegisterCreatorFunction( @@ -201,7 +199,9 @@ void FieldIOXml::v_Write(const std::string &outFile, for (int i = 0; i < fielddefs[f]->m_numHomogeneousDir; ++i) { if (!first) + { homoLenStringStream << ","; + } homoLenStringStream << fielddefs[f]->m_homogeneousLengths[i]; first = false; @@ -597,9 +597,9 @@ DataSourceSharedPtr FieldIOXml::v_ImportFieldMetaData( { DataSourceSharedPtr doc = XmlDataSource::create(filename); XmlDataSourceSharedPtr xml = std::static_pointer_cast<XmlDataSource>(doc); - TiXmlElement *metadata = 0; - TiXmlElement *master = 0; // Master tag within which all data is - // contained. + TiXmlElement *metadata = nullptr; + TiXmlElement *master = nullptr; // Master tag within which all data is + // contained. master = xml->Get().FirstChildElement("NEKTAR"); ASSERTL0(master, "Unable to find NEKTAR tag in file."); @@ -736,7 +736,7 @@ void FieldIOXml::ImportFieldDefs( XmlDataSourceSharedPtr xml = std::static_pointer_cast<XmlDataSource>(dataSource); TiXmlElement *master = - NULL; // Master tag within which all data is contained. + nullptr; // Master tag within which all data is contained. master = xml->Get().FirstChildElement("NEKTAR"); ASSERTL0(master, "Unable to find NEKTAR tag in file."); @@ -1054,7 +1054,7 @@ void FieldIOXml::ImportFieldData( std::static_pointer_cast<XmlDataSource>(dataSource); TiXmlElement *master = - NULL; // Master tag within which all data is contained. + nullptr; // Master tag within which all data is contained. master = xml->Get().FirstChildElement("NEKTAR"); ASSERTL0(master, "Unable to find NEKTAR tag in file."); @@ -1112,5 +1112,4 @@ void FieldIOXml::ImportFieldData( master = master->NextSiblingElement("NEKTAR"); } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/FieldIOXml.h b/library/LibUtilities/BasicUtils/FieldIOXml.h index 343a622e87..11ba06e3f3 100644 --- a/library/LibUtilities/BasicUtils/FieldIOXml.h +++ b/library/LibUtilities/BasicUtils/FieldIOXml.h @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/FieldIO.h> #include <LibUtilities/BasicUtils/FileSystem.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -123,7 +121,7 @@ public: protected: /// Add a child node. - virtual TagWriterSharedPtr v_AddChild(const std::string &name) override + TagWriterSharedPtr v_AddChild(const std::string &name) override { TiXmlElement *child = new TiXmlElement(name.c_str()); m_El->LinkEndChild(child); @@ -131,8 +129,7 @@ protected: } /// Set an attribute key/value pair on this tag. - virtual void v_SetAttr(const std::string &key, - const std::string &val) override + void v_SetAttr(const std::string &key, const std::string &val) override { if (boost::starts_with(key, "XML_")) { @@ -221,7 +218,7 @@ public: LIB_UTILITIES_EXPORT FieldIOXml(LibUtilities::CommSharedPtr pComm, bool sharedFilesystem); - LIB_UTILITIES_EXPORT virtual ~FieldIOXml() + LIB_UTILITIES_EXPORT ~FieldIOXml() override { } @@ -250,7 +247,7 @@ public: FieldMetaDataMap &fieldmetadatamap); protected: - LIB_UTILITIES_EXPORT virtual void v_Write( + LIB_UTILITIES_EXPORT void v_Write( const std::string &outFile, std::vector<FieldDefinitionsSharedPtr> &fielddefs, std::vector<std::vector<NekDouble>> &fielddata, @@ -265,13 +262,12 @@ protected: FieldMetaDataMap &fieldinfomap = NullFieldMetaDataMap, const Array<OneD, int> &ElementIDs = NullInt1DArray) override; - LIB_UTILITIES_EXPORT virtual DataSourceSharedPtr v_ImportFieldMetaData( - const std::string &filename, - FieldMetaDataMap &fieldmetadatamap) override; + LIB_UTILITIES_EXPORT DataSourceSharedPtr + v_ImportFieldMetaData(const std::string &filename, + FieldMetaDataMap &fieldmetadatamap) override; - virtual const std::string &v_GetClassName() const override; + const std::string &v_GetClassName() const override; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/FileSystem.cpp b/library/LibUtilities/BasicUtils/FileSystem.cpp index b9da7e33f1..aab2d14db2 100644 --- a/library/LibUtilities/BasicUtils/FileSystem.cpp +++ b/library/LibUtilities/BasicUtils/FileSystem.cpp @@ -34,9 +34,7 @@ #include "LibUtilities/BasicUtils/FileSystem.h" -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * \brief create portable path on different platforms for @@ -48,5 +46,4 @@ std::string PortablePath(const boost::filesystem::path &path) temp.make_preferred(); return temp.string(); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/FileSystem.h b/library/LibUtilities/BasicUtils/FileSystem.h index 11514e5019..7105fdf405 100644 --- a/library/LibUtilities/BasicUtils/FileSystem.h +++ b/library/LibUtilities/BasicUtils/FileSystem.h @@ -41,12 +41,9 @@ namespace fs = boost::filesystem; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { LIB_UTILITIES_EXPORT std::string PortablePath( const boost::filesystem::path &path); -} -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/H5.cpp b/library/LibUtilities/BasicUtils/H5.cpp index 301e4db056..0d503aa0bc 100644 --- a/library/LibUtilities/BasicUtils/H5.cpp +++ b/library/LibUtilities/BasicUtils/H5.cpp @@ -41,11 +41,7 @@ #include <LibUtilities/Communication/CommMpi.h> #endif -namespace Nektar -{ -namespace LibUtilities -{ -namespace H5 +namespace Nektar::LibUtilities::H5 { Object::Object() : m_Id(H5I_INVALID_HID) @@ -419,7 +415,7 @@ DataSpaceSharedPtr DataSpace::Scalar() DataSpaceSharedPtr DataSpace::OneD(hsize_t size) { DataSpaceSharedPtr ans(new DataSpace); - H5_CONSTRUCT(ans->m_Id, H5Screate_simple, (1, &size, NULL)); + H5_CONSTRUCT(ans->m_Id, H5Screate_simple, (1, &size, nullptr)); return ans; } @@ -434,14 +430,16 @@ DataSpace::DataSpace(hid_t id) : Object(id) DataSpace::DataSpace(const std::vector<hsize_t> &dims) : Object() { int rank = dims.size(); - H5_CONSTRUCT(m_Id, H5Screate_simple, (rank, &dims[0], NULL)); + H5_CONSTRUCT(m_Id, H5Screate_simple, (rank, &dims[0], nullptr)); } DataSpace::DataSpace(const hsize_t size, const hsize_t max) : Object() { - const hsize_t *max_p = NULL; + const hsize_t *max_p = nullptr; if (max != (H5S_UNLIMITED - 1)) + { max_p = &max; + } H5_CONSTRUCT(m_Id, H5Screate_simple, (1, &size, max_p)); } @@ -466,24 +464,24 @@ void DataSpace::v_Close() void DataSpace::SelectRange(const hsize_t start, const hsize_t count) { H5_CALL(H5Sselect_hyperslab, - (m_Id, H5S_SELECT_SET, &start, NULL, &count, NULL)); + (m_Id, H5S_SELECT_SET, &start, nullptr, &count, nullptr)); } void DataSpace::AppendRange(const hsize_t start, const hsize_t count) { H5_CALL(H5Sselect_hyperslab, - (m_Id, H5S_SELECT_OR, &start, NULL, &count, NULL)); + (m_Id, H5S_SELECT_OR, &start, nullptr, &count, nullptr)); } void DataSpace::SelectRange(const std::vector<hsize_t> start, const std::vector<hsize_t> count) { H5_CALL(H5Sselect_hyperslab, - (m_Id, H5S_SELECT_SET, &start[0], NULL, &count[0], NULL)); + (m_Id, H5S_SELECT_SET, &start[0], nullptr, &count[0], nullptr)); } void DataSpace::AppendRange(const std::vector<hsize_t> start, const std::vector<hsize_t> count) { H5_CALL(H5Sselect_hyperslab, - (m_Id, H5S_SELECT_OR, &start[0], NULL, &count[0], NULL)); + (m_Id, H5S_SELECT_OR, &start[0], nullptr, &count[0], nullptr)); } void DataSpace::SetSelection(const hsize_t num_elmt, const std::vector<hsize_t> &coords) @@ -513,7 +511,7 @@ std::vector<hsize_t> DataSpace::GetDims() { int ndims = H5Sget_simple_extent_ndims(m_Id); std::vector<hsize_t> ret(ndims, 0); - H5Sget_simple_extent_dims(m_Id, &ret[0], NULL); + H5Sget_simple_extent_dims(m_Id, &ret[0], nullptr); return ret; } @@ -721,6 +719,4 @@ DataSpaceSharedPtr DataSet::GetSpace() const { return DataSpaceSharedPtr(new DataSpace(H5Dget_space(m_Id))); } -} // namespace H5 -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities::H5 diff --git a/library/LibUtilities/BasicUtils/H5.h b/library/LibUtilities/BasicUtils/H5.h index 8430a44545..b6bd394c61 100644 --- a/library/LibUtilities/BasicUtils/H5.h +++ b/library/LibUtilities/BasicUtils/H5.h @@ -46,11 +46,7 @@ #include <LibUtilities/BasicUtils/ErrorUtil.hpp> #include <LibUtilities/Communication/Comm.h> -namespace Nektar -{ -namespace LibUtilities -{ -namespace H5 +namespace Nektar::LibUtilities::H5 { #define H5_CONSTRUCT(ans, func, args) \ @@ -164,7 +160,7 @@ public: static PListSharedPtr LinkAccess(); PList(); - ~PList(); + ~PList() override; void SetChunk(const std::vector<hsize_t> &dims); void SetDeflate(const unsigned level = 1); void SetMpio(CommSharedPtr comm); @@ -172,7 +168,7 @@ public: void SetDxMpioIndependent(); protected: - virtual void v_Close() override; + void v_Close() override; private: PList(hid_t cls); @@ -323,7 +319,7 @@ public: DataSpace(const std::vector<hsize_t> &dims); DataSpace(const std::vector<hsize_t> &dims, const std::vector<hsize_t> &max_dims); - ~DataSpace(); + ~DataSpace() override; void SelectRange(const hsize_t start, const hsize_t count); void AppendRange(const hsize_t start, const hsize_t count); @@ -342,7 +338,7 @@ public: std::vector<hsize_t> GetDims(); protected: - virtual void v_Close() override; + void v_Close() override; private: DataSpace(hid_t id); @@ -407,7 +403,7 @@ public: DataTypeSharedPtr Copy() const; protected: - virtual void v_Close() override; + void v_Close() override; DataType(hid_t id); }; @@ -428,7 +424,7 @@ public: } protected: - virtual void v_Close() override; + void v_Close() override; private: CompoundDataType(hid_t); @@ -442,7 +438,7 @@ public: static DataTypeSharedPtr CS1(); protected: - virtual void v_Close() override; + void v_Close() override; private: PredefinedDataType(hid_t); @@ -452,11 +448,11 @@ private: class Attribute : public Object { public: - ~Attribute(); + ~Attribute() override; DataSpaceSharedPtr GetSpace() const; protected: - virtual void v_Close() override; + void v_Close() override; private: Attribute(hid_t id) : Object(id) @@ -478,11 +474,11 @@ public: PListSharedPtr accessPL = PList::Default()); static FileSharedPtr Open(const std::string &filename, unsigned mode, PListSharedPtr accessPL = PList::Default()); - ~File(); + ~File() override; protected: - virtual void v_Close() override; - virtual hsize_t v_GetNumElements() override; + void v_Close() override; + hsize_t v_GetNumElements() override; private: File(hid_t id); @@ -492,14 +488,14 @@ private: class Group : public CanHaveAttributes, public CanHaveGroupsDataSets { public: - ~Group(); + ~Group() override; std::vector<std::string> GetElementNames(); CanHaveAttributesSharedPtr operator[](hsize_t idx); CanHaveAttributesSharedPtr operator[](const std::string &key); protected: - virtual void v_Close() override; - virtual hsize_t v_GetNumElements() override; + void v_Close() override; + hsize_t v_GetNumElements() override; private: Group(hid_t id); @@ -509,7 +505,7 @@ private: class DataSet : public CanHaveAttributes { public: - ~DataSet(); + ~DataSet() override; DataSpaceSharedPtr GetSpace() const; template <class T> void Write(const std::vector<T> &data) @@ -643,7 +639,7 @@ public: } protected: - virtual void v_Close() override; + void v_Close() override; private: DataSet(hid_t id); @@ -746,7 +742,7 @@ void CanHaveAttributes::SetAttribute(const std::string &name, DataSpaceSharedPtr space = DataSpace::OneD(value.size()); AttributeSharedPtr attr = CreateAttribute(name, type, space); - const void *converted_buf = NULL; + const void *converted_buf = nullptr; if (DataTypeConversionPolicy<T>::MustConvert) { converted_vals.resize(value.size()); @@ -795,7 +791,7 @@ void CanHaveAttributes::GetAttribute(const std::string &name, H5Sget_simple_extent_dims(space->GetId(), &len, &maxdim); value.resize(len); - void *converted_buf = NULL; + void *converted_buf = nullptr; if (DataTypeConversionPolicy<T>::MustConvert) { converted_vals.resize(len); @@ -832,8 +828,6 @@ DataSetSharedPtr CanHaveGroupsDataSets::CreateWriteDataSet( dataset->Write(data); return dataset; } -} // namespace H5 -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities::H5 #endif diff --git a/library/LibUtilities/BasicUtils/Interpolator.cpp b/library/LibUtilities/BasicUtils/Interpolator.cpp index b38c8885f5..eb9c43e6de 100644 --- a/library/LibUtilities/BasicUtils/Interpolator.cpp +++ b/library/LibUtilities/BasicUtils/Interpolator.cpp @@ -41,9 +41,7 @@ using namespace std; namespace bg = boost::geometry; namespace bgi = boost::geometry::index; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -715,5 +713,4 @@ void Interpolator::FindNeighbours(const PtsPoint &searchPt, sort(neighbourPts.begin(), neighbourPts.end()); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/Interpolator.h b/library/LibUtilities/BasicUtils/Interpolator.h index 52e73ed416..2e47f14ef6 100644 --- a/library/LibUtilities/BasicUtils/Interpolator.h +++ b/library/LibUtilities/BasicUtils/Interpolator.h @@ -54,9 +54,7 @@ #include <LibUtilities/BasicUtils/VmathArray.hpp> #include <LibUtilities/LibUtilitiesDeclspec.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { enum InterpMethod @@ -224,7 +222,6 @@ private: typedef std::shared_ptr<Interpolator> InterpolatorSharedPtr; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/NekFactory.hpp b/library/LibUtilities/BasicUtils/NekFactory.hpp index 4482ea15f7..c3e2e2bbb3 100644 --- a/library/LibUtilities/BasicUtils/NekFactory.hpp +++ b/library/LibUtilities/BasicUtils/NekFactory.hpp @@ -49,9 +49,7 @@ #include <LibUtilities/BasicUtils/ErrorUtil.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { #ifdef NEKTAR_USE_THREAD_SAFETY @@ -290,7 +288,6 @@ private: #endif }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/NekManager.hpp b/library/LibUtilities/BasicUtils/NekManager.hpp index 7573af9877..38b8dce11f 100644 --- a/library/LibUtilities/BasicUtils/NekManager.hpp +++ b/library/LibUtilities/BasicUtils/NekManager.hpp @@ -47,9 +47,7 @@ #include <LibUtilities/BasicUtils/ErrorUtil.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { #ifdef NEKTAR_USE_THREAD_SAFETY typedef boost::unique_lock<boost::shared_mutex> WriteLock; @@ -335,7 +333,6 @@ template <typename KeyType, typename ValueT, typename opLessCreator> typename boost::shared_mutex NekManager<KeyType, ValueT, opLessCreator>::m_mutex; #endif -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIB_UTILITIES_BASIC_UTILS_NEK_MANAGER_HPP diff --git a/library/LibUtilities/BasicUtils/Progressbar.hpp b/library/LibUtilities/BasicUtils/Progressbar.hpp index e2b6cd11dc..3284275ef2 100644 --- a/library/LibUtilities/BasicUtils/Progressbar.hpp +++ b/library/LibUtilities/BasicUtils/Progressbar.hpp @@ -47,9 +47,7 @@ #define ISTTY isatty(fileno(stdout)) #endif -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -107,7 +105,6 @@ inline int PrintProgressbar(const int position, const int goal, } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP diff --git a/library/LibUtilities/BasicUtils/PtsField.cpp b/library/LibUtilities/BasicUtils/PtsField.cpp index bf8d06d593..6cd6c4dec5 100644 --- a/library/LibUtilities/BasicUtils/PtsField.cpp +++ b/library/LibUtilities/BasicUtils/PtsField.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { PtsField::PtsField(const int dim, @@ -272,5 +270,4 @@ void PtsField::SetBoxSize(const vector<NekDouble> boxSize) { m_boxSize = boxSize; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/PtsField.h b/library/LibUtilities/BasicUtils/PtsField.h index a6e48f2e0e..1e2158f72f 100644 --- a/library/LibUtilities/BasicUtils/PtsField.h +++ b/library/LibUtilities/BasicUtils/PtsField.h @@ -45,9 +45,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/BasicUtils/VmathArray.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { enum PtsType @@ -189,7 +187,6 @@ private: typedef std::shared_ptr<PtsField> PtsFieldSharedPtr; static PtsFieldSharedPtr NullPtsField; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/PtsIO.cpp b/library/LibUtilities/BasicUtils/PtsIO.cpp index e7aed93093..8cbed4fc77 100644 --- a/library/LibUtilities/BasicUtils/PtsIO.cpp +++ b/library/LibUtilities/BasicUtils/PtsIO.cpp @@ -49,9 +49,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { PtsIO::PtsIO(CommSharedPtr pComm, bool sharedFilesystem) @@ -143,7 +141,7 @@ void PtsIO::Write(const string &outFile, std::ofstream ptsFile; ptsFile.open(filename.c_str()); - ptsFile << "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" << endl; + ptsFile << R"(<?xml version="1.0" encoding="utf-8" ?>)" << endl; ptsFile << "<NEKTAR>" << endl; ptsFile << " <POINTS "; ptsFile << "DIM=\"" << ptsField->GetDim() << "\" "; @@ -305,5 +303,4 @@ void PtsIO::SetUpFieldMetaData(const string outname) WriteMultiFldFileIDs(infofile, filenames, ElementIDs, fieldmetadatamap); } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/PtsIO.h b/library/LibUtilities/BasicUtils/PtsIO.h index bf59e2d031..02eb7bede6 100644 --- a/library/LibUtilities/BasicUtils/PtsIO.h +++ b/library/LibUtilities/BasicUtils/PtsIO.h @@ -50,9 +50,7 @@ #include <LibUtilities/BasicUtils/PtsField.h> #include <LibUtilities/BasicUtils/SharedArray.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { typedef std::map<std::string, std::string> PtsMetaDataMap; @@ -64,7 +62,7 @@ public: LIB_UTILITIES_EXPORT PtsIO(LibUtilities::CommSharedPtr pComm, bool sharedFilesystem = false); - LIB_UTILITIES_EXPORT virtual ~PtsIO() + LIB_UTILITIES_EXPORT ~PtsIO() override { } @@ -82,7 +80,7 @@ protected: const std::string inFile, PtsFieldSharedPtr &ptsField, DomainRangeShPtr &Range = NullDomainRangeShPtr); - LIB_UTILITIES_EXPORT virtual std::string v_GetFileEnding() const override + LIB_UTILITIES_EXPORT std::string v_GetFileEnding() const override { return "pts"; }; @@ -90,6 +88,5 @@ protected: }; typedef std::shared_ptr<PtsIO> PtsIOSharedPtr; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/RealComparison.hpp b/library/LibUtilities/BasicUtils/RealComparison.hpp index 127de94eb5..a6d1abfaec 100644 --- a/library/LibUtilities/BasicUtils/RealComparison.hpp +++ b/library/LibUtilities/BasicUtils/RealComparison.hpp @@ -41,9 +41,7 @@ #include <limits> #include <type_traits> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// compare reals of same type with relative tolerance template < @@ -84,7 +82,6 @@ inline bool IsRealClose(T1 &&lhs, T2 &&rhs, return std::abs(lhs - rhs) < tol; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/SessionReader.cpp b/library/LibUtilities/BasicUtils/SessionReader.cpp index e6f80280c9..24ffd972cf 100644 --- a/library/LibUtilities/BasicUtils/SessionReader.cpp +++ b/library/LibUtilities/BasicUtils/SessionReader.cpp @@ -70,9 +70,7 @@ using namespace std; namespace po = boost::program_options; namespace io = boost::iostreams; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class SessionReader @@ -184,7 +182,7 @@ CmdLineArgMap &SessionReader::GetCmdLineArgMap() */ SessionReader::SessionReader(int argc, char *argv[]) { - m_xmlDoc = 0; + m_xmlDoc = nullptr; m_filenames = ParseCommandLineArguments(argc, argv); ASSERTL0(m_filenames.size() > 0, "No session file(s) given."); @@ -208,7 +206,7 @@ SessionReader::SessionReader(int argc, char *argv[]) m_interpreter = MemoryManager<Interpreter>::AllocateSharedPtr(); m_interpreter->SetRandomSeed((m_comm->GetSpaceComm()->GetRank() + 1) * - (unsigned int)time(NULL)); + (unsigned int)time(nullptr)); } /** @@ -221,7 +219,7 @@ SessionReader::SessionReader(int argc, char *argv[], ASSERTL0(pFilenames.size() > 0, "No filenames specified."); ParseCommandLineArguments(argc, argv); - m_xmlDoc = 0; + m_xmlDoc = nullptr; m_filenames = pFilenames; m_sessionName = ParseSessionName(m_filenames); @@ -250,7 +248,7 @@ SessionReader::SessionReader(int argc, char *argv[], m_interpreter = MemoryManager<Interpreter>::AllocateSharedPtr(); m_interpreter->SetRandomSeed((m_comm->GetSpaceComm()->GetRank() + 1) * - (unsigned int)time(NULL)); + (unsigned int)time(nullptr)); // Set time level (Parallel-in-Time) m_timeLevel = timelevel; @@ -707,7 +705,9 @@ bool SessionReader::DefinesElement(const std::string &pPath) const { vReturn = vReturn->FirstChildElement(st[i].c_str()); if (!vReturn) + { return false; + } } return true; } @@ -2413,13 +2413,19 @@ void SessionReader::ParseEquals(const std::string &line, std::string &lhs, size_t end = line.find_first_of("="); // Check for no parameter name if (beg == end) + { throw 1; + } // Check for no parameter value if (end != line.find_last_of("=")) + { throw 1; + } // Check for no equals sign if (end == std::string::npos) + { throw 1; + } lhs = line.substr(line.find_first_not_of(" "), end - beg); lhs = lhs.substr(0, lhs.find_last_not_of(" ") + 1); @@ -2543,5 +2549,4 @@ TiXmlElement *GetChildElementOrThrow(const std::string &filename, return element; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/SessionReader.h b/library/LibUtilities/BasicUtils/SessionReader.h index 5779be0bd7..9d35b26119 100644 --- a/library/LibUtilities/BasicUtils/SessionReader.h +++ b/library/LibUtilities/BasicUtils/SessionReader.h @@ -51,9 +51,7 @@ class TiXmlElement; class TiXmlDocument; class TiXmlHandle; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { typedef std::map<std::string, std::string> SolverInfoMap; typedef std::map<std::string, NekDouble> ParameterMap; @@ -639,7 +637,6 @@ TiXmlElement *GetChildElementOrThrow(const std::string &filename, std::string childElementName, const TiXmlHandle &docHandle); -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/ShapeType.hpp b/library/LibUtilities/BasicUtils/ShapeType.hpp index e7e7de0f79..d446e391d0 100644 --- a/library/LibUtilities/BasicUtils/ShapeType.hpp +++ b/library/LibUtilities/BasicUtils/ShapeType.hpp @@ -46,9 +46,7 @@ #undef min #endif -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Types of geometry types. @@ -381,7 +379,6 @@ inline int GetNumberOfCoefficients(ShapeType shape, int na, int nb = 0, return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/BasicUtils/Thread.cpp b/library/LibUtilities/BasicUtils/Thread.cpp index acea858b27..255c7d2673 100644 --- a/library/LibUtilities/BasicUtils/Thread.cpp +++ b/library/LibUtilities/BasicUtils/Thread.cpp @@ -38,9 +38,7 @@ #include "LibUtilities/BasicUtils/Thread.h" -namespace Nektar -{ -namespace Thread +namespace Nektar::Thread { /** @@ -337,5 +335,4 @@ ThreadStartupManager &ThreadStartupManager::operator=( return *this; } -} // namespace Thread -} /* namespace Nektar */ +} // namespace Nektar::Thread diff --git a/library/LibUtilities/BasicUtils/Thread.h b/library/LibUtilities/BasicUtils/Thread.h index 5c6b5b4e89..2403a9af35 100644 --- a/library/LibUtilities/BasicUtils/Thread.h +++ b/library/LibUtilities/BasicUtils/Thread.h @@ -45,9 +45,7 @@ #include <LibUtilities/BasicUtils/NekFactory.hpp> -namespace Nektar -{ -namespace Thread +namespace Nektar::Thread { /** @@ -440,23 +438,23 @@ class ThreadStartupManager : public ThreadManager public: ThreadStartupManager(); ThreadStartupManager(const ThreadStartupManager &src) = default; - virtual ~ThreadStartupManager(); + ~ThreadStartupManager() override; protected: - virtual void v_QueueJobs(std::vector<ThreadJob *> &joblist) override; - virtual void v_QueueJob(ThreadJob *job) override; - virtual unsigned int v_GetNumWorkers() override; - virtual unsigned int v_GetWorkerNum() override; - virtual void v_SetNumWorkers(const unsigned int num) override; - virtual void v_SetNumWorkers() override; - virtual unsigned int v_GetMaxNumWorkers() override; - virtual void v_Wait() override; - virtual void v_SetChunkSize(unsigned int chnk) override; - virtual void v_SetSchedType(SchedType s) override; - virtual bool v_InThread() override; - virtual void v_Hold() override; - virtual bool v_IsInitialised() override; - virtual const std::string &v_GetType() const override; + void v_QueueJobs(std::vector<ThreadJob *> &joblist) override; + void v_QueueJob(ThreadJob *job) override; + unsigned int v_GetNumWorkers() override; + unsigned int v_GetWorkerNum() override; + void v_SetNumWorkers(const unsigned int num) override; + void v_SetNumWorkers() override; + unsigned int v_GetMaxNumWorkers() override; + void v_Wait() override; + void v_SetChunkSize(unsigned int chnk) override; + void v_SetSchedType(SchedType s) override; + bool v_InThread() override; + void v_Hold() override; + bool v_IsInitialised() override; + const std::string &v_GetType() const override; private: // Do not allow assignment as m_type is const @@ -465,7 +463,5 @@ private: const std::string m_type; }; -} // namespace Thread - -} // namespace Nektar +} // namespace Nektar::Thread #endif /* THREAD_H_ */ diff --git a/library/LibUtilities/BasicUtils/ThreadBoost.cpp b/library/LibUtilities/BasicUtils/ThreadBoost.cpp index 56e5308ce0..aa406af8e3 100644 --- a/library/LibUtilities/BasicUtils/ThreadBoost.cpp +++ b/library/LibUtilities/BasicUtils/ThreadBoost.cpp @@ -38,9 +38,7 @@ #include <algorithm> #include <iostream> -namespace Nektar -{ -namespace Thread +namespace Nektar::Thread { std::string ThreadManagerBoost::className = @@ -446,5 +444,4 @@ void ThreadWorkerBoost::RunJobs() } } -} // namespace Thread -} /* namespace Nektar */ +} // namespace Nektar::Thread diff --git a/library/LibUtilities/BasicUtils/ThreadBoost.h b/library/LibUtilities/BasicUtils/ThreadBoost.h index 8c8e3847b6..fecaff6251 100644 --- a/library/LibUtilities/BasicUtils/ThreadBoost.h +++ b/library/LibUtilities/BasicUtils/ThreadBoost.h @@ -43,9 +43,7 @@ #include "LibUtilities/Memory/NekMemoryManager.hpp" -namespace Nektar -{ -namespace Thread +namespace Nektar::Thread { typedef boost::unique_lock<boost::mutex> Lock; @@ -66,7 +64,7 @@ public: /// Constructs a ThreadManagerBoost. ThreadManagerBoost(unsigned int numWorkers); /// Shuts down threading. - virtual ~ThreadManagerBoost(); + ~ThreadManagerBoost() override; /// Called by the factory method. static ThreadManagerSharedPtr Create(unsigned int numT) @@ -75,19 +73,19 @@ public: } protected: - virtual void v_QueueJobs(std::vector<ThreadJob *> &joblist) override; - virtual void v_QueueJob(ThreadJob *job) override; - virtual unsigned int v_GetNumWorkers() override; - virtual unsigned int v_GetWorkerNum() override; - virtual void v_SetNumWorkers(const unsigned int num) override; - virtual void v_SetNumWorkers() override; - virtual unsigned int v_GetMaxNumWorkers() override; - virtual void v_Wait() override; - virtual void v_SetChunkSize(unsigned int chnk) override; - virtual void v_SetSchedType(SchedType s) override; - virtual bool v_InThread() override; - virtual void v_Hold() override; - virtual const std::string &v_GetType() const override; + void v_QueueJobs(std::vector<ThreadJob *> &joblist) override; + void v_QueueJob(ThreadJob *job) override; + unsigned int v_GetNumWorkers() override; + unsigned int v_GetWorkerNum() override; + void v_SetNumWorkers(const unsigned int num) override; + void v_SetNumWorkers() override; + unsigned int v_GetMaxNumWorkers() override; + void v_Wait() override; + void v_SetChunkSize(unsigned int chnk) override; + void v_SetSchedType(SchedType s) override; + bool v_InThread() override; + void v_Hold() override; + const std::string &v_GetType() const override; private: ThreadManagerBoost(); @@ -173,6 +171,5 @@ private: unsigned int m_threadNum; }; -} // namespace Thread -} // namespace Nektar +} // namespace Nektar::Thread #endif /* THREADBOOST_H_ */ diff --git a/library/LibUtilities/BasicUtils/Timer.cpp b/library/LibUtilities/BasicUtils/Timer.cpp index 4aa9270250..98993efd9f 100644 --- a/library/LibUtilities/BasicUtils/Timer.cpp +++ b/library/LibUtilities/BasicUtils/Timer.cpp @@ -38,9 +38,7 @@ #include <iostream> #include <tuple> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { void Timer::Start() @@ -163,7 +161,9 @@ void Timer::PrintElapsedRegions(LibUtilities::CommSharedPtr comm, { // Add a newline between each IO Level group if (comm->GetRank() == 0) + { o << "\n"; + } for (auto item = m_elapsedRegion.begin(); item != m_elapsedRegion.end(); ++item) @@ -205,5 +205,4 @@ void Timer::PrintElapsedRegions(LibUtilities::CommSharedPtr comm, std::map<std::string, std::tuple<Timer::Seconds, size_t, int>> Timer::m_elapsedRegion{}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/BasicUtils/Timer.h b/library/LibUtilities/BasicUtils/Timer.h index ef9aaf90f0..3ab962dba2 100644 --- a/library/LibUtilities/BasicUtils/Timer.h +++ b/library/LibUtilities/BasicUtils/Timer.h @@ -43,9 +43,7 @@ #include <LibUtilities/Communication/CommSerial.h> #include <LibUtilities/LibUtilitiesDeclspec.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class Timer @@ -90,7 +88,6 @@ private: m_elapsedRegion; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIB_UTILITIES_BASIC_UTILS_TIMER_H diff --git a/library/LibUtilities/BasicUtils/Vmath.cpp b/library/LibUtilities/BasicUtils/Vmath.cpp index 233c8b2ddd..2d09688b31 100644 --- a/library/LibUtilities/BasicUtils/Vmath.cpp +++ b/library/LibUtilities/BasicUtils/Vmath.cpp @@ -89,18 +89,26 @@ template <class T> T ran2(long *idum) if (*idum <= 0) { if (-(*idum) < 1) + { *idum = 1; + } else + { *idum = -(*idum); + } idum2 = (*idum); for (j = NTAB + 7; j >= 0; j--) { k = (*idum) / IQ1; *idum = IA1 * (*idum - k * IQ1) - k * IR1; if (*idum < 0) + { *idum += IM1; + } if (j < NTAB) + { iv[j] = *idum; + } } iy = iv[0]; } @@ -108,23 +116,33 @@ template <class T> T ran2(long *idum) k = (*idum) / IQ1; *idum = IA1 * (*idum - k * IQ1) - k * IR1; if (*idum < 0) + { *idum += IM1; + } k = idum2 / IQ2; idum2 = IA2 * (idum2 - k * IQ2) - k * IR2; if (idum2 < 0) + { idum2 += IM2; + } j = iy / NDIV; iy = iv[j] - idum2; iv[j] = *idum; if (iy < 1) + { iy += IMM1; + } if ((temp = AM * iy) > RNMX) + { return RNMX; + } else + { return temp; + } } #undef IM1 diff --git a/library/LibUtilities/BasicUtils/VmathSIMD.hpp b/library/LibUtilities/BasicUtils/VmathSIMD.hpp index 9dd9113863..eb3003e900 100644 --- a/library/LibUtilities/BasicUtils/VmathSIMD.hpp +++ b/library/LibUtilities/BasicUtils/VmathSIMD.hpp @@ -39,9 +39,7 @@ #include <LibUtilities/SimdLib/tinysimd.hpp> -namespace Vmath -{ -namespace SIMD +namespace Vmath::SIMD { /// \brief Add vector z = x + y template <class T, typename = typename std::enable_if< @@ -562,6 +560,5 @@ void Gathr(const I n, const T *x, const I *y, T *z) } } -} // namespace SIMD -} // namespace Vmath +} // namespace Vmath::SIMD #endif diff --git a/library/LibUtilities/Communication/Comm.cpp b/library/LibUtilities/Communication/Comm.cpp index b7de0b6f69..5be7af15e5 100644 --- a/library/LibUtilities/Communication/Comm.cpp +++ b/library/LibUtilities/Communication/Comm.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/Communication/Comm.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { Comm::Comm(int narg, char *arg[]) { @@ -76,5 +74,4 @@ std::pair<CommSharedPtr, CommSharedPtr> Comm::v_SplitCommNode() return std::make_pair(CommSharedPtr(), CommSharedPtr()); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Communication/Comm.h b/library/LibUtilities/Communication/Comm.h index 444298b60c..d9fb9f1a4a 100644 --- a/library/LibUtilities/Communication/Comm.h +++ b/library/LibUtilities/Communication/Comm.h @@ -46,9 +46,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/Communication/CommDataType.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Forward declarations class Comm; @@ -501,7 +499,7 @@ template <class T> T Comm::Gather(const int rootProc, T &val) unsigned nOut = amRoot ? GetSize() * nEl : 0; T ans(nOut); - void *recvbuf = amRoot ? CommDataTypeTraits<T>::GetPointer(ans) : NULL; + void *recvbuf = amRoot ? CommDataTypeTraits<T>::GetPointer(ans) : nullptr; v_Gather(CommDataTypeTraits<T>::GetPointer(val), nEl, CommDataTypeTraits<T>::GetDataType(), recvbuf, nEl, @@ -520,7 +518,7 @@ template <class T> T Comm::Scatter(const int rootProc, T &pData) bool amRoot = (GetRank() == rootProc); unsigned nEl = CommDataTypeTraits<T>::GetCount(pData) / GetSize(); - void *sendbuf = amRoot ? CommDataTypeTraits<T>::GetPointer(pData) : NULL; + void *sendbuf = amRoot ? CommDataTypeTraits<T>::GetPointer(pData) : nullptr; T ans(nEl); v_Scatter(sendbuf, nEl, CommDataTypeTraits<T>::GetDataType(), @@ -815,7 +813,6 @@ std::pair<CommSharedPtr, CommSharedPtr> Comm::SplitCommNode() return v_SplitCommNode(); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Communication/CommCwipi.cpp b/library/LibUtilities/Communication/CommCwipi.cpp index 242ad349e1..c170637f8e 100644 --- a/library/LibUtilities/Communication/CommCwipi.cpp +++ b/library/LibUtilities/Communication/CommCwipi.cpp @@ -41,9 +41,7 @@ #include <cwipi.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string CommCwipi::className = GetCommFactory().RegisterCreatorFunction( @@ -93,5 +91,4 @@ void CommCwipi::v_Finalise() cwipi_finalize(); CommMpi::v_Finalise(); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Communication/CommCwipi.h b/library/LibUtilities/Communication/CommCwipi.h index 562813011c..03ec5a4c01 100644 --- a/library/LibUtilities/Communication/CommCwipi.h +++ b/library/LibUtilities/Communication/CommCwipi.h @@ -41,9 +41,7 @@ #include <LibUtilities/Communication/CommMpi.h> #include <LibUtilities/Memory/NekMemoryManager.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Forward declarations class CommCwipi; @@ -67,12 +65,11 @@ public: CommCwipi(int narg, char *arg[]); - virtual ~CommCwipi(); + ~CommCwipi() override; protected: - virtual void v_Finalise(); + void v_Finalise() override; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Communication/CommDataType.cpp b/library/LibUtilities/Communication/CommDataType.cpp index 604837340d..ea84470a8d 100644 --- a/library/LibUtilities/Communication/CommDataType.cpp +++ b/library/LibUtilities/Communication/CommDataType.cpp @@ -39,9 +39,7 @@ #include "petscsys.h" #endif -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -169,5 +167,4 @@ template <> CommDataType &CommDataTypeTraits<long double>::GetDataType() return type; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Communication/CommDataType.h b/library/LibUtilities/Communication/CommDataType.h index e7bf1056da..d21233aef0 100644 --- a/library/LibUtilities/Communication/CommDataType.h +++ b/library/LibUtilities/Communication/CommDataType.h @@ -43,13 +43,10 @@ #ifdef NEKTAR_USE_MPI #include <mpi.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { typedef MPI_Datatype CommDataType; -} -} // namespace Nektar +} // namespace Nektar::LibUtilities #elif NEKTAR_USING_PETSC diff --git a/library/LibUtilities/Communication/CommMpi.cpp b/library/LibUtilities/Communication/CommMpi.cpp index 65f3f01326..d20e4e68da 100644 --- a/library/LibUtilities/Communication/CommMpi.cpp +++ b/library/LibUtilities/Communication/CommMpi.cpp @@ -38,9 +38,7 @@ #include <LibUtilities/Communication/CommMpi.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string CommMpi::className = GetCommFactory().RegisterCreatorFunction( @@ -598,5 +596,4 @@ std::pair<CommSharedPtr, CommSharedPtr> CommMpi::v_SplitCommNode() return ret; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Communication/CommMpi.h b/library/LibUtilities/Communication/CommMpi.h index 4eda1ba1a5..39b9cc16b4 100644 --- a/library/LibUtilities/Communication/CommMpi.h +++ b/library/LibUtilities/Communication/CommMpi.h @@ -47,9 +47,7 @@ #define MPISYNC 1 #endif -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Forward declarations class CommMpi; @@ -68,7 +66,7 @@ public: } /// Default destructor - inline ~CommRequestMpi() override final = default; + inline ~CommRequestMpi() final = default; inline MPI_Request *GetRequest(int i) { @@ -101,7 +99,7 @@ public: LIB_UTILITIES_EXPORT static std::string className; LIB_UTILITIES_EXPORT CommMpi(int narg, char *arg[]); - LIB_UTILITIES_EXPORT virtual ~CommMpi() override; + LIB_UTILITIES_EXPORT ~CommMpi() override; LIB_UTILITIES_EXPORT MPI_Comm GetComm(); @@ -112,85 +110,72 @@ protected: explicit CommMpi(MPI_Comm pComm); - virtual void v_Finalise() override; - virtual int v_GetRank() override final; - virtual bool v_TreatAsRankZero() override final; - virtual bool v_IsSerial() override final; - virtual std::tuple<int, int, int> v_GetVersion() override final; - virtual void v_Block() override final; - virtual double v_Wtime() override final; - - virtual void v_Send(void *buf, int count, CommDataType dt, - int dest) override final; - virtual void v_Recv(void *buf, int count, CommDataType dt, - int source) override final; - virtual void v_SendRecv(void *sendbuf, int sendcount, CommDataType sendtype, - int dest, void *recvbuf, int recvcount, - CommDataType recvtype, int source) override final; - - virtual void v_AllReduce(void *buf, int count, CommDataType dt, - enum ReduceOperator pOp) override final; - - virtual void v_AlltoAll(void *sendbuf, int sendcount, CommDataType sendtype, - void *recvbuf, int recvcount, - CommDataType recvtype) override final; - virtual void v_AlltoAllv(void *sendbuf, int sendcounts[], int sensdispls[], + void v_Finalise() override; + int v_GetRank() final; + bool v_TreatAsRankZero() final; + bool v_IsSerial() final; + std::tuple<int, int, int> v_GetVersion() final; + void v_Block() final; + double v_Wtime() final; + + void v_Send(void *buf, int count, CommDataType dt, int dest) final; + void v_Recv(void *buf, int count, CommDataType dt, int source) final; + void v_SendRecv(void *sendbuf, int sendcount, CommDataType sendtype, + int dest, void *recvbuf, int recvcount, + CommDataType recvtype, int source) final; + + void v_AllReduce(void *buf, int count, CommDataType dt, + enum ReduceOperator pOp) final; + + void v_AlltoAll(void *sendbuf, int sendcount, CommDataType sendtype, + void *recvbuf, int recvcount, CommDataType recvtype) final; + void v_AlltoAllv(void *sendbuf, int sendcounts[], int sensdispls[], + CommDataType sendtype, void *recvbuf, int recvcounts[], + int rdispls[], CommDataType recvtype) final; + + void v_AllGather(void *sendbuf, int sendcount, CommDataType sendtype, + void *recvbuf, int recvcount, CommDataType recvtype) final; + void v_AllGatherv(void *sendbuf, int sendcount, CommDataType sendtype, + void *recvbuf, int recvcounts[], int rdispls[], + CommDataType recvtype) final; + void v_AllGatherv(void *recvbuf, int recvcounts[], int rdispls[], + CommDataType recvtype) final; + + void v_Bcast(void *buffer, int count, CommDataType dt, int root) final; + void v_Gather(void *sendbuf, int sendcount, CommDataType sendtype, + void *recvbuf, int recvcount, CommDataType recvtype, + int root) final; + void v_Scatter(void *sendbuf, int sendcount, CommDataType sendtype, + void *recvbuf, int recvcount, CommDataType recvtype, + int root) final; + + void v_DistGraphCreateAdjacent(int indegree, const int sources[], + const int sourceweights[], + int reorder) final; + void v_NeighborAlltoAllv(void *sendbuf, int sendcounts[], int sensdispls[], CommDataType sendtype, void *recvbuf, int recvcounts[], int rdispls[], - CommDataType recvtype) override final; - - virtual void v_AllGather(void *sendbuf, int sendcount, - CommDataType sendtype, void *recvbuf, - int recvcount, - CommDataType recvtype) override final; - virtual void v_AllGatherv(void *sendbuf, int sendcount, - CommDataType sendtype, void *recvbuf, - int recvcounts[], int rdispls[], - CommDataType recvtype) override final; - virtual void v_AllGatherv(void *recvbuf, int recvcounts[], int rdispls[], - CommDataType recvtype) override final; - - virtual void v_Bcast(void *buffer, int count, CommDataType dt, - int root) override final; - virtual void v_Gather(void *sendbuf, int sendcount, CommDataType sendtype, - void *recvbuf, int recvcount, CommDataType recvtype, - int root) override final; - virtual void v_Scatter(void *sendbuf, int sendcount, CommDataType sendtype, - void *recvbuf, int recvcount, CommDataType recvtype, - int root) override final; - - virtual void v_DistGraphCreateAdjacent(int indegree, const int sources[], - const int sourceweights[], - int reorder) override final; - virtual void v_NeighborAlltoAllv(void *sendbuf, int sendcounts[], - int sensdispls[], CommDataType sendtype, - void *recvbuf, int recvcounts[], - int rdispls[], - CommDataType recvtype) override final; - - virtual void v_Irsend(void *buf, int count, CommDataType dt, int dest, - CommRequestSharedPtr request, int loc) override final; - virtual void v_Isend(void *buf, int count, CommDataType dt, int dest, - CommRequestSharedPtr request, int loc) override final; - virtual void v_SendInit(void *buf, int count, CommDataType dt, int dest, - CommRequestSharedPtr request, - int loc) override final; - virtual void v_Irecv(void *buf, int count, CommDataType dt, int source, - CommRequestSharedPtr request, int loc) override final; - virtual void v_RecvInit(void *buf, int count, CommDataType dt, int source, - CommRequestSharedPtr request, - int loc) override final; - - virtual void v_StartAll(CommRequestSharedPtr request) override final; - virtual void v_WaitAll(CommRequestSharedPtr request) override final; - - virtual CommRequestSharedPtr v_CreateRequest(int num) override final; - virtual void v_SplitComm(int pRows, int pColumns, int pTime) override; - virtual CommSharedPtr v_CommCreateIf(int flag) override final; - virtual std::pair<CommSharedPtr, CommSharedPtr> v_SplitCommNode() - override final; + CommDataType recvtype) final; + + void v_Irsend(void *buf, int count, CommDataType dt, int dest, + CommRequestSharedPtr request, int loc) final; + void v_Isend(void *buf, int count, CommDataType dt, int dest, + CommRequestSharedPtr request, int loc) final; + void v_SendInit(void *buf, int count, CommDataType dt, int dest, + CommRequestSharedPtr request, int loc) final; + void v_Irecv(void *buf, int count, CommDataType dt, int source, + CommRequestSharedPtr request, int loc) final; + void v_RecvInit(void *buf, int count, CommDataType dt, int source, + CommRequestSharedPtr request, int loc) final; + + void v_StartAll(CommRequestSharedPtr request) final; + void v_WaitAll(CommRequestSharedPtr request) final; + + CommRequestSharedPtr v_CreateRequest(int num) final; + void v_SplitComm(int pRows, int pColumns, int pTime) override; + CommSharedPtr v_CommCreateIf(int flag) final; + std::pair<CommSharedPtr, CommSharedPtr> v_SplitCommNode() final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Communication/CommSerial.cpp b/library/LibUtilities/Communication/CommSerial.cpp index 209625a177..9789fcb875 100644 --- a/library/LibUtilities/Communication/CommSerial.cpp +++ b/library/LibUtilities/Communication/CommSerial.cpp @@ -40,9 +40,7 @@ #include <LibUtilities/Communication/CommSerial.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string CommSerial::className = GetCommFactory().RegisterCreatorFunction( "Serial", CommSerial::create, "Single-process serial communication."); @@ -353,5 +351,4 @@ CommSharedPtr CommSerial::v_CommCreateIf(int flag) } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Communication/CommSerial.h b/library/LibUtilities/Communication/CommSerial.h index 1132e9ab3a..2e1014eb2c 100644 --- a/library/LibUtilities/Communication/CommSerial.h +++ b/library/LibUtilities/Communication/CommSerial.h @@ -40,9 +40,7 @@ #include <LibUtilities/LibUtilitiesDeclspec.h> #include <LibUtilities/Memory/NekMemoryManager.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Forward declarations class CommSerial; @@ -64,109 +62,96 @@ public: LIB_UTILITIES_EXPORT static std::string className; LIB_UTILITIES_EXPORT CommSerial(int argc, char *argv[]); - LIB_UTILITIES_EXPORT virtual ~CommSerial() override; + LIB_UTILITIES_EXPORT ~CommSerial() override; protected: - LIB_UTILITIES_EXPORT virtual void v_Finalise() override final; - LIB_UTILITIES_EXPORT virtual int v_GetRank() override; - LIB_UTILITIES_EXPORT virtual bool v_TreatAsRankZero() override; - LIB_UTILITIES_EXPORT virtual bool v_IsSerial() override; - LIB_UTILITIES_EXPORT virtual std::tuple<int, int, int> v_GetVersion() - override final; - LIB_UTILITIES_EXPORT virtual void v_Block() override final; - LIB_UTILITIES_EXPORT virtual NekDouble v_Wtime() override final; - - LIB_UTILITIES_EXPORT virtual void v_Send(void *buf, int count, - CommDataType dt, - int dest) override final; - LIB_UTILITIES_EXPORT virtual void v_Recv(void *buf, int count, - CommDataType dt, - int source) override final; - LIB_UTILITIES_EXPORT virtual void v_SendRecv(void *sendbuf, int sendcount, - CommDataType sendtype, - int dest, void *recvbuf, - int recvcount, - CommDataType recvtype, - int source) override final; - - LIB_UTILITIES_EXPORT virtual void v_AllReduce( - void *buf, int count, CommDataType dt, - enum ReduceOperator pOp) override final; - - LIB_UTILITIES_EXPORT virtual void v_AlltoAll( - void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, - int recvcount, CommDataType recvtype) override final; - LIB_UTILITIES_EXPORT virtual void v_AlltoAllv( - void *sendbuf, int sendcounts[], int sensdispls[], - CommDataType sendtype, void *recvbuf, int recvcounts[], int rdispls[], - CommDataType recvtype) override final; - - LIB_UTILITIES_EXPORT virtual void v_AllGather( - void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, - int recvcount, CommDataType recvtype) override final; - LIB_UTILITIES_EXPORT virtual void v_AllGatherv( - void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, - int recvcounts[], int rdispls[], CommDataType recvtype) override final; - LIB_UTILITIES_EXPORT virtual void v_AllGatherv( - void *recvbuf, int recvcounts[], int rdispls[], - CommDataType recvtype) override final; - - LIB_UTILITIES_EXPORT virtual void v_Bcast(void *buffer, int count, - CommDataType dt, - int root) override final; - LIB_UTILITIES_EXPORT virtual void v_Gather(void *sendbuf, int sendcount, - CommDataType sendtype, - void *recvbuf, int recvcount, - CommDataType recvtype, - int root) override final; - LIB_UTILITIES_EXPORT virtual void v_Scatter(void *sendbuf, int sendcount, - CommDataType sendtype, - void *recvbuf, int recvcount, - CommDataType recvtype, - int root) override final; - - LIB_UTILITIES_EXPORT virtual void v_DistGraphCreateAdjacent( + LIB_UTILITIES_EXPORT void v_Finalise() final; + LIB_UTILITIES_EXPORT int v_GetRank() override; + LIB_UTILITIES_EXPORT bool v_TreatAsRankZero() override; + LIB_UTILITIES_EXPORT bool v_IsSerial() override; + LIB_UTILITIES_EXPORT std::tuple<int, int, int> v_GetVersion() final; + LIB_UTILITIES_EXPORT void v_Block() final; + LIB_UTILITIES_EXPORT NekDouble v_Wtime() final; + + LIB_UTILITIES_EXPORT void v_Send(void *buf, int count, CommDataType dt, + int dest) final; + LIB_UTILITIES_EXPORT void v_Recv(void *buf, int count, CommDataType dt, + int source) final; + LIB_UTILITIES_EXPORT void v_SendRecv(void *sendbuf, int sendcount, + CommDataType sendtype, int dest, + void *recvbuf, int recvcount, + CommDataType recvtype, + int source) final; + + LIB_UTILITIES_EXPORT void v_AllReduce(void *buf, int count, CommDataType dt, + enum ReduceOperator pOp) final; + + LIB_UTILITIES_EXPORT void v_AlltoAll(void *sendbuf, int sendcount, + CommDataType sendtype, void *recvbuf, + int recvcount, + CommDataType recvtype) final; + LIB_UTILITIES_EXPORT void v_AlltoAllv(void *sendbuf, int sendcounts[], + int sensdispls[], + CommDataType sendtype, void *recvbuf, + int recvcounts[], int rdispls[], + CommDataType recvtype) final; + + LIB_UTILITIES_EXPORT void v_AllGather(void *sendbuf, int sendcount, + CommDataType sendtype, void *recvbuf, + int recvcount, + CommDataType recvtype) final; + LIB_UTILITIES_EXPORT void v_AllGatherv(void *sendbuf, int sendcount, + CommDataType sendtype, void *recvbuf, + int recvcounts[], int rdispls[], + CommDataType recvtype) final; + LIB_UTILITIES_EXPORT void v_AllGatherv(void *recvbuf, int recvcounts[], + int rdispls[], + CommDataType recvtype) final; + + LIB_UTILITIES_EXPORT void v_Bcast(void *buffer, int count, CommDataType dt, + int root) final; + LIB_UTILITIES_EXPORT void v_Gather(void *sendbuf, int sendcount, + CommDataType sendtype, void *recvbuf, + int recvcount, CommDataType recvtype, + int root) final; + LIB_UTILITIES_EXPORT void v_Scatter(void *sendbuf, int sendcount, + CommDataType sendtype, void *recvbuf, + int recvcount, CommDataType recvtype, + int root) final; + + LIB_UTILITIES_EXPORT void v_DistGraphCreateAdjacent( int indegree, const int sources[], const int sourceweights[], - int reorder) override final; - LIB_UTILITIES_EXPORT virtual void v_NeighborAlltoAllv( + int reorder) final; + LIB_UTILITIES_EXPORT void v_NeighborAlltoAllv( void *sendbuf, int sendcounts[], int sdispls[], CommDataType sendtype, void *recvbuf, int recvcounts[], int rdispls[], - CommDataType recvtype) override final; - - LIB_UTILITIES_EXPORT virtual void v_Irsend(void *buf, int count, - CommDataType dt, int dest, - CommRequestSharedPtr request, - int loc) override final; - LIB_UTILITIES_EXPORT virtual void v_Isend(void *buf, int count, - CommDataType dt, int dest, - CommRequestSharedPtr request, - int loc) final; - LIB_UTILITIES_EXPORT virtual void v_SendInit(void *buf, int count, - CommDataType dt, int dest, - CommRequestSharedPtr request, - int loc) override final; - LIB_UTILITIES_EXPORT virtual void v_Irecv(void *buf, int count, - CommDataType dt, int source, - CommRequestSharedPtr request, - int loc) override final; - LIB_UTILITIES_EXPORT virtual void v_RecvInit(void *buf, int count, - CommDataType dt, int source, - CommRequestSharedPtr request, - int loc) override final; - - LIB_UTILITIES_EXPORT virtual void v_StartAll( - CommRequestSharedPtr request) override final; - LIB_UTILITIES_EXPORT virtual void v_WaitAll( - CommRequestSharedPtr request) override final; - - LIB_UTILITIES_EXPORT virtual CommRequestSharedPtr v_CreateRequest( - int num) override final; - LIB_UTILITIES_EXPORT virtual void v_SplitComm(int pRows, int pColumns, - int pTime) override; - LIB_UTILITIES_EXPORT virtual CommSharedPtr v_CommCreateIf( - int flag) override final; + CommDataType recvtype) final; + + LIB_UTILITIES_EXPORT void v_Irsend(void *buf, int count, CommDataType dt, + int dest, CommRequestSharedPtr request, + int loc) final; + LIB_UTILITIES_EXPORT void v_Isend(void *buf, int count, CommDataType dt, + int dest, CommRequestSharedPtr request, + int loc) final; + LIB_UTILITIES_EXPORT void v_SendInit(void *buf, int count, CommDataType dt, + int dest, CommRequestSharedPtr request, + int loc) final; + LIB_UTILITIES_EXPORT void v_Irecv(void *buf, int count, CommDataType dt, + int source, CommRequestSharedPtr request, + int loc) final; + LIB_UTILITIES_EXPORT void v_RecvInit(void *buf, int count, CommDataType dt, + int source, + CommRequestSharedPtr request, + int loc) final; + + LIB_UTILITIES_EXPORT void v_StartAll(CommRequestSharedPtr request) final; + LIB_UTILITIES_EXPORT void v_WaitAll(CommRequestSharedPtr request) final; + + LIB_UTILITIES_EXPORT CommRequestSharedPtr v_CreateRequest(int num) final; + LIB_UTILITIES_EXPORT void v_SplitComm(int pRows, int pColumns, + int pTime) override; + LIB_UTILITIES_EXPORT CommSharedPtr v_CommCreateIf(int flag) final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Communication/GsLib.hpp b/library/LibUtilities/Communication/GsLib.hpp index c1edc7a2a4..3e275dd6aa 100644 --- a/library/LibUtilities/Communication/GsLib.hpp +++ b/library/LibUtilities/Communication/GsLib.hpp @@ -196,7 +196,7 @@ static inline gs_data *Init(const Nektar::Array<OneD, long> pId, #ifdef NEKTAR_USE_MPI if (pComm->IsSerial()) { - return 0; + return nullptr; } LibUtilities::CommMpiSharedPtr vCommMpi = std::dynamic_pointer_cast<LibUtilities::CommMpi>(pComm); @@ -278,7 +278,7 @@ static inline void Gather( } if (pBuffer.size() == 0) { - nektar_gs(pU.get(), gs_double, pOp, false, pGsh, 0); + nektar_gs(pU.get(), gs_double, pOp, false, pGsh, nullptr); } else { diff --git a/library/LibUtilities/Communication/Transposition.cpp b/library/LibUtilities/Communication/Transposition.cpp index a68e6f9e05..1503353ad0 100644 --- a/library/LibUtilities/Communication/Transposition.cpp +++ b/library/LibUtilities/Communication/Transposition.cpp @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/Vmath.hpp> // for Vcopy #include <LibUtilities/Foundations/Basis.h> // for BasisKey -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * Constructor for 1D transform. @@ -623,5 +621,4 @@ void Transposition::TransposeZYtoYZ(const int npts, } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Communication/Transposition.h b/library/LibUtilities/Communication/Transposition.h index e1dcde553b..a73aaafc36 100644 --- a/library/LibUtilities/Communication/Transposition.h +++ b/library/LibUtilities/Communication/Transposition.h @@ -39,17 +39,12 @@ #include <LibUtilities/Communication/Comm.h> #include <LibUtilities/LibUtilitiesDeclspec.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class BasisKey; -} -} // namespace Nektar +} // namespace Nektar::LibUtilities -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { enum TranspositionDir { @@ -163,6 +158,5 @@ private: }; typedef std::shared_ptr<Transposition> TranspositionSharedPtr; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/FFT/NekFFTW.cpp b/library/LibUtilities/FFT/NekFFTW.cpp index 20d29202ff..9be6d3980a 100644 --- a/library/LibUtilities/FFT/NekFFTW.cpp +++ b/library/LibUtilities/FFT/NekFFTW.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/BasicUtils/VmathArray.hpp> #include <LibUtilities/FFT/NekFFTW.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string NekFFTW::className = GetNektarFFTFactory().RegisterCreatorFunction("NekFFTW", NekFFTW::create); @@ -140,5 +138,4 @@ void NekFFTW::Reshuffle_Nek2FFTW(Array<OneD, NekDouble> &coef) return; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/FFT/NekFFTW.h b/library/LibUtilities/FFT/NekFFTW.h index bb9c44c13b..df340f3fdf 100644 --- a/library/LibUtilities/FFT/NekFFTW.h +++ b/library/LibUtilities/FFT/NekFFTW.h @@ -73,7 +73,7 @@ public: NekFFTW(int N); // Distructor - virtual ~NekFFTW(); + ~NekFFTW() override; protected: Array<OneD, NekDouble> @@ -98,11 +98,11 @@ protected: void Reshuffle_Nek2FFTW(Array<OneD, NekDouble> &coef); - virtual void v_FFTFwdTrans(Array<OneD, NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FFTFwdTrans(Array<OneD, NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_FFTBwdTrans(Array<OneD, NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FFTBwdTrans(Array<OneD, NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; private: }; diff --git a/library/LibUtilities/FFT/NektarFFT.cpp b/library/LibUtilities/FFT/NektarFFT.cpp index 6470a8e595..e743b0c57e 100644 --- a/library/LibUtilities/FFT/NektarFFT.cpp +++ b/library/LibUtilities/FFT/NektarFFT.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/FFT/NektarFFT.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NektarFFT @@ -102,5 +100,4 @@ void NektarFFT::v_FFTBwdTrans(Array<OneD, NekDouble> &coef, boost::ignore_unused(coef, phys); } -} // end namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/BLPoints.cpp b/library/LibUtilities/Foundations/BLPoints.cpp index 6f1e73af81..33a5b2031a 100644 --- a/library/LibUtilities/Foundations/BLPoints.cpp +++ b/library/LibUtilities/Foundations/BLPoints.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/BLPoints.h> #include <LibUtilities/Foundations/ManagerAccess.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool BLPoints::initPointsManager[] = { PointsManager().RegisterCreator(PointsKey(0, eBoundaryLayerPoints), @@ -163,5 +161,4 @@ void BLPoints::CalculateInterpMatrix( ASSERTL0(false, "CalculateInterpMatrix not available for Boundary Layer Points"); } -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/BLPoints.h b/library/LibUtilities/Foundations/BLPoints.h index 64c564fc03..0d0643ad8b 100644 --- a/library/LibUtilities/Foundations/BLPoints.h +++ b/library/LibUtilities/Foundations/BLPoints.h @@ -37,14 +37,12 @@ #include <LibUtilities/Foundations/Points.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class BLPoints : public Points<NekDouble> { public: - virtual ~BLPoints() + ~BLPoints() override { } @@ -107,12 +105,12 @@ public: } protected: - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - const PointsKey &pkey) override final; - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - const Array<OneD, const NekDouble> &x) override final; - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - size_t numpoints, const Array<OneD, const NekDouble> &x) override final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(const PointsKey &pkey) final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(const Array<OneD, const NekDouble> &x) final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(size_t numpoints, const Array<OneD, const NekDouble> &x) final; private: static bool initPointsManager[]; @@ -120,15 +118,14 @@ private: BLPoints() = delete; BLPoints(const BLPoints &points) = delete; - virtual void v_CalculatePoints() override; - virtual void v_CalculateWeights() override; - virtual void v_CalculateDerivMatrix() override; + void v_CalculatePoints() override; + void v_CalculateWeights() override; + void v_CalculateDerivMatrix() override; void CalculateInterpMatrix(size_t npts, const Array<OneD, const NekDouble> &xpoints, Array<OneD, NekDouble> &interp); }; // class BLPoints -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // BLPoints_H diff --git a/library/LibUtilities/Foundations/Basis.cpp b/library/LibUtilities/Foundations/Basis.cpp index 0813df7cf5..136dc86d60 100644 --- a/library/LibUtilities/Foundations/Basis.cpp +++ b/library/LibUtilities/Foundations/Basis.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Polylib/Polylib.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool Basis::initBasisManager = { BasisManager().RegisterGlobalCreator(Basis::Create)}; @@ -245,7 +243,8 @@ void Basis::GenBasis() for (p = 0; p < numModes; ++p, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, p, 0.0, 0.0); + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, p, 0.0, + 0.0); // normalise scal = sqrt(0.5 * (2.0 * p + 1.0)); for (i = 0; i < numPoints; ++i) @@ -281,7 +280,7 @@ void Basis::GenBasis() { for (size_t q = 0; q < numModes - p; ++q, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, q, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, q, 2 * p + 1.0, 0.0); for (size_t j = 0; j < numPoints; ++j) { @@ -320,7 +319,7 @@ void Basis::GenBasis() { for (size_t r = 0; r <= R - p - q; ++r, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, r, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, r, 2 * p + 2 * q + 2.0, 0.0); for (size_t k = 0; k < numPoints; ++k) { @@ -382,7 +381,7 @@ void Basis::GenBasis() // size_t pq = max(p + q -1,0); size_t pq = std::max(p + q, size_t(0)); - Polylib::jacobfd(numPoints, z.data(), mode, NULL, r, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, r, 2 * pq + 2.0, 0.0); for (size_t k = 0; k < numPoints; ++k) { @@ -421,7 +420,7 @@ void Basis::GenBasis() for (p = 2; p < numModes; ++p, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, p - 2, 1.0, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, p - 2, 1.0, 1.0); for (i = 0; i < numPoints; ++i) @@ -468,7 +467,7 @@ void Basis::GenBasis() for (q = 2; q < numModes; ++q, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, q - 2, 1.0, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, q - 2, 1.0, 1.0); for (i = 0; i < numPoints; ++i) @@ -487,7 +486,7 @@ void Basis::GenBasis() for (q = 2; q < numModes; ++q, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, q - 2, 1.0, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, q - 2, 1.0, 1.0); for (i = 0; i < numPoints; ++i) @@ -512,7 +511,7 @@ void Basis::GenBasis() for (q = 1; q < numModes - p; ++q, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, q - 1, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, q - 1, 2 * p - 1, 1.0); for (i = 0; i < numPoints; ++i) @@ -670,8 +669,8 @@ void Basis::GenBasis() // interior for (size_t r = 1; r < numModes - std::max(p, q); ++r) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, r - 1, - 2 * p + 2 * q - 3, 1.0); + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, + r - 1, 2 * p + 2 * q - 3, 1.0); for (i = 0; i < numPoints; ++i) { @@ -816,7 +815,7 @@ void Basis::GenBasis() for (p = 0, scal = 1; p < numModes; ++p, mode += numPoints) { - Polylib::jacobfd(numPoints, z.data(), mode, NULL, p, -0.5, + Polylib::jacobfd(numPoints, z.data(), mode, nullptr, p, -0.5, -0.5); for (i = 0; i < numPoints; ++i) @@ -937,5 +936,4 @@ bool operator!=(const BasisKey &x, const BasisKey *y) return (!(x == *y)); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/Basis.h b/library/LibUtilities/Foundations/Basis.h index f0bf9b058a..7d46eca47d 100644 --- a/library/LibUtilities/Foundations/Basis.h +++ b/library/LibUtilities/Foundations/Basis.h @@ -38,9 +38,7 @@ #include <LibUtilities/Foundations/Points.h> #include <LibUtilities/LinearAlgebra/NekMatrix.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// Describes the specification for a Basis. class BasisKey @@ -352,7 +350,6 @@ LIB_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &os, static BasisSharedPtr NullBasisSharedPtr; static Array<OneD, BasisSharedPtr> NullBasisSharedPtr1DArray; -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIB_UTILIITIES_FOUNDATIONS_BASIS_H diff --git a/library/LibUtilities/Foundations/BasisType.h b/library/LibUtilities/Foundations/BasisType.h index eb8bc9390b..8e16f02aa9 100644 --- a/library/LibUtilities/Foundations/BasisType.h +++ b/library/LibUtilities/Foundations/BasisType.h @@ -34,9 +34,7 @@ #ifndef NEKTAR_LIB_UTILITIES_BASIS_TYPE_H #define NEKTAR_LIB_UTILITIES_BASIS_TYPE_H -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { enum BasisType { @@ -71,7 +69,6 @@ enum BasisType //!< part of the first mode \f$ Im[\exp(i \pi z_i)]\f$ SIZE_BasisType //!< Length of enum list }; -} -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Foundations/Foundations.hpp b/library/LibUtilities/Foundations/Foundations.hpp index e43be8813c..5738e745bb 100644 --- a/library/LibUtilities/Foundations/Foundations.hpp +++ b/library/LibUtilities/Foundations/Foundations.hpp @@ -39,9 +39,7 @@ #include <LibUtilities/Foundations/PointsType.h> #include <string> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { const char *const BasisTypeMap[] = { "NoBasisType", "Ortho_A", "Ortho_B", @@ -85,7 +83,6 @@ const std::string kPointsTypeStr[] = {"NoPointsType", "NodalPrismSPI", "NodalQuadElec", "NodalHexElec"}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // FOUNDATIONS_H diff --git a/library/LibUtilities/Foundations/FoundationsFwd.hpp b/library/LibUtilities/Foundations/FoundationsFwd.hpp index 58a758db71..6ae521a274 100644 --- a/library/LibUtilities/Foundations/FoundationsFwd.hpp +++ b/library/LibUtilities/Foundations/FoundationsFwd.hpp @@ -40,9 +40,7 @@ #include <memory> #include <vector> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class BLPoints; @@ -75,7 +73,6 @@ typedef Points<NekDouble> PointsBaseType; typedef std::shared_ptr<Points<NekDouble>> PointsSharedPtr; typedef size_t GraphVertexID; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // FOUNDATIONS_FWD_H diff --git a/library/LibUtilities/Foundations/FourierPoints.cpp b/library/LibUtilities/Foundations/FourierPoints.cpp index f71736fd01..dc763cd0fa 100644 --- a/library/LibUtilities/Foundations/FourierPoints.cpp +++ b/library/LibUtilities/Foundations/FourierPoints.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/FourierPoints.h> #include <LibUtilities/Foundations/ManagerAccess.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool FourierPoints::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, eFourierEvenlySpaced), FourierPoints::Create)}; @@ -187,5 +185,4 @@ NekDouble FourierPoints::PeriodicSincFunction(const NekDouble x, return y; } -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/FourierPoints.h b/library/LibUtilities/Foundations/FourierPoints.h index c70cfcb6b3..6328711a52 100644 --- a/library/LibUtilities/Foundations/FourierPoints.h +++ b/library/LibUtilities/Foundations/FourierPoints.h @@ -37,14 +37,12 @@ #include <LibUtilities/Foundations/Points.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class FourierPoints : public Points<NekDouble> { public: - virtual ~FourierPoints() + ~FourierPoints() override { } @@ -101,12 +99,12 @@ public: } protected: - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - const PointsKey &pkey) override final; - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - const Array<OneD, const NekDouble> &x) override final; - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - size_t numpoints, const Array<OneD, const NekDouble> &x) override final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(const PointsKey &pkey) final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(const Array<OneD, const NekDouble> &x) final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(size_t numpoints, const Array<OneD, const NekDouble> &x) final; private: static bool initPointsManager[]; @@ -114,9 +112,9 @@ private: FourierPoints() = delete; FourierPoints(const FourierPoints &points) = delete; - virtual void v_CalculatePoints() override; - virtual void v_CalculateWeights() override; - virtual void v_CalculateDerivMatrix() override; + void v_CalculatePoints() override; + void v_CalculateWeights() override; + void v_CalculateDerivMatrix() override; void CalculateInterpMatrix(size_t npts, const Array<OneD, const NekDouble> &xpoints, @@ -124,7 +122,6 @@ private: NekDouble PeriodicSincFunction(const NekDouble x, const NekDouble h); }; // class FourierPoints -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // FOURIERPOINTS_H diff --git a/library/LibUtilities/Foundations/FourierSingleModePoints.cpp b/library/LibUtilities/Foundations/FourierSingleModePoints.cpp index db68233a8f..fb4ebf2637 100644 --- a/library/LibUtilities/Foundations/FourierSingleModePoints.cpp +++ b/library/LibUtilities/Foundations/FourierSingleModePoints.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/FourierSingleModePoints.h> #include <LibUtilities/Foundations/ManagerAccess.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool FourierSingleModePoints::initPointsManager[] = { PointsManager().RegisterCreator(PointsKey(0, eFourierSingleModeSpaced), @@ -146,5 +144,4 @@ void FourierSingleModePoints::CalculateInterpMatrix( "CalculateInterpMatrix not available for Fourier Single Mode Points"); } -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/FourierSingleModePoints.h b/library/LibUtilities/Foundations/FourierSingleModePoints.h index 5870079055..03fd8f79b3 100644 --- a/library/LibUtilities/Foundations/FourierSingleModePoints.h +++ b/library/LibUtilities/Foundations/FourierSingleModePoints.h @@ -37,14 +37,12 @@ #include <LibUtilities/Foundations/Points.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class FourierSingleModePoints : public Points<NekDouble> { public: - virtual ~FourierSingleModePoints() + ~FourierSingleModePoints() override { } @@ -104,12 +102,12 @@ public: } protected: - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - const PointsKey &pkey) override final; - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - const Array<OneD, const NekDouble> &x) override final; - LIB_UTILITIES_EXPORT virtual const MatrixSharedPtrType v_GetI( - size_t numpoints, const Array<OneD, const NekDouble> &x) override final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(const PointsKey &pkey) final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(const Array<OneD, const NekDouble> &x) final; + LIB_UTILITIES_EXPORT const MatrixSharedPtrType + v_GetI(size_t numpoints, const Array<OneD, const NekDouble> &x) final; private: static bool initPointsManager[]; @@ -117,9 +115,9 @@ private: FourierSingleModePoints() = delete; FourierSingleModePoints(const FourierSingleModePoints &points) = delete; - virtual void v_CalculatePoints() override; - virtual void v_CalculateWeights() override; - virtual void v_CalculateDerivMatrix() override; + void v_CalculatePoints() override; + void v_CalculateWeights() override; + void v_CalculateDerivMatrix() override; void CalculateInterpMatrix(size_t npts, const Array<OneD, const NekDouble> &xpoints, @@ -127,7 +125,6 @@ private: NekDouble PeriodicSincFunction(const NekDouble x, const NekDouble h); }; // class FourierPoints -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // FOURIERSINGLEMODEPOINTS_H diff --git a/library/LibUtilities/Foundations/GaussPoints.cpp b/library/LibUtilities/Foundations/GaussPoints.cpp index 2e836ca08c..d8a2eb07d6 100644 --- a/library/LibUtilities/Foundations/GaussPoints.cpp +++ b/library/LibUtilities/Foundations/GaussPoints.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Polylib/Polylib.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool GaussPoints::initPointsManager[] = { PointsManager().RegisterCreator(PointsKey(0, eGaussGaussLegendre), @@ -456,5 +454,4 @@ std::shared_ptr<NekMatrix<NekDouble>> GaussPoints:: return returnval; } -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/GaussPoints.h b/library/LibUtilities/Foundations/GaussPoints.h index 98a025dd37..463a2974dd 100644 --- a/library/LibUtilities/Foundations/GaussPoints.h +++ b/library/LibUtilities/Foundations/GaussPoints.h @@ -37,14 +37,12 @@ #include <LibUtilities/Foundations/Points.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class GaussPoints : public Points<NekDouble> { public: - virtual ~GaussPoints() + ~GaussPoints() override { } @@ -183,13 +181,13 @@ public: } protected: - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( const PointsKey &pkey) override; - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( const Array<OneD, const NekDouble> &x) override; - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( size_t numpoints, const Array<OneD, const NekDouble> &x) override; - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetGalerkinProjection(const PointsKey &pkey) override; private: @@ -198,9 +196,9 @@ private: GaussPoints() = delete; GaussPoints(const GaussPoints &points) = delete; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(size_t npts, const Array<OneD, const NekDouble> &xpoints, @@ -210,7 +208,6 @@ private: const PointsKey &pkey); }; // class GaussPoints -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // GAUSSPOINTS_H diff --git a/library/LibUtilities/Foundations/Graph.cpp b/library/LibUtilities/Foundations/Graph.cpp index d4b92fa722..92090aae4c 100644 --- a/library/LibUtilities/Foundations/Graph.cpp +++ b/library/LibUtilities/Foundations/Graph.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/Graph.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { size_t GraphVertexObject::m_nextid = 0; @@ -63,5 +61,4 @@ bool operator!=(const GraphVertexObject &x, const GraphVertexObject &y) { return (x.m_id != y.m_id); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/Graph.h b/library/LibUtilities/Foundations/Graph.h index dfdb799e16..0b68380f69 100644 --- a/library/LibUtilities/Foundations/Graph.h +++ b/library/LibUtilities/Foundations/Graph.h @@ -39,9 +39,7 @@ #include <LibUtilities/LibUtilitiesDeclspec.h> #include <list> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class GraphVertexObject { @@ -105,6 +103,5 @@ protected: std::list<GraphEdgeObject *> m_edgeset; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // GRAPH_H diff --git a/library/LibUtilities/Foundations/Interp.cpp b/library/LibUtilities/Foundations/Interp.cpp index 359c44682e..71832a7a0c 100644 --- a/library/LibUtilities/Foundations/Interp.cpp +++ b/library/LibUtilities/Foundations/Interp.cpp @@ -38,9 +38,7 @@ #include <LibUtilities/Foundations/Points.h> #include <LibUtilities/LinearAlgebra/NekTypeDefs.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Physical Space Interpolation methods @@ -217,5 +215,4 @@ void Interp3D(const PointsKey &fpoints0, const PointsKey &fpoints1, I2->GetPtr().get(), tnp2, 0.0, to, tnp0 * tnp1); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/Interp.h b/library/LibUtilities/Foundations/Interp.h index 27fef0db0d..df13b96056 100644 --- a/library/LibUtilities/Foundations/Interp.h +++ b/library/LibUtilities/Foundations/Interp.h @@ -44,9 +44,7 @@ namespace Nektar template <typename Dim, typename DataType> class Array; } -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Physical Space Interpolation methods @@ -168,7 +166,6 @@ LIB_UTILITIES_EXPORT void Interp3D( const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to); -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // FOUNDATIONS_H diff --git a/library/LibUtilities/Foundations/InterpCoeff.cpp b/library/LibUtilities/Foundations/InterpCoeff.cpp index 5bff87f53a..2eb4ad37ed 100644 --- a/library/LibUtilities/Foundations/InterpCoeff.cpp +++ b/library/LibUtilities/Foundations/InterpCoeff.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/LinearAlgebra/NekTypeDefs.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { void InterpCoeff1D(const BasisKey &fbasis0, const Array<OneD, const NekDouble> &from, @@ -154,5 +152,4 @@ void InterpCoeff3D(const BasisKey &fbasis0, const BasisKey &fbasis1, Blas::Dgemm('N', 'T', tnm0 * tnm1, tnm2, fnm2, 1.0, wsp1.get(), tnm0 * tnm1, ft2->GetPtr().get(), tnm2, 0.0, to, tnm0 * tnm1); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/InterpCoeff.h b/library/LibUtilities/Foundations/InterpCoeff.h index 4e9b684bdd..6755dec852 100644 --- a/library/LibUtilities/Foundations/InterpCoeff.h +++ b/library/LibUtilities/Foundations/InterpCoeff.h @@ -44,9 +44,7 @@ namespace Nektar template <typename Dim, typename DataType> class Array; } -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Coefficient Space Interpolation methods @@ -78,7 +76,6 @@ LIB_UTILITIES_EXPORT void InterpCoeff3D( const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const NekDouble *from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, NekDouble *to); -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Foundations/ManagerAccess.cpp b/library/LibUtilities/Foundations/ManagerAccess.cpp index 1f9300f1ac..ae1e7fc457 100644 --- a/library/LibUtilities/Foundations/ManagerAccess.cpp +++ b/library/LibUtilities/Foundations/ManagerAccess.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { PointsManagerT &PointsManager(void) @@ -51,5 +49,4 @@ BasisManagerT &BasisManager(void) return instance; } -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/ManagerAccess.h b/library/LibUtilities/Foundations/ManagerAccess.h index 8fbda77415..a514b222d3 100644 --- a/library/LibUtilities/Foundations/ManagerAccess.h +++ b/library/LibUtilities/Foundations/ManagerAccess.h @@ -39,9 +39,7 @@ #include <LibUtilities/Foundations/Basis.h> #include <LibUtilities/Foundations/Points.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { typedef NekManager<PointsKey, Points<NekDouble>, PointsKey::opLess> @@ -51,6 +49,5 @@ typedef NekManager<BasisKey, Basis, BasisKey::opLess> BasisManagerT; LIB_UTILITIES_EXPORT PointsManagerT &PointsManager(void); LIB_UTILITIES_EXPORT BasisManagerT &BasisManager(void); -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIB_UTILIITIES_FOUNDATIONS_MANAGER_ACCESS_H diff --git a/library/LibUtilities/Foundations/NodalHexElec.cpp b/library/LibUtilities/Foundations/NodalHexElec.cpp index 02e5281e70..3e071edf02 100644 --- a/library/LibUtilities/Foundations/NodalHexElec.cpp +++ b/library/LibUtilities/Foundations/NodalHexElec.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/Foundations/NodalHexElec.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalHexElec::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, eNodalHexElec), NodalHexElec::Create)}; @@ -98,5 +96,4 @@ std::shared_ptr<PointsBaseType> NodalHexElec::Create(const PointsKey &key) returnval->Initialize(); return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalHexElec.h b/library/LibUtilities/Foundations/NodalHexElec.h index 05009b9366..cce0f18e44 100644 --- a/library/LibUtilities/Foundations/NodalHexElec.h +++ b/library/LibUtilities/Foundations/NodalHexElec.h @@ -40,15 +40,13 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Foundations/NodalUtil.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalHexElec : public Points<NekDouble> { public: - virtual ~NodalHexElec() + ~NodalHexElec() override { } @@ -70,11 +68,10 @@ private: /// 1D GLL weights. Array<OneD, NekDouble> m_ew; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALHEXELEC_H diff --git a/library/LibUtilities/Foundations/NodalPrismElec.cpp b/library/LibUtilities/Foundations/NodalPrismElec.cpp index 921d0aa45a..4f7938ed6b 100644 --- a/library/LibUtilities/Foundations/NodalPrismElec.cpp +++ b/library/LibUtilities/Foundations/NodalPrismElec.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/NodalPrismElec.h> #include <vector> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalPrismElec::initPointsManager[] = {PointsManager().RegisterCreator( @@ -464,5 +462,4 @@ std::shared_ptr<PointsBaseType> NodalPrismElec::Create(const PointsKey &key) return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalPrismElec.h b/library/LibUtilities/Foundations/NodalPrismElec.h index 3afd8afb4b..97495c0dc0 100644 --- a/library/LibUtilities/Foundations/NodalPrismElec.h +++ b/library/LibUtilities/Foundations/NodalPrismElec.h @@ -39,14 +39,12 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalPrismElec : public Points<NekDouble> { public: - virtual ~NodalPrismElec() + ~NodalPrismElec() override { } @@ -58,7 +56,7 @@ public: const PointsKey &key); protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 3, "NodalPrismElec Points can only interp to " @@ -68,7 +66,7 @@ protected: return GetI(x, y, z); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y, const Array<OneD, const NekDouble> &z) override @@ -94,9 +92,9 @@ private: void NodalPointReorder3d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xi, const Array<OneD, const NekDouble> &yi, @@ -104,7 +102,6 @@ private: Array<OneD, NekDouble> &interp); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALPRISMELEC_H diff --git a/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.cpp b/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.cpp index a1cafe93bb..70a2a874a7 100644 --- a/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.cpp +++ b/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/NodalPrismEvenlySpaced.h> #include <vector> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalPrismEvenlySpaced::initPointsManager[] = { PointsManager().RegisterCreator(PointsKey(0, eNodalPrismEvenlySpaced), @@ -443,5 +441,4 @@ std::shared_ptr<PointsBaseType> NodalPrismEvenlySpaced::Create( return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.h b/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.h index b577354e1b..b0eff847a5 100644 --- a/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.h +++ b/library/LibUtilities/Foundations/NodalPrismEvenlySpaced.h @@ -40,14 +40,12 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Foundations/NodalUtil.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalPrismEvenlySpaced : public Points<NekDouble> { public: - virtual ~NodalPrismEvenlySpaced() + ~NodalPrismEvenlySpaced() override { } @@ -59,7 +57,7 @@ public: const PointsKey &key); protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 3, "NodalPrismEvenlySpaced Points can only interp to " @@ -69,7 +67,7 @@ protected: return GetI(x, y, z); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y, const Array<OneD, const NekDouble> &z) override @@ -95,16 +93,15 @@ private: void NodalPointReorder3d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xi, const Array<OneD, const NekDouble> &yi, const Array<OneD, const NekDouble> &zi, Array<OneD, NekDouble> &interp); }; // end of NodalPrismEvenlySpaced -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALPRISMEVENLYSPACED_H diff --git a/library/LibUtilities/Foundations/NodalPrismSPI.cpp b/library/LibUtilities/Foundations/NodalPrismSPI.cpp index 4767317019..fb11908e65 100644 --- a/library/LibUtilities/Foundations/NodalPrismSPI.cpp +++ b/library/LibUtilities/Foundations/NodalPrismSPI.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/Foundations/NodalPrismSPI.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalPrismSPI::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, eNodalPrismSPI), NodalPrismSPI::Create)}; @@ -99,5 +97,4 @@ std::shared_ptr<PointsBaseType> NodalPrismSPI::Create(const PointsKey &key) return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalPrismSPI.h b/library/LibUtilities/Foundations/NodalPrismSPI.h index f957adf9b3..dfd0a670bb 100644 --- a/library/LibUtilities/Foundations/NodalPrismSPI.h +++ b/library/LibUtilities/Foundations/NodalPrismSPI.h @@ -39,15 +39,13 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalPrismSPI : public Points<NekDouble> { public: - virtual ~NodalPrismSPI() + ~NodalPrismSPI() override { } @@ -67,11 +65,10 @@ private: Array<OneD, NekDouble> m_t0, m_t1, m_tw, m_e0, m_ew; size_t m_numtri; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTRIELEC_H diff --git a/library/LibUtilities/Foundations/NodalQuadElec.cpp b/library/LibUtilities/Foundations/NodalQuadElec.cpp index 7710f3829b..7052aa8295 100644 --- a/library/LibUtilities/Foundations/NodalQuadElec.cpp +++ b/library/LibUtilities/Foundations/NodalQuadElec.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/Foundations/NodalQuadElec.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalQuadElec::initPointsManager[] = {PointsManager().RegisterCreator( @@ -92,5 +90,4 @@ std::shared_ptr<PointsBaseType> NodalQuadElec::Create(const PointsKey &key) returnval->Initialize(); return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalQuadElec.h b/library/LibUtilities/Foundations/NodalQuadElec.h index 4de1e5157e..cc68d311cd 100644 --- a/library/LibUtilities/Foundations/NodalQuadElec.h +++ b/library/LibUtilities/Foundations/NodalQuadElec.h @@ -39,15 +39,13 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalQuadElec : public Points<NekDouble> { public: - virtual ~NodalQuadElec() + ~NodalQuadElec() override { } @@ -69,11 +67,10 @@ private: /// 1D GLL weights Array<OneD, NekDouble> m_ew; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NodalQuadElec diff --git a/library/LibUtilities/Foundations/NodalTetElec.cpp b/library/LibUtilities/Foundations/NodalTetElec.cpp index a8d0a516d6..8a984a5b3b 100644 --- a/library/LibUtilities/Foundations/NodalTetElec.cpp +++ b/library/LibUtilities/Foundations/NodalTetElec.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/NodalTetElec.h> #include <LibUtilities/Foundations/NodalTetElecData.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTetElec::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, eNodalTetElec), NodalTetElec::Create)}; @@ -651,5 +649,4 @@ void NodalTetElec::NodalPointReorder3d() } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTetElec.h b/library/LibUtilities/Foundations/NodalTetElec.h index 742654d67e..0d4086b39f 100644 --- a/library/LibUtilities/Foundations/NodalTetElec.h +++ b/library/LibUtilities/Foundations/NodalTetElec.h @@ -39,15 +39,13 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTetElec : public Points<NekDouble> { public: - virtual ~NodalTetElec() + ~NodalTetElec() override { } @@ -59,7 +57,7 @@ public: } protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 3, "NodalTetElec Points can only interp to other 3d " @@ -69,7 +67,7 @@ protected: return GetI(x, y, z); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y, const Array<OneD, const NekDouble> &z) override @@ -95,16 +93,15 @@ private: void NodalPointReorder3d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xia, const Array<OneD, const NekDouble> &yia, const Array<OneD, const NekDouble> &zia, Array<OneD, NekDouble> &interp); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTETELEC_H diff --git a/library/LibUtilities/Foundations/NodalTetElecData.h b/library/LibUtilities/Foundations/NodalTetElecData.h index ec52f0b1a2..f5f63da7e8 100644 --- a/library/LibUtilities/Foundations/NodalTetElecData.h +++ b/library/LibUtilities/Foundations/NodalTetElecData.h @@ -32,9 +32,7 @@ // /////////////////////////////////////////////////////////////////////////////// -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { static const size_t perm4_3d[4][4] = {{0, 1, 2, 3}, {3, 0, 1, 2}, @@ -173,5 +171,4 @@ static const NekDouble NodalTetElecData[][9] = { {0, 0, 0, 0, 1, 0.2707097521, 0.5811217960, 0.1481684519, 0.0000000000}, {0, 0, 0, 0, 1, 0.3019928872, 0.4393774966, 0.1776946096, 0.0809350066}}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTetEvenlySpaced.cpp b/library/LibUtilities/Foundations/NodalTetEvenlySpaced.cpp index 379aa5b720..66bbf2d6ef 100644 --- a/library/LibUtilities/Foundations/NodalTetEvenlySpaced.cpp +++ b/library/LibUtilities/Foundations/NodalTetEvenlySpaced.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/NodalTetEvenlySpaced.h> #include <vector> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTetEvenlySpaced::initPointsManager[] = { PointsManager().RegisterCreator(PointsKey(0, eNodalTetEvenlySpaced), @@ -405,5 +403,4 @@ std::shared_ptr<PointsBaseType> NodalTetEvenlySpaced::Create( return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTetEvenlySpaced.h b/library/LibUtilities/Foundations/NodalTetEvenlySpaced.h index cf7c123d89..e8d83ab545 100644 --- a/library/LibUtilities/Foundations/NodalTetEvenlySpaced.h +++ b/library/LibUtilities/Foundations/NodalTetEvenlySpaced.h @@ -40,14 +40,12 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Foundations/NodalUtil.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTetEvenlySpaced : public Points<NekDouble> { public: - virtual ~NodalTetEvenlySpaced() + ~NodalTetEvenlySpaced() override { } @@ -59,7 +57,7 @@ public: const PointsKey &key); protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 3, "NodalTetEvenlySpaced Points can only interp to other " @@ -69,7 +67,7 @@ protected: return GetI(x, y, z); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y, const Array<OneD, const NekDouble> &z) override @@ -95,16 +93,15 @@ private: void NodalPointReorder3d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xi, const Array<OneD, const NekDouble> &yi, const Array<OneD, const NekDouble> &zi, Array<OneD, NekDouble> &interp); }; // end of NodalTetEvenlySpaced -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTETEVENLYSPACED_H diff --git a/library/LibUtilities/Foundations/NodalTetSPI.cpp b/library/LibUtilities/Foundations/NodalTetSPI.cpp index ef9326d1f5..3941fa5ad2 100644 --- a/library/LibUtilities/Foundations/NodalTetSPI.cpp +++ b/library/LibUtilities/Foundations/NodalTetSPI.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/NodalTetSPI.h> #include <LibUtilities/Foundations/NodalTetSPIData.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTetSPI::initPointsManager[] = {PointsManager().RegisterCreator( @@ -103,5 +101,4 @@ std::shared_ptr<PointsBaseType> NodalTetSPI::Create(const PointsKey &key) return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTetSPI.h b/library/LibUtilities/Foundations/NodalTetSPI.h index b2a7f126e4..82c0098239 100644 --- a/library/LibUtilities/Foundations/NodalTetSPI.h +++ b/library/LibUtilities/Foundations/NodalTetSPI.h @@ -39,15 +39,13 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTetSPI : public Points<NekDouble> { public: - virtual ~NodalTetSPI() + ~NodalTetSPI() override { } @@ -64,12 +62,11 @@ private: NodalTetSPI() = delete; NodalTetSPI(const NodalTetSPI &points) = delete; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTRIELEC_H diff --git a/library/LibUtilities/Foundations/NodalTetSPIData.h b/library/LibUtilities/Foundations/NodalTetSPIData.h index ea154174c3..87b65a94f5 100644 --- a/library/LibUtilities/Foundations/NodalTetSPIData.h +++ b/library/LibUtilities/Foundations/NodalTetSPIData.h @@ -35,9 +35,7 @@ #ifndef NODALTETSPIDATA_H #define NODALTETSPIDATA_H -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { const size_t NodalTetSPIAvailable = 10; static const size_t NodalTetSPINPTS[NodalTetSPIAvailable] = { @@ -1082,7 +1080,6 @@ static const NekDouble NodalTetSPIData[][4] = { {-0.4957371056118361, -0.9462404191356018, -0.7971636934427455, 0.01470390638751603}}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Foundations/NodalTriElec.cpp b/library/LibUtilities/Foundations/NodalTriElec.cpp index 8d1230b37c..122a0c85dd 100644 --- a/library/LibUtilities/Foundations/NodalTriElec.cpp +++ b/library/LibUtilities/Foundations/NodalTriElec.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/NodalTriElec.h> #include <LibUtilities/Foundations/NodalTriElecData.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTriElec::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, eNodalTriElec), NodalTriElec::Create)}; @@ -329,5 +327,4 @@ void NodalTriElec::NodalPointReorder2d() } return; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTriElec.h b/library/LibUtilities/Foundations/NodalTriElec.h index bca16b0172..894903b1d9 100644 --- a/library/LibUtilities/Foundations/NodalTriElec.h +++ b/library/LibUtilities/Foundations/NodalTriElec.h @@ -39,15 +39,13 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTriElec : public Points<NekDouble> { public: - virtual ~NodalTriElec() + ~NodalTriElec() override { } @@ -59,7 +57,7 @@ public: } protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 2, "NodalTriElec Points can only interpolate to other 2d " @@ -69,7 +67,7 @@ protected: return GetI(x, y); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y) override { @@ -93,15 +91,14 @@ private: void NodalPointReorder2d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xia, const Array<OneD, const NekDouble> &yia, Array<OneD, NekDouble> &interp); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTRIELEC_H diff --git a/library/LibUtilities/Foundations/NodalTriElecData.h b/library/LibUtilities/Foundations/NodalTriElecData.h index f3c26f324d..22c1ed93ff 100644 --- a/library/LibUtilities/Foundations/NodalTriElecData.h +++ b/library/LibUtilities/Foundations/NodalTriElecData.h @@ -32,9 +32,7 @@ // /////////////////////////////////////////////////////////////////////////////// -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { static const size_t perm3A_2d[3][3] = { {0, 1, 2}, {2, 0, 1}, {0, 2, 1}}; // Works for aab @@ -269,5 +267,4 @@ static const NekDouble NodalTriElecData[][6] = { {0, 0, 1, 0.4883520007, 0.2978352313, 0.2138127680}, {0, 0, 1, 0.4806452274, 0.3853613574, 0.1339934152}}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTriEvenlySpaced.cpp b/library/LibUtilities/Foundations/NodalTriEvenlySpaced.cpp index 10b7abc145..aac6b9ca96 100644 --- a/library/LibUtilities/Foundations/NodalTriEvenlySpaced.cpp +++ b/library/LibUtilities/Foundations/NodalTriEvenlySpaced.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/NodalTriEvenlySpaced.h> #include <vector> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTriEvenlySpaced::initPointsManager[] = { PointsManager().RegisterCreator(PointsKey(0, eNodalTriEvenlySpaced), @@ -246,5 +244,4 @@ void NodalTriEvenlySpaced::NodalPointReorder2d() } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTriEvenlySpaced.h b/library/LibUtilities/Foundations/NodalTriEvenlySpaced.h index a82edce79d..2bccc46b18 100644 --- a/library/LibUtilities/Foundations/NodalTriEvenlySpaced.h +++ b/library/LibUtilities/Foundations/NodalTriEvenlySpaced.h @@ -39,14 +39,12 @@ #include <LibUtilities/Foundations/NodalUtil.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTriEvenlySpaced : public Points<NekDouble> { public: - virtual ~NodalTriEvenlySpaced() + ~NodalTriEvenlySpaced() override { } @@ -58,7 +56,7 @@ public: const PointsKey &key); protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 2, "NodalTriEvenlySpaced Points can only interp to other " @@ -68,7 +66,7 @@ protected: return GetI(x, y); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y) override { @@ -93,15 +91,14 @@ private: void NodalPointReorder2d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xi, const Array<OneD, const NekDouble> &yi, Array<OneD, NekDouble> &interp); }; // end of NodalTriEvenlySpaced -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTRIEVENLYSPACED_H diff --git a/library/LibUtilities/Foundations/NodalTriFekete.cpp b/library/LibUtilities/Foundations/NodalTriFekete.cpp index 4b865dd18c..d97af62bb7 100644 --- a/library/LibUtilities/Foundations/NodalTriFekete.cpp +++ b/library/LibUtilities/Foundations/NodalTriFekete.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/NodalTriFekete.h> #include <LibUtilities/Foundations/NodalTriFeketeData.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTriFekete::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, eNodalTriFekete), NodalTriFekete::Create)}; @@ -333,5 +331,4 @@ void NodalTriFekete::NodalPointReorder2d() return; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTriFekete.h b/library/LibUtilities/Foundations/NodalTriFekete.h index 8d89469611..8555fe2c56 100644 --- a/library/LibUtilities/Foundations/NodalTriFekete.h +++ b/library/LibUtilities/Foundations/NodalTriFekete.h @@ -41,15 +41,13 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Foundations/NodalUtil.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTriFekete : public Points<NekDouble> { public: - virtual ~NodalTriFekete() + ~NodalTriFekete() override { } @@ -61,7 +59,7 @@ public: const PointsKey &key); protected: - virtual const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override + const MatrixSharedPtrType v_GetI(const PointsKey &pkey) override { ASSERTL0(pkey.GetPointsDim() == 2, "Fekete Points can only interp to other 2d " @@ -71,7 +69,7 @@ protected: return GetI(x, y); } - virtual const MatrixSharedPtrType v_GetI( + const MatrixSharedPtrType v_GetI( const Array<OneD, const NekDouble> &x, const Array<OneD, const NekDouble> &y) override { @@ -96,15 +94,14 @@ private: void NodalPointReorder2d(); - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(const Array<OneD, const NekDouble> &xi, const Array<OneD, const NekDouble> &yi, Array<OneD, NekDouble> &interp); }; // end of NodalTriFekete -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTRIFEKETE_H diff --git a/library/LibUtilities/Foundations/NodalTriFeketeData.h b/library/LibUtilities/Foundations/NodalTriFeketeData.h index 70ee8b6690..647a3c2b65 100644 --- a/library/LibUtilities/Foundations/NodalTriFeketeData.h +++ b/library/LibUtilities/Foundations/NodalTriFeketeData.h @@ -32,9 +32,7 @@ // /////////////////////////////////////////////////////////////////////////////// -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { static const size_t perm3A_2d[3][3] = { {0, 1, 2}, {2, 0, 1}, {0, 2, 1}}; // Works for aab @@ -269,5 +267,4 @@ static const NekDouble NodalTriFeketeData[][6] = { {0, 0, 1, 0.5481915845, 0.4347608890, 0.0170475265}, {0, 0, 1, 0.5160516828, 0.3894384191, 0.0945098981}, {0, 0, 1, 0.5043443688, 0.3260983223, 0.1695573088}}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTriSPI.cpp b/library/LibUtilities/Foundations/NodalTriSPI.cpp index 7108366027..9d6bce11dd 100644 --- a/library/LibUtilities/Foundations/NodalTriSPI.cpp +++ b/library/LibUtilities/Foundations/NodalTriSPI.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/NodalTriSPI.h> #include <LibUtilities/Foundations/NodalTriSPIData.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { bool NodalTriSPI::initPointsManager[] = {PointsManager().RegisterCreator( @@ -102,5 +100,4 @@ std::shared_ptr<PointsBaseType> NodalTriSPI::Create(const PointsKey &key) return returnval; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalTriSPI.h b/library/LibUtilities/Foundations/NodalTriSPI.h index e6e45081ee..aba469504a 100644 --- a/library/LibUtilities/Foundations/NodalTriSPI.h +++ b/library/LibUtilities/Foundations/NodalTriSPI.h @@ -40,15 +40,13 @@ #include <LibUtilities/Foundations/ManagerAccess.h> #include <LibUtilities/Foundations/NodalUtil.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NodalTriSPI : public Points<NekDouble> { public: - virtual ~NodalTriSPI() + ~NodalTriSPI() override { } @@ -65,12 +63,11 @@ private: NodalTriSPI() = delete; NodalTriSPI(const NodalTriSPI &points) = delete; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALTRIELEC_H diff --git a/library/LibUtilities/Foundations/NodalTriSPIData.h b/library/LibUtilities/Foundations/NodalTriSPIData.h index 5e918827a2..cda48560e8 100644 --- a/library/LibUtilities/Foundations/NodalTriSPIData.h +++ b/library/LibUtilities/Foundations/NodalTriSPIData.h @@ -35,9 +35,7 @@ #ifndef NODALTRISPIDATA_H #define NODALTRISPIDATA_H -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { const size_t NodalTriSPIAvailable = 10; static const size_t NodalTriSPINPTS[NodalTriSPIAvailable] = { @@ -216,7 +214,6 @@ static const NekDouble NodalTriSPIData[][3] = { {-0.924487456996639, -0.4144607978125548, 0.0752868215187729}, {-0.4144607978125548, -0.924487456996639, 0.0752868215187729}}; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Foundations/NodalUtil.cpp b/library/LibUtilities/Foundations/NodalUtil.cpp index faea0fa5d7..9d9acced43 100644 --- a/library/LibUtilities/Foundations/NodalUtil.cpp +++ b/library/LibUtilities/Foundations/NodalUtil.cpp @@ -42,9 +42,7 @@ #include <LibUtilities/LinearAlgebra/NekVector.hpp> #include <LibUtilities/Polylib/Polylib.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -294,9 +292,9 @@ NekVector<NekDouble> NodalUtilTriangle::v_OrthoBasis(const size_t mode) std::pair<int, int> modes = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacobi_i[0], NULL, modes.first, - 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacobi_j[0], NULL, + Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacobi_i[0], nullptr, + modes.first, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacobi_j[0], nullptr, modes.second, 2.0 * modes.first + 1.0, 0.0); NekVector<NekDouble> ret(m_numPoints); @@ -335,9 +333,9 @@ NekVector<NekDouble> NodalUtilTriangle::v_OrthoBasisDeriv(const size_t dir, // Calculate Jacobi polynomials and their derivatives. Note that we use both // jacobfd and jacobd since jacobfd is only valid for derivatives in the // open interval (-1,1). - Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacobi_i[0], NULL, modes.first, - 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacobi_j[0], NULL, + Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacobi_i[0], nullptr, + modes.first, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacobi_j[0], nullptr, modes.second, 2.0 * modes.first + 1.0, 0.0); Polylib::jacobd(m_numPoints, &m_eta[0][0], &jacobi_di[0], modes.first, 0.0, 0.0); @@ -493,10 +491,10 @@ NekVector<NekDouble> NodalUtilTetrahedron::v_OrthoBasis(const size_t mode) std::tie(I, J, K) = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], NULL, I, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], NULL, J, + Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], nullptr, I, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], nullptr, J, 2.0 * I + 1.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], NULL, K, + Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], nullptr, K, 2.0 * (I + J) + 2.0, 0.0); NekVector<NekDouble> ret(m_numPoints); @@ -537,10 +535,10 @@ NekVector<NekDouble> NodalUtilTetrahedron::v_OrthoBasisDeriv(const size_t dir, std::tie(I, J, K) = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], NULL, I, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], NULL, J, + Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], nullptr, I, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], nullptr, J, 2.0 * I + 1.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], NULL, K, + Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], nullptr, K, 2.0 * (I + J) + 2.0, 0.0); Polylib::jacobd(m_numPoints, &m_eta[0][0], &jacDerivA[0], I, 0.0, 0.0); Polylib::jacobd(m_numPoints, &m_eta[1][0], &jacDerivB[0], J, 2.0 * I + 1.0, @@ -712,9 +710,9 @@ NekVector<NekDouble> NodalUtilPrism::v_OrthoBasis(const size_t mode) std::tie(I, J, K) = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], NULL, I, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], NULL, J, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], NULL, K, + Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], nullptr, I, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], nullptr, J, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], nullptr, K, 2.0 * I + 1.0, 0.0); NekVector<NekDouble> ret(m_numPoints); @@ -755,9 +753,9 @@ NekVector<NekDouble> NodalUtilPrism::v_OrthoBasisDeriv(const size_t dir, std::tie(I, J, K) = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], NULL, I, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], NULL, J, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], NULL, K, + Polylib::jacobfd(m_numPoints, &m_eta[0][0], &jacA[0], nullptr, I, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[1][0], &jacB[0], nullptr, J, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_eta[2][0], &jacC[0], nullptr, K, 2.0 * I + 1.0, 0.0); Polylib::jacobd(m_numPoints, &m_eta[0][0], &jacDerivA[0], I, 0.0, 0.0); Polylib::jacobd(m_numPoints, &m_eta[1][0], &jacDerivB[0], J, 0.0, 0.0); @@ -861,10 +859,10 @@ NekVector<NekDouble> NodalUtilQuad::v_OrthoBasis(const size_t mode) std::pair<int, int> modes = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], NULL, modes.first, - 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], NULL, modes.second, - 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], nullptr, + modes.first, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], nullptr, + modes.second, 0.0, 0.0); NekVector<NekDouble> ret(m_numPoints); @@ -892,10 +890,10 @@ NekVector<NekDouble> NodalUtilQuad::v_OrthoBasisDeriv(const size_t dir, // Calculate Jacobi polynomials and their derivatives. Note that we use both // jacobfd and jacobd since jacobfd is only valid for derivatives in the // open interval (-1,1). - Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], NULL, modes.first, - 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], NULL, modes.second, - 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], nullptr, + modes.first, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], nullptr, + modes.second, 0.0, 0.0); Polylib::jacobd(m_numPoints, &m_xi[0][0], &jacobi_di[0], modes.first, 0.0, 0.0); Polylib::jacobd(m_numPoints, &m_xi[1][0], &jacobi_dj[0], modes.second, 0.0, @@ -978,9 +976,12 @@ NekVector<NekDouble> NodalUtilHex::v_OrthoBasis(const size_t mode) std::tie(I, J, K) = m_ordering[mode]; // Calculate Jacobi polynomials - Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], NULL, I, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], NULL, J, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_xi[2][0], &jacobi_k[0], NULL, K, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], nullptr, I, 0.0, + 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], nullptr, J, 0.0, + 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[2][0], &jacobi_k[0], nullptr, K, 0.0, + 0.0); NekVector<NekDouble> ret(m_numPoints); @@ -1006,9 +1007,12 @@ NekVector<NekDouble> NodalUtilHex::v_OrthoBasisDeriv(const size_t dir, // Calculate Jacobi polynomials and their derivatives. Note that we use both // jacobfd and jacobd since jacobfd is only valid for derivatives in the // open interval (-1,1). - Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], NULL, I, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], NULL, J, 0.0, 0.0); - Polylib::jacobfd(m_numPoints, &m_xi[2][0], &jacobi_k[0], NULL, K, 0.0, 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[0][0], &jacobi_i[0], nullptr, I, 0.0, + 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[1][0], &jacobi_j[0], nullptr, J, 0.0, + 0.0); + Polylib::jacobfd(m_numPoints, &m_xi[2][0], &jacobi_k[0], nullptr, K, 0.0, + 0.0); Polylib::jacobd(m_numPoints, &m_xi[0][0], &jacobi_di[0], I, 0.0, 0.0); Polylib::jacobd(m_numPoints, &m_xi[1][0], &jacobi_dj[0], J, 0.0, 0.0); Polylib::jacobd(m_numPoints, &m_xi[2][0], &jacobi_dk[0], K, 0.0, 0.0); @@ -1040,5 +1044,4 @@ NekVector<NekDouble> NodalUtilHex::v_OrthoBasisDeriv(const size_t dir, return ret; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/NodalUtil.h b/library/LibUtilities/Foundations/NodalUtil.h index 0b7add0596..8aa6f7f83c 100644 --- a/library/LibUtilities/Foundations/NodalUtil.h +++ b/library/LibUtilities/Foundations/NodalUtil.h @@ -43,9 +43,7 @@ #include <LibUtilities/LinearAlgebra/NekMatrixFwd.hpp> #include <LibUtilities/LinearAlgebra/NekVectorFwd.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { typedef std::shared_ptr<NekMatrix<NekDouble>> SharedMatrix; @@ -171,7 +169,7 @@ public: Array<OneD, NekDouble> r, Array<OneD, NekDouble> s); - LIB_UTILITIES_EXPORT virtual ~NodalUtilTriangle() + LIB_UTILITIES_EXPORT ~NodalUtilTriangle() override { } @@ -183,23 +181,23 @@ protected: /// Collapsed coordinates \f$ (\eta_1, \eta_2) \f$ of the nodal points. Array<OneD, Array<OneD, NekDouble>> m_eta; - virtual NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; - virtual NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, - const size_t mode) override; + NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; + NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, + const size_t mode) override; - virtual std::shared_ptr<NodalUtil> v_CreateUtil( + std::shared_ptr<NodalUtil> v_CreateUtil( Array<OneD, Array<OneD, NekDouble>> &xi) override { return MemoryManager<NodalUtilTriangle>::AllocateSharedPtr( m_degree, xi[0], xi[1]); } - virtual NekDouble v_ModeZeroIntegral() override + NekDouble v_ModeZeroIntegral() override { return 2.0 * sqrt(2.0); } - virtual size_t v_NumModes() override + size_t v_NumModes() override { return (m_degree + 1) * (m_degree + 2) / 2; } @@ -219,7 +217,7 @@ public: Array<OneD, NekDouble> s, Array<OneD, NekDouble> t); - LIB_UTILITIES_EXPORT virtual ~NodalUtilTetrahedron() + LIB_UTILITIES_EXPORT ~NodalUtilTetrahedron() override { } @@ -232,23 +230,23 @@ protected: /// points. Array<OneD, Array<OneD, NekDouble>> m_eta; - virtual NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; - virtual NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, - const size_t mode) override; + NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; + NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, + const size_t mode) override; - virtual std::shared_ptr<NodalUtil> v_CreateUtil( + std::shared_ptr<NodalUtil> v_CreateUtil( Array<OneD, Array<OneD, NekDouble>> &xi) override { return MemoryManager<NodalUtilTetrahedron>::AllocateSharedPtr( m_degree, xi[0], xi[1], xi[2]); } - virtual NekDouble v_ModeZeroIntegral() override + NekDouble v_ModeZeroIntegral() override { return 8.0 * sqrt(2.0) / 3.0; } - virtual size_t v_NumModes() override + size_t v_NumModes() override { return (m_degree + 1) * (m_degree + 2) * (m_degree + 3) / 6; } @@ -267,7 +265,7 @@ public: Array<OneD, NekDouble> s, Array<OneD, NekDouble> t); - LIB_UTILITIES_EXPORT virtual ~NodalUtilPrism() + LIB_UTILITIES_EXPORT ~NodalUtilPrism() override { } @@ -280,23 +278,23 @@ protected: /// points. Array<OneD, Array<OneD, NekDouble>> m_eta; - virtual NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; - virtual NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, - const size_t mode) override; + NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; + NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, + const size_t mode) override; - virtual std::shared_ptr<NodalUtil> v_CreateUtil( + std::shared_ptr<NodalUtil> v_CreateUtil( Array<OneD, Array<OneD, NekDouble>> &xi) override { return MemoryManager<NodalUtilPrism>::AllocateSharedPtr(m_degree, xi[0], xi[1], xi[2]); } - virtual NekDouble v_ModeZeroIntegral() override + NekDouble v_ModeZeroIntegral() override { return 4.0 * sqrt(2.0); } - virtual size_t v_NumModes() override + size_t v_NumModes() override { return (m_degree + 1) * (m_degree + 1) * (m_degree + 2) / 2; } @@ -311,7 +309,7 @@ public: LIB_UTILITIES_EXPORT NodalUtilQuad(size_t degree, Array<OneD, NekDouble> r, Array<OneD, NekDouble> s); - LIB_UTILITIES_EXPORT virtual ~NodalUtilQuad() + LIB_UTILITIES_EXPORT ~NodalUtilQuad() override { } @@ -320,23 +318,23 @@ protected: /// ordering. std::vector<std::pair<int, int>> m_ordering; - virtual NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; - virtual NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, - const size_t mode) override; + NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; + NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, + const size_t mode) override; - virtual std::shared_ptr<NodalUtil> v_CreateUtil( + std::shared_ptr<NodalUtil> v_CreateUtil( Array<OneD, Array<OneD, NekDouble>> &xi) override { return MemoryManager<NodalUtilQuad>::AllocateSharedPtr(m_degree, xi[0], xi[1]); } - virtual NekDouble v_ModeZeroIntegral() override + NekDouble v_ModeZeroIntegral() override { return 4.0; } - virtual size_t v_NumModes() override + size_t v_NumModes() override { return (m_degree + 1) * (m_degree + 1); } @@ -354,7 +352,7 @@ public: Array<OneD, NekDouble> s, Array<OneD, NekDouble> t); - LIB_UTILITIES_EXPORT virtual ~NodalUtilHex() + LIB_UTILITIES_EXPORT ~NodalUtilHex() override { } @@ -363,29 +361,28 @@ protected: /// ordering. std::vector<Mode> m_ordering; - virtual NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; - virtual NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, - const size_t mode) override; + NekVector<NekDouble> v_OrthoBasis(const size_t mode) override; + NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, + const size_t mode) override; - virtual std::shared_ptr<NodalUtil> v_CreateUtil( + std::shared_ptr<NodalUtil> v_CreateUtil( Array<OneD, Array<OneD, NekDouble>> &xi) override { return MemoryManager<NodalUtilHex>::AllocateSharedPtr(m_degree, xi[0], xi[1], xi[2]); } - virtual NekDouble v_ModeZeroIntegral() override + NekDouble v_ModeZeroIntegral() override { return 8.0; } - virtual size_t v_NumModes() override + size_t v_NumModes() override { return (m_degree + 1) * (m_degree + 1) * (m_degree + 1); } }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NODALUTIL_H diff --git a/library/LibUtilities/Foundations/PhysGalerkinProject.cpp b/library/LibUtilities/Foundations/PhysGalerkinProject.cpp index d2d45cb165..1f87f0fb22 100644 --- a/library/LibUtilities/Foundations/PhysGalerkinProject.cpp +++ b/library/LibUtilities/Foundations/PhysGalerkinProject.cpp @@ -40,9 +40,7 @@ #include <LibUtilities/Foundations/Points.h> #include <LibUtilities/LinearAlgebra/NekTypeDefs.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Physical Space Interpolation methods @@ -220,5 +218,4 @@ void PhysGalerkinProject3D(const PointsKey &fpoints0, const PointsKey &fpoints1, tnp0, wsp1.get(), fnp0, 0.0, to, tnp0); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/PhysGalerkinProject.h b/library/LibUtilities/Foundations/PhysGalerkinProject.h index 00a81c4a51..53c22b28c9 100644 --- a/library/LibUtilities/Foundations/PhysGalerkinProject.h +++ b/library/LibUtilities/Foundations/PhysGalerkinProject.h @@ -45,9 +45,7 @@ namespace Nektar template <typename Dim, typename DataType> class Array; } -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Physical Space Galerkin projection methods @@ -103,7 +101,6 @@ LIB_UTILITIES_EXPORT void PhysGalerkinProject3D( const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to); -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // FOUNDATIONS_H diff --git a/library/LibUtilities/Foundations/Points.cpp b/library/LibUtilities/Foundations/Points.cpp index cde4ba55dd..94f1168a09 100644 --- a/library/LibUtilities/Foundations/Points.cpp +++ b/library/LibUtilities/Foundations/Points.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/Foundations/Points.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class PointsKey @@ -107,5 +105,4 @@ std::ostream &operator<<(std::ostream &os, const PointsKey &rhs) * allocated from the memory pool if in use. */ -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/Points.h b/library/LibUtilities/Foundations/Points.h index a8fa3cdcb7..25576b1c6c 100644 --- a/library/LibUtilities/Foundations/Points.h +++ b/library/LibUtilities/Foundations/Points.h @@ -44,10 +44,7 @@ #include <LibUtilities/Foundations/FoundationsFwd.hpp> #include <LibUtilities/LinearAlgebra/NekMatrixFwd.hpp> -namespace Nektar -{ - -namespace LibUtilities +namespace Nektar::LibUtilities { /// Defines a specification for a set of points. @@ -510,7 +507,6 @@ private: Points() = delete; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // NEKTAR_LIB_UTILITIES_FOUNDATIONS_POINTS_H diff --git a/library/LibUtilities/Foundations/PointsType.h b/library/LibUtilities/Foundations/PointsType.h index 82d95616c6..e06fa09bb4 100644 --- a/library/LibUtilities/Foundations/PointsType.h +++ b/library/LibUtilities/Foundations/PointsType.h @@ -37,9 +37,7 @@ #include <vector> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { enum PointsType @@ -98,7 +96,6 @@ enum PointsType }; static std::vector<LibUtilities::PointsType> NullPointsTypeVector; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Foundations/PolyEPoints.cpp b/library/LibUtilities/Foundations/PolyEPoints.cpp index a89ee7c3ad..82aea65d9d 100644 --- a/library/LibUtilities/Foundations/PolyEPoints.cpp +++ b/library/LibUtilities/Foundations/PolyEPoints.cpp @@ -36,10 +36,9 @@ #include <LibUtilities/Foundations/PolyEPoints.h> #include <LibUtilities/Polylib/Polylib.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { + bool PolyEPoints::initPointsManager[] = {PointsManager().RegisterCreator( PointsKey(0, ePolyEvenlySpaced), PolyEPoints::Create)}; @@ -172,5 +171,4 @@ const std::shared_ptr<NekMatrix<NekDouble>> PolyEPoints::v_GetI( return returnval; } -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Foundations/PolyEPoints.h b/library/LibUtilities/Foundations/PolyEPoints.h index 7850a8baa9..76e6913d69 100644 --- a/library/LibUtilities/Foundations/PolyEPoints.h +++ b/library/LibUtilities/Foundations/PolyEPoints.h @@ -38,9 +38,7 @@ #include <LibUtilities/Foundations/Points.h> #include <memory> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class PolyEPoints : public Points<NekDouble> @@ -48,7 +46,7 @@ class PolyEPoints : public Points<NekDouble> public: typedef Points<NekDouble> PointsBaseType; - virtual ~PolyEPoints() + ~PolyEPoints() override { } @@ -60,11 +58,11 @@ public: } protected: - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( const PointsKey &pkey) override; - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( const Array<OneD, const NekDouble> &x) override; - LIB_UTILITIES_EXPORT virtual const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( + LIB_UTILITIES_EXPORT const std::shared_ptr<NekMatrix<NekDouble>> v_GetI( size_t numpoints, const Array<OneD, const NekDouble> &x) override; private: @@ -73,16 +71,15 @@ private: PolyEPoints() = delete; PolyEPoints(const PolyEPoints &points) = delete; - virtual void v_CalculatePoints() override final; - virtual void v_CalculateWeights() override final; - virtual void v_CalculateDerivMatrix() override final; + void v_CalculatePoints() final; + void v_CalculateWeights() final; + void v_CalculateDerivMatrix() final; void CalculateInterpMatrix(size_t npts, const Array<OneD, const NekDouble> &xpoints, Array<OneD, NekDouble> &interp); }; // class PolyEPoints -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif // POLYEPOINTS_H diff --git a/library/LibUtilities/Interpreter/Interpreter.cpp b/library/LibUtilities/Interpreter/Interpreter.cpp index a73765f9d2..cf78edd268 100644 --- a/library/LibUtilities/Interpreter/Interpreter.cpp +++ b/library/LibUtilities/Interpreter/Interpreter.cpp @@ -61,9 +61,7 @@ namespace bsp = boost::spirit::classic; #include <cmath> #endif -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // signum function @@ -349,7 +347,7 @@ public: NekDouble GetConstant(std::string const &name) { NekDouble *value = find(m_constantsParser, name.c_str()); - ASSERTL1(value != NULL, "Constant variable not found: " + name); + ASSERTL1(value != nullptr, "Constant variable not found: " + name); return *value; } @@ -1152,7 +1150,7 @@ public: // constants_p. ~AnalyticExpression() { - constants_p = NULL; + constants_p = nullptr; } template <typename ScannerT> struct definition @@ -1413,12 +1411,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = state[argIdx1]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = state[argIdx1]; } @@ -1429,12 +1429,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = consts[argIdx1]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = consts[argIdx1]; } @@ -1445,12 +1447,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = vars[argIdx1 * n + i]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = vars[argIdx1]; } @@ -1461,12 +1465,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = params[argIdx1]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = params[argIdx1]; } @@ -1477,13 +1483,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = state[argIdx1 * n + i] + state[argIdx2 * n + i]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = state[argIdx1] + state[argIdx2]; } @@ -1494,13 +1502,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = state[argIdx1 * n + i] - state[argIdx2 * n + i]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = state[argIdx1] - state[argIdx2]; } @@ -1511,13 +1521,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = state[argIdx1 * n + i] * state[argIdx2 * n + i]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = state[argIdx1] * state[argIdx2]; } @@ -1528,13 +1540,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = state[argIdx1 * n + i] / state[argIdx2 * n + i]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = state[argIdx1] / state[argIdx2]; } @@ -1545,13 +1559,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::pow(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::pow(state[argIdx1], state[argIdx2]); } @@ -1562,12 +1578,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = -state[argIdx1 * n + i]; + } } - virtual void run_once() + void run_once() override { state[storeIdx] = -state[argIdx1]; } @@ -1578,13 +1596,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = (state[argIdx1 * n + i] == state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = (state[argIdx1] == state[argIdx2]); } @@ -1595,13 +1615,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = (state[argIdx1 * n + i] <= state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = (state[argIdx1] <= state[argIdx2]); } @@ -1612,13 +1634,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = (state[argIdx1 * n + i] < state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = (state[argIdx1] < state[argIdx2]); } @@ -1629,13 +1653,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = (state[argIdx1 * n + i] >= state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = (state[argIdx1] >= state[argIdx2]); } @@ -1646,13 +1672,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = (state[argIdx1 * n + i] > state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = (state[argIdx1] > state[argIdx2]); } @@ -1663,13 +1691,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::fmod(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::fmod(state[argIdx1], state[argIdx2]); } @@ -1680,12 +1710,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::abs(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::abs(state[argIdx1]); } @@ -1696,13 +1728,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = ((state[argIdx1 * n + i] > 0.0) - (state[argIdx1 * n + i] < 0.0)); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = ((state[argIdx1] > 0.0) - (state[argIdx1] < 0.0)); } @@ -1713,12 +1747,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::asin(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::asin(state[argIdx1]); } @@ -1729,12 +1765,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::acos(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::acos(state[argIdx1]); } @@ -1745,12 +1783,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::atan(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::atan(state[argIdx1]); } @@ -1761,13 +1801,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::atan2(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::atan2(state[argIdx1], state[argIdx2]); } @@ -1778,13 +1820,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = ang(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = ang(state[argIdx1], state[argIdx2]); } @@ -1795,13 +1839,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = boost::math::cyl_bessel_j( state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = boost::math::cyl_bessel_j(state[argIdx1], state[argIdx2]); @@ -1813,12 +1859,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::ceil(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::ceil(state[argIdx1]); } @@ -1829,12 +1877,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::cos(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::cos(state[argIdx1]); } @@ -1845,12 +1895,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::cosh(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::cosh(state[argIdx1]); } @@ -1861,12 +1913,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::exp(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::exp(state[argIdx1]); } @@ -1877,12 +1931,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::fabs(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::fabs(state[argIdx1]); } @@ -1893,12 +1949,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::floor(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::floor(state[argIdx1]); } @@ -1909,13 +1967,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = fmod(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = fmod(state[argIdx1], state[argIdx2]); } @@ -1926,12 +1986,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::log(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::log(state[argIdx1]); } @@ -1942,12 +2004,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::log10(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::log10(state[argIdx1]); } @@ -1958,13 +2022,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = fmax(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = fmax(state[argIdx1], state[argIdx2]); } @@ -1975,13 +2041,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = fmin(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = fmin(state[argIdx1], state[argIdx2]); } @@ -1992,13 +2060,15 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = rad(state[argIdx1 * n + i], state[argIdx2 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = rad(state[argIdx1], state[argIdx2]); } @@ -2009,12 +2079,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::sin(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::sin(state[argIdx1]); } @@ -2025,12 +2097,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::sinh(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::sinh(state[argIdx1]); } @@ -2041,12 +2115,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::sqrt(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::sqrt(state[argIdx1]); } @@ -2057,12 +2133,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::tan(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::tan(state[argIdx1]); } @@ -2073,12 +2151,14 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { for (int i = 0; i < n; i++) + { state[storeIdx * n + i] = std::tanh(state[argIdx1 * n + i]); + } } - virtual void run_once() + void run_once() override { state[storeIdx] = std::tanh(state[argIdx1]); } @@ -2089,7 +2169,7 @@ private: : EvaluationStep(rn, i, l, r, s, c, p, v) { } - virtual void run_many(ci n) + void run_many(ci n) override { // assuming the argument to AWGN does not depend on spatial // variables => @@ -2102,7 +2182,7 @@ private: state[storeIdx * n + i] = _normal(); } } - virtual void run_once() + void run_once() override { boost::variate_generator<boost::mt19937 &, boost::normal_distribution<>> @@ -2214,5 +2294,4 @@ void Interpreter::Evaluate( m_impl->Evaluate(expression_id, points, result); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/Interpreter/Interpreter.h b/library/LibUtilities/Interpreter/Interpreter.h index 7ec4b78155..35e33b9497 100644 --- a/library/LibUtilities/Interpreter/Interpreter.h +++ b/library/LibUtilities/Interpreter/Interpreter.h @@ -41,9 +41,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -323,7 +321,6 @@ private: typedef std::shared_ptr<Interpreter> InterpreterSharedPtr; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/Kernel/kernel.cpp b/library/LibUtilities/Kernel/kernel.cpp new file mode 100644 index 0000000000..7db1b041f2 --- /dev/null +++ b/library/LibUtilities/Kernel/kernel.cpp @@ -0,0 +1,432 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// File: kernel.cpp +// +// For more information, please see: http://www.nektar.info +// +// The MIT License +// +// Copyright (c) 2006 Scientific Computing and Imaging Institute, +// University of Utah (USA) and Department of Aeronautics, Imperial +// College London (UK). +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// Description: +// +/////////////////////////////////////////////////////////////////////////////// + +#include <LibUtilities/Kernel/kernel.h> + +namespace Nektar::LibUtilities +{ +Kernel::Kernel(int order) +{ + UpdateKernelOrder(order); + UpdateKernelNumOfCoeffs(); + UpdateKernelWidth(); + UpdateKernelBspline(); + UpdateKernelCoeffs(); + k_center = 0.0; +} + +void Kernel::UpdateKernelBspline() +{ + Array<TwoD, NekDouble> out_final(k_order, k_order); + + int i, j; + + if (k_order == 1.0) + { + b_spline[0][0] = 1.0; + } + else if (k_order == 2) + { + NekDouble out[2][2] = {{1.0, 0.0}, {-1.0, 1.0}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + else if (k_order == 3) + { + NekDouble out[3][3] = { + {0.5, 0.0, 0.0}, {-1.0, 1.0, 0.5}, {0.5, -1.0, 0.5}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + else if (k_order == 4) + { + NekDouble out[4][4] = {{1.0 / 6.0, 0, 0, 0}, + {-0.5, 0.5, 0.5, 1.0 / 6.0}, + {0.5, -1.0, 0, 2.0 / 3}, + {-1.0 / 6.0, 0.5, -0.5, 1.0 / 6.0}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + else if (k_order == 5) + { + NekDouble out[5][5] = { + {1.0 / 24.0, 0, 0, 0, 0}, + {-1.0 / 6, 1.0 / 6, 0.25, 1.0 / 6, 1.0 / 24}, + {0.25, -0.5, -0.25, 0.5, 11.0 / 24}, + {-1.0 / 6, 0.5, -0.25, -0.5, 11.0 / 24}, + {1.0 / 24, -1.0 / 6.0, 0.25, -1.0 / 6, 1.0 / 24}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + else if (k_order == 6) + { + NekDouble out[6][6] = { + {1.0 / 1.020, 0, 0, 0, 0, 0}, + {-1.0 / 24, 1.0 / 24, 1.0 / 12, 1.0 / 12, 1.0 / 24, 1.0 / 120}, + {1.0 / 12, -1.0 / 6, -1.0 / 6, 1.0 / 6, 5.0 / 12, 13.0 / 60}, + {-1.0 / 12, 0.25, 0, -1.0 / 2, 0, 11.0 / 20}, + {1.0 / 24, -1.0 / 6, 1.0 / 6, 1.0 / 6, -5.0 / 12, 13.0 / 60}, + {-1.0 / 120, 1.0 / 24, -1.0 / 12, 1.0 / 12, -1.0 / 24, 1.0 / 120}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + else if (k_order == 7) + { + NekDouble out[7][7] = {{1.0 / 720, 0, 0, 0, 0, 0, 0}, + {-1.0 / 120, 1.0 / 120, 1.0 / 48, 1.0 / 36, + 1.0 / 48, 1.0 / 120, 1.0 / 720}, + {1.0 / 48, -1.0 / 24, -1.0 / 16, 1.0 / 36, + 3.0 / 16, 5.0 / 24, 19.0 / 240}, + {-1.0 / 36, 1.0 / 1.02, 1.0 / 24, -2.0 / 9, + -5.0 / 24, 1.0 / 3, 151.0 / 360}, + {1.0 / 48, -1.0 / 12, 1.0 / 24, 2.0 / 9, + -5.0 / 24, -1.0 / 3, 151.0 / 360}, + {-1.0 / 120, 1.0 / 24, -1.0 / 16, -1.0 / 36, + 3.0 / 16, -5.0 / 24, 19.0 / 240}, + {1.0 / 720, -1.0 / 120, 1.0 / 48, -1.0 / 36, + 1.0 / 48, -1.0 / 120, 1.0 / 720}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + else if (k_order == 8) + { + NekDouble out[8][8] = { + {1.0 / 5040, 0, 0, 0, 0, 0, 0, 0}, + {-1.0 / 720, 1.0 / 720, 1.0 / 240, 1.0 / 144, 1.0 / 144, 1.0 / 240, + 1.0 / 720, 1.0 / 5040}, + {1.0 / 240, -1.0 / 120, -1.0 / 60, 0, 1.0 / 18, 1.0 / 10, 7.0 / 90, + 1.0 / 42}, + {-1.0 / 144, 1.0 / 48, 1.0 / 48, -1.0 / 16, -19.0 / 144, 1.0 / 16, + 49.0 / 144, 397.0 / 1680}, + {1.0 / 144, -1.0 / 36, 0, 1.0 / 9, 0, -1.0 / 3, 0, 151.0 / 315}, + {-1.0 / 240, 1.0 / 48, -1.0 / 48, -1.0 / 16, 19.0 / 144, 1.0 / 16, + -49.0 / 144, 397.0 / 1680}, + {1.0 / 720, -1.0 / 120, 1.0 / 60, 0, -1.0 / 18, 1.0 / 10, -7.0 / 90, + 1.0 / 42}, + {-1.0 / 5040, 1.0 / 720, -1.0 / 240, 1.0 / 144, -1.0 / 144, + 1.0 / 240, -1.0 / 720, 1.0 / 5040}}; + for (i = 0; i < k_order; i++) + { + for (j = 0; j < k_order; j++) + { + out_final[i][j] = out[i][j]; + } + } + } + + b_spline = out_final; + + ASSERTL0(k_order <= 8, "Order is not supported"); +} + +void Kernel::UpdateKernelCoeffs() +{ + int i; + Array<OneD, NekDouble> out_final(k_ncoeffs); + + if (k_order == 2) + { + NekDouble out[3] = {-1.0 / 12, 7.0 / 6, -1.0 / 12}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + else if (k_order == 3) + { + NekDouble out[5] = {37.0 / 1920, -97.0 / 480, 437.0 / 320, -97.0 / 480, + 37.0 / 1920}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + else if (k_order == 4) + { + NekDouble out[7] = {-41.0 / 7560, 311.0 / 5040, -919.0 / 2520, + 12223.0 / 7560, -919.0 / 2520, 311.0 / 5040, + -41.0 / 7560}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + else if (k_order == 5) + { + NekDouble out[9] = { + 153617.0 / 92897280, -35411.0 / 1658880, 3153959.0 / 23224320, + -6803459.0 / 11612160, 18017975.0 / 9289728, -6803459.0 / 11612160, + 3153959.0 / 23224320, -35411.0 / 1658880, 153617.0 / 92897280}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + else if (k_order == 6) + { + NekDouble out[11] = { + -4201.0 / 7983360, 30773.0 / 3991680, -20813.0 / 380160, + 2825.0 / 11088, -1179649.0 / 1330560, 1569217.0 / 665280, + -1179649.0 / 1330560, 2825.0 / 11088, -20813.0 / 380160, + 30773.0 / 3991680, -4201.0 / 7983360}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + else if (k_order == 7) + { + NekDouble out[13] = {13154671847.0 / 76517631590400.0, + -18073154507.0 / 6376469299200.0, + 287360344573.0 / 12752938598400.0, + -2217732343517.0 / 19129407897600.0, + 1240941746699.0 / 2833986355200.0, + -275386671493.0 / 212548976640.0, + 2648644782397.0 / 910924185600.0, + -275386671493.0 / 212548976640.0, + 1240941746699.0 / 2833986355200.0, + -2217732343517.0 / 19129407897600.0, + 287360344573.0 / 12752938598400.0, + -18073154507.0 / 6376469299200.0, + 13154671847.0 / 76517631590400.0}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + else if (k_order == 8) + { + NekDouble out[15] = { + -800993.0 / 14010796800.0, 73587167.0 / 70053984000.0, + -651305719.0 / 70053984000.0, 3714581677.0 / 70053984000.0, + -3085236289.0 / 14010796800.0, 1426328231.0 / 2001542400.0, + -43268401973.0 / 23351328000.0, 42401344373.0 / 11675664000.0, + -43268401973.0 / 23351328000.0, 1426328231.0 / 2001542400.0, + -3085236289.0 / 14010796800.0, 3714581677.0 / 70053984000.0, + -651305719.0 / 70053984000.0, 73587167.0 / 70053984000.0, + -800993.0 / 14010796800.0}; + for (i = 0; i < k_ncoeffs; i++) + { + out_final[i] = out[i]; + } + } + + k_coeffs = out_final; + ASSERTL0(k_order <= 8, "Order is not supported"); +} + +void Kernel::UpdateKernelBreaks(NekDouble h) +{ + int i; + Array<OneD, NekDouble> temp(k_width + 1); + temp[0] = -(k_width / 2.0) * h; // it needs to get scaled by h + for (i = 1; i < k_width + 1; i++) + { + temp[i] = temp[i - 1] + h; + } + k_breaks = temp; +} + +void Kernel::MoveKernelCenter(NekDouble x_value, + Array<OneD, NekDouble> &outarray) +{ + int i; + for (i = 0; i < k_width + 1; i++) + { + outarray[i] = k_breaks[i] + x_value; + } + + // Update the center of the kernel + k_center = x_value; +} + +void Kernel::FindMeshUnderKernel(Array<OneD, NekDouble> &inarray, NekDouble h, + Array<OneD, NekDouble> &outarray) +{ + int j; + NekDouble first = ceil(inarray[0] / h) * h; + int index = k_width; + NekDouble last = floor(inarray[index] / h) * h; + int count = (int)((last - first) / h) + + 1; // number of mesh breaks under the kernel support + Array<OneD, NekDouble> mesh_breaks(count); + mesh_breaks[0] = first; + for (j = 1; j < count; j++) + { + mesh_breaks[j] = mesh_breaks[j - 1] + h; + } + outarray = mesh_breaks; +} + +void Kernel::EvaluateKernel(Array<OneD, NekDouble> inarray, NekDouble h, + Array<OneD, NekDouble> &outarray) +{ + int gamma, i; + int degree = k_order - 1; + int nvalues = inarray.size(); + Array<OneD, NekDouble> bs_values(nvalues); + + for (i = 0; i < nvalues; i++) + { + outarray[i] = 0.0; + } + + for (gamma = -degree; gamma <= degree; gamma++) + { + int cIndex = gamma + degree; + + // Evaluate the bSpline values + EvaluateBspline(inarray, h, k_center + (gamma * h), bs_values); + + for (i = 0; i < nvalues; i++) + { + outarray[i] += k_coeffs[cIndex] * bs_values[i]; + } + } +} + +void Kernel::EvaluateBspline(Array<OneD, NekDouble> inarray, NekDouble h, + NekDouble offset, Array<OneD, NekDouble> &outarray) +{ + int i; + NekDouble min_value = -k_order / 2.0; + NekDouble max_value = k_order / 2.0; + + int nvalues = inarray.size(); + + // Make a copy for further modifications + Array<OneD, NekDouble> inarray_cp(nvalues); + + for (i = 0; i < nvalues; i++) + { + inarray_cp[i] = inarray[i] - offset; + inarray_cp[i] = inarray_cp[i] / h; + int interval = (int)floor(inarray_cp[i] - + min_value); // determines to which interval of + // the bspline the value belongs + + if (inarray_cp[i] >= min_value && inarray_cp[i] <= max_value) + { + if (interval >= k_order) + { + interval -= 1; + } + NekDouble shift = min_value + interval; + inarray_cp[i] -= shift; + outarray[i] = EvaluateBsplinePoly(inarray_cp[i], interval); + } + else + { + outarray[i] = 0.0; + } + } +} + +NekDouble Kernel::EvaluateBsplinePoly(NekDouble x_value, int interval) +{ + int i; + int deg = k_order - 1; + NekDouble poly_value = b_spline[interval][0]; + + for (i = 0; i < deg; i++) + { + poly_value = poly_value * x_value + b_spline[interval][i + 1]; + } + + return poly_value; +} + +void Kernel::Sort(Array<OneD, NekDouble> &inarray1, + Array<OneD, NekDouble> &inarray2, + Array<OneD, NekDouble> &outarray) +{ + int j; + int kIndex = 0; // Keeps track of the kernel breaks + int mIndex = 0; // Keeps track of the mesh breaks + for (j = 0; j < outarray.size(); j++) + { + if (mIndex >= inarray2.size()) + { + outarray[j] = inarray1[kIndex]; + kIndex++; + } + else if (kIndex >= inarray1.size()) + { + outarray[j] = inarray2[mIndex]; + mIndex++; + } + else if (inarray1[kIndex] < inarray2[mIndex]) + { + outarray[j] = inarray1[kIndex]; + kIndex++; + } + else + { + outarray[j] = inarray2[mIndex]; + mIndex++; + } + } +} + +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/BlockMatrix.cpp b/library/LibUtilities/LinearAlgebra/BlockMatrix.cpp index 7d648a33af..0ed28dba1d 100644 --- a/library/LibUtilities/LinearAlgebra/BlockMatrix.cpp +++ b/library/LibUtilities/LinearAlgebra/BlockMatrix.cpp @@ -190,7 +190,7 @@ NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetBlockPtr( int x = CalculateBlockIndex(row, column); if (x == -1) { - return 0; + return nullptr; } else { @@ -530,7 +530,7 @@ void NekMatrix<NekMatrix<DataType, InnerMatrixType>, { for (auto &ptr : m_data) { - if (ptr.get() != 0) + if (ptr.get() != nullptr) { ptr->Transpose(); } diff --git a/library/LibUtilities/LinearAlgebra/BlockMatrix.hpp b/library/LibUtilities/LinearAlgebra/BlockMatrix.hpp index afe75082d9..05066dae16 100644 --- a/library/LibUtilities/LinearAlgebra/BlockMatrix.hpp +++ b/library/LibUtilities/LinearAlgebra/BlockMatrix.hpp @@ -200,13 +200,13 @@ public: const std::shared_ptr<ThisType> &rhs); protected: - LIB_UTILITIES_EXPORT virtual - typename boost::call_traits<NumberType>::value_type - v_GetValue(unsigned int row, unsigned int column) const override; + LIB_UTILITIES_EXPORT + typename boost::call_traits<NumberType>::value_type v_GetValue( + unsigned int row, unsigned int column) const override; - LIB_UTILITIES_EXPORT virtual unsigned int v_GetStorageSize() const override; + LIB_UTILITIES_EXPORT unsigned int v_GetStorageSize() const override; - LIB_UTILITIES_EXPORT virtual void v_Transpose() override; + LIB_UTILITIES_EXPORT void v_Transpose() override; private: LIB_UTILITIES_EXPORT static unsigned int GetNumberOfElementsInBlock( diff --git a/library/LibUtilities/LinearAlgebra/MatrixBase.hpp b/library/LibUtilities/LinearAlgebra/MatrixBase.hpp index 7e795a9076..b92bb78b2a 100644 --- a/library/LibUtilities/LinearAlgebra/MatrixBase.hpp +++ b/library/LibUtilities/LinearAlgebra/MatrixBase.hpp @@ -133,7 +133,7 @@ private: template <typename DataType> class Matrix : public ConstMatrix<DataType> { public: - LIB_UTILITIES_EXPORT virtual ~Matrix(); + LIB_UTILITIES_EXPORT ~Matrix() override; LIB_UTILITIES_EXPORT void SetValue( unsigned int row, unsigned int column, diff --git a/library/LibUtilities/LinearAlgebra/MatrixOperations.hpp b/library/LibUtilities/LinearAlgebra/MatrixOperations.hpp index 99ab1f8a41..07c8f9b37b 100644 --- a/library/LibUtilities/LinearAlgebra/MatrixOperations.hpp +++ b/library/LibUtilities/LinearAlgebra/MatrixOperations.hpp @@ -148,7 +148,7 @@ void NekMultiplyFullMatrixFullMatrix( typename std::enable_if< CanGetRawPtr<NekMatrix<LhsDataType, LhsMatrixType>>::value && CanGetRawPtr<NekMatrix<RhsDataType, RhsMatrixType>>::value>::type *p = - 0) + nullptr) { boost::ignore_unused(p); diff --git a/library/LibUtilities/LinearAlgebra/MatrixVectorMultiplication.cpp b/library/LibUtilities/LinearAlgebra/MatrixVectorMultiplication.cpp index 864d5e40b9..bef3d57e15 100644 --- a/library/LibUtilities/LinearAlgebra/MatrixVectorMultiplication.cpp +++ b/library/LibUtilities/LinearAlgebra/MatrixVectorMultiplication.cpp @@ -85,7 +85,8 @@ void NekMultiplyBandedMatrix( DataType *result, const NekMatrix<LhsDataType, MatrixType> &lhs, const DataType *rhs, typename std::enable_if< - CanGetRawPtr<NekMatrix<LhsDataType, MatrixType>>::value>::type *p = 0) + CanGetRawPtr<NekMatrix<LhsDataType, MatrixType>>::value>::type *p = + nullptr) { boost::ignore_unused(p); @@ -110,7 +111,7 @@ void NekMultiplyBandedMatrix( const DataType *rhs, typename std::enable_if< !CanGetRawPtr<NekMatrix<LhsDataType, BlockMatrixTag>>::value>::type *p = - 0) + nullptr) { boost::ignore_unused(result, lhs, rhs, p); @@ -478,7 +479,7 @@ void NekMultiplySymmetricMatrix( const DataType *rhs, typename std::enable_if< CanGetRawPtr<NekMatrix<InnerMatrixType, MatrixTag>>::value>::type *p = - 0) + nullptr) { boost::ignore_unused(p); @@ -501,7 +502,7 @@ void NekMultiplySymmetricMatrix( const DataType *rhs, typename std::enable_if< !CanGetRawPtr<NekMatrix<InnerMatrixType, MatrixTag>>::value>::type *p = - 0) + nullptr) { boost::ignore_unused(p); @@ -514,7 +515,7 @@ void NekMultiplyFullMatrix( const DataType *rhs, typename std::enable_if< CanGetRawPtr<NekMatrix<InnerMatrixType, MatrixTag>>::value>::type *p = - 0) + nullptr) { boost::ignore_unused(p); @@ -540,7 +541,7 @@ void NekMultiplyFullMatrix( const DataType *rhs, typename std::enable_if< !CanGetRawPtr<NekMatrix<InnerMatrixType, MatrixTag>>::value>::type *p = - 0) + nullptr) { boost::ignore_unused(p); diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIter.cpp b/library/LibUtilities/LinearAlgebra/NekLinSysIter.cpp index e221ca6368..bbece6d8c0 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIter.cpp +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIter.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekLinSysIter @@ -180,5 +178,4 @@ void NekLinSysIter::Set_Rhs_Magnitude(const Array<OneD, NekDouble> &pIn) } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIter.h b/library/LibUtilities/LinearAlgebra/NekLinSysIter.h index 95936484c7..64d90e8660 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIter.h +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIter.h @@ -38,9 +38,7 @@ #include <LibUtilities/BasicUtils/NekFactory.hpp> #include <LibUtilities/LinearAlgebra/NekSys.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NekLinSysIter; @@ -73,7 +71,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey); - LIB_UTILITIES_EXPORT virtual ~NekLinSysIter(); + LIB_UTILITIES_EXPORT ~NekLinSysIter() override; LIB_UTILITIES_EXPORT void SetUniversalUniqueMap( const Array<OneD, const int> &map); @@ -126,11 +124,10 @@ protected: void Set_Rhs_Magnitude(const Array<OneD, NekDouble> &pIn); void SetUniversalUniqueMap(); - virtual void v_InitObject() override; + void v_InitObject() override; private: }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.cpp b/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.cpp index 7fbc2a5f61..fba8df0090 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.cpp +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekLinSysIterCG @@ -245,5 +243,4 @@ void NekLinSysIterCG::DoConjugateGradient( rho = rho_new; } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.h b/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.h index 9b6124c4f3..20ec9dc2a3 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.h +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterCG.h @@ -37,9 +37,7 @@ #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LINSYS_ITERAT_CG_H #include <LibUtilities/LinearAlgebra/NekLinSysIter.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// A global linear system. class NekLinSysIterCG; @@ -69,16 +67,15 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey); - LIB_UTILITIES_EXPORT ~NekLinSysIterCG(); + LIB_UTILITIES_EXPORT ~NekLinSysIterCG() override; protected: - virtual void v_InitObject() override; + void v_InitObject() override; - virtual int v_SolveSystem(const int nGlobal, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, const int nDir, - const NekDouble tol, - const NekDouble factor) override; + int v_SolveSystem(const int nGlobal, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, const int nDir, + const NekDouble tol, const NekDouble factor) override; private: /// Actual iterative solve @@ -87,7 +84,6 @@ private: Array<OneD, NekDouble> &pOutput, const int pNumDir); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.cpp b/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.cpp index cc40154812..fce4bf9ff6 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.cpp +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekLinSysIterCGLoc @@ -244,5 +242,4 @@ void NekLinSysIterCGLoc::DoConjugateGradient( k++; } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.h b/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.h index 92d96ae9da..ddc68a9b3b 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.h +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterCGLoc.h @@ -37,9 +37,7 @@ #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LINSYS_ITERAT_CG_H #include <LibUtilities/LinearAlgebra/NekLinSysIter.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// A global linear system. class NekLinSysIterCGLoc; @@ -69,16 +67,15 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey); - LIB_UTILITIES_EXPORT ~NekLinSysIterCGLoc(); + LIB_UTILITIES_EXPORT ~NekLinSysIterCGLoc() override; protected: - virtual void v_InitObject() override; + void v_InitObject() override; - virtual int v_SolveSystem(const int nGlobal, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, const int nDir, - const NekDouble tol, - const NekDouble factor) override; + int v_SolveSystem(const int nGlobal, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, const int nDir, + const NekDouble tol, const NekDouble factor) override; private: /// Actual iterative solve @@ -86,7 +83,6 @@ private: const Array<OneD, const NekDouble> &pInput, Array<OneD, NekDouble> &pOutput); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.cpp b/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.cpp index 73d5080b0a..0680d86b24 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.cpp +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekLinSysIterFixedpointJacobi @@ -100,5 +98,4 @@ int NekLinSysIterFixedpointJacobi::v_SolveSystem( return niterations; } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.h b/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.h index 43af89ccfc..9dbd6ab913 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.h +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterFixedpointJacobi.h @@ -37,9 +37,7 @@ #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LINSYS_ITERAT_FIXEDPOINTJACOBI_H #include <LibUtilities/LinearAlgebra/NekLinSysIter.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// A global linear system. class NekLinSysIterFixedpointJacobi; @@ -70,20 +68,18 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey); - LIB_UTILITIES_EXPORT ~NekLinSysIterFixedpointJacobi(); + LIB_UTILITIES_EXPORT ~NekLinSysIterFixedpointJacobi() override; protected: - virtual void v_InitObject() override; + void v_InitObject() override; - virtual int v_SolveSystem(const int nGlobal, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, const int nDir, - const NekDouble tol, - const NekDouble factor) override; + int v_SolveSystem(const int nGlobal, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, const int nDir, + const NekDouble tol, const NekDouble factor) override; private: }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.cpp b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.cpp index 0eacef837c..19392c1fde 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.cpp +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekLinSysIterGMRES @@ -598,5 +596,4 @@ void NekLinSysIterGMRES::DoBackward(const int number, y[i] = sum / A[i][i]; } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.h b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.h index 86b4486b3c..15aecf39b3 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.h +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRES.h @@ -37,9 +37,7 @@ #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LINSYS_ITERAT_GMRES_H #include <LibUtilities/LinearAlgebra/NekLinSysIter.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// A global linear system. class NekLinSysIterGMRES; @@ -67,7 +65,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey = NekSysKey()); - LIB_UTILITIES_EXPORT ~NekLinSysIterGMRES(); + LIB_UTILITIES_EXPORT ~NekLinSysIterGMRES() override; LIB_UTILITIES_EXPORT int GetMaxLinIte() { @@ -88,13 +86,12 @@ protected: bool m_DifferenceFlag0 = false; bool m_DifferenceFlag1 = false; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual int v_SolveSystem(const int nGlobal, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, const int nDir, - const NekDouble tol, - const NekDouble factor) override; + int v_SolveSystem(const int nGlobal, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, const int nDir, + const NekDouble tol, const NekDouble factor) override; private: /// Actual iterative solve-GMRES @@ -132,7 +129,6 @@ private: static std::string lookupIds[]; static std::string def; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.cpp b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.cpp index 80cfca697c..0ca2b1423d 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.cpp +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekLinSysIterGMRESLoc @@ -570,5 +568,4 @@ void NekLinSysIterGMRESLoc::DoBackward(const int number, y[i] = sum / A[i][i]; } } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.h b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.h index 9999dccaaf..da4b3ad3a3 100644 --- a/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.h +++ b/library/LibUtilities/LinearAlgebra/NekLinSysIterGMRESLoc.h @@ -37,9 +37,7 @@ #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LINSYS_ITERAT_GMRESLoc_H #include <LibUtilities/LinearAlgebra/NekLinSysIter.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// A global linear system. class NekLinSysIterGMRESLoc; @@ -67,7 +65,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey = NekSysKey()); - LIB_UTILITIES_EXPORT ~NekLinSysIterGMRESLoc(); + LIB_UTILITIES_EXPORT ~NekLinSysIterGMRESLoc() override; LIB_UTILITIES_EXPORT int GetMaxLinIte() { @@ -88,13 +86,12 @@ protected: bool m_DifferenceFlag0 = false; bool m_DifferenceFlag1 = false; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual int v_SolveSystem(const int nLocal, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, const int nDir, - const NekDouble tol, - const NekDouble factor) override; + int v_SolveSystem(const int nLocal, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, const int nDir, + const NekDouble tol, const NekDouble factor) override; private: /// Actual iterative solve-GMRES @@ -134,7 +131,6 @@ private: static std::string lookupIds[]; static std::string def; }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekNonlinSys.cpp b/library/LibUtilities/LinearAlgebra/NekNonlinSys.cpp index a8a9a29110..508a25d328 100644 --- a/library/LibUtilities/LinearAlgebra/NekNonlinSys.cpp +++ b/library/LibUtilities/LinearAlgebra/NekNonlinSys.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekNonlinSys @@ -150,5 +148,4 @@ NekNonlinSys::~NekNonlinSys() { } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekNonlinSys.h b/library/LibUtilities/LinearAlgebra/NekNonlinSys.h index c5fa423cca..cd4750dd05 100644 --- a/library/LibUtilities/LinearAlgebra/NekNonlinSys.h +++ b/library/LibUtilities/LinearAlgebra/NekNonlinSys.h @@ -39,9 +39,7 @@ #include <LibUtilities/LinearAlgebra/NekLinSysIter.h> #include <LibUtilities/LinearAlgebra/NekSys.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NekNonlinSys; @@ -60,7 +58,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey); - LIB_UTILITIES_EXPORT ~NekNonlinSys(); + LIB_UTILITIES_EXPORT ~NekNonlinSys() override; LIB_UTILITIES_EXPORT const Array<OneD, const NekDouble> &GetRefSolution() const @@ -134,7 +132,9 @@ protected: Array<OneD, NekDouble> m_DeltSltn; Array<OneD, NekDouble> m_SourceVec; - virtual void v_InitObject(); + bool m_ResidualUpdated = false; + + void v_InitObject() override; LIB_UTILITIES_EXPORT virtual void v_SetupNekNonlinSystem( const int nGlobal, const Array<OneD, const NekDouble> &pInput, @@ -142,6 +142,5 @@ protected: private: }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.cpp b/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.cpp index 233fb8d49a..09cb161fa0 100644 --- a/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.cpp +++ b/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekNonlinSysNewton @@ -188,5 +186,4 @@ void NekNonlinSysNewton::v_SetupNekNonlinSystem( m_linsol->SetSysOperators(m_operator); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.h b/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.h index 714a95c680..9de3f79252 100644 --- a/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.h +++ b/library/LibUtilities/LinearAlgebra/NekNonlinSysNewton.h @@ -38,9 +38,7 @@ #include <LibUtilities/LinearAlgebra/NekNonlinSys.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class NekNonlinSysNewton; @@ -68,7 +66,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nscale, const NekSysKey &pKey); - LIB_UTILITIES_EXPORT ~NekNonlinSysNewton(); + LIB_UTILITIES_EXPORT ~NekNonlinSysNewton() override; protected: NekDouble m_SysResNorm0; @@ -78,28 +76,27 @@ protected: NekDouble m_forcingGamma = 1.0; NekDouble m_forcingAlpha = 0.5 * (1.0 + sqrt(5)); - virtual void v_InitObject() override; + void v_InitObject() override; - virtual int v_SolveSystem(const int nGlobal, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, const int nDir, - const NekDouble tol, - const NekDouble factor) override; + int v_SolveSystem(const int nGlobal, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, const int nDir, + const NekDouble tol, const NekDouble factor) override; - virtual bool v_ConvergenceCheck( - const int nIteration, const Array<OneD, const NekDouble> &Residual, - const NekDouble tol) override; + bool v_ConvergenceCheck(const int nIteration, + const Array<OneD, const NekDouble> &Residual, + const NekDouble tol) override; - virtual void v_SetupNekNonlinSystem( - const int nGlobal, const Array<OneD, const NekDouble> &pInput, - const Array<OneD, const NekDouble> &pSource, const int nDir) override; + void v_SetupNekNonlinSystem(const int nGlobal, + const Array<OneD, const NekDouble> &pInput, + const Array<OneD, const NekDouble> &pSource, + const int nDir) override; private: NekDouble CalcInexactNewtonForcing(const int &k, const NekDouble &resnormOld, const NekDouble &resnorm); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/NekSys.cpp b/library/LibUtilities/LinearAlgebra/NekSys.cpp index 80965f9ae5..9cd46ff4a1 100644 --- a/library/LibUtilities/LinearAlgebra/NekSys.cpp +++ b/library/LibUtilities/LinearAlgebra/NekSys.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class NekSys @@ -106,5 +104,4 @@ void NekSys::v_NekSysInitialGuess(const Array<OneD, const NekDouble> &pInput, Vmath::Vcopy(ndim, pInput, 1, pguess, 1); } -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/LinearAlgebra/NekSys.h b/library/LibUtilities/LinearAlgebra/NekSys.h index 7cb27d0c85..7028f19504 100644 --- a/library/LibUtilities/LinearAlgebra/NekSys.h +++ b/library/LibUtilities/LinearAlgebra/NekSys.h @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/Vmath.hpp> #include <LibUtilities/LinearAlgebra/NekMatrix.hpp> #include <iomanip> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // ===================================================================== @@ -334,6 +332,5 @@ protected: const Array<OneD, const NekDouble> &pInput, Array<OneD, NekDouble> &pguess); }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/LinearAlgebra/ScaledMatrix.hpp b/library/LibUtilities/LinearAlgebra/ScaledMatrix.hpp index 82227ac4a0..85a08dd880 100644 --- a/library/LibUtilities/LinearAlgebra/ScaledMatrix.hpp +++ b/library/LibUtilities/LinearAlgebra/ScaledMatrix.hpp @@ -142,13 +142,13 @@ public: const std::shared_ptr<ThisType> &rhs); protected: - LIB_UTILITIES_EXPORT virtual - typename boost::call_traits<NumberType>::value_type - v_GetValue(unsigned int row, unsigned int column) const override; + LIB_UTILITIES_EXPORT + typename boost::call_traits<NumberType>::value_type v_GetValue( + unsigned int row, unsigned int column) const override; - LIB_UTILITIES_EXPORT virtual unsigned int v_GetStorageSize() const override; + LIB_UTILITIES_EXPORT unsigned int v_GetStorageSize() const override; - LIB_UTILITIES_EXPORT virtual char v_GetTransposeFlag() const override; + LIB_UTILITIES_EXPORT char v_GetTransposeFlag() const override; private: std::shared_ptr<const InnerType> m_matrix; diff --git a/library/LibUtilities/LinearAlgebra/SparseDiagBlkMatrix.cpp b/library/LibUtilities/LinearAlgebra/SparseDiagBlkMatrix.cpp index ce4cce4a76..23dbdd9c1f 100644 --- a/library/LibUtilities/LinearAlgebra/SparseDiagBlkMatrix.cpp +++ b/library/LibUtilities/LinearAlgebra/SparseDiagBlkMatrix.cpp @@ -178,7 +178,9 @@ NekSparseDiagBlkMatrix<SparseStorageType>::operator()( } /// \todo double check, might be a bug when local_col > local column if (local_col < 0) + { return defaultReturnValue; + } return m_submatrix[i]->GetValue(local_row, local_col); } @@ -456,9 +458,13 @@ void NekSparseDiagBlkMatrix<SparseStorageType>:: const IndexType col = entry->first.second; if (blk_row != row / blockSize) + { continue; + } if (blk_col != col / blockSize) + { continue; + } grid[row % blockSize][col % blockSize]++; } @@ -497,9 +503,13 @@ void NekSparseDiagBlkMatrix<SparseStorageType>::writeBlockSparsityPatternTo( const IndexType col = entry->first.second + col_offset; if (blk_row != row / blockSize) + { continue; + } if (blk_col != col / blockSize) + { continue; + } grid[row % blockSize][col % blockSize]++; } row_offset += m_submatrix[i]->GetRows(); diff --git a/library/LibUtilities/LinearAlgebra/SparseMatrix.cpp b/library/LibUtilities/LinearAlgebra/SparseMatrix.cpp index aa04d8b705..c71b3f3c5d 100644 --- a/library/LibUtilities/LinearAlgebra/SparseMatrix.cpp +++ b/library/LibUtilities/LinearAlgebra/SparseMatrix.cpp @@ -250,9 +250,13 @@ void NekSparseMatrix<SparseStorageType>::writeBlockSparsityPatternTo( const IndexType col = entry->first.second; if (blk_row != row / blockSize) + { continue; + } if (blk_col != col / blockSize) + { continue; + } grid[row % blockSize][col % blockSize]++; } diff --git a/library/LibUtilities/LinearAlgebra/StandardMatrix.hpp b/library/LibUtilities/LinearAlgebra/StandardMatrix.hpp index 3755af0758..98829066ac 100644 --- a/library/LibUtilities/LinearAlgebra/StandardMatrix.hpp +++ b/library/LibUtilities/LinearAlgebra/StandardMatrix.hpp @@ -89,7 +89,7 @@ public: : m_data(d), m_end(e), m_curRow(std::numeric_limits<unsigned int>::max()), m_curColumn(std::numeric_limits<unsigned int>::max()), - m_matrix(NULL), + m_matrix(nullptr), m_curIndex(std::numeric_limits<unsigned int>::max()), m_transpose('N') { @@ -100,7 +100,7 @@ public: } iterator_impl(MatrixType *m, char transpose, bool isEnd = false) - : m_data(NULL), m_end(NULL), m_curRow(0), m_curColumn(0), + : m_data(nullptr), m_end(nullptr), m_curRow(0), m_curColumn(0), m_matrix(m), m_curIndex(0), m_transpose(transpose) { if (isEnd) @@ -522,15 +522,15 @@ protected: LIB_UTILITIES_EXPORT void ResizeDataArrayIfNeeded(); - LIB_UTILITIES_EXPORT virtual - typename boost::call_traits<DataType>::value_type - v_GetValue(unsigned int row, unsigned int column) const override; + LIB_UTILITIES_EXPORT + typename boost::call_traits<DataType>::value_type v_GetValue( + unsigned int row, unsigned int column) const override; - LIB_UTILITIES_EXPORT virtual unsigned int v_GetStorageSize() const override; + LIB_UTILITIES_EXPORT unsigned int v_GetStorageSize() const override; // We need to rethink class structure a little. This shouldn't be // necessary. - LIB_UTILITIES_EXPORT virtual void v_SetValue( + LIB_UTILITIES_EXPORT void v_SetValue( unsigned int row, unsigned int column, typename boost::call_traits<DataType>::const_reference d) override; diff --git a/library/LibUtilities/LinearAlgebra/StorageSmvBsr.cpp b/library/LibUtilities/LinearAlgebra/StorageSmvBsr.cpp index e6b6bf8053..d885343f66 100644 --- a/library/LibUtilities/LinearAlgebra/StorageSmvBsr.cpp +++ b/library/LibUtilities/LinearAlgebra/StorageSmvBsr.cpp @@ -183,7 +183,9 @@ void StorageSmvBsr<DataType>::const_iterator::forward() { while ((m_iter.storageindex + 1 < m_val.size()) && (m_val[++m_iter.storageindex] <= NekConstants::kNekSparseNonZeroTol)) + { ; + } m_iter.nnzindex++; @@ -550,7 +552,9 @@ void StorageSmvBsr<DataType>::Multiply_generic(const int mb, const double *val, const int mm = lb * lb; double *pc = c; for (int i = 0; i != mb * lb; i++) + { *pc++ = 0; + } pc = c; for (int i = 0; i != mb; i++) @@ -614,7 +618,9 @@ void StorageSmvBsr<DataType>::processBcoInput(const IndexType blkRows, { m_val[blkSize * (tmp[rowcoord]) + i] = value[i]; if (std::abs(value[i]) > NekConstants::kNekSparseNonZeroTol) + { m_nnz++; + } } m_indx[tmp[rowcoord]] = colcoord; diff --git a/library/LibUtilities/Memory/NekMemoryManager.hpp b/library/LibUtilities/Memory/NekMemoryManager.hpp index 00cd4a95b0..8c743db006 100644 --- a/library/LibUtilities/Memory/NekMemoryManager.hpp +++ b/library/LibUtilities/Memory/NekMemoryManager.hpp @@ -108,7 +108,7 @@ public: #endif #endif - data = NULL; + data = nullptr; } #ifdef NEKTAR_MEMORY_POOL_ENABLED @@ -260,11 +260,8 @@ public: return &r; } - pointer allocate(size_type n, - std::allocator<void>::const_pointer hint = - 0) // typename MemoryManager<void>::pointer hint = 0) + pointer allocate(size_type n) { - boost::ignore_unused(hint); return RawAllocate(n); } diff --git a/library/LibUtilities/Polylib/Polylib.cpp b/library/LibUtilities/Polylib/Polylib.cpp index 2396496b86..f04097be6a 100644 --- a/library/LibUtilities/Polylib/Polylib.cpp +++ b/library/LibUtilities/Polylib/Polylib.cpp @@ -164,7 +164,9 @@ void zwgj(double *z, double *w, const int np, const double alpha, gammaFracGammaF(np + 1, beta, np + 1, apb); for (i = 0; i < np; ++i) + { w[i] = fac / (w[i] * w[i] * (one - z[i] * z[i])); + } return; } @@ -195,14 +197,16 @@ void zwgrjm(double *z, double *w, const int np, const double alpha, z[0] = -one; jacobz(np - 1, z + 1, alpha, beta + 1); - jacobfd(np, z, w, NULL, np - 1, alpha, beta); + jacobfd(np, z, w, nullptr, np - 1, alpha, beta); fac = pow(two, apb) * gammaFracGammaF(np, alpha, np, 0.0) * gammaFracGammaF(np, beta, np + 1, apb); fac /= (beta + np); for (i = 0; i < np; ++i) + { w[i] = fac * (1 - z[i]) / (w[i] * w[i]); + } w[0] *= (beta + one); } @@ -236,14 +240,16 @@ void zwgrjp(double *z, double *w, const int np, const double alpha, jacobz(np - 1, z, alpha + 1, beta); z[np - 1] = one; - jacobfd(np, z, w, NULL, np - 1, alpha, beta); + jacobfd(np, z, w, nullptr, np - 1, alpha, beta); fac = pow(two, apb) * gammaFracGammaF(np, alpha, np, 0.0) * gammaFracGammaF(np, beta, np + 1, apb); fac /= (alpha + np); for (i = 0; i < np; ++i) + { w[i] = fac * (1 + z[i]) / (w[i] * w[i]); + } w[np - 1] *= (alpha + one); } @@ -284,14 +290,16 @@ void zwglj(double *z, double *w, const int np, const double alpha, z[0] = -one; z[np - 1] = one; jacobz(np - 2, z + 1, alpha + one, beta + one); - jacobfd(np, z, w, NULL, np - 1, alpha, beta); + jacobfd(np, z, w, nullptr, np - 1, alpha, beta); fac = pow(two, apb + 1) * gammaFracGammaF(np, alpha, np, 0.0) * gammaFracGammaF(np, beta, np + 1, apb); fac /= (np - 1); for (i = 0; i < np; ++i) + { w[i] = fac / (w[i] * w[i]); + } w[0] *= (beta + one); w[np - 1] *= (alpha + one); } @@ -668,11 +676,15 @@ void Dgj(double *D, const double *z, const int np, const double alpha, { if (i != j) + { D[i * np + j] = pd[j] / (pd[i] * (z[j] - z[i])); + } else + { D[i * np + j] = (alpha - beta + (alpha + beta + two) * z[j]) / (two * (one - z[j] * z[j])); + } } } free(pd); @@ -711,23 +723,31 @@ void Dgrjm(double *D, const double *z, const int np, const double alpha, pd[0] /= gammaF(beta + two); jacobd(np - 1, z + 1, pd + 1, np - 1, alpha, beta + 1); for (i = 1; i < np; ++i) + { pd[i] *= (1 + z[i]); + } for (i = 0; i < np; i++) { for (j = 0; j < np; j++) { if (i != j) + { D[i * np + j] = pd[j] / (pd[i] * (z[j] - z[i])); + } else { if (j == 0) + { D[i * np + j] = -(np + alpha + beta + one) * (np - one) / (two * (beta + two)); + } else + { D[i * np + j] = (alpha - beta + one + (alpha + beta + one) * z[j]) / (two * (one - z[j] * z[j])); + } } } } @@ -765,7 +785,9 @@ void Dgrjp(double *D, const double *z, const int np, const double alpha, jacobd(np - 1, z, pd, np - 1, alpha + 1, beta); for (i = 0; i < np - 1; ++i) + { pd[i] *= (1 - z[i]); + } pd[np - 1] = -gammaFracGammaF(np + 1, alpha, np, 0.0); pd[np - 1] /= gammaF(alpha + two); @@ -774,16 +796,22 @@ void Dgrjp(double *D, const double *z, const int np, const double alpha, for (j = 0; j < np; j++) { if (i != j) + { D[i * np + j] = pd[j] / (pd[i] * (z[j] - z[i])); + } else { if (j == np - 1) + { D[i * np + j] = (np + alpha + beta + one) * (np - one) / (two * (alpha + two)); + } else + { D[i * np + j] = (alpha - beta - one + (alpha + beta + one) * z[j]) / (two * (one - z[j] * z[j])); + } } } } @@ -823,7 +851,9 @@ void Dglj(double *D, const double *z, const int np, const double alpha, pd[0] /= gammaF(beta + two); jacobd(np - 2, z + 1, pd + 1, np - 2, alpha + 1, beta + 1); for (i = 1; i < np - 1; ++i) + { pd[i] *= (one - z[i] * z[i]); + } pd[np - 1] = -two * gammaFracGammaF(np, alpha, np - 1, 0.0); pd[np - 1] /= gammaF(alpha + two); @@ -832,20 +862,28 @@ void Dglj(double *D, const double *z, const int np, const double alpha, for (j = 0; j < np; j++) { if (i != j) + { D[i * np + j] = pd[j] / (pd[i] * (z[j] - z[i])); + } else { if (j == 0) + { D[i * np + j] = (alpha - (np - 1) * (np + alpha + beta)) / (two * (beta + two)); + } else if (j == np - 1) + { D[i * np + j] = -(beta - (np - 1) * (np + alpha + beta)) / (two * (alpha + two)); + } else + { D[i * np + j] = (alpha - beta + (alpha + beta) * z[j]) / (two * (one - z[j] * z[j])); + } } } } @@ -884,7 +922,9 @@ double hgj(const int i, const double z, const double *zgj, const int np, zi = *(zgj + i); dz = z - zi; if (fabs(dz) < EPS) + { return 1.0; + } return laginterp(z, i, zgj, np); } @@ -920,7 +960,9 @@ double hgrjm(const int i, const double z, const double *zgrj, const int np, zi = *(zgrj + i); dz = z - zi; if (fabs(dz) < EPS) + { return 1.0; + } return laginterp(z, i, zgrj, np); } @@ -955,7 +997,9 @@ double hgrjp(const int i, const double z, const double *zgrj, const int np, zi = *(zgrj + i); dz = z - zi; if (fabs(dz) < EPS) + { return 1.0; + } return laginterp(z, i, zgrj, np); } @@ -991,7 +1035,9 @@ double hglj(const int i, const double z, const double *zglj, const int np, zi = *(zglj + i); dz = z - zi; if (fabs(dz) < EPS) + { return 1.0; + } return laginterp(z, i, zglj, np); } @@ -1210,25 +1256,43 @@ void jacobfd(const int np, const double *z, double *poly_in, double *polyd, double zero = 0.0, one = 1.0, two = 2.0; if (!np) + { return; + } if (n == 0) { if (poly_in) + { for (i = 0; i < np; ++i) + { poly_in[i] = one; + } + } if (polyd) + { for (i = 0; i < np; ++i) + { polyd[i] = zero; + } + } } else if (n == 1) { if (poly_in) + { for (i = 0; i < np; ++i) + { poly_in[i] = 0.5 * (alpha - beta + (alpha + beta + two) * z[i]); + } + } if (polyd) + { for (i = 0; i < np; ++i) + { polyd[i] = 0.5 * (alpha + beta + two); + } + } } else { @@ -1321,14 +1385,20 @@ void jacobd(const int np, const double *z, double *polyd, const int n, int i; double one = 1.0; if (n == 0) + { for (i = 0; i < np; ++i) + { polyd[i] = 0.0; + } + } else { // jacobf(np,z,polyd,n-1,alpha+one,beta+one); - jacobfd(np, z, polyd, NULL, n - 1, alpha + one, beta + one); + jacobfd(np, z, polyd, nullptr, n - 1, alpha + one, beta + one); for (i = 0; i < np; ++i) + { polyd[i] *= 0.5 * (alpha + beta + (double)n + one); + } } return; } @@ -1349,9 +1419,13 @@ double gammaF(const double x) double gamma = 1.0; if (x == -0.5) + { gamma = -2.0 * sqrt(M_PI); + } else if (!x) + { return gamma; + } else if ((x - (int)x) == 0.5) { int n = (int)x; @@ -1376,7 +1450,9 @@ double gammaF(const double x) } } else + { fprintf(stderr, "%lf is not of integer or half order\n", x); + } return gamma; } @@ -1406,12 +1482,16 @@ double gammaFracGammaF(const int x, const double alpha, const int y, if (X > Y) { for (int tmp = X - 1; tmp > Y - 1; tmp -= 1) + { gamma *= tmp; + } } else if (Y > X) { for (int tmp = Y - 1; tmp > X - 1; tmp -= 1) + { gamma *= tmp; + } gamma = 1. / gamma; } } @@ -1422,12 +1502,16 @@ double gammaFracGammaF(const int x, const double alpha, const int y, if (X > Y) { for (int tmp = int(X); tmp > int(Y); tmp -= 1) + { gamma *= tmp - 0.5; + } } else if (Y > X) { for (int tmp = int(Y); tmp > int(X); tmp -= 1) + { gamma *= tmp - 0.5; + } gamma = 1. / gamma; } } @@ -1492,7 +1576,9 @@ std::complex<Nektar::NekDouble> ImagBesselComp( { z = z * (1.0 / i / (i + n) * zarg); if (abs(z) <= tol) + { break; + } zbes = zbes + z; i++; } @@ -1522,25 +1608,33 @@ static void Jacobz(const int n, double *z, const double alpha, double one = 1.0, two = 2.0; if (!n) + { return; + } for (k = 0; k < n; ++k) { r = -cos((two * (double)k + one) * dth); if (k) + { r = 0.5 * (r + rlast); + } for (j = 1; j < STOP; ++j) { jacobfd(1, &r, &poly, &pder, n, alpha, beta); for (i = 0, sum = 0.0; i < k; ++i) + { sum += one / (r - z[i]); + } delr = -poly / (pder - sum * poly); r += delr; if (fabs(delr) < EPS) + { break; + } } z[k] = r; rlast = r; @@ -1612,7 +1706,9 @@ static void RecCoeff(const int n, double *a, double *b, const double alpha, double apb, apbi, a2b2; if (!n) + { return; + } // generate normalised terms apb = alpha + beta; @@ -1686,7 +1782,9 @@ static void TriQL(const int n, double *d, double *e, double **z) { dd = fabs(d[m]) + fabs(d[m + 1]); if (fabs(e[m]) + dd == dd) + { break; + } } if (m != l) { @@ -1747,11 +1845,13 @@ static void TriQL(const int n, double *d, double *e, double **z) k = i; p = d[i]; for (l = i + 1; l < n; ++l) + { if (d[l] < p) { k = l; p = d[l]; } + } d[k] = d[i]; d[i] = p; diff --git a/library/LibUtilities/Python/BasicUtils/SessionReader.cpp b/library/LibUtilities/Python/BasicUtils/SessionReader.cpp index 0881256069..f765fa4fa4 100644 --- a/library/LibUtilities/Python/BasicUtils/SessionReader.cpp +++ b/library/LibUtilities/Python/BasicUtils/SessionReader.cpp @@ -79,7 +79,7 @@ SessionReaderSharedPtr SessionReader_CreateInstance(py::list &ns) // Also make sure we set argv[argc] = NULL otherwise OpenMPI will also // segfault. - argv[argc] = NULL; + argv[argc] = nullptr; #ifdef NEKTAR_USE_MPI // In the case we're using MPI, it may already have been initialised. So to diff --git a/library/LibUtilities/Python/BasicUtils/SharedArray.cpp b/library/LibUtilities/Python/BasicUtils/SharedArray.cpp index c0f0a3b5a9..b7aa6602cd 100644 --- a/library/LibUtilities/Python/BasicUtils/SharedArray.cpp +++ b/library/LibUtilities/Python/BasicUtils/SharedArray.cpp @@ -49,7 +49,7 @@ template <typename T> void CapsuleDestructor(void *ptr) #else template <typename T> void CapsuleDestructor(PyObject *ptr) { - Array<OneD, T> *tmp = (Array<OneD, T> *)PyCapsule_GetPointer(ptr, 0); + Array<OneD, T> *tmp = (Array<OneD, T> *)PyCapsule_GetPointer(ptr, nullptr); delete tmp; } #endif @@ -66,7 +66,7 @@ template <typename T> struct OneDArrayToPython new Array<OneD, T>(arr), CapsuleDestructor<T>))); #else py::object capsule(py::handle<>( - PyCapsule_New(new Array<OneD, T>(arr), 0, + PyCapsule_New(new Array<OneD, T>(arr), nullptr, (PyCapsule_Destructor)&CapsuleDestructor<T>))); #endif PyObject *tmp = @@ -98,20 +98,20 @@ template <typename T> struct PythonToOneDArray np::dtype::get_builtin<typename boost::remove_const<T>::type>(); if (dtype != array.get_dtype()) { - return 0; + return nullptr; } // Check shape is 1D if (array.get_nd() != 1) { - return 0; + return nullptr; } } catch (boost::python::error_already_set &) { py::handle_exception(); PyErr_Clear(); - return 0; + return nullptr; } return objPtr; @@ -155,7 +155,7 @@ template <typename T> struct PythonToOneDArray if (PyCapsule_CheckExact(base.ptr())) { ptr = reinterpret_cast<Array<OneD, T> *>( - PyCapsule_GetPointer(base.ptr(), 0)); + PyCapsule_GetPointer(base.ptr(), nullptr)); } #endif diff --git a/library/LibUtilities/Python/LibUtilities.cpp b/library/LibUtilities/Python/LibUtilities.cpp index 316b0650e2..81a4eab3cc 100644 --- a/library/LibUtilities/Python/LibUtilities.cpp +++ b/library/LibUtilities/Python/LibUtilities.cpp @@ -60,7 +60,7 @@ PyObject *CreateExceptionClass(const char *name, std::string qualifiedName0 = std::string("NekPy.LibUtilities.") + name; PyObject *typeObj = PyErr_NewException( - const_cast<char *>(qualifiedName0.c_str()), baseTypeObj, 0); + const_cast<char *>(qualifiedName0.c_str()), baseTypeObj, nullptr); if (!typeObj) { diff --git a/library/LibUtilities/Python/LinearAlgebra/NekMatrix.cpp b/library/LibUtilities/Python/LinearAlgebra/NekMatrix.cpp index c6f0625ca0..58f4624114 100644 --- a/library/LibUtilities/Python/LinearAlgebra/NekMatrix.cpp +++ b/library/LibUtilities/Python/LinearAlgebra/NekMatrix.cpp @@ -50,7 +50,7 @@ template <typename T, typename F> void NekMatrixCapsuleDestructor(void *ptr) template <typename T, typename F> void NekMatrixCapsuleDestructor(PyObject *ptr) { std::shared_ptr<NekMatrix<T, F>> *mat = - (std::shared_ptr<NekMatrix<T, F>> *)PyCapsule_GetPointer(ptr, 0); + (std::shared_ptr<NekMatrix<T, F>> *)PyCapsule_GetPointer(ptr, nullptr); delete mat; } #endif @@ -70,7 +70,7 @@ template <typename T> struct NekMatrixToPython #else py::object capsule(py::handle<>(PyCapsule_New( (void *)new std::shared_ptr<NekMatrix<T, StandardMatrixTag>>(mat), - NULL, + nullptr, (PyCapsule_Destructor)&NekMatrixCapsuleDestructor< T, StandardMatrixTag>))); #endif diff --git a/library/LibUtilities/SimdLib/avx2.hpp b/library/LibUtilities/SimdLib/avx2.hpp index a7ecdecefb..25821a2073 100644 --- a/library/LibUtilities/SimdLib/avx2.hpp +++ b/library/LibUtilities/SimdLib/avx2.hpp @@ -47,10 +47,7 @@ #include <cmath> #include <vector> -namespace tinysimd -{ - -namespace abi +namespace tinysimd::abi { template <typename scalarType, int width = 0> struct avx2 @@ -58,10 +55,13 @@ template <typename scalarType, int width = 0> struct avx2 using type = void; }; -} // namespace abi +} // namespace tinysimd::abi #if defined(__AVX2__) && defined(NEKTAR_ENABLE_SIMD_AVX2) +namespace tinysimd +{ + // forward declaration of concrete types template <typename T> struct avx2Long4; template <typename T> struct avx2Int8; @@ -969,7 +969,6 @@ inline bool operator&&(avx2Mask8 lhs, bool rhs) return tmp && rhs; } -#endif // defined(__AVX2__) - } // namespace tinysimd +#endif // defined(__AVX2__) #endif diff --git a/library/LibUtilities/SimdLib/avx512.hpp b/library/LibUtilities/SimdLib/avx512.hpp index 97386dfc19..518681ef71 100644 --- a/library/LibUtilities/SimdLib/avx512.hpp +++ b/library/LibUtilities/SimdLib/avx512.hpp @@ -46,10 +46,7 @@ #include "traits.hpp" #include <vector> -namespace tinysimd -{ - -namespace abi +namespace tinysimd::abi { template <typename scalarType, int width = 0> struct avx512 @@ -57,10 +54,13 @@ template <typename scalarType, int width = 0> struct avx512 using type = void; }; -} // namespace abi +} // namespace tinysimd::abi #if defined(__AVX512F__) && defined(NEKTAR_ENABLE_SIMD_AVX512) +namespace tinysimd +{ + // forward declaration of concrete types template <typename T> struct avx512Long8; template <typename T> struct avx512Int16; @@ -978,7 +978,8 @@ inline bool operator&&(avx512Mask16 lhs, bool rhs) return tmp && rhs; } +} // namespace tinysimd + #endif // defined(__avx512__) -} // namespace tinysimd #endif diff --git a/library/LibUtilities/SimdLib/sse2.hpp b/library/LibUtilities/SimdLib/sse2.hpp index 68a02bd856..cbde465388 100644 --- a/library/LibUtilities/SimdLib/sse2.hpp +++ b/library/LibUtilities/SimdLib/sse2.hpp @@ -46,10 +46,7 @@ #include "traits.hpp" #include <cstdint> -namespace tinysimd -{ - -namespace abi +namespace tinysimd::abi { template <typename scalarType> struct sse2 @@ -57,10 +54,13 @@ template <typename scalarType> struct sse2 using type = void; }; -} // namespace abi +} // namespace tinysimd::abi #if defined(__SSE2__) && defined(NEKTAR_ENABLE_SIMD_SSE2) +namespace tinysimd +{ + // forward declaration of concrete types template <typename T> struct sse2Int4; @@ -183,7 +183,8 @@ template <typename T> struct sse2Int4 } }; +} // namespace tinysimd + #endif // defined(__SSE2__) && defined(NEKTAR_ENABLE_SIMD_SSE2) -} // namespace tinysimd #endif diff --git a/library/LibUtilities/SimdLib/sve.hpp b/library/LibUtilities/SimdLib/sve.hpp index 210a2264e1..91b4ad9842 100644 --- a/library/LibUtilities/SimdLib/sve.hpp +++ b/library/LibUtilities/SimdLib/sve.hpp @@ -44,22 +44,22 @@ #include "traits.hpp" #include <vector> -namespace tinysimd -{ - -namespace abi +namespace tinysimd::abi { - template <typename scalarType, int width = 0> struct sve { using type = void; }; -} // namespace abi +} // namespace tinysimd::abi // requires clang >= 12.0.0 or gcc >= 10 // requires -msve-vector-bits=<length> #if __ARM_FEATURE_SVE_BITS > 0 && defined(NEKTAR_ENABLE_SIMD_SVE) + +namespace tinysimd +{ + // from VLA to VLST // C++ does not allow for incomplete class member types // to get around that we force a known size at compile time @@ -992,7 +992,8 @@ inline bool operator&&(sveMask32 lhs, bool rhs) return tmp && rhs; } +} // namespace tinysimd + #endif // defined(__ARM_FEATURE_SVE_BITS) -} // namespace tinysimd #endif diff --git a/library/LibUtilities/TimeIntegration/AdamsBashforthTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/AdamsBashforthTimeIntegrationSchemes.h index 0c99fff08c..62e4ed97e6 100644 --- a/library/LibUtilities/TimeIntegration/AdamsBashforthTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/AdamsBashforthTimeIntegrationSchemes.h @@ -47,9 +47,7 @@ #include <LibUtilities/TimeIntegration/RungeKuttaTimeIntegrationSchemes.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -121,7 +119,7 @@ public: } } - virtual ~AdamsBashforthTimeIntegrationScheme() + ~AdamsBashforthTimeIntegrationScheme() override { } @@ -217,12 +215,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("AdamsBashforth"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { if (GetOrder() == 1) { @@ -374,7 +372,6 @@ protected: }; // end class AdamsBashforthOrder4TimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/AdamsMoultonTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/AdamsMoultonTimeIntegrationSchemes.h index e73ff01c00..c70b58eca3 100644 --- a/library/LibUtilities/TimeIntegration/AdamsMoultonTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/AdamsMoultonTimeIntegrationSchemes.h @@ -47,9 +47,7 @@ #include <LibUtilities/TimeIntegration/DIRKTimeIntegrationSchemes.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -119,7 +117,7 @@ public: } } - virtual ~AdamsMoultonTimeIntegrationScheme() + ~AdamsMoultonTimeIntegrationScheme() override { } @@ -216,12 +214,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("AdamsMoulton"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -358,7 +356,6 @@ protected: }; // end class AdamsMoultonOrder4TimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/BDFImplicitTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/BDFImplicitTimeIntegrationSchemes.h index 3de1a4c75e..159be3e98e 100644 --- a/library/LibUtilities/TimeIntegration/BDFImplicitTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/BDFImplicitTimeIntegrationSchemes.h @@ -47,9 +47,7 @@ #include <LibUtilities/TimeIntegration/DIRKTimeIntegrationSchemes.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -77,8 +75,10 @@ public: // Next to last phase if (order > 1) + { BDFImplicitTimeIntegrationScheme::SetupSchemeData( m_integration_phases[order - 2], order - 1); + } // Last phase BDFImplicitTimeIntegrationScheme::SetupSchemeData( @@ -117,7 +117,7 @@ public: } } - virtual ~BDFImplicitTimeIntegrationScheme() + ~BDFImplicitTimeIntegrationScheme() override { } @@ -207,12 +207,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("BDFImplicit"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -345,7 +345,6 @@ protected: }; // end class BDFImplicitOrder4TimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/CNABTimeIntegrationScheme.h b/library/LibUtilities/TimeIntegration/CNABTimeIntegrationScheme.h index c235214076..8f251d57eb 100644 --- a/library/LibUtilities/TimeIntegration/CNABTimeIntegrationScheme.h +++ b/library/LibUtilities/TimeIntegration/CNABTimeIntegrationScheme.h @@ -42,13 +42,10 @@ #define LUE LIB_UTILITIES_EXPORT -#include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> - #include <LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h> +#include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class CNABTimeIntegrationScheme : public TimeIntegrationSchemeGLM @@ -74,7 +71,7 @@ public: CNABTimeIntegrationScheme::SetupSchemeData(m_integration_phases[1]); } - virtual ~CNABTimeIntegrationScheme() + ~CNABTimeIntegrationScheme() override { } @@ -152,12 +149,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("CNAB"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -166,7 +163,6 @@ protected: }; // end class CNABTimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/DIRKTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/DIRKTimeIntegrationSchemes.h index 12359ab92e..472be0b655 100644 --- a/library/LibUtilities/TimeIntegration/DIRKTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/DIRKTimeIntegrationSchemes.h @@ -46,9 +46,7 @@ using namespace std; #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -87,7 +85,7 @@ public: } } - virtual ~DIRKTimeIntegrationScheme() + ~DIRKTimeIntegrationScheme() override { } @@ -335,12 +333,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("DIRK"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -503,7 +501,6 @@ protected: static std::string TimeIntegrationMethodLookupId; }; // end class DIRKOrder4_ES6TimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/EulerExponentialTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/EulerExponentialTimeIntegrationSchemes.h index 01e8c5c4f1..22a0af8961 100644 --- a/library/LibUtilities/TimeIntegration/EulerExponentialTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/EulerExponentialTimeIntegrationSchemes.h @@ -91,7 +91,7 @@ public: } } - virtual ~EulerExponentialTimeIntegrationScheme() + ~EulerExponentialTimeIntegrationScheme() override { } @@ -205,23 +205,23 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("EulerExponential"); } - LUE virtual std::string v_GetFullName() const override + LUE std::string v_GetFullName() const override { return GetVariant() + GetName() + "Order" + std::to_string(GetOrder()); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } - virtual void v_InitializeSecondaryData(TimeIntegrationAlgorithmGLM *phase, - NekDouble deltaT) const override + void v_InitializeSecondaryData(TimeIntegrationAlgorithmGLM *phase, + NekDouble deltaT) const override { /** * \brief Lambda Matrix Assumption, member variable phase->m_L @@ -396,7 +396,9 @@ protected: // B evaluation value shuffling second row first column. if (phase->m_order > 1) + { phase->m_B_phi[k][1][0] = 1.0; // constant 1 + } // U Curent time step evaluation first row first column. phase->m_U_phi[k][0][0] = 1.0; // constant 1 diff --git a/library/LibUtilities/TimeIntegration/EulerTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/EulerTimeIntegrationSchemes.h index dc7092f4d1..f3d792b911 100644 --- a/library/LibUtilities/TimeIntegration/EulerTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/EulerTimeIntegrationSchemes.h @@ -45,9 +45,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -74,7 +72,7 @@ public: variant); } - virtual ~EulerTimeIntegrationScheme() + ~EulerTimeIntegrationScheme() override { } @@ -139,17 +137,17 @@ public: } protected: - LUE virtual std::string v_GetFullName() const override + LUE std::string v_GetFullName() const override { return m_integration_phases.back()->m_name; } - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("Euler"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { if (GetVariant() == "Backward") { @@ -225,7 +223,6 @@ protected: }; // end class ForwardEulerTimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/ExplicitTimeIntegrationSchemeSDC.h b/library/LibUtilities/TimeIntegration/ExplicitTimeIntegrationSchemeSDC.h index 49e96b1ea5..0c5ec79bbb 100644 --- a/library/LibUtilities/TimeIntegration/ExplicitTimeIntegrationSchemeSDC.h +++ b/library/LibUtilities/TimeIntegration/ExplicitTimeIntegrationSchemeSDC.h @@ -41,9 +41,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class ExplicitTimeIntegrationSchemeSDC : public TimeIntegrationSchemeSDC { @@ -69,19 +67,17 @@ public: static std::string className; protected: - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual void v_ResidualEval(const NekDouble &delta_t, - const size_t n) override; - - LUE virtual void v_ResidualEval(const NekDouble &delta_t) override; + LUE void v_ResidualEval(const NekDouble &delta_t, const size_t n) override; - LUE virtual void v_ComputeInitialGuess(const NekDouble &delta_t) override; + LUE void v_ResidualEval(const NekDouble &delta_t) override; - LUE virtual void v_SDCIterationLoop(const NekDouble &delta_t) override; + LUE void v_ComputeInitialGuess(const NekDouble &delta_t) override; + LUE void v_SDCIterationLoop(const NekDouble &delta_t) override; }; // end class ExplicitTimeIntegrationSchemeSDC /** @@ -182,7 +178,6 @@ void ExplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop( } } -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/IMEXGearTimeIntegrationScheme.h b/library/LibUtilities/TimeIntegration/IMEXGearTimeIntegrationScheme.h index fa1d304d1a..953db71467 100644 --- a/library/LibUtilities/TimeIntegration/IMEXGearTimeIntegrationScheme.h +++ b/library/LibUtilities/TimeIntegration/IMEXGearTimeIntegrationScheme.h @@ -46,9 +46,7 @@ #include <LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class IMEXGearTimeIntegrationScheme : public TimeIntegrationSchemeGLM @@ -72,7 +70,7 @@ public: IMEXGearTimeIntegrationScheme::SetupSchemeData(m_integration_phases[1]); } - virtual ~IMEXGearTimeIntegrationScheme() + ~IMEXGearTimeIntegrationScheme() override { } @@ -147,12 +145,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("IMEX"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -161,7 +159,6 @@ protected: }; // end class IMEXGearTimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemeSDC.h b/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemeSDC.h index 3cf0f4cb18..e87263bb0e 100644 --- a/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemeSDC.h +++ b/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemeSDC.h @@ -41,9 +41,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class IMEXTimeIntegrationSchemeSDC : public TimeIntegrationSchemeSDC { @@ -84,18 +82,17 @@ public: DoubleArray m_tmp; /// Array for temporary storage protected: - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual void v_ResidualEval(const NekDouble &delta_t, - const size_t n) override; + LUE void v_ResidualEval(const NekDouble &delta_t, const size_t n) override; - LUE virtual void v_ResidualEval(const NekDouble &delta_t) override; + LUE void v_ResidualEval(const NekDouble &delta_t) override; - LUE virtual void v_ComputeInitialGuess(const NekDouble &delta_t) override; + LUE void v_ComputeInitialGuess(const NekDouble &delta_t) override; - LUE virtual void v_SDCIterationLoop(const NekDouble &delta_t) override; + LUE void v_SDCIterationLoop(const NekDouble &delta_t) override; private: void ComputeTotalResidual(const size_t n); @@ -282,7 +279,6 @@ void IMEXTimeIntegrationSchemeSDC::ComputeTotalResidual(const size_t n) } } -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemes.h index 9bd8474158..4e4362e783 100644 --- a/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/IMEXTimeIntegrationSchemes.h @@ -48,9 +48,7 @@ #include <LibUtilities/TimeIntegration/IMEXGearTimeIntegrationScheme.h> #include <LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -167,7 +165,7 @@ public: } } - virtual ~IMEXTimeIntegrationScheme() + ~IMEXTimeIntegrationScheme() override { } @@ -252,7 +250,9 @@ public: for (size_t n = 1; n < 2 * phase->m_order; ++n) { if (n != phase->m_order) + { phase->m_V[n][n - 1] = 1.0; // constant 1 + } } phase->m_numMultiStepValues = phase->m_order; @@ -272,17 +272,17 @@ public: } protected: - LUE virtual std::string v_GetFullName() const override + LUE std::string v_GetFullName() const override { return m_integration_phases.back()->m_name; } - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("IMEX"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -411,7 +411,6 @@ protected: }; // end class IMEXOrder4TimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h index 8ddf25c871..020d36c6fa 100644 --- a/library/LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h @@ -45,9 +45,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -88,7 +86,7 @@ public: } } - virtual ~IMEXdirkTimeIntegrationScheme() + ~IMEXdirkTimeIntegrationScheme() override { } @@ -425,17 +423,17 @@ public: } protected: - LUE virtual std::string v_GetFullName() const override + LUE std::string v_GetFullName() const override { return m_integration_phases.back()->m_name; } - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("IMEX"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -456,7 +454,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_1_1_1TimeIntegrationScheme() + ~IMEXdirk_1_1_1TimeIntegrationScheme() override { } @@ -494,7 +492,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_1_2_1TimeIntegrationScheme() + ~IMEXdirk_1_2_1TimeIntegrationScheme() override { } @@ -532,7 +530,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_1_2_2TimeIntegrationScheme() + ~IMEXdirk_1_2_2TimeIntegrationScheme() override { } @@ -570,7 +568,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_2_2_2TimeIntegrationScheme() + ~IMEXdirk_2_2_2TimeIntegrationScheme() override { } @@ -608,7 +606,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_2_3_2TimeIntegrationScheme() + ~IMEXdirk_2_3_2TimeIntegrationScheme() override { } @@ -647,7 +645,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_2_3_3TimeIntegrationScheme() + ~IMEXdirk_2_3_3TimeIntegrationScheme() override { } @@ -686,7 +684,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_3_4_3TimeIntegrationScheme() + ~IMEXdirk_3_4_3TimeIntegrationScheme() override { } @@ -725,7 +723,7 @@ public: boost::ignore_unused(freeParams); } - virtual ~IMEXdirk_4_4_3TimeIntegrationScheme() + ~IMEXdirk_4_4_3TimeIntegrationScheme() override { } @@ -750,7 +748,6 @@ protected: }; // end class IMEXdirk_4_4_3TimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/ImplicitTimeIntegrationSchemeSDC.h b/library/LibUtilities/TimeIntegration/ImplicitTimeIntegrationSchemeSDC.h index 3bf3c76eb1..41c81d7676 100644 --- a/library/LibUtilities/TimeIntegration/ImplicitTimeIntegrationSchemeSDC.h +++ b/library/LibUtilities/TimeIntegration/ImplicitTimeIntegrationSchemeSDC.h @@ -41,9 +41,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class ImplicitTimeIntegrationSchemeSDC : public TimeIntegrationSchemeSDC { @@ -75,19 +73,17 @@ public: DoubleArray m_tmp; /// Array for temporary storage protected: - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual void v_ResidualEval(const NekDouble &delta_t, - const size_t n) override; - - LUE virtual void v_ResidualEval(const NekDouble &delta_t) override; + LUE void v_ResidualEval(const NekDouble &delta_t, const size_t n) override; - LUE virtual void v_ComputeInitialGuess(const NekDouble &delta_t) override; + LUE void v_ResidualEval(const NekDouble &delta_t) override; - LUE virtual void v_SDCIterationLoop(const NekDouble &delta_t) override; + LUE void v_ComputeInitialGuess(const NekDouble &delta_t) override; + LUE void v_SDCIterationLoop(const NekDouble &delta_t) override; }; // end class ImplicitTimeIntegrationSchemeSDC /** @@ -207,7 +203,6 @@ void ImplicitTimeIntegrationSchemeSDC::v_SDCIterationLoop( } } -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/MCNABTimeIntegrationScheme.h b/library/LibUtilities/TimeIntegration/MCNABTimeIntegrationScheme.h index af9d99697c..74a5b7d1b8 100644 --- a/library/LibUtilities/TimeIntegration/MCNABTimeIntegrationScheme.h +++ b/library/LibUtilities/TimeIntegration/MCNABTimeIntegrationScheme.h @@ -44,9 +44,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class MCNABTimeIntegrationScheme : public TimeIntegrationSchemeGLM @@ -74,7 +72,7 @@ public: MCNABTimeIntegrationScheme::SetupSchemeData(m_integration_phases[2]); } - virtual ~MCNABTimeIntegrationScheme() + ~MCNABTimeIntegrationScheme() override { } @@ -154,12 +152,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("MCNAB"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } @@ -168,7 +166,6 @@ protected: }; // end class MCNABTimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.cpp b/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.cpp index b81c8443ae..49558dd8fa 100644 --- a/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.cpp +++ b/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Access Methods @@ -118,5 +116,4 @@ void NoSchemeTimeIntegrationScheme::v_printFull(std::ostream &os) const os << "Time Integration Scheme: " << GetFullName() << std::endl; } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.h b/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.h index 6c68a95fa5..de3eeda3fc 100644 --- a/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.h +++ b/library/LibUtilities/TimeIntegration/NoSchemeTimeIntegrationScheme.h @@ -40,9 +40,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -57,7 +55,7 @@ public: { boost::ignore_unused(variant, order, freeParams); } - virtual ~NoSchemeTimeIntegrationScheme() + ~NoSchemeTimeIntegrationScheme() override { } @@ -72,16 +70,15 @@ public: } // Access methods - LUE virtual std::string v_GetName() const override; + LUE std::string v_GetName() const override; // Values stored by each integration phase. - LUE virtual std::string v_GetVariant() const override; - LUE virtual size_t v_GetOrder() const override; - LUE virtual std::vector<NekDouble> v_GetFreeParams() const override; + LUE std::string v_GetVariant() const override; + LUE size_t v_GetOrder() const override; + LUE std::vector<NekDouble> v_GetFreeParams() const override; - LUE virtual NekDouble v_GetTimeStability() const override; + LUE NekDouble v_GetTimeStability() const override; - LUE virtual TimeIntegrationSchemeType v_GetIntegrationSchemeType() - const override; + LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override; LUE size_t v_GetNumIntegrationPhases() const override; @@ -99,16 +96,16 @@ public: } // The worker methods - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual ConstDoubleArray &v_TimeIntegrate( - const size_t timestep, const NekDouble delta_t) override; + LUE ConstDoubleArray &v_TimeIntegrate(const size_t timestep, + const NekDouble delta_t) override; - LUE virtual void v_print(std::ostream &os) const override; - LUE virtual void v_printFull(std::ostream &os) const override; - LUE virtual TripleArray &v_UpdateSolutionVector() override; + LUE void v_print(std::ostream &os) const override; + LUE void v_printFull(std::ostream &os) const override; + LUE TripleArray &v_UpdateSolutionVector() override; static std::string className; @@ -119,7 +116,6 @@ protected: }; // end class TimeIntegrationScheme -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/RungeKuttaTimeIntegrationSchemes.h b/library/LibUtilities/TimeIntegration/RungeKuttaTimeIntegrationSchemes.h index 8b96925301..c5b37e1e46 100644 --- a/library/LibUtilities/TimeIntegration/RungeKuttaTimeIntegrationSchemes.h +++ b/library/LibUtilities/TimeIntegration/RungeKuttaTimeIntegrationSchemes.h @@ -45,9 +45,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { //////////////////////////////////////////////////////////////////////////////// @@ -80,7 +78,7 @@ public: m_integration_phases[0], variant, order, freeParams); } - virtual ~RungeKuttaTimeIntegrationScheme() + ~RungeKuttaTimeIntegrationScheme() override { } @@ -276,12 +274,12 @@ public: } protected: - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return std::string("RungeKutta"); } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { if (GetOrder() == 1 || GetOrder() == 2) { @@ -571,7 +569,6 @@ protected: }; // end class RungeKutta3_SSPTimeIntegrationScheme -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/SchemeInitializer.cpp b/library/LibUtilities/TimeIntegration/SchemeInitializer.cpp index 6bf4580640..1c330e1b52 100644 --- a/library/LibUtilities/TimeIntegration/SchemeInitializer.cpp +++ b/library/LibUtilities/TimeIntegration/SchemeInitializer.cpp @@ -58,9 +58,7 @@ #include <LibUtilities/BasicUtils/SessionReader.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Register all the schemes with the Time Integration Scheme Factory... @@ -217,5 +215,4 @@ std::string TimeIntegrationSchemeGEM::className = GetTimeIntegrationSchemeFactory().RegisterCreatorFunction( "ExtrapolationMethod", TimeIntegrationSchemeGEM::create); -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.cpp index 83bed25d33..217f6d2528 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.cpp @@ -44,9 +44,7 @@ #include <cmath> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { //////////////////////////////////////////////////////////////////////////////// @@ -1090,5 +1088,4 @@ std::ostream &operator<<(std::ostream &os, return os; } // end function operator<< -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.h b/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.h index cdcb51e213..ae06eb8753 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.h @@ -44,9 +44,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeOperators.h> #include <LibUtilities/TimeIntegration/TimeIntegrationTypes.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class TimeIntegrationAlgorithmGLM @@ -390,7 +388,6 @@ LUE std::ostream &operator<<(std::ostream &os, // ========================================================================= -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.cpp index f43400bfe8..c3de2d66b1 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.cpp @@ -39,9 +39,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { TimeIntegrationSchemeFactory &GetTimeIntegrationSchemeFactory() @@ -72,5 +70,4 @@ std::ostream &operator<<(std::ostream &os, return os; } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.h b/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.h index fafc6b6797..24e619faa2 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationScheme.h @@ -53,9 +53,7 @@ #define LUE LIB_UTILITIES_EXPORT -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /// Datatype of the NekFactory used to instantiate classes derived from the @@ -227,7 +225,6 @@ LUE std::ostream &operator<<(std::ostream &os, LUE std::ostream &operator<<(std::ostream &os, const TimeIntegrationSchemeSharedPtr &rhs); -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.cpp index c37277f98e..e69a7c89e0 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.cpp @@ -39,9 +39,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** * @class FractionalInTimeIntegrationScheme @@ -144,9 +142,13 @@ void FractionalInTimeIntegrationScheme::v_InitializeScheme( { // Store the initial values as the first previous state. if (m == 0) + { m_u[m][i][j] = m_u0[i][j]; + } else + { m_u[m][i][j] = 0; + } } } } @@ -734,12 +736,16 @@ void FractionalInTimeIntegrationScheme::integralClassInitialize( for (size_t q = 0; q < m_nQuadPts; ++q) { if (m == 0) + { instance.Eh[0][q] = 1. / instance.z[q] * (exp(instance.z[q] * m_deltaT) - 1.0); + } else + { instance.Eh[m][q] = -1. / instance.z[q] + NekDouble(m) / (instance.z[q] * m_deltaT) * instance.Eh[m - 1][q]; + } } } @@ -937,7 +943,9 @@ void FractionalInTimeIntegrationScheme::timeAdvance(const size_t timeStep, { // y * instance.E if (m == 0) + { y[i][j][q] *= instance.E[q]; + } // F * instance.AtEh y[i][j][q] += m_F[i][j] * instance.AtEh[m][q]; @@ -1077,5 +1085,4 @@ std::ostream &operator<<(std::ostream &os, return os; } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.h b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.h index 8454ebe957..06132085f4 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeFIT.h @@ -46,9 +46,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -61,7 +59,7 @@ public: std::vector<NekDouble> freeParams); /// Destructor - virtual ~FractionalInTimeIntegrationScheme() + ~FractionalInTimeIntegrationScheme() override { } @@ -87,38 +85,37 @@ public: protected: // Access methods from the base class that are virtual - LUE virtual std::string v_GetName() const override + LUE std::string v_GetName() const override { return m_name; } - LUE virtual std::string v_GetVariant() const override + LUE std::string v_GetVariant() const override { return m_variant; } - LUE virtual size_t v_GetOrder() const override + LUE size_t v_GetOrder() const override { return m_order; } - LUE virtual std::vector<NekDouble> v_GetFreeParams() const override + LUE std::vector<NekDouble> v_GetFreeParams() const override { return m_freeParams; } - LUE virtual TimeIntegrationSchemeType v_GetIntegrationSchemeType() - const override + LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override { return m_schemeType; } - LUE virtual NekDouble v_GetTimeStability() const override + LUE NekDouble v_GetTimeStability() const override { return 1.0; } - LUE virtual size_t v_GetNumIntegrationPhases() const override + LUE size_t v_GetNumIntegrationPhases() const override { return 1; } @@ -126,11 +123,11 @@ protected: /** * \brief Gets the solution vector of the ODE */ - virtual const TripleArray &v_GetSolutionVector() const override + const TripleArray &v_GetSolutionVector() const override { return m_u; } - virtual TripleArray &v_UpdateSolutionVector() override + TripleArray &v_UpdateSolutionVector() override { return m_u; } @@ -138,22 +135,21 @@ protected: /** * \brief Sets the solution vector of the ODE */ - virtual void v_SetSolutionVector(const size_t Offset, - const DoubleArray &y) override + void v_SetSolutionVector(const size_t Offset, const DoubleArray &y) override { m_u[Offset] = y; } // The worker methods from the base class that are virtual - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual ConstDoubleArray &v_TimeIntegrate( - const size_t timestep, const NekDouble delta_t) override; + LUE ConstDoubleArray &v_TimeIntegrate(const size_t timestep, + const NekDouble delta_t) override; - LUE virtual void v_print(std::ostream &os) const override; - LUE virtual void v_printFull(std::ostream &os) const override; + LUE void v_print(std::ostream &os) const override; + LUE void v_printFull(std::ostream &os) const override; struct Instance { @@ -306,7 +302,6 @@ LUE std::ostream &operator<<(std::ostream &os, LUE std::ostream &operator<<( std::ostream &os, const FractionalInTimeIntegrationSchemeSharedPtr &rhs); -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.cpp index 5d8010bc00..10b08380a5 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string TimeIntegrationSchemeGEM::v_GetName() const @@ -446,5 +444,4 @@ std::ostream &operator<<(std::ostream &os, return os; } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.h b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.h index f5945b20c0..076136d874 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGEM.h @@ -42,9 +42,7 @@ #include <LibUtilities/BasicUtils/VmathArray.hpp> #include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -110,7 +108,7 @@ public: } /// Destructor - virtual ~TimeIntegrationSchemeGEM() + ~TimeIntegrationSchemeGEM() override { } @@ -127,25 +125,24 @@ public: static std::string className; protected: - LUE virtual std::string v_GetName() const override; - LUE virtual std::string v_GetVariant() const override; - LUE virtual size_t v_GetOrder() const override; - LUE virtual std::vector<NekDouble> v_GetFreeParams() const override; - LUE virtual TimeIntegrationSchemeType v_GetIntegrationSchemeType() - const override; - LUE virtual NekDouble v_GetTimeStability() const override; - LUE virtual size_t v_GetNumIntegrationPhases() const override; - LUE virtual const TripleArray &v_GetSolutionVector() const override; - LUE virtual TripleArray &v_UpdateSolutionVector() override; - LUE virtual void v_SetSolutionVector(const size_t Offset, - const DoubleArray &y) override; - LUE virtual void v_InitializeScheme( + LUE std::string v_GetName() const override; + LUE std::string v_GetVariant() const override; + LUE size_t v_GetOrder() const override; + LUE std::vector<NekDouble> v_GetFreeParams() const override; + LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override; + LUE NekDouble v_GetTimeStability() const override; + LUE size_t v_GetNumIntegrationPhases() const override; + LUE const TripleArray &v_GetSolutionVector() const override; + LUE TripleArray &v_UpdateSolutionVector() override; + LUE void v_SetSolutionVector(const size_t Offset, + const DoubleArray &y) override; + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual ConstDoubleArray &v_TimeIntegrate( - const size_t timestep, const NekDouble delta_t) override; - LUE virtual void v_print(std::ostream &os) const override; - LUE virtual void v_printFull(std::ostream &os) const override; + LUE ConstDoubleArray &v_TimeIntegrate(const size_t timestep, + const NekDouble delta_t) override; + LUE void v_print(std::ostream &os) const override; + LUE void v_printFull(std::ostream &os) const override; // Variables common to all schemes. NekDouble m_time; @@ -176,7 +173,6 @@ LUE std::ostream &operator<<(std::ostream &os, LUE std::ostream &operator<<(std::ostream &os, const TimeIntegrationSchemeGEMSharedPtr &rhs); -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.cpp index 4b2a05bbfd..be6298b8d9 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Access Methods @@ -160,5 +158,4 @@ std::ostream &operator<<(std::ostream &os, return os; } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h index 97b6cf123c..33c189098e 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h @@ -40,9 +40,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h> #include <LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /** @@ -65,44 +63,43 @@ public: protected: // Values stored by each integration phase. - LUE virtual std::string v_GetVariant() const override; - LUE virtual size_t v_GetOrder() const override; - LUE virtual std::vector<NekDouble> v_GetFreeParams() const override; - LUE virtual TimeIntegrationSchemeType v_GetIntegrationSchemeType() - const override; - LUE virtual size_t v_GetNumIntegrationPhases() const override; + LUE std::string v_GetVariant() const override; + LUE size_t v_GetOrder() const override; + LUE std::vector<NekDouble> v_GetFreeParams() const override; + LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override; + LUE size_t v_GetNumIntegrationPhases() const override; // Gets the solution Vector - LUE virtual const TripleArray &v_GetSolutionVector() const override + LUE const TripleArray &v_GetSolutionVector() const override { return m_solVector->GetSolutionVector(); } - LUE virtual TripleArray &v_UpdateSolutionVector() override + LUE TripleArray &v_UpdateSolutionVector() override { return m_solVector->UpdateSolutionVector(); } // Sets the solution Vector - LUE virtual void v_SetSolutionVector(const size_t Offset, - const DoubleArray &y) override + LUE void v_SetSolutionVector(const size_t Offset, + const DoubleArray &y) override { m_solVector->SetSolutionVector(Offset, y); } // The worker methods - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual ConstDoubleArray &v_TimeIntegrate( - const size_t timestep, const NekDouble delta_t) override; + LUE ConstDoubleArray &v_TimeIntegrate(const size_t timestep, + const NekDouble delta_t) override; LUE virtual void v_InitializeSecondaryData( TimeIntegrationAlgorithmGLM *phase, NekDouble deltaT) const; - LUE virtual void v_print(std::ostream &os) const override; - LUE virtual void v_printFull(std::ostream &os) const override; + LUE void v_print(std::ostream &os) const override; + LUE void v_printFull(std::ostream &os) const override; // These methods should never be used directly, only used by child classes. LUE TimeIntegrationSchemeGLM(std::string variant, size_t order, @@ -112,7 +109,7 @@ protected: boost::ignore_unused(variant, order, freeParams); } - virtual ~TimeIntegrationSchemeGLM() + ~TimeIntegrationSchemeGLM() override { } @@ -127,7 +124,6 @@ LUE std::ostream &operator<<(std::ostream &os, LUE std::ostream &operator<<(std::ostream &os, const TimeIntegrationSchemeGLMSharedPtr &rhs); -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeOperators.h b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeOperators.h index a5c2707d9b..509be9892a 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeOperators.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeOperators.h @@ -49,9 +49,7 @@ #define LUE LIB_UTILITIES_EXPORT -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class TimeIntegrationSchemeOperators; @@ -140,7 +138,6 @@ protected: private: }; -} // namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.cpp index ba1dfcf944..76c49dcf64 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { std::string TimeIntegrationSchemeSDC::v_GetName() const @@ -359,5 +357,4 @@ std::ostream &operator<<(std::ostream &os, return os; } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h index aa0b4a2ed5..aaca036abd 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSchemeSDC.h @@ -46,9 +46,7 @@ #include <LibUtilities/Polylib/Polylib.h> #include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { /////////////////////////////////////////////////////////////////////////////// @@ -173,7 +171,7 @@ public: } /// Destructor - virtual ~TimeIntegrationSchemeSDC() + ~TimeIntegrationSchemeSDC() override { } @@ -311,34 +309,33 @@ public: LUE void UpdateIntegratedResidualQFint(const NekDouble &delta_t); protected: - LUE virtual std::string v_GetName() const override; - LUE virtual std::string v_GetVariant() const override; - LUE virtual size_t v_GetOrder() const override; - LUE virtual std::vector<NekDouble> v_GetFreeParams() const override; - LUE virtual TimeIntegrationSchemeType v_GetIntegrationSchemeType() - const override; - LUE virtual NekDouble v_GetTimeStability() const override; - LUE virtual size_t v_GetNumIntegrationPhases() const override; + LUE std::string v_GetName() const override; + LUE std::string v_GetVariant() const override; + LUE size_t v_GetOrder() const override; + LUE std::vector<NekDouble> v_GetFreeParams() const override; + LUE TimeIntegrationSchemeType v_GetIntegrationSchemeType() const override; + LUE NekDouble v_GetTimeStability() const override; + LUE size_t v_GetNumIntegrationPhases() const override; /** * \brief Gets the solution vector of the ODE */ - LUE virtual const TripleArray &v_GetSolutionVector() const override; - LUE virtual TripleArray &v_UpdateSolutionVector() override; + LUE const TripleArray &v_GetSolutionVector() const override; + LUE TripleArray &v_UpdateSolutionVector() override; /** * \brief Sets the solution vector of the ODE */ - LUE virtual void v_SetSolutionVector(const size_t Offset, - const DoubleArray &y) override; + LUE void v_SetSolutionVector(const size_t Offset, + const DoubleArray &y) override; // The worker methods from the base class that are virtual - LUE virtual void v_InitializeScheme( + LUE void v_InitializeScheme( const NekDouble deltaT, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op) override; - LUE virtual ConstDoubleArray &v_TimeIntegrate( - const size_t timestep, const NekDouble delta_t) override; + LUE ConstDoubleArray &v_TimeIntegrate(const size_t timestep, + const NekDouble delta_t) override; LUE virtual void v_ResidualEval(const NekDouble &delta_t, const size_t n) { @@ -368,8 +365,8 @@ protected: boost::ignore_unused(delta_t); } - LUE virtual void v_print(std::ostream &os) const override; - LUE virtual void v_printFull(std::ostream &os) const override; + LUE void v_print(std::ostream &os) const override; + LUE void v_printFull(std::ostream &os) const override; // Variables common to all schemes NekDouble m_time; @@ -406,7 +403,6 @@ protected: }; // end class TimeIntegrationSchemeSDC -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.cpp b/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.cpp index 856e3c06f0..42307d4bc5 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.cpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.cpp @@ -36,9 +36,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationSchemeGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { TimeIntegrationSolutionGLM::TimeIntegrationSolutionGLM( @@ -106,5 +104,4 @@ TimeIntegrationSolutionGLM::TimeIntegrationSolutionGLM( { } -} // end namespace LibUtilities -} // namespace Nektar +} // namespace Nektar::LibUtilities diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.h b/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.h index 2318752c49..398e68aa72 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.h +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationSolutionGLM.h @@ -40,9 +40,7 @@ #include <LibUtilities/TimeIntegration/TimeIntegrationAlgorithmGLM.h> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { class TimeIntegrationSolutionGLM @@ -354,7 +352,6 @@ private: }; // end class TimeIntegrationSolutionGLM -} // end of namespace LibUtilities -} // end of namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LibUtilities/TimeIntegration/TimeIntegrationTypes.hpp b/library/LibUtilities/TimeIntegration/TimeIntegrationTypes.hpp index 90480cb61f..45bd6d7d8f 100644 --- a/library/LibUtilities/TimeIntegration/TimeIntegrationTypes.hpp +++ b/library/LibUtilities/TimeIntegration/TimeIntegrationTypes.hpp @@ -38,9 +38,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> -namespace Nektar -{ -namespace LibUtilities +namespace Nektar::LibUtilities { // Typedefs double arrays @@ -139,7 +137,6 @@ enum TimeIntegrationSchemeType eFractionalInTime, //!< Fractional in Time scheme }; -} // end namespace LibUtilities -} // end namespace Nektar +} // namespace Nektar::LibUtilities #endif diff --git a/library/LocalRegions/Expansion.cpp b/library/LocalRegions/Expansion.cpp index d78878a0bc..932910b210 100644 --- a/library/LocalRegions/Expansion.cpp +++ b/library/LocalRegions/Expansion.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { Expansion::Expansion(SpatialDomains::GeometrySharedPtr pGeom) : m_indexMapManager( @@ -72,7 +70,7 @@ Expansion::Expansion(SpatialDomains::GeometrySharedPtr pGeom) NEKERROR(ErrorUtil::ewarning, err.str()); } - m_traceExp.empty(); + m_traceExp.clear(); } Expansion::Expansion(const Expansion &pSrc) @@ -931,5 +929,4 @@ void Expansion::v_AlignVectorToCollapsedDir( boost::ignore_unused(dir, inarray, outarray); NEKERROR(ErrorUtil::efatal, "v_AlignVectorToCollapsedDir is not defined"); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/Expansion.h b/library/LocalRegions/Expansion.h index 168f07ac0b..716302fc40 100644 --- a/library/LocalRegions/Expansion.h +++ b/library/LocalRegions/Expansion.h @@ -44,9 +44,7 @@ #include <memory> #include <vector> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class Expansion; @@ -76,7 +74,7 @@ public: LOCAL_REGIONS_EXPORT Expansion( SpatialDomains::GeometrySharedPtr pGeom); // default constructor. LOCAL_REGIONS_EXPORT Expansion(const Expansion &pSrc); // copy constructor. - LOCAL_REGIONS_EXPORT virtual ~Expansion(); + LOCAL_REGIONS_EXPORT ~Expansion() override; LOCAL_REGIONS_EXPORT void SetTraceExp(const int traceid, ExpansionSharedPtr &f); @@ -302,7 +300,7 @@ protected: Array<OneD, NekDouble> GetMFMag(const int dir, const StdRegions::VarCoeffMap &varcoeffs); - virtual void v_MultiplyByQuadratureMetric( + void v_MultiplyByQuadratureMetric( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -314,14 +312,14 @@ protected: { } - virtual int v_GetCoordim() const override + int v_GetCoordim() const override { return m_geom->GetCoordim(); } - virtual void v_GetCoords(Array<OneD, NekDouble> &coords_1, - Array<OneD, NekDouble> &coords_2, - Array<OneD, NekDouble> &coords_3) override; + void v_GetCoords(Array<OneD, NekDouble> &coords_1, + Array<OneD, NekDouble> &coords_2, + Array<OneD, NekDouble> &coords_3) override; virtual DNekScalMatSharedPtr v_GetLocMatrix( const LocalRegions::MatrixKey &mkey); @@ -372,9 +370,9 @@ protected: virtual StdRegions::Orientation v_GetTraceOrient(int trace); - virtual void v_SetCoeffsToOrientation( - StdRegions::Orientation dir, Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_SetCoeffsToOrientation(StdRegions::Orientation dir, + Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; virtual void v_GetTraceQFactors(const int trace, Array<OneD, NekDouble> &outarray); @@ -478,7 +476,6 @@ inline void Expansion::SetAdjacentElementExp(int traceid, } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/Expansion0D.cpp b/library/LocalRegions/Expansion0D.cpp index 3f7f6bc52a..66b53c65f6 100644 --- a/library/LocalRegions/Expansion0D.cpp +++ b/library/LocalRegions/Expansion0D.cpp @@ -34,13 +34,10 @@ #include <LocalRegions/Expansion0D.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { Expansion0D::Expansion0D(SpatialDomains::Geometry0DSharedPtr pGeom) : StdExpansion(), Expansion(pGeom), StdExpansion0D() { } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/Expansion0D.h b/library/LocalRegions/Expansion0D.h index b7795d7831..bdfdf5f9dd 100644 --- a/library/LocalRegions/Expansion0D.h +++ b/library/LocalRegions/Expansion0D.h @@ -41,9 +41,7 @@ #include <SpatialDomains/Geometry0D.h> #include <StdRegions/StdExpansion0D.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class Expansion0D; typedef std::shared_ptr<Expansion0D> Expansion0DSharedPtr; @@ -55,7 +53,7 @@ class Expansion0D : virtual public Expansion, public: LOCAL_REGIONS_EXPORT Expansion0D(SpatialDomains::Geometry0DSharedPtr pGeom); - LOCAL_REGIONS_EXPORT virtual ~Expansion0D() + LOCAL_REGIONS_EXPORT ~Expansion0D() override { } @@ -69,7 +67,6 @@ inline SpatialDomains::Geometry0DSharedPtr Expansion0D::GetGeom0D() const { return std::dynamic_pointer_cast<SpatialDomains::Geometry0D>(m_geom); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/Expansion1D.cpp b/library/LocalRegions/Expansion1D.cpp index 65b7147674..84c529087a 100644 --- a/library/LocalRegions/Expansion1D.cpp +++ b/library/LocalRegions/Expansion1D.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { DNekMatSharedPtr Expansion1D::v_GenMatrix(const StdRegions::StdMatrixKey &mkey) @@ -527,5 +525,4 @@ void Expansion1D::v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) p = m_ncoeffs - 1; } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/Expansion1D.h b/library/LocalRegions/Expansion1D.h index de3d6b8337..b5ac492ab7 100644 --- a/library/LocalRegions/Expansion1D.h +++ b/library/LocalRegions/Expansion1D.h @@ -40,9 +40,7 @@ #include <SpatialDomains/Geometry1D.h> #include <StdRegions/StdExpansion1D.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class Expansion2D; typedef std::shared_ptr<Expansion2D> Expansion2DSharedPtr; @@ -62,7 +60,7 @@ public: { } - LOCAL_REGIONS_EXPORT virtual ~Expansion1D() override = default; + LOCAL_REGIONS_EXPORT ~Expansion1D() override = default; LOCAL_REGIONS_EXPORT void AddNormTraceInt( const int dir, Array<OneD, const NekDouble> &inarray, @@ -75,32 +73,30 @@ public: inline SpatialDomains::Geometry1DSharedPtr GetGeom1D() const; protected: - virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; + DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; - virtual void v_AddRobinMassMatrix( - const int vert, const Array<OneD, const NekDouble> &primCoeffs, - DNekMatSharedPtr &inoutmat) override; + void v_AddRobinMassMatrix(const int vert, + const Array<OneD, const NekDouble> &primCoeffs, + DNekMatSharedPtr &inoutmat) override; - virtual void v_AddRobinTraceContribution( + void v_AddRobinTraceContribution( const int vert, const Array<OneD, const NekDouble> &primCoeffs, const Array<OneD, NekDouble> &incoeffs, Array<OneD, NekDouble> &coeffs) override; - virtual NekDouble v_VectorFlux( + NekDouble v_VectorFlux( const Array<OneD, Array<OneD, NekDouble>> &vec) override; - virtual void v_NormalTraceDerivFactors( + void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &factors, Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors) override; - virtual void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, - Array<OneD, int> &idmap, const int nq0, - const int nq1) override; + void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, + Array<OneD, int> &idmap, const int nq0, + const int nq1) override; - virtual void v_TraceNormLen(const int traceid, NekDouble &h, - NekDouble &p) override; + void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override; private: }; @@ -109,7 +105,6 @@ inline SpatialDomains::Geometry1DSharedPtr Expansion1D ::GetGeom1D() const { return std::dynamic_pointer_cast<SpatialDomains ::Geometry1D>(m_geom); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/Expansion2D.cpp b/library/LocalRegions/Expansion2D.cpp index 70efa9fc16..5338532317 100644 --- a/library/LocalRegions/Expansion2D.cpp +++ b/library/LocalRegions/Expansion2D.cpp @@ -47,9 +47,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { Expansion2D::Expansion2D(SpatialDomains::Geometry2DSharedPtr pGeom) : StdExpansion(), Expansion(pGeom), StdExpansion2D() @@ -162,11 +160,17 @@ DNekScalMatSharedPtr Expansion2D::CreateMatrix(const MatrixKey &mkey) m_metricinfo->GetDerivFactors(ptsKeys); int dir = 0; if (mkey.GetMatrixType() == StdRegions::eWeakDeriv0) + { dir = 0; + } if (mkey.GetMatrixType() == StdRegions::eWeakDeriv1) + { dir = 1; + } if (mkey.GetMatrixType() == StdRegions::eWeakDeriv2) + { dir = 2; + } MatrixKey deriv0key(StdRegions::eWeakDeriv0, mkey.GetShapeType(), *this); @@ -588,11 +592,17 @@ DNekScalMatSharedPtr Expansion2D::CreateMatrix(const MatrixKey &mkey) m_metricinfo->GetDerivFactors(ptsKeys); int dir = 0; if (mkey.GetMatrixType() == StdRegions::eIProductWRTDerivBase0) + { dir = 0; + } if (mkey.GetMatrixType() == StdRegions::eIProductWRTDerivBase1) + { dir = 1; + } if (mkey.GetMatrixType() == StdRegions::eIProductWRTDerivBase2) + { dir = 2; + } MatrixKey iProdDeriv0Key(StdRegions::eIProductWRTDerivBase0, mkey.GetShapeType(), *this); @@ -2371,5 +2381,4 @@ void Expansion2D::v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) p = (NekDouble)(GetBasisNumModes(dirn) - 1); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/Expansion2D.h b/library/LocalRegions/Expansion2D.h index ff6e3955bc..67952c7086 100644 --- a/library/LocalRegions/Expansion2D.h +++ b/library/LocalRegions/Expansion2D.h @@ -43,9 +43,7 @@ #include <SpatialDomains/Geometry2D.h> #include <StdRegions/StdExpansion2D.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class Expansion3D; typedef std::shared_ptr<Expansion3D> Expansion3DSharedPtr; @@ -62,7 +60,7 @@ class Expansion2D : virtual public Expansion, public: LOCAL_REGIONS_EXPORT Expansion2D(SpatialDomains::Geometry2DSharedPtr pGeom); - LOCAL_REGIONS_EXPORT virtual ~Expansion2D() override = default; + LOCAL_REGIONS_EXPORT ~Expansion2D() override = default; LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey); @@ -109,53 +107,49 @@ public: const int nvert, const StdRegions::Orientation orient, const int nq0, Array<OneD, int> &idmap); - virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; - virtual void v_GenTraceExp(const int traceid, - ExpansionSharedPtr &exp) override; + DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; + void v_GenTraceExp(const int traceid, ExpansionSharedPtr &exp) override; protected: std::vector<bool> m_requireNeg; // Hybridized DG routines - virtual void v_DGDeriv(const int dir, - const Array<OneD, const NekDouble> &incoeffs, - Array<OneD, ExpansionSharedPtr> &EdgeExp, - Array<OneD, Array<OneD, NekDouble>> &edgeCoeffs, - Array<OneD, NekDouble> &out_d) override; - - virtual void v_AddEdgeNormBoundaryInt( - const int edge, const ExpansionSharedPtr &EdgeExp, - const Array<OneD, const NekDouble> &Fx, - const Array<OneD, const NekDouble> &Fy, - Array<OneD, NekDouble> &outarray) override; - - virtual void v_AddEdgeNormBoundaryInt( - const int edge, const ExpansionSharedPtr &EdgeExp, - const Array<OneD, const NekDouble> &Fn, - Array<OneD, NekDouble> &outarray) override; - - virtual void v_AddRobinMassMatrix( - const int edgeid, const Array<OneD, const NekDouble> &primCoeffs, - DNekMatSharedPtr &inoutmat) override; - - virtual void v_AddRobinTraceContribution( + void v_DGDeriv(const int dir, const Array<OneD, const NekDouble> &incoeffs, + Array<OneD, ExpansionSharedPtr> &EdgeExp, + Array<OneD, Array<OneD, NekDouble>> &edgeCoeffs, + Array<OneD, NekDouble> &out_d) override; + + void v_AddEdgeNormBoundaryInt(const int edge, + const ExpansionSharedPtr &EdgeExp, + const Array<OneD, const NekDouble> &Fx, + const Array<OneD, const NekDouble> &Fy, + Array<OneD, NekDouble> &outarray) override; + + void v_AddEdgeNormBoundaryInt(const int edge, + const ExpansionSharedPtr &EdgeExp, + const Array<OneD, const NekDouble> &Fn, + Array<OneD, NekDouble> &outarray) override; + + void v_AddRobinMassMatrix(const int edgeid, + const Array<OneD, const NekDouble> &primCoeffs, + DNekMatSharedPtr &inoutmat) override; + + void v_AddRobinTraceContribution( const int traceid, const Array<OneD, const NekDouble> &primCoeffs, const Array<OneD, NekDouble> &incoeffs, Array<OneD, NekDouble> &coeffs) override; - virtual DNekMatSharedPtr v_BuildVertexMatrix( + DNekMatSharedPtr v_BuildVertexMatrix( const DNekScalMatSharedPtr &r_bnd) override; - virtual void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, - Array<OneD, int> &idmap, const int nq0, - const int nq1) override; + void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, + Array<OneD, int> &idmap, const int nq0, + const int nq1) override; - virtual void v_SetUpPhysNormals(const int edge) override; - virtual NekDouble v_VectorFlux( + void v_SetUpPhysNormals(const int edge) override; + NekDouble v_VectorFlux( const Array<OneD, Array<OneD, NekDouble>> &vec) override; - virtual void v_TraceNormLen(const int traceid, NekDouble &h, - NekDouble &p) override; + void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override; private: void GetPhysEdgeVarCoeffsFromElement( @@ -173,7 +167,6 @@ inline SpatialDomains::Geometry2DSharedPtr Expansion2D::GetGeom2D() const { return std::dynamic_pointer_cast<SpatialDomains::Geometry2D>(m_geom); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/Expansion3D.cpp b/library/LocalRegions/Expansion3D.cpp index 1e1d9726f4..9617568ce4 100644 --- a/library/LocalRegions/Expansion3D.cpp +++ b/library/LocalRegions/Expansion3D.cpp @@ -45,9 +45,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { // evaluate additional terms in HDG face. Note that this assumes that // edges are unpacked into local cartesian order. @@ -399,7 +397,9 @@ void Expansion3D::SetFaceToGeomOrientation(const int face, inout[k] = f_in[j]; // checking if sign is changing if ((*map1)[j].sign != (*map2)[k].sign) + { inout[k] *= -1.0; + } break; } } @@ -493,11 +493,17 @@ DNekScalMatSharedPtr Expansion3D::CreateMatrix(const MatrixKey &mkey) m_metricinfo->GetDerivFactors(ptsKeys); int dir = 0; if (mkey.GetMatrixType() == StdRegions::eWeakDeriv0) + { dir = 0; + } if (mkey.GetMatrixType() == StdRegions::eWeakDeriv1) + { dir = 1; + } if (mkey.GetMatrixType() == StdRegions::eWeakDeriv2) + { dir = 2; + } MatrixKey deriv0key(StdRegions::eWeakDeriv0, mkey.GetShapeType(), *this); @@ -3069,5 +3075,4 @@ void Expansion3D::v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) } p = (NekDouble)(GetBasisNumModes(dirn) - 1); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/Expansion3D.h b/library/LocalRegions/Expansion3D.h index cc6dccd57c..0daea8f44e 100644 --- a/library/LocalRegions/Expansion3D.h +++ b/library/LocalRegions/Expansion3D.h @@ -40,9 +40,7 @@ #include <SpatialDomains/Geometry3D.h> #include <StdRegions/StdExpansion3D.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class Expansion2D; @@ -62,7 +60,7 @@ public: : Expansion(pGeom), StdExpansion3D(), m_requireNeg() { } - LOCAL_REGIONS_EXPORT virtual ~Expansion3D() override = default; + LOCAL_REGIONS_EXPORT ~Expansion3D() override = default; LOCAL_REGIONS_EXPORT void SetTraceToGeomOrientation( Array<OneD, NekDouble> &inout); @@ -117,32 +115,29 @@ public: protected: std::map<int, NormalVector> m_faceNormals; - virtual void v_DGDeriv(const int dir, - const Array<OneD, const NekDouble> &incoeffs, - Array<OneD, ExpansionSharedPtr> &FaceExp, - Array<OneD, Array<OneD, NekDouble>> &faceCoeffs, - Array<OneD, NekDouble> &out_d) override; - virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; - virtual void v_AddFaceNormBoundaryInt( - const int face, const ExpansionSharedPtr &FaceExp, - const Array<OneD, const NekDouble> &Fn, - Array<OneD, NekDouble> &outarray) override; - - virtual void v_AddRobinMassMatrix( - const int face, const Array<OneD, const NekDouble> &primCoeffs, - DNekMatSharedPtr &inoutmat) override; - - virtual StdRegions::Orientation v_GetTraceOrient(int face) override; - - virtual void v_GetTracePhysVals( - const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - StdRegions::Orientation orient) override; - - virtual void v_GenTraceExp(const int traceid, - ExpansionSharedPtr &exp) override; + void v_DGDeriv(const int dir, const Array<OneD, const NekDouble> &incoeffs, + Array<OneD, ExpansionSharedPtr> &FaceExp, + Array<OneD, Array<OneD, NekDouble>> &faceCoeffs, + Array<OneD, NekDouble> &out_d) override; + DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; + void v_AddFaceNormBoundaryInt(const int face, + const ExpansionSharedPtr &FaceExp, + const Array<OneD, const NekDouble> &Fn, + Array<OneD, NekDouble> &outarray) override; + + void v_AddRobinMassMatrix(const int face, + const Array<OneD, const NekDouble> &primCoeffs, + DNekMatSharedPtr &inoutmat) override; + + StdRegions::Orientation v_GetTraceOrient(int face) override; + + void v_GetTracePhysVals(const int face, + const StdRegions::StdExpansionSharedPtr &FaceExp, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + StdRegions::Orientation orient) override; + + void v_GenTraceExp(const int traceid, ExpansionSharedPtr &exp) override; void GetPhysFaceVarCoeffsFromElement( const int face, ExpansionSharedPtr &FaceExp, @@ -153,19 +148,18 @@ protected: // Low Energy Basis functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_BuildTransformationMatrix( + LOCAL_REGIONS_EXPORT DNekMatSharedPtr v_BuildTransformationMatrix( const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix( + LOCAL_REGIONS_EXPORT DNekMatSharedPtr v_BuildInverseTransformationMatrix( const DNekScalMatSharedPtr &transformationmatrix) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_BuildVertexMatrix( - const DNekScalMatSharedPtr &r_bnd) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd) override; - LOCAL_REGIONS_EXPORT virtual void v_TraceNormLen(const int traceid, - NekDouble &h, - NekDouble &p) override; + LOCAL_REGIONS_EXPORT void v_TraceNormLen(const int traceid, NekDouble &h, + NekDouble &p) override; private: // Do not add members here since it may lead to conflicts. @@ -183,7 +177,6 @@ inline SpatialDomains::Geometry3DSharedPtr Expansion3D::GetGeom3D() const { return std::dynamic_pointer_cast<SpatialDomains::Geometry3D>(m_geom); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/HexExp.cpp b/library/LocalRegions/HexExp.cpp index 43da07b5f5..dc66c7235e 100644 --- a/library/LocalRegions/HexExp.cpp +++ b/library/LocalRegions/HexExp.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { /** * @class HexExp @@ -1767,5 +1765,4 @@ void HexExp::v_NormalTraceDerivFactors( } } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/HexExp.h b/library/LocalRegions/HexExp.h index 623533e7ef..ba6a82d0fb 100644 --- a/library/LocalRegions/HexExp.h +++ b/library/LocalRegions/HexExp.h @@ -43,9 +43,7 @@ #include <SpatialDomains/HexGeom.h> #include <StdRegions/StdHexExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class HexExp : virtual public StdRegions::StdHexExp, virtual public Expansion3D { @@ -57,28 +55,28 @@ public: LOCAL_REGIONS_EXPORT HexExp(const HexExp &T); - LOCAL_REGIONS_EXPORT virtual ~HexExp() override = default; + LOCAL_REGIONS_EXPORT ~HexExp() override = default; protected: //------------------------------ // Integration Method //------------------------------ - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //----------------------------- // Differentiation Methods //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDirectionalDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDirectionalDeriv( const Array<OneD, const NekDouble> &inarray, const Array<OneD, const NekDouble> &direction, Array<OneD, NekDouble> &out) override; @@ -86,35 +84,35 @@ protected: //--------------------------------------- // Transforms //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Inner product functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_AlignVectorToCollapsedDir( + LOCAL_REGIONS_EXPORT void v_AlignVectorToCollapsedDir( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDirectionalDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDirectionalDerivBase( const Array<OneD, const NekDouble> &direction, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override @@ -122,7 +120,7 @@ protected: IProductWRTDirectionalDerivBase_SumFac(direction, inarray, outarray); } - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDirectionalDerivBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTDirectionalDerivBase_SumFac( const Array<OneD, const NekDouble> &direction, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -130,45 +128,45 @@ protected: //--------------------------------------- // Evaluation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_StdPhysEvaluate( - const Array<OneD, const NekDouble> &Lcoord, - const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, + const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coords, - const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coords, + const Array<OneD, const NekDouble> &physvals) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; //--------------------------------------- // Helper functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() + LOCAL_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap( const int face, Array<OneD, int> &outarray) override; LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override; @@ -176,70 +174,70 @@ protected: //--------------------------------------- // Operator creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_MassMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_WeakDerivMatrixOp( + LOCAL_REGIONS_EXPORT void v_WeakDerivMatrixOp( const int i, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_WeakDirectionalDerivMatrixOp( + LOCAL_REGIONS_EXPORT void v_WeakDirectionalDerivMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_MassLevelCurvatureMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassLevelCurvatureMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + LOCAL_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_ReduceOrderCoeffs( + LOCAL_REGIONS_EXPORT void v_ReduceOrderCoeffs( int numMin, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + LOCAL_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdRegions::StdMatrixKey &mkey) override; //--------------------------------------- // Matrix creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeLaplacianMetric() override; + LOCAL_REGIONS_EXPORT void v_ComputeLaplacianMetric() override; private: LibUtilities::NekManager<MatrixKey, DNekScalMat, MatrixKey::opLess> @@ -247,11 +245,11 @@ private: LibUtilities::NekManager<MatrixKey, DNekScalBlkMat, MatrixKey::opLess> m_staticCondMatrixManager; - virtual void v_LaplacianMatrixOp_MatFree_Kernel( + void v_LaplacianMatrixOp_MatFree_Kernel( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override; - virtual void v_NormalTraceDerivFactors( + void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &factors, Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors) override; @@ -259,7 +257,6 @@ private: typedef std::shared_ptr<HexExp> HexExpSharedPtr; typedef std::vector<HexExpSharedPtr> HexExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // HEX_EXP_H diff --git a/library/LocalRegions/IndexMapKey.cpp b/library/LocalRegions/IndexMapKey.cpp index 6d173cd964..5011891e53 100644 --- a/library/LocalRegions/IndexMapKey.cpp +++ b/library/LocalRegions/IndexMapKey.cpp @@ -35,9 +35,7 @@ #include <LocalRegions/IndexMapKey.h> #include <LocalRegions/LocalRegions.hpp> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { IndexMapKey::IndexMapKey(const IndexMapType indexmapType, const LibUtilities::ShapeType shapeType, @@ -189,5 +187,4 @@ std::ostream &operator<<(std::ostream &os, const IndexMapKey &rhs) << std::endl; return os; } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/IndexMapKey.h b/library/LocalRegions/IndexMapKey.h index 31e56c884c..fc7dcb4a83 100644 --- a/library/LocalRegions/IndexMapKey.h +++ b/library/LocalRegions/IndexMapKey.h @@ -42,9 +42,7 @@ #include <memory> #include <ostream> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { struct IndexValue { @@ -126,7 +124,6 @@ LOCAL_REGIONS_EXPORT std::ostream &operator<<(std::ostream &os, typedef std::shared_ptr<IndexMapKey> IndexMapKeySharedPtr; typedef std::shared_ptr<IndexMapValues> IndexMapValuesSharedPtr; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/LocalRegions.hpp b/library/LocalRegions/LocalRegions.hpp index 465bf21e17..209b774dd3 100644 --- a/library/LocalRegions/LocalRegions.hpp +++ b/library/LocalRegions/LocalRegions.hpp @@ -36,9 +36,7 @@ #include <string> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { enum GeomState { @@ -91,7 +89,6 @@ const char *const IndexMapTypeMap[] = {"EdgeToElement", "FaceToElement", "EdgeInterior", "FaceInterior", "Boundary", "Vertex"}; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // LOCALREGIONS_H diff --git a/library/LocalRegions/MatrixKey.cpp b/library/LocalRegions/MatrixKey.cpp index 0551f21d3c..e1a68d0217 100644 --- a/library/LocalRegions/MatrixKey.cpp +++ b/library/LocalRegions/MatrixKey.cpp @@ -35,9 +35,7 @@ #include <LocalRegions/Expansion.h> #include <LocalRegions/MatrixKey.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { MatrixKey::MatrixKey(const StdRegions::MatrixType matrixType, const LibUtilities::ShapeType shapeType, @@ -88,5 +86,4 @@ bool operator<(const MatrixKey &lhs, const MatrixKey &rhs) *dynamic_cast<const StdRegions::StdMatrixKey *>(&rhs)); } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/MatrixKey.h b/library/LocalRegions/MatrixKey.h index cf4468aeee..85494078e8 100644 --- a/library/LocalRegions/MatrixKey.h +++ b/library/LocalRegions/MatrixKey.h @@ -39,9 +39,7 @@ #include <SpatialDomains/GeomFactors.h> #include <StdRegions/StdMatrixKey.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class MatrixKey : public StdRegions::StdMatrixKey @@ -62,7 +60,7 @@ public: LOCAL_REGIONS_EXPORT MatrixKey(const StdRegions::StdMatrixKey &mkey); - virtual ~MatrixKey() + ~MatrixKey() override { } @@ -92,7 +90,6 @@ protected: private: }; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // STDMATRIXKEY_H diff --git a/library/LocalRegions/NodalTetExp.cpp b/library/LocalRegions/NodalTetExp.cpp index ba69440291..75ec114c2e 100644 --- a/library/LocalRegions/NodalTetExp.cpp +++ b/library/LocalRegions/NodalTetExp.cpp @@ -33,11 +33,3 @@ /////////////////////////////////////////////////////////////////////////////// #include <LocalRegions/NodalTetExp.h> - -namespace Nektar -{ -namespace LocalRegions -{ - -} // namespace LocalRegions -} // namespace Nektar diff --git a/library/LocalRegions/NodalTetExp.h b/library/LocalRegions/NodalTetExp.h index 8681018b1c..9616a433d1 100644 --- a/library/LocalRegions/NodalTetExp.h +++ b/library/LocalRegions/NodalTetExp.h @@ -39,9 +39,7 @@ #include <LocalRegions/TetExp.h> #include <SpatialDomains/TetGeom.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class NodalTetExp : public TetExp @@ -61,13 +59,12 @@ class NodalTetExp : public TetExp LOCAL_REGIONS_EXPORT NodalTetExp(const NodalTetExp &T); /// Destructor - LOCAL_REGIONS_EXPORT virtual ~NodalTetExp() override = default; + LOCAL_REGIONS_EXPORT ~NodalTetExp() override = default; protected: private: }; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // NODALTETEXP_H diff --git a/library/LocalRegions/NodalTriExp.cpp b/library/LocalRegions/NodalTriExp.cpp index 961d1c2335..5296ece022 100644 --- a/library/LocalRegions/NodalTriExp.cpp +++ b/library/LocalRegions/NodalTriExp.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { NodalTriExp::NodalTriExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, @@ -686,5 +684,4 @@ void NodalTriExp::v_ComputeTraceNormal(const int edge) } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/NodalTriExp.h b/library/LocalRegions/NodalTriExp.h index 4fb3dd6c5b..5011099fb1 100644 --- a/library/LocalRegions/NodalTriExp.h +++ b/library/LocalRegions/NodalTriExp.h @@ -44,9 +44,7 @@ #include <LocalRegions/LocalRegionsDeclspec.h> #include <LocalRegions/MatrixKey.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class NodalTriExp final : virtual public StdRegions::StdNodalTriExp, @@ -64,7 +62,7 @@ public: LOCAL_REGIONS_EXPORT NodalTriExp(const NodalTriExp &T); /// Destructor - LOCAL_REGIONS_EXPORT virtual ~NodalTriExp() override = default; + LOCAL_REGIONS_EXPORT ~NodalTriExp() override = default; LOCAL_REGIONS_EXPORT void GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, @@ -185,13 +183,11 @@ protected: Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey); - virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override; + StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override; - virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( - void) const override; + StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override; - virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; + DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; private: LibUtilities::NekManager<MatrixKey, DNekScalMat, MatrixKey::opLess> @@ -199,7 +195,7 @@ private: LibUtilities::NekManager<MatrixKey, DNekScalBlkMat, MatrixKey::opLess> m_staticCondMatrixManager; - virtual void v_GetCoords( + void v_GetCoords( Array<OneD, NekDouble> &coords_0, Array<OneD, NekDouble> &coords_1 = NullNekDouble1DArray, Array<OneD, NekDouble> &coords_2 = NullNekDouble1DArray) override @@ -207,30 +203,29 @@ private: GetCoords(coords_0, coords_1, coords_2); } - virtual void v_GetCoord(const Array<OneD, const NekDouble> &lcoord, - Array<OneD, NekDouble> &coord) override + void v_GetCoord(const Array<OneD, const NekDouble> &lcoord, + Array<OneD, NekDouble> &coord) override { GetCoord(lcoord, coord); } /** \brief Virtual call to integrate the physical point list \a inarray over region (see SegExp::Integral) */ - virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override + NekDouble v_Integral(const Array<OneD, const NekDouble> &inarray) override { return Integral(inarray); } /** \brief Virtual call to TriExp::IProduct_WRT_B */ - virtual void v_IProductWRTBase(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override + void v_IProductWRTBase(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override { IProductWRTBase(inarray, outarray); } - virtual void v_IProductWRTDerivBase( - const int dir, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override + void v_IProductWRTDerivBase(const int dir, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override { IProductWRTDerivBase(dir, inarray, outarray); } @@ -252,9 +247,8 @@ private: PhysDeriv(inarray, out_d0, out_d1); } - virtual void v_PhysDeriv(const int dir, - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override + void v_PhysDeriv(const int dir, const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override { Array<OneD, NekDouble> tmp; switch (dir) @@ -278,52 +272,51 @@ private: } /// Virtual call to SegExp::FwdTrans - virtual void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override + void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override { FwdTrans(inarray, outarray); } /// Virtual call to TriExp::Evaluate - virtual NekDouble v_PhysEvaluate( + NekDouble v_PhysEvaluate( const Array<OneD, const NekDouble> &coord, const Array<OneD, const NekDouble> &physvals) override { return PhysEvaluate(coord, physvals); } - virtual DNekMatSharedPtr v_CreateStdMatrix( + DNekMatSharedPtr v_CreateStdMatrix( const StdRegions::StdMatrixKey &mkey) override { return CreateStdMatrix(mkey); } - virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override + DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override { return m_matrixManager[mkey]; } - virtual void v_DropLocMatrix(const MatrixKey &mkey) override + void v_DropLocMatrix(const MatrixKey &mkey) override { m_matrixManager.DeleteObject(mkey); } - virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( + DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( const MatrixKey &mkey) override { return m_staticCondMatrixManager[mkey]; } - virtual void v_BwdTrans_SumFac(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override + void v_BwdTrans_SumFac(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override { StdNodalTriExp::v_BwdTrans_SumFac(inarray, outarray); } - virtual void v_IProductWRTBase_SumFac( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - bool multiplybyweights = true) override + void v_IProductWRTBase_SumFac(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + bool multiplybyweights = true) override { boost::ignore_unused(multiplybyweights); IProductWRTBase_SumFac(inarray, outarray); @@ -340,41 +333,39 @@ private: const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - virtual void v_MassMatrixOp(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::StdMatrixKey &mkey) override + void v_MassMatrixOp(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::StdMatrixKey &mkey) override { MassMatrixOp(inarray, outarray, mkey); } - virtual void v_LaplacianMatrixOp( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::StdMatrixKey &mkey) override + void v_LaplacianMatrixOp(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::StdMatrixKey &mkey) override { LaplacianMatrixOp(inarray, outarray, mkey); } - virtual void v_LaplacianMatrixOp( - const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::StdMatrixKey &mkey) override + void v_LaplacianMatrixOp(const int k1, const int k2, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::StdMatrixKey &mkey) override { LaplacianMatrixOp(k1, k2, inarray, outarray, mkey); } - virtual void v_WeakDerivMatrixOp( - const int i, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::StdMatrixKey &mkey) override + void v_WeakDerivMatrixOp(const int i, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::StdMatrixKey &mkey) override { WeakDerivMatrixOp(i, inarray, outarray, mkey); } - virtual void v_HelmholtzMatrixOp( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::StdMatrixKey &mkey) override + void v_HelmholtzMatrixOp(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::StdMatrixKey &mkey) override { HelmholtzMatrixOp(inarray, outarray, mkey); } @@ -385,7 +376,6 @@ private: typedef std::shared_ptr<NodalTriExp> NodalTriExpSharedPtr; typedef std::vector<NodalTriExpSharedPtr> NodalTriExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // NODALTRIEXP_H diff --git a/library/LocalRegions/PointExp.cpp b/library/LocalRegions/PointExp.cpp index 6723656906..25e45f0cad 100644 --- a/library/LocalRegions/PointExp.cpp +++ b/library/LocalRegions/PointExp.cpp @@ -34,9 +34,7 @@ #include <LocalRegions/PointExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { PointExp::PointExp(const SpatialDomains::PointGeomSharedPtr &geom) @@ -82,5 +80,4 @@ void PointExp::v_NormVectorIProductWRTBase( outarray[0] = Fx[0] * normals[0][0]; } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/PointExp.h b/library/LocalRegions/PointExp.h index 1215a326c4..788742258c 100644 --- a/library/LocalRegions/PointExp.h +++ b/library/LocalRegions/PointExp.h @@ -40,9 +40,7 @@ #include <SpatialDomains/PointGeom.h> #include <StdRegions/StdPointExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class PointExp : virtual public StdRegions::StdPointExp, virtual public Expansion0D @@ -50,7 +48,7 @@ class PointExp : virtual public StdRegions::StdPointExp, public: LOCAL_REGIONS_EXPORT PointExp( const SpatialDomains::PointGeomSharedPtr &m_geom); - LOCAL_REGIONS_EXPORT virtual ~PointExp() override = default; + LOCAL_REGIONS_EXPORT ~PointExp() override = default; inline const Array<OneD, const NekDouble> &GetCoeffs(void) const { @@ -123,20 +121,18 @@ protected: //!< same as the coefficient but is defined for consistency (It //!< is also used in Robin boundary conditions) - virtual void v_GetCoords(Array<OneD, NekDouble> &coords_0, - Array<OneD, NekDouble> &coords_1, - Array<OneD, NekDouble> &coords_2) override; + void v_GetCoords(Array<OneD, NekDouble> &coords_0, + Array<OneD, NekDouble> &coords_1, + Array<OneD, NekDouble> &coords_2) override; - virtual void v_NormVectorIProductWRTBase( - const Array<OneD, const NekDouble> &Fx, - Array<OneD, NekDouble> &outarray) override; + void v_NormVectorIProductWRTBase(const Array<OneD, const NekDouble> &Fx, + Array<OneD, NekDouble> &outarray) override; }; typedef std::shared_ptr<PointExp> PointExpSharedPtr; typedef std::vector<PointExpSharedPtr> PointExpVector; const static Array<OneD, PointExpSharedPtr> NullPointExpSharedPtrArray{}; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // POINTEXP_H diff --git a/library/LocalRegions/PrismExp.cpp b/library/LocalRegions/PrismExp.cpp index 2cc672099c..58d1a71a4b 100644 --- a/library/LocalRegions/PrismExp.cpp +++ b/library/LocalRegions/PrismExp.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { PrismExp::PrismExp(const LibUtilities::BasisKey &Ba, @@ -1823,5 +1821,4 @@ void PrismExp::v_NormalTraceDerivFactors( } } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/PrismExp.h b/library/LocalRegions/PrismExp.h index 535abf9146..63bc803981 100644 --- a/library/LocalRegions/PrismExp.h +++ b/library/LocalRegions/PrismExp.h @@ -42,9 +42,7 @@ #include <SpatialDomains/PrismGeom.h> #include <StdRegions/StdPrismExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class PrismExp : virtual public StdRegions::StdPrismExp, virtual public Expansion3D @@ -59,19 +57,19 @@ public: LOCAL_REGIONS_EXPORT PrismExp(const PrismExp &T); - LOCAL_REGIONS_EXPORT virtual ~PrismExp() override = default; + LOCAL_REGIONS_EXPORT ~PrismExp() override = default; protected: //------------------------------- // Integration Methods //------------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //---------------------------- // Differentiation Methods //---------------------------- - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; @@ -79,17 +77,17 @@ protected: //--------------------------------------- // Transforms //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Inner product functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; @@ -99,50 +97,50 @@ protected: LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_AlignVectorToCollapsedDir( + LOCAL_REGIONS_EXPORT void v_AlignVectorToCollapsedDir( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_StdPhysEvaluate( - const Array<OneD, const NekDouble> &Lcoord, - const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, + const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coord, - const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coord, + const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; //--------------------------------------- // Helper functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap( const int face, Array<OneD, int> &outarray) override; LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override; @@ -150,47 +148,47 @@ protected: //--------------------------------------- // Operator creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_MassMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + LOCAL_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + LOCAL_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdRegions::StdMatrixKey &mkey) override; //--------------------------------------- // Matrix creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT - virtual void v_GetSimplexEquiSpacedConnectivity( - Array<OneD, int> &conn, bool standard = true) override; + void v_GetSimplexEquiSpacedConnectivity(Array<OneD, int> &conn, + bool standard = true) override; - LOCAL_REGIONS_EXPORT virtual void v_NormalTraceDerivFactors( + LOCAL_REGIONS_EXPORT void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors, Array<OneD, Array<OneD, NekDouble>> &d2factors) override; @@ -201,15 +199,14 @@ private: LibUtilities::NekManager<MatrixKey, DNekScalBlkMat, MatrixKey::opLess> m_staticCondMatrixManager; - virtual void v_LaplacianMatrixOp_MatFree_Kernel( + void v_LaplacianMatrixOp_MatFree_Kernel( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override; }; typedef std::shared_ptr<PrismExp> PrismExpSharedPtr; typedef std::vector<PrismExpSharedPtr> PrismExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #define H_PRISMEXP #endif diff --git a/library/LocalRegions/PyrExp.cpp b/library/LocalRegions/PyrExp.cpp index 0df3ea25f4..3e5d530b92 100644 --- a/library/LocalRegions/PyrExp.cpp +++ b/library/LocalRegions/PyrExp.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { PyrExp::PyrExp(const LibUtilities::BasisKey &Ba, @@ -1627,5 +1625,4 @@ void PyrExp::v_NormalTraceDerivFactors( } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/PyrExp.h b/library/LocalRegions/PyrExp.h index 258e122baa..4e66cc0d5c 100644 --- a/library/LocalRegions/PyrExp.h +++ b/library/LocalRegions/PyrExp.h @@ -42,9 +42,7 @@ #include <SpatialDomains/PyrGeom.h> #include <StdRegions/StdPyrExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class PyrExp : virtual public StdRegions::StdPyrExp, virtual public Expansion3D @@ -59,19 +57,19 @@ public: LOCAL_REGIONS_EXPORT PyrExp(const PyrExp &T); - LOCAL_REGIONS_EXPORT virtual ~PyrExp() override = default; + LOCAL_REGIONS_EXPORT ~PyrExp() override = default; protected: //------------------------------- // Integration Methods //------------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //---------------------------- // Differentiation Methods //---------------------------- - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; @@ -79,17 +77,17 @@ protected: //--------------------------------------- // Transforms //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Inner product functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; @@ -100,28 +98,28 @@ protected: const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_AlignVectorToCollapsedDir( + LOCAL_REGIONS_EXPORT void v_AlignVectorToCollapsedDir( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; @@ -130,43 +128,43 @@ protected: v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coord, - const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coord, + const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; //--------------------------------------- // Helper functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap( const int face, Array<OneD, int> &outarray) override; LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override; - LOCAL_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + LOCAL_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdRegions::StdMatrixKey &mkey) override; //--------------------------------------- // Matrix creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeLaplacianMetric() override; - LOCAL_REGIONS_EXPORT virtual void v_NormalTraceDerivFactors( + LOCAL_REGIONS_EXPORT void v_ComputeLaplacianMetric() override; + LOCAL_REGIONS_EXPORT void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors, Array<OneD, Array<OneD, NekDouble>> &d2factors) override; @@ -177,14 +175,13 @@ private: LibUtilities::NekManager<MatrixKey, DNekScalBlkMat, MatrixKey::opLess> m_staticCondMatrixManager; - virtual void v_LaplacianMatrixOp_MatFree_Kernel( + void v_LaplacianMatrixOp_MatFree_Kernel( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override; }; typedef std::shared_ptr<PyrExp> PyrExpSharedPtr; typedef std::vector<PyrExpSharedPtr> PyrExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // PYREXP_H diff --git a/library/LocalRegions/QuadExp.cpp b/library/LocalRegions/QuadExp.cpp index a72b686db4..775b2a27ca 100644 --- a/library/LocalRegions/QuadExp.cpp +++ b/library/LocalRegions/QuadExp.cpp @@ -44,9 +44,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { QuadExp::QuadExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, @@ -1793,5 +1791,4 @@ void QuadExp::v_NormalTraceDerivFactors( } } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/QuadExp.h b/library/LocalRegions/QuadExp.h index dd2c6f44c2..4469bbd4f8 100644 --- a/library/LocalRegions/QuadExp.h +++ b/library/LocalRegions/QuadExp.h @@ -42,9 +42,7 @@ #include <SpatialDomains/QuadGeom.h> #include <StdRegions/StdQuadExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class QuadExp : virtual public StdRegions::StdQuadExp, @@ -61,29 +59,29 @@ public: LOCAL_REGIONS_EXPORT QuadExp(const QuadExp &T); - LOCAL_REGIONS_EXPORT virtual ~QuadExp() override = default; + LOCAL_REGIONS_EXPORT ~QuadExp() override = default; protected: //------------------------------- // Integration Methods //------------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //---------------------------- // Differentiation Methods //---------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_StdPhysEvaluate( - const Array<OneD, const NekDouble> &Lcoord, - const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT NekDouble + v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, + const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDirectionalDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDirectionalDeriv( const Array<OneD, const NekDouble> &inarray, const Array<OneD, const NekDouble> &direction, Array<OneD, NekDouble> &out) override; @@ -91,105 +89,104 @@ protected: //--------------------------------------- // Transforms //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_FwdTransBndConstrained( + LOCAL_REGIONS_EXPORT void v_FwdTransBndConstrained( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Inner product functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_AlignVectorToCollapsedDir( + LOCAL_REGIONS_EXPORT void v_AlignVectorToCollapsedDir( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase( + LOCAL_REGIONS_EXPORT void v_NormVectorIProductWRTBase( const Array<OneD, const NekDouble> &Fx, const Array<OneD, const NekDouble> &Fy, const Array<OneD, const NekDouble> &Fz, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase( + LOCAL_REGIONS_EXPORT void v_NormVectorIProductWRTBase( const Array<OneD, const Array<OneD, NekDouble>> &Fvec, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coord, - const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysVals( + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coord, + const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; + LOCAL_REGIONS_EXPORT void v_GetTracePhysVals( const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, StdRegions::Orientation orient) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTraceQFactors( + LOCAL_REGIONS_EXPORT void v_GetTraceQFactors( const int edge, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeTraceNormal( - const int edge) override; + LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int edge) override; //--------------------------------------- // Helper functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; - LOCAL_REGIONS_EXPORT virtual StdRegions::Orientation v_GetTraceOrient( + LOCAL_REGIONS_EXPORT StdRegions::Orientation v_GetTraceOrient( int edge) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap( const int edge, Array<OneD, int> &outarray) override; //--------------------------------------- // Matrix creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; @@ -197,47 +194,47 @@ protected: //--------------------------------------- // Operators //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_MassMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_WeakDerivMatrixOp( + LOCAL_REGIONS_EXPORT void v_WeakDerivMatrixOp( const int i, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_WeakDirectionalDerivMatrixOp( + LOCAL_REGIONS_EXPORT void v_WeakDirectionalDerivMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_MassLevelCurvatureMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassLevelCurvatureMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + LOCAL_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp_MatFree_Kernel( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp_MatFree_Kernel( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override; - LOCAL_REGIONS_EXPORT virtual void v_ReduceOrderCoeffs( + LOCAL_REGIONS_EXPORT void v_ReduceOrderCoeffs( int numMin, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeLaplacianMetric() override; + LOCAL_REGIONS_EXPORT void v_ComputeLaplacianMetric() override; - LOCAL_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + LOCAL_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_NormalTraceDerivFactors( + LOCAL_REGIONS_EXPORT void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &factors, Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors) override; @@ -257,7 +254,6 @@ private: typedef std::shared_ptr<QuadExp> QuadExpSharedPtr; typedef std::vector<QuadExpSharedPtr> QuadExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/LocalRegions/SegExp.cpp b/library/LocalRegions/SegExp.cpp index 6ec104bb1a..eb3b77fc95 100644 --- a/library/LocalRegions/SegExp.cpp +++ b/library/LocalRegions/SegExp.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { /** @@ -1380,5 +1378,4 @@ void SegExp::MultiplyByElmtInvMass(const Array<OneD, const NekDouble> &inarray, out = (*matsys) * in; } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/SegExp.h b/library/LocalRegions/SegExp.h index 54e015bf38..f98a015aa8 100644 --- a/library/LocalRegions/SegExp.h +++ b/library/LocalRegions/SegExp.h @@ -43,9 +43,7 @@ //#include <fstream> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class SegExp : virtual public StdRegions::StdSegExp, virtual public Expansion1D @@ -58,151 +56,150 @@ public: LOCAL_REGIONS_EXPORT SegExp(const SegExp &S); - LOCAL_REGIONS_EXPORT virtual ~SegExp() override = default; + LOCAL_REGIONS_EXPORT ~SegExp() override = default; protected: //---------------------------- // Integration Methods //---------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //----------------------------- // Differentiation Methods //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1 = NullNekDouble1DArray, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv_s( + LOCAL_REGIONS_EXPORT void v_PhysDeriv_s( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_ds) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv_n( + LOCAL_REGIONS_EXPORT void v_PhysDeriv_n( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_dn) override; //----------------------------- // Transforms //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_FwdTransBndConstrained( + LOCAL_REGIONS_EXPORT void v_FwdTransBndConstrained( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //----------------------------- // Inner product functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &base, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, int coll_check) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase( + LOCAL_REGIONS_EXPORT void v_NormVectorIProductWRTBase( const Array<OneD, const NekDouble> &Fx, const Array<OneD, const NekDouble> &Fy, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase( + LOCAL_REGIONS_EXPORT void v_NormVectorIProductWRTBase( const Array<OneD, const Array<OneD, NekDouble>> &Fvec, Array<OneD, NekDouble> &outarray) override; //----------------------------- // Evaluation functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_StdPhysEvaluate( - const Array<OneD, const NekDouble> &Lcoord, - const Array<OneD, const NekDouble> &physvals) override; - - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coord, - const Array<OneD, const NekDouble> &physvals) override; - - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; - - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs, - std::array<NekDouble, 6> &secondOrderDerivs) override; - - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT NekDouble + v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, + const Array<OneD, const NekDouble> &physvals) override; + + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coord, + const Array<OneD, const NekDouble> &physvals) override; + + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; + + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs, + std::array<NekDouble, 6> &secondOrderDerivs) override; + + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; - LOCAL_REGIONS_EXPORT virtual void v_GetVertexPhysVals( + LOCAL_REGIONS_EXPORT void v_GetVertexPhysVals( const int vertex, const Array<OneD, const NekDouble> &inarray, NekDouble &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysVals( + LOCAL_REGIONS_EXPORT void v_GetTracePhysVals( const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, StdRegions::Orientation orient) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( - const int vertex, Array<OneD, int> &map) override; + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap(const int vertex, + Array<OneD, int> &map) override; //----------------------------- // Helper functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_SetCoeffsToOrientation( + LOCAL_REGIONS_EXPORT void v_SetCoeffsToOrientation( StdRegions::Orientation dir, Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override; + LOCAL_REGIONS_EXPORT int v_NumBndryCoeffs() const override; - LOCAL_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override; + LOCAL_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeTraceNormal( - const int vertex) override; + LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int vertex) override; - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; - LOCAL_REGIONS_EXPORT virtual const Array<OneD, const NekDouble> - &v_GetPhysNormals() override; + LOCAL_REGIONS_EXPORT const Array<OneD, const NekDouble> &v_GetPhysNormals() + override; //----------------------------- // Operator creation functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + LOCAL_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; @@ -211,24 +208,24 @@ protected: // Matrix creation functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey); - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_DropLocStaticCondMatrix( + LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; private: @@ -250,7 +247,6 @@ private: typedef std::shared_ptr<SegExp> SegExpSharedPtr; typedef std::vector<SegExpSharedPtr> SegExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // SEGEXP_H diff --git a/library/LocalRegions/TetExp.cpp b/library/LocalRegions/TetExp.cpp index f1a30c5252..97b7cab4d6 100644 --- a/library/LocalRegions/TetExp.cpp +++ b/library/LocalRegions/TetExp.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { /** * @class TetExp @@ -1604,5 +1602,4 @@ void TetExp::v_NormalTraceDerivFactors( } } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/TetExp.h b/library/LocalRegions/TetExp.h index afc623370d..99a0a62ccf 100644 --- a/library/LocalRegions/TetExp.h +++ b/library/LocalRegions/TetExp.h @@ -42,9 +42,7 @@ #include <SpatialDomains/TetGeom.h> #include <StdRegions/StdTetExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class TetExp : virtual public StdRegions::StdTetExp, virtual public Expansion3D @@ -58,19 +56,19 @@ public: LOCAL_REGIONS_EXPORT TetExp(const TetExp &T); - LOCAL_REGIONS_EXPORT virtual ~TetExp() override = default; + LOCAL_REGIONS_EXPORT ~TetExp() override = default; protected: //----------------------------- // Integration Methods //----------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //----------------------------- // Differentiation Methods //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; @@ -78,109 +76,109 @@ protected: //----------------------------- // Transforms //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //----------------------------- // Inner product functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_AlignVectorToCollapsedDir( + LOCAL_REGIONS_EXPORT void v_AlignVectorToCollapsedDir( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; //----------------------------- // Evaluation functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_StdPhysEvaluate( - const Array<OneD, const NekDouble> &Lcoord, - const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, + const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coords, - const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coords, + const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; //----------------------------- // Helper functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() + LOCAL_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap( const int face, Array<OneD, int> &outarray) override; LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override; //----------------------------- // Operator creation functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + LOCAL_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + LOCAL_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdRegions::StdMatrixKey &mkey) override; //----------------------------- // Matrix creation functions //----------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; @@ -190,9 +188,9 @@ protected: DNekMatSharedPtr m_inversetransformationmatrix, DNekMatSharedPtr m_inversetransposedtransformationmatrix); - LOCAL_REGIONS_EXPORT virtual void v_ComputeLaplacianMetric() override; + LOCAL_REGIONS_EXPORT void v_ComputeLaplacianMetric() override; - LOCAL_REGIONS_EXPORT virtual void v_NormalTraceDerivFactors( + LOCAL_REGIONS_EXPORT void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors, Array<OneD, Array<OneD, NekDouble>> &d2factors) override; @@ -206,14 +204,13 @@ private: LOCAL_REGIONS_EXPORT void GeneralMatrixOp_MatOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey); - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp_MatFree_Kernel( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp_MatFree_Kernel( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override; }; typedef std::shared_ptr<TetExp> TetExpSharedPtr; typedef std::vector<TetExpSharedPtr> TetExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif // TETEXP_H diff --git a/library/LocalRegions/TriExp.cpp b/library/LocalRegions/TriExp.cpp index ad482630fa..c4ed3870da 100644 --- a/library/LocalRegions/TriExp.cpp +++ b/library/LocalRegions/TriExp.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { TriExp::TriExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, @@ -1633,5 +1631,4 @@ void TriExp::v_NormalTraceDerivFactors( } } } -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions diff --git a/library/LocalRegions/TriExp.h b/library/LocalRegions/TriExp.h index 4619016b31..8be5116a0a 100644 --- a/library/LocalRegions/TriExp.h +++ b/library/LocalRegions/TriExp.h @@ -42,9 +42,7 @@ #include <SpatialDomains/TriGeom.h> #include <StdRegions/StdTriExp.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class TriExp : virtual public StdRegions::StdTriExp, virtual public Expansion2D @@ -61,26 +59,26 @@ public: LOCAL_REGIONS_EXPORT TriExp(const TriExp &T); - LOCAL_REGIONS_EXPORT virtual ~TriExp() override = default; + LOCAL_REGIONS_EXPORT ~TriExp() override = default; protected: //------------------------------- // Integration Methods //------------------------------- - LOCAL_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + LOCAL_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //---------------------------- // Differentiation Methods //---------------------------- - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_PhysDirectionalDeriv( + LOCAL_REGIONS_EXPORT void v_PhysDirectionalDeriv( const Array<OneD, const NekDouble> &inarray, const Array<OneD, const NekDouble> &direction, Array<OneD, NekDouble> &out) override; @@ -88,157 +86,156 @@ protected: //--------------------------------------- // Transforms //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_FwdTrans( + LOCAL_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_FwdTransBndConstrained( + LOCAL_REGIONS_EXPORT void v_FwdTransBndConstrained( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Inner product functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_AlignVectorToCollapsedDir( + LOCAL_REGIONS_EXPORT void v_AlignVectorToCollapsedDir( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDirectionalDerivBase( + LOCAL_REGIONS_EXPORT void v_IProductWRTDirectionalDerivBase( const Array<OneD, const NekDouble> &direction, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_IProductWRTDirectionalDerivBase_SumFac( + LOCAL_REGIONS_EXPORT void v_IProductWRTDirectionalDerivBase_SumFac( const Array<OneD, const NekDouble> &direction, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase( + LOCAL_REGIONS_EXPORT void v_NormVectorIProductWRTBase( const Array<OneD, const NekDouble> &Fx, const Array<OneD, const NekDouble> &Fy, const Array<OneD, const NekDouble> &Fz, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_NormVectorIProductWRTBase( + LOCAL_REGIONS_EXPORT void v_NormVectorIProductWRTBase( const Array<OneD, const Array<OneD, NekDouble>> &Fvec, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp( + LOCAL_REGIONS_EXPORT StdRegions::StdExpansionSharedPtr v_GetLinStdExp( void) const override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoord( + LOCAL_REGIONS_EXPORT void v_GetCoord( const Array<OneD, const NekDouble> &Lcoords, Array<OneD, NekDouble> &coords) override; - LOCAL_REGIONS_EXPORT virtual void v_GetCoords( + LOCAL_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2, Array<OneD, NekDouble> &coords_3) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_StdPhysEvaluate( - const Array<OneD, const NekDouble> &Lcoord, - const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coord, - const Array<OneD, const NekDouble> &physvals) override; - LOCAL_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysVals( + LOCAL_REGIONS_EXPORT NekDouble + v_StdPhysEvaluate(const Array<OneD, const NekDouble> &Lcoord, + const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coord, + const Array<OneD, const NekDouble> &physvals) override; + LOCAL_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; + LOCAL_REGIONS_EXPORT void v_GetTracePhysVals( const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, StdRegions::Orientation orient) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTraceQFactors( + LOCAL_REGIONS_EXPORT void v_GetTraceQFactors( const int edge, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeTraceNormal( - const int edge) override; + LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int edge) override; //--------------------------------------- // Helper functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual void v_ExtractDataToCoeffs( + LOCAL_REGIONS_EXPORT void v_ExtractDataToCoeffs( const NekDouble *data, const std::vector<unsigned int> &nummodes, const int mode_offset, NekDouble *coeffs, std::vector<LibUtilities::BasisType> &fromType) override; - LOCAL_REGIONS_EXPORT virtual StdRegions::Orientation v_GetTraceOrient( + LOCAL_REGIONS_EXPORT StdRegions::Orientation v_GetTraceOrient( int edge) override; - LOCAL_REGIONS_EXPORT virtual void v_GetTracePhysMap( + LOCAL_REGIONS_EXPORT void v_GetTracePhysMap( const int edge, Array<OneD, int> &outarray) override; //--------------------------------------- // Matrix creation functions //--------------------------------------- - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalMatSharedPtr v_GetLocMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalMatSharedPtr + v_GetLocMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix( - const MatrixKey &mkey) override; + LOCAL_REGIONS_EXPORT DNekScalBlkMatSharedPtr + v_GetLocStaticCondMatrix(const MatrixKey &mkey) override; LOCAL_REGIONS_EXPORT void v_DropLocStaticCondMatrix( const MatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_MassMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_WeakDerivMatrixOp( + LOCAL_REGIONS_EXPORT void v_WeakDerivMatrixOp( const int i, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_WeakDirectionalDerivMatrixOp( + LOCAL_REGIONS_EXPORT void v_WeakDirectionalDerivMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_MassLevelCurvatureMatrixOp( + LOCAL_REGIONS_EXPORT void v_MassLevelCurvatureMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + LOCAL_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_LaplacianMatrixOp_MatFree_Kernel( + LOCAL_REGIONS_EXPORT void v_LaplacianMatrixOp_MatFree_Kernel( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override; - LOCAL_REGIONS_EXPORT virtual void v_ReduceOrderCoeffs( + LOCAL_REGIONS_EXPORT void v_ReduceOrderCoeffs( int numMin, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - LOCAL_REGIONS_EXPORT virtual void v_ComputeLaplacianMetric() override; + LOCAL_REGIONS_EXPORT void v_ComputeLaplacianMetric() override; - LOCAL_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + LOCAL_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdRegions::StdMatrixKey &mkey) override; - LOCAL_REGIONS_EXPORT virtual void v_NormalTraceDerivFactors( + LOCAL_REGIONS_EXPORT void v_NormalTraceDerivFactors( Array<OneD, Array<OneD, NekDouble>> &factors, Array<OneD, Array<OneD, NekDouble>> &d0factors, Array<OneD, Array<OneD, NekDouble>> &d1factors) override; @@ -252,7 +249,6 @@ private: typedef std::shared_ptr<TriExp> TriExpSharedPtr; typedef std::vector<TriExpSharedPtr> TriExpVector; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions #endif diff --git a/library/MatrixFreeOps/BwdTrans.h b/library/MatrixFreeOps/BwdTrans.h index cca8d1fd52..51b1d73a3c 100644 --- a/library/MatrixFreeOps/BwdTrans.h +++ b/library/MatrixFreeOps/BwdTrans.h @@ -52,9 +52,7 @@ // are constructed by CMake in the CMakeLists.txt file which uses an // implementation file. See the CMakeLists.txt files for more // details. -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { template <LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED = false> @@ -354,7 +352,6 @@ private: int m_nmTot; }; -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/BwdTransKernels.hpp b/library/MatrixFreeOps/BwdTransKernels.hpp index 5d64b45089..a21e272fb8 100644 --- a/library/MatrixFreeOps/BwdTransKernels.hpp +++ b/library/MatrixFreeOps/BwdTransKernels.hpp @@ -37,9 +37,7 @@ #include <LibUtilities/BasicUtils/NekInline.hpp> -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { using namespace tinysimd; @@ -629,7 +627,6 @@ NEK_FORCE_INLINE static void BwdTrans3DKernel( #endif // SHAPE_DIMENSION -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/Helmholtz.h b/library/MatrixFreeOps/Helmholtz.h index 00a033d4b8..8277f74d52 100644 --- a/library/MatrixFreeOps/Helmholtz.h +++ b/library/MatrixFreeOps/Helmholtz.h @@ -46,9 +46,7 @@ #include "IProductKernels.hpp" #include "PhysDerivKernels.hpp" -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { // As each opertor has seven shapes over three dimension to get to the @@ -579,7 +577,6 @@ private: std::vector<vec_t, allocator<vec_t>> m_h0, m_h1, m_h2, m_h3; }; -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/HelmholtzKernels.hpp b/library/MatrixFreeOps/HelmholtzKernels.hpp index 07aeb9af74..378c22c185 100644 --- a/library/MatrixFreeOps/HelmholtzKernels.hpp +++ b/library/MatrixFreeOps/HelmholtzKernels.hpp @@ -35,9 +35,7 @@ #ifndef NEKTAR_LIBRARY_MF_HELMHOLTZ_KERNELS_H #define NEKTAR_LIBRARY_MF_HELMHOLTZ_KERNELS_H -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { using namespace tinysimd; @@ -1507,7 +1505,6 @@ NEK_FORCE_INLINE static void DiffusionCoeff3DKernel( #endif // SHAPE_DIMENSION -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/IProduct.h b/library/MatrixFreeOps/IProduct.h index 2d8c369211..f0a7d61515 100644 --- a/library/MatrixFreeOps/IProduct.h +++ b/library/MatrixFreeOps/IProduct.h @@ -43,9 +43,7 @@ #include "IProductKernels.hpp" -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { // As each operator has seven shapes over three dimension to get to the @@ -426,7 +424,6 @@ private: int m_nmTot; }; -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/IProductKernels.hpp b/library/MatrixFreeOps/IProductKernels.hpp index 73940e2aed..32cb0e6d91 100644 --- a/library/MatrixFreeOps/IProductKernels.hpp +++ b/library/MatrixFreeOps/IProductKernels.hpp @@ -35,9 +35,7 @@ #ifndef NEKTAR_LIBRARY_MF_IPRODUCT_KERNELS_HPP #define NEKTAR_LIBRARY_MF_IPRODUCT_KERNELS_HPP -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { using namespace tinysimd; @@ -964,7 +962,6 @@ NEK_FORCE_INLINE static void IProduct3DKernel( #endif // SHAPE_DIMENSION -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/IProductWRTDerivBase.h b/library/MatrixFreeOps/IProductWRTDerivBase.h index 596937581b..699c9a7c78 100644 --- a/library/MatrixFreeOps/IProductWRTDerivBase.h +++ b/library/MatrixFreeOps/IProductWRTDerivBase.h @@ -44,9 +44,7 @@ #include "IProductKernels.hpp" #include "IProductWRTDerivBaseKernels.hpp" -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { // As each opertor has seven shapes over three dimension to get to the @@ -173,7 +171,9 @@ struct IProductWRTDerivBaseTemplate // Load and transpose data for (int d = 0; d < ndf; ++d) + { load_interleave(inptr[d], nqTot, tmpIn[d]); + } IProductWRTDerivBase1DKernel<SHAPE_TYPE, DEFORMED>( nqTot, ndf, df_ptr, df_tmp, tmpIn, tmp0); @@ -187,7 +187,9 @@ struct IProductWRTDerivBaseTemplate deinterleave_store(tmpOut, m_nmTot, outptr); for (int d = 0; d < ndf; ++d) + { inptr[d] += nqBlocks; + } outptr += nmBlocks; } @@ -250,7 +252,9 @@ struct IProductWRTDerivBaseTemplate // Load and transpose data for (int d = 0; d < ndf; ++d) + { load_interleave(inptr[d], nqTot, tmpIn[d]); + } IProductWRTDerivBase1DKernel<SHAPE_TYPE, DEFORMED>( nqTot, ndf, df_ptr, df_tmp, tmpIn, tmp0); @@ -264,7 +268,9 @@ struct IProductWRTDerivBaseTemplate deinterleave_store(tmpOut, m_nmTot, outptr); for (int d = 0; d < ndf; ++d) + { inptr[d] += nqBlocks; + } outptr += nmBlocks; } @@ -678,7 +684,6 @@ private: int m_nmTot; }; -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/IProductWRTDerivBaseKernels.hpp b/library/MatrixFreeOps/IProductWRTDerivBaseKernels.hpp index 987c7fbbe4..59d1a1f616 100644 --- a/library/MatrixFreeOps/IProductWRTDerivBaseKernels.hpp +++ b/library/MatrixFreeOps/IProductWRTDerivBaseKernels.hpp @@ -35,9 +35,7 @@ #ifndef NEKTAR_LIBRARY_MF_IPRODUCTWRTDERIVBASE_KERNELS_H #define NEKTAR_LIBRARY_MF_IPRODUCTWRTDERIVBASE_KERNELS_H -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { // The dimension and shape kernels. NOTE: They are NOT duplicate @@ -59,7 +57,9 @@ NEK_FORCE_INLINE static void IProductWRTDerivBaseSegKernel( if (!DEFORMED) { for (int d = 0; d < ndf; ++d) + { df_tmp[d] = df_ptr[d]; + } } for (int i = 0; i < nq0; ++i) @@ -67,12 +67,16 @@ NEK_FORCE_INLINE static void IProductWRTDerivBaseSegKernel( if (DEFORMED) { for (int d = 0; d < ndf; ++d) + { df_tmp[d] = df_ptr[i * ndf + d]; + } } tmp0[i] = df_tmp[0] * tmpIn[0][i]; for (int d = 1; d < ndf; ++d) + { tmp0[i] += (df_tmp[d] * tmpIn[d][i]); + } } } @@ -569,7 +573,6 @@ NEK_FORCE_INLINE static void IProductWRTDerivBase3DKernel( #endif // SHAPE_DIMENSION -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/Operator.cpp b/library/MatrixFreeOps/Operator.cpp index 0d2d5c71df..c567258f56 100644 --- a/library/MatrixFreeOps/Operator.cpp +++ b/library/MatrixFreeOps/Operator.cpp @@ -34,9 +34,7 @@ #include "Operator.hpp" -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { OperatorFactory &GetOperatorFactory() @@ -91,5 +89,4 @@ std::string GetOpstring(LibUtilities::ShapeType shape, bool deformed) return op_string; } -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree diff --git a/library/MatrixFreeOps/Operator.hpp b/library/MatrixFreeOps/Operator.hpp index 28f55d297d..4bb160a5a1 100644 --- a/library/MatrixFreeOps/Operator.hpp +++ b/library/MatrixFreeOps/Operator.hpp @@ -45,9 +45,7 @@ #include <LibUtilities/Foundations/Basis.h> #include <LibUtilities/SimdLib/tinysimd.hpp> -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { class Operator; @@ -102,7 +100,7 @@ public: { } - virtual ~BwdTrans() = default; + ~BwdTrans() override = default; MATRIXFREE_EXPORT virtual void operator()( const Array<OneD, const NekDouble> &input, @@ -122,9 +120,9 @@ public: { } - virtual ~IProduct() = default; + ~IProduct() override = default; - bool NeedsJac() override final + bool NeedsJac() final { return true; } @@ -149,14 +147,14 @@ public: { } - virtual ~IProductWRTDerivBase() = default; + ~IProductWRTDerivBase() override = default; - virtual bool NeedsDF() override final + bool NeedsDF() final { return true; } - virtual bool NeedsJac() override final + bool NeedsJac() final { return true; } @@ -179,9 +177,9 @@ public: { } - virtual ~PhysDeriv() = default; + ~PhysDeriv() override = default; - virtual bool NeedsDF() override final + bool NeedsDF() final { return true; } @@ -230,14 +228,14 @@ public: } } - virtual ~Helmholtz() = default; + ~Helmholtz() override = default; - virtual bool NeedsDF() override final + bool NeedsDF() final { return true; } - virtual bool NeedsJac() override final + bool NeedsJac() final { return true; } @@ -387,16 +385,16 @@ protected: } } - void virtual SetDF( + void SetDF( const std::shared_ptr<std::vector<vec_t, tinysimd::allocator<vec_t>>> - &df) override final + &df) final { m_df = df; } - void virtual SetJac( + void SetJac( const std::shared_ptr<std::vector<vec_t, tinysimd::allocator<vec_t>>> - &jac) override final + &jac) final { m_jac = jac; } @@ -417,7 +415,6 @@ protected: std::shared_ptr<std::vector<vec_t, tinysimd::allocator<vec_t>>> m_jac; }; -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/OperatorImp.cpp.in b/library/MatrixFreeOps/OperatorImp.cpp.in index e2cb8c61c8..2b8b9b5caa 100644 --- a/library/MatrixFreeOps/OperatorImp.cpp.in +++ b/library/MatrixFreeOps/OperatorImp.cpp.in @@ -15,12 +15,9 @@ #include "NektarExpMacros.h" -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { NEKTAR_EXPL_DEC_INC_GEN@INST@( @OPERATOR@, @SHAPE@ ) -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree diff --git a/library/MatrixFreeOps/PhysDeriv.h b/library/MatrixFreeOps/PhysDeriv.h index c32eb40eca..89dcc25dbb 100644 --- a/library/MatrixFreeOps/PhysDeriv.h +++ b/library/MatrixFreeOps/PhysDeriv.h @@ -42,9 +42,7 @@ #include "Operator.hpp" #include "PhysDerivKernels.hpp" -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { // As each opertor has seven shapes over three dimension to get to the @@ -507,9 +505,13 @@ struct PhysDerivTemplate // if( ndf >= 1 ) df_tmp[0] = df_ptr[0]; if (ndf >= 2) + { df_tmp[1] = df_ptr[1]; + } if (ndf == 3) + { df_tmp[2] = df_ptr[2]; + } } for (int j = 0; j < nq0; ++j) @@ -519,17 +521,25 @@ struct PhysDerivTemplate // if( ndf >= 1 ) df_tmp[0] = df_ptr[j * ndf]; // load 1x if (ndf >= 2) + { df_tmp[1] = df_ptr[j * ndf + 1]; // load 1x + } if (ndf == 3) + { df_tmp[2] = df_ptr[j * ndf + 2]; // load 1x + } } // Multiply by derivative factors if (ndf == 3) + { out[2][j] = out[0][j] * df_tmp[2]; // Store 1x + } if (ndf >= 2) + { out[1][j] = out[0][j] * df_tmp[1]; // Store 1x - out[0][j] *= df_tmp[0]; // Store 1x + } + out[0][j] *= df_tmp[0]; // Store 1x } } @@ -817,7 +827,6 @@ private: int m_nmTot; }; -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MatrixFreeOps/PhysDerivKernels.hpp b/library/MatrixFreeOps/PhysDerivKernels.hpp index f55bb0ee52..d3addbe2cc 100644 --- a/library/MatrixFreeOps/PhysDerivKernels.hpp +++ b/library/MatrixFreeOps/PhysDerivKernels.hpp @@ -35,9 +35,7 @@ #ifndef NEKTAR_LIBRARY_MF_PHYS_DERIV_KERNELS_HPP #define NEKTAR_LIBRARY_MF_PHYS_DERIV_KERNELS_HPP -namespace Nektar -{ -namespace MatrixFree +namespace Nektar::MatrixFree { using namespace tinysimd; @@ -263,7 +261,6 @@ NEK_FORCE_INLINE static void PhysDeriv3DWorkspace(const size_t nq0, #endif // SHAPE_DIMENSION -} // namespace MatrixFree -} // namespace Nektar +} // namespace Nektar::MatrixFree #endif diff --git a/library/MultiRegions/AssemblyMap/AssemblyCommDG.cpp b/library/MultiRegions/AssemblyMap/AssemblyCommDG.cpp index 452e5ccc2c..433c30ed77 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyCommDG.cpp +++ b/library/MultiRegions/AssemblyMap/AssemblyCommDG.cpp @@ -38,9 +38,7 @@ #include <utility> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { AllToAll::AllToAll(const LibUtilities::CommSharedPtr &comm, const int &maxQuad, @@ -746,5 +744,4 @@ std::tuple<NekDouble, NekDouble, NekDouble> AssemblyCommDG::Timing( return std::make_tuple(avgTime, minTime[0], maxTime[0]); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/AssemblyMap/AssemblyCommDG.h b/library/MultiRegions/AssemblyMap/AssemblyCommDG.h index 66d56775a1..9ebca00256 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyCommDG.h +++ b/library/MultiRegions/AssemblyMap/AssemblyCommDG.h @@ -38,9 +38,7 @@ #include <LibUtilities/BasicUtils/Timer.h> #include <MultiRegions/ExpList.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** @@ -301,7 +299,6 @@ private: typedef std::shared_ptr<AssemblyCommDG> AssemblyCommDGSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/AssemblyMap/AssemblyMap.cpp b/library/MultiRegions/AssemblyMap/AssemblyMap.cpp index 959aaf3c79..7e4d72f996 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMap.cpp +++ b/library/MultiRegions/AssemblyMap/AssemblyMap.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class AssemblyMap @@ -84,7 +82,7 @@ AssemblyMap::AssemblyMap() m_numGlobalBndCoeffs(0), m_numLocalDirBndCoeffs(0), m_numGlobalDirBndCoeffs(0), m_solnType(eNoSolnType), m_bndSystemBandWidth(0), m_successiveRHS(0), - m_linSysIterSolver("ConjugateGradient"), m_gsh(0), m_bndGsh(0) + m_linSysIterSolver("ConjugateGradient"), m_gsh(nullptr), m_bndGsh(nullptr) { } @@ -95,7 +93,7 @@ AssemblyMap::AssemblyMap(const LibUtilities::SessionReaderSharedPtr &pSession, m_numLocalBndCoeffs(0), m_numGlobalBndCoeffs(0), m_numLocalDirBndCoeffs(0), m_numGlobalDirBndCoeffs(0), m_bndSystemBandWidth(0), m_successiveRHS(0), - m_linSysIterSolver("ConjugateGradient"), m_gsh(0), m_bndGsh(0) + m_linSysIterSolver("ConjugateGradient"), m_gsh(nullptr), m_bndGsh(nullptr) { // Default value from Solver Info m_solnType = @@ -1311,10 +1309,14 @@ void AssemblyMap::UniversalAssembleBnd(Array<OneD, NekDouble> &pGlobal, { Array<OneD, NekDouble> tmp(offset); if (offset > 0) + { Vmath::Vcopy(offset, pGlobal, 1, tmp, 1); + } UniversalAssembleBnd(pGlobal); if (offset > 0) + { Vmath::Vcopy(offset, tmp, 1, pGlobal, 1); + } } void AssemblyMap::UniversalAbsMaxBnd(Array<OneD, NekDouble> &bndvals) @@ -1635,5 +1637,4 @@ void AssemblyMap::PrintStats(std::ostream &out, std::string variable, } tmp->PrintStats(out, variable, false); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/AssemblyMap/AssemblyMap.h b/library/MultiRegions/AssemblyMap/AssemblyMap.h index 12dc240ecb..bd9dc5b137 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMap.h +++ b/library/MultiRegions/AssemblyMap/AssemblyMap.h @@ -42,9 +42,7 @@ #include <MultiRegions/SubStructuredGraph.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class AssemblyMap; @@ -520,7 +518,6 @@ private: PatchMapSharedPtr m_patchMapFromPrevLevel; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIREGIONS_ASSEMBLY_MAP_H diff --git a/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp b/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp index cf1eb07479..708dcb7600 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp +++ b/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp @@ -48,9 +48,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class AssemblyMapCG @@ -2956,5 +2954,4 @@ const Array<OneD, const int> &AssemblyMapCG::v_GetExtraDirEdges() { return m_extraDirEdges; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/AssemblyMap/AssemblyMapCG.h b/library/MultiRegions/AssemblyMap/AssemblyMapCG.h index c4cf3b9181..ab08875bf7 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMapCG.h +++ b/library/MultiRegions/AssemblyMap/AssemblyMapCG.h @@ -41,9 +41,7 @@ #include <MultiRegions/ExpList.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { static std::map<int, int> NullIntIntMap; const static std::vector<std::map<int, int>> NullVecIntIntMap; @@ -91,7 +89,7 @@ public: const PeriodicMap &periodicFaces = NullPeriodicMap); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~AssemblyMapCG(); + MULTI_REGIONS_EXPORT ~AssemblyMapCG() override; MULTI_REGIONS_EXPORT std::set<ExtraDirDof> &GetCopyLocalDirDofs() { @@ -160,87 +158,85 @@ protected: /// Calculate the bandwith of the full matrix system. void CalculateFullSystemBandWidth(); - MULTI_REGIONS_EXPORT virtual int v_GetLocalToGlobalMap( - const int i) const override; + MULTI_REGIONS_EXPORT int v_GetLocalToGlobalMap(const int i) const override; - MULTI_REGIONS_EXPORT virtual int v_GetGlobalToUniversalMap( + MULTI_REGIONS_EXPORT int v_GetGlobalToUniversalMap( const int i) const override; - MULTI_REGIONS_EXPORT virtual int v_GetGlobalToUniversalMapUnique( + MULTI_REGIONS_EXPORT int v_GetGlobalToUniversalMapUnique( const int i) const override; - MULTI_REGIONS_EXPORT virtual const Array<OneD, const int> - &v_GetLocalToGlobalMap() override; + MULTI_REGIONS_EXPORT const Array<OneD, const int> &v_GetLocalToGlobalMap() + override; - MULTI_REGIONS_EXPORT virtual const Array<OneD, const int> + MULTI_REGIONS_EXPORT const Array<OneD, const int> &v_GetGlobalToUniversalMap() override; - MULTI_REGIONS_EXPORT virtual const Array<OneD, const int> + MULTI_REGIONS_EXPORT const Array<OneD, const int> &v_GetGlobalToUniversalMapUnique() override; - MULTI_REGIONS_EXPORT virtual NekDouble v_GetLocalToGlobalSign( - const int i) const override; + MULTI_REGIONS_EXPORT NekDouble + v_GetLocalToGlobalSign(const int i) const override; - MULTI_REGIONS_EXPORT virtual const Array<OneD, NekDouble> - &v_GetLocalToGlobalSign() const override; + MULTI_REGIONS_EXPORT const Array<OneD, NekDouble> &v_GetLocalToGlobalSign() + const override; - MULTI_REGIONS_EXPORT virtual void v_LocalToGlobal( + MULTI_REGIONS_EXPORT void v_LocalToGlobal( const Array<OneD, const NekDouble> &loc, Array<OneD, NekDouble> &global, bool useComm) const override; - MULTI_REGIONS_EXPORT virtual void v_LocalToGlobal( - const NekVector<NekDouble> &loc, NekVector<NekDouble> &global, - bool useComm) const override; + MULTI_REGIONS_EXPORT void v_LocalToGlobal(const NekVector<NekDouble> &loc, + NekVector<NekDouble> &global, + bool useComm) const override; - MULTI_REGIONS_EXPORT virtual void v_GlobalToLocal( + MULTI_REGIONS_EXPORT void v_GlobalToLocal( const Array<OneD, const NekDouble> &global, Array<OneD, NekDouble> &loc) const override; - MULTI_REGIONS_EXPORT virtual void v_GlobalToLocal( + MULTI_REGIONS_EXPORT void v_GlobalToLocal( const NekVector<NekDouble> &global, NekVector<NekDouble> &loc) const override; - MULTI_REGIONS_EXPORT virtual void v_Assemble( + MULTI_REGIONS_EXPORT void v_Assemble( const Array<OneD, const NekDouble> &loc, Array<OneD, NekDouble> &global) const override; - MULTI_REGIONS_EXPORT virtual void v_Assemble( + MULTI_REGIONS_EXPORT void v_Assemble( const NekVector<NekDouble> &loc, NekVector<NekDouble> &global) const override; - MULTI_REGIONS_EXPORT virtual void v_UniversalAssemble( + MULTI_REGIONS_EXPORT void v_UniversalAssemble( Array<OneD, NekDouble> &pGlobal) const override; - MULTI_REGIONS_EXPORT virtual void v_UniversalAssemble( + MULTI_REGIONS_EXPORT void v_UniversalAssemble( NekVector<NekDouble> &pGlobal) const override; - MULTI_REGIONS_EXPORT virtual void v_UniversalAssemble( + MULTI_REGIONS_EXPORT void v_UniversalAssemble( Array<OneD, NekDouble> &pGlobal, int offset) const override; - MULTI_REGIONS_EXPORT virtual int v_GetFullSystemBandWidth() const override; + MULTI_REGIONS_EXPORT int v_GetFullSystemBandWidth() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumNonDirVertexModes() const override; + MULTI_REGIONS_EXPORT int v_GetNumNonDirVertexModes() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumNonDirEdgeModes() const override; + MULTI_REGIONS_EXPORT int v_GetNumNonDirEdgeModes() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumNonDirFaceModes() const override; + MULTI_REGIONS_EXPORT int v_GetNumNonDirFaceModes() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumDirEdges() const override; + MULTI_REGIONS_EXPORT int v_GetNumDirEdges() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumDirFaces() const override; + MULTI_REGIONS_EXPORT int v_GetNumDirFaces() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumNonDirEdges() const override; + MULTI_REGIONS_EXPORT int v_GetNumNonDirEdges() const override; - MULTI_REGIONS_EXPORT virtual int v_GetNumNonDirFaces() const override; + MULTI_REGIONS_EXPORT int v_GetNumNonDirFaces() const override; - MULTI_REGIONS_EXPORT virtual const Array<OneD, const int> - &v_GetExtraDirEdges() override; + MULTI_REGIONS_EXPORT const Array<OneD, const int> &v_GetExtraDirEdges() + override; - MULTI_REGIONS_EXPORT virtual AssemblyMapSharedPtr v_LinearSpaceMap( + MULTI_REGIONS_EXPORT AssemblyMapSharedPtr v_LinearSpaceMap( const ExpList &locexp, GlobalSysSolnType solnType) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIREGIONS_ASSEMBLYMAPCG_H diff --git a/library/MultiRegions/AssemblyMap/AssemblyMapDG.cpp b/library/MultiRegions/AssemblyMap/AssemblyMapDG.cpp index e8a9b0c735..6c37413083 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMapDG.cpp +++ b/library/MultiRegions/AssemblyMap/AssemblyMapDG.cpp @@ -47,9 +47,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { AssemblyMapDG::AssemblyMapDG() : m_numDirichletBndPhys(0) { @@ -915,5 +913,4 @@ AssemblyCommDGSharedPtr AssemblyMapDG::GetAssemblyCommDG() return m_assemblyComm; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/AssemblyMap/AssemblyMapDG.h b/library/MultiRegions/AssemblyMap/AssemblyMapDG.h index d14a10e1b3..22fb671491 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMapDG.h +++ b/library/MultiRegions/AssemblyMap/AssemblyMapDG.h @@ -40,9 +40,7 @@ #include <MultiRegions/ExpList.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class AssemblyMapDG; typedef std::shared_ptr<AssemblyMapDG> AssemblyMapDGSharedPtr; @@ -66,7 +64,7 @@ public: const std::string variable = "DefaultVar"); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~AssemblyMapDG(); + MULTI_REGIONS_EXPORT ~AssemblyMapDG() override; /// Return the number of boundary segments on which Dirichlet /// boundary conditions are imposed. @@ -106,47 +104,43 @@ protected: void SetUpUniversalDGMap(const ExpList &locExp); - virtual int v_GetLocalToGlobalMap(const int i) const override; + int v_GetLocalToGlobalMap(const int i) const override; - virtual int v_GetGlobalToUniversalMap(const int i) const override; + int v_GetGlobalToUniversalMap(const int i) const override; - virtual int v_GetGlobalToUniversalMapUnique(const int i) const override; + int v_GetGlobalToUniversalMapUnique(const int i) const override; - virtual const Array<OneD, const int> &v_GetLocalToGlobalMap() override; + const Array<OneD, const int> &v_GetLocalToGlobalMap() override; - virtual const Array<OneD, const int> &v_GetGlobalToUniversalMap() override; + const Array<OneD, const int> &v_GetGlobalToUniversalMap() override; - virtual const Array<OneD, const int> &v_GetGlobalToUniversalMapUnique() - override; + const Array<OneD, const int> &v_GetGlobalToUniversalMapUnique() override; - virtual NekDouble v_GetLocalToGlobalSign(const int i) const override; + NekDouble v_GetLocalToGlobalSign(const int i) const override; - virtual void v_LocalToGlobal(const Array<OneD, const NekDouble> &loc, - Array<OneD, NekDouble> &global, - bool useComm = false) const override; + void v_LocalToGlobal(const Array<OneD, const NekDouble> &loc, + Array<OneD, NekDouble> &global, + bool useComm = false) const override; - virtual void v_GlobalToLocal(const Array<OneD, const NekDouble> &global, - Array<OneD, NekDouble> &loc) const override; + void v_GlobalToLocal(const Array<OneD, const NekDouble> &global, + Array<OneD, NekDouble> &loc) const override; - virtual void v_GlobalToLocal(const NekVector<NekDouble> &global, - NekVector<NekDouble> &loc) const override; + void v_GlobalToLocal(const NekVector<NekDouble> &global, + NekVector<NekDouble> &loc) const override; - virtual void v_Assemble(const Array<OneD, const NekDouble> &loc, - Array<OneD, NekDouble> &global) const override; + void v_Assemble(const Array<OneD, const NekDouble> &loc, + Array<OneD, NekDouble> &global) const override; - virtual void v_Assemble(const NekVector<NekDouble> &loc, - NekVector<NekDouble> &global) const override; + void v_Assemble(const NekVector<NekDouble> &loc, + NekVector<NekDouble> &global) const override; - virtual void v_UniversalAssemble( - Array<OneD, NekDouble> &pGlobal) const override; + void v_UniversalAssemble(Array<OneD, NekDouble> &pGlobal) const override; - virtual void v_UniversalAssemble( - NekVector<NekDouble> &pGlobal) const override; + void v_UniversalAssemble(NekVector<NekDouble> &pGlobal) const override; - virtual int v_GetFullSystemBandWidth() const override; + int v_GetFullSystemBandWidth() const override; }; // class -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIREGIONS_ASSEMBLY_MAP_DG_H diff --git a/library/MultiRegions/AssemblyMap/InterfaceMapDG.cpp b/library/MultiRegions/AssemblyMap/InterfaceMapDG.cpp index c5f872a05f..303fa8c5f9 100644 --- a/library/MultiRegions/AssemblyMap/InterfaceMapDG.cpp +++ b/library/MultiRegions/AssemblyMap/InterfaceMapDG.cpp @@ -34,9 +34,7 @@ #include "InterfaceMapDG.h" -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { InterfaceTrace::InterfaceTrace( @@ -598,5 +596,4 @@ void InterfaceExchange::CalcRankDistances() } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/AssemblyMap/InterfaceMapDG.h b/library/MultiRegions/AssemblyMap/InterfaceMapDG.h index d59a89f699..6b9e16ba54 100644 --- a/library/MultiRegions/AssemblyMap/InterfaceMapDG.h +++ b/library/MultiRegions/AssemblyMap/InterfaceMapDG.h @@ -38,9 +38,7 @@ #include <MultiRegions/ExpList.h> #include <SpatialDomains/Movement/Movement.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** @@ -268,7 +266,6 @@ private: typedef std::shared_ptr<InterfaceMapDG> InterfaceMapDGSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif \ No newline at end of file diff --git a/library/MultiRegions/AssemblyMap/LocTraceToTraceMap.cpp b/library/MultiRegions/AssemblyMap/LocTraceToTraceMap.cpp index 4942b36577..6122d7fc15 100644 --- a/library/MultiRegions/AssemblyMap/LocTraceToTraceMap.cpp +++ b/library/MultiRegions/AssemblyMap/LocTraceToTraceMap.cpp @@ -44,9 +44,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** @@ -1916,5 +1914,4 @@ void LocTraceToTraceMap::AddTraceCoeffsToFieldCoeffs( } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ContField.cpp b/library/MultiRegions/ContField.cpp index ad129b627c..031f75af43 100644 --- a/library/MultiRegions/ContField.cpp +++ b/library/MultiRegions/ContField.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class ContField @@ -1061,5 +1059,4 @@ void ContField::v_UnsetGlobalLinSys(GlobalLinSysKey key, m_globalLinSysManager.DeleteObject(key); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ContField.h b/library/MultiRegions/ContField.h index 5c43707468..98bc7266e5 100644 --- a/library/MultiRegions/ContField.h +++ b/library/MultiRegions/ContField.h @@ -45,9 +45,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <SpatialDomains/Conditions.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /// This class is the abstraction of a global continuous two- @@ -88,7 +86,7 @@ public: const ExpList &In); /// The default destructor. - MULTI_REGIONS_EXPORT virtual ~ContField(); + MULTI_REGIONS_EXPORT ~ContField() override; /// Assembles the global coefficients \f$\boldsymbol{\hat{u}}_g\f$ /// from the local coefficients \f$\boldsymbol{\hat{u}}_l\f$. @@ -177,60 +175,60 @@ protected: GenGlobalLinSys(const GlobalLinSysKey &mkey); /// Impose the Dirichlet Boundary Conditions on outarray - MULTI_REGIONS_EXPORT virtual void v_ImposeDirichletConditions( + MULTI_REGIONS_EXPORT void v_ImposeDirichletConditions( Array<OneD, NekDouble> &outarray) override; - MULTI_REGIONS_EXPORT virtual void v_FillBndCondFromField( + MULTI_REGIONS_EXPORT void v_FillBndCondFromField( const Array<OneD, NekDouble> coeffs) override; - MULTI_REGIONS_EXPORT virtual void v_FillBndCondFromField( + MULTI_REGIONS_EXPORT void v_FillBndCondFromField( const int nreg, const Array<OneD, NekDouble> coeffs) override; /// Gathers the global coefficients \f$\boldsymbol{\hat{u}}_g\f$ /// from the local coefficients \f$\boldsymbol{\hat{u}}_l\f$. - MULTI_REGIONS_EXPORT virtual void v_LocalToGlobal( + MULTI_REGIONS_EXPORT void v_LocalToGlobal( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool useComm) override; - MULTI_REGIONS_EXPORT virtual void v_LocalToGlobal(bool useComm) override; + MULTI_REGIONS_EXPORT void v_LocalToGlobal(bool useComm) override; /// Scatters from the global coefficients /// \f$\boldsymbol{\hat{u}}_g\f$ to the local coefficients /// \f$\boldsymbol{\hat{u}}_l\f$. - MULTI_REGIONS_EXPORT virtual void v_GlobalToLocal( + MULTI_REGIONS_EXPORT void v_GlobalToLocal( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - MULTI_REGIONS_EXPORT virtual void v_GlobalToLocal(void) override; + MULTI_REGIONS_EXPORT void v_GlobalToLocal(void) override; /// Template method virtual forwarder for FwdTrans(). - MULTI_REGIONS_EXPORT virtual void v_FwdTrans( + MULTI_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; /// Template method virtual forwarded for SmoothField(). - MULTI_REGIONS_EXPORT virtual void v_SmoothField( + MULTI_REGIONS_EXPORT void v_SmoothField( Array<OneD, NekDouble> &field) override; /// Template method virtual forwarder for MultiplyByInvMassMatrix(). - MULTI_REGIONS_EXPORT virtual void v_MultiplyByInvMassMatrix( + MULTI_REGIONS_EXPORT void v_MultiplyByInvMassMatrix( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; /// Solves the two-dimensional Helmholtz equation, subject to the /// boundary conditions specified. - MULTI_REGIONS_EXPORT virtual GlobalLinSysKey v_HelmSolve( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::ConstFactorMap &factors, - const StdRegions::VarCoeffMap &varcoeff, - const MultiRegions::VarFactorsMap &varfactors, - const Array<OneD, const NekDouble> &dirForcing, - const bool PhysSpaceForcing) override; + MULTI_REGIONS_EXPORT GlobalLinSysKey + v_HelmSolve(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::ConstFactorMap &factors, + const StdRegions::VarCoeffMap &varcoeff, + const MultiRegions::VarFactorsMap &varfactors, + const Array<OneD, const NekDouble> &dirForcing, + const bool PhysSpaceForcing) override; // Solve the linear advection problem assuming that m_coeffs // vector contains an intial estimate for solution - MULTI_REGIONS_EXPORT virtual GlobalLinSysKey + MULTI_REGIONS_EXPORT GlobalLinSysKey v_LinearAdvectionDiffusionReactionSolve( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, @@ -242,7 +240,7 @@ protected: // Solve the linear advection problem assuming that m_coeff // vector contains an intial estimate for solution - MULTI_REGIONS_EXPORT virtual void v_LinearAdvectionReactionSolve( + MULTI_REGIONS_EXPORT void v_LinearAdvectionReactionSolve( const Array<OneD, Array<OneD, NekDouble>> &velocity, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const NekDouble lambda, @@ -254,10 +252,10 @@ protected: &v_GetBndCondExpansions() override; /// Template method virtual forwarder for GetBndConditions(). - MULTI_REGIONS_EXPORT virtual const Array< + MULTI_REGIONS_EXPORT const Array< OneD, const SpatialDomains ::BoundaryConditionShPtr> &v_GetBndConditions() override; - MULTI_REGIONS_EXPORT virtual void v_ClearGlobalLinSysManager(void) override; + MULTI_REGIONS_EXPORT void v_ClearGlobalLinSysManager(void) override; // Get manager pool count; intended for unit tests MULTI_REGIONS_EXPORT int v_GetPoolCount(std::string) override; @@ -369,7 +367,6 @@ inline int ContField::GetGlobalMatrixNnz(const GlobalMatrixKey &gkey) return 0; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIERGIONS_CONTFIELD2D_H diff --git a/library/MultiRegions/ContField3DHomogeneous1D.cpp b/library/MultiRegions/ContField3DHomogeneous1D.cpp index 17262aa956..de784035f2 100644 --- a/library/MultiRegions/ContField3DHomogeneous1D.cpp +++ b/library/MultiRegions/ContField3DHomogeneous1D.cpp @@ -36,9 +36,7 @@ #include <MultiRegions/ContField.h> #include <MultiRegions/ContField3DHomogeneous1D.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { ContField3DHomogeneous1D::ContField3DHomogeneous1D(void) @@ -314,5 +312,4 @@ void ContField3DHomogeneous1D::v_ClearGlobalLinSysManager(void) } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ContField3DHomogeneous1D.h b/library/MultiRegions/ContField3DHomogeneous1D.h index b26bde89c8..39146ae320 100644 --- a/library/MultiRegions/ContField3DHomogeneous1D.h +++ b/library/MultiRegions/ContField3DHomogeneous1D.h @@ -39,9 +39,7 @@ #include <MultiRegions/DisContField3DHomogeneous1D.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class ContField3DHomogeneous1D : public DisContField3DHomogeneous1D { @@ -67,44 +65,40 @@ public: const std::string &variable); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ContField3DHomogeneous1D(); + MULTI_REGIONS_EXPORT ~ContField3DHomogeneous1D() override; - MULTI_REGIONS_EXPORT virtual void v_SmoothField( + MULTI_REGIONS_EXPORT void v_SmoothField( Array<OneD, NekDouble> &field) override; protected: - virtual void v_ImposeDirichletConditions( - Array<OneD, NekDouble> &outarray) override; + void v_ImposeDirichletConditions(Array<OneD, NekDouble> &outarray) override; - virtual void v_FillBndCondFromField( - const Array<OneD, NekDouble> coeffs) override; - virtual void v_FillBndCondFromField( - const int nreg, const Array<OneD, NekDouble> coeffs) override; + void v_FillBndCondFromField(const Array<OneD, NekDouble> coeffs) override; + void v_FillBndCondFromField(const int nreg, + const Array<OneD, NekDouble> coeffs) override; /// Template method virtual forwarded for LocalToGlobal() - virtual void v_LocalToGlobal(bool useComm) override; + void v_LocalToGlobal(bool useComm) override; /// Template method virtual forwarded for GlobalToLocal() - virtual void v_GlobalToLocal(void) override; + void v_GlobalToLocal(void) override; /// Solves the three-dimensional Helmholtz equation, subject to the /// boundary conditions specified. - virtual GlobalLinSysKey v_HelmSolve( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::ConstFactorMap &factors, - const StdRegions::VarCoeffMap &varcoeff, - const MultiRegions::VarFactorsMap &varfactors, - const Array<OneD, const NekDouble> &dirForcing, - const bool PhysSpaceForcing) override; - - virtual void v_ClearGlobalLinSysManager(void) override; + GlobalLinSysKey v_HelmSolve(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::ConstFactorMap &factors, + const StdRegions::VarCoeffMap &varcoeff, + const MultiRegions::VarFactorsMap &varfactors, + const Array<OneD, const NekDouble> &dirForcing, + const bool PhysSpaceForcing) override; + + void v_ClearGlobalLinSysManager(void) override; }; typedef std::shared_ptr<ContField3DHomogeneous1D> ContField3DHomogeneous1DSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIERGIONS_CONTFIELD3DHOMO1D_H diff --git a/library/MultiRegions/ContField3DHomogeneous2D.cpp b/library/MultiRegions/ContField3DHomogeneous2D.cpp index 3b007df4c6..df50f28702 100644 --- a/library/MultiRegions/ContField3DHomogeneous2D.cpp +++ b/library/MultiRegions/ContField3DHomogeneous2D.cpp @@ -36,9 +36,7 @@ #include <MultiRegions/ContField.h> #include <MultiRegions/ContField3DHomogeneous2D.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { ContField3DHomogeneous2D::ContField3DHomogeneous2D(void) @@ -216,5 +214,4 @@ void ContField3DHomogeneous2D::v_ClearGlobalLinSysManager(void) } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ContField3DHomogeneous2D.h b/library/MultiRegions/ContField3DHomogeneous2D.h index 51f355c970..b9637dfd76 100644 --- a/library/MultiRegions/ContField3DHomogeneous2D.h +++ b/library/MultiRegions/ContField3DHomogeneous2D.h @@ -39,9 +39,7 @@ #include <MultiRegions/DisContField3DHomogeneous2D.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class ContField3DHomogeneous2D : public DisContField3DHomogeneous2D { @@ -63,32 +61,30 @@ public: const ContField3DHomogeneous2D &In); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ContField3DHomogeneous2D(); + MULTI_REGIONS_EXPORT ~ContField3DHomogeneous2D() override; protected: // virtual functions - virtual void v_ImposeDirichletConditions( - Array<OneD, NekDouble> &outarray) override; + void v_ImposeDirichletConditions(Array<OneD, NekDouble> &outarray) override; /// Template method virtual forwarded for LocalToGlobal() - virtual void v_LocalToGlobal(bool useComm) override; + void v_LocalToGlobal(bool useComm) override; /// Template method virtual forwarded for GlobalToLocal() - virtual void v_GlobalToLocal(void) override; + void v_GlobalToLocal(void) override; /// Solves the three-dimensional Helmholtz equation, subject to the /// boundary conditions specified. - virtual GlobalLinSysKey v_HelmSolve( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::ConstFactorMap &factors, - const StdRegions::VarCoeffMap &varcoeff, - const MultiRegions::VarFactorsMap &varfactors, - const Array<OneD, const NekDouble> &dirForcing, - const bool PhysSpaceForcing) override; + GlobalLinSysKey v_HelmSolve(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::ConstFactorMap &factors, + const StdRegions::VarCoeffMap &varcoeff, + const MultiRegions::VarFactorsMap &varfactors, + const Array<OneD, const NekDouble> &dirForcing, + const bool PhysSpaceForcing) override; - virtual void v_ClearGlobalLinSysManager(void) override; + void v_ClearGlobalLinSysManager(void) override; private: Array<OneD, NekDouble> m_contCoeffs; @@ -97,7 +93,6 @@ private: typedef std::shared_ptr<ContField3DHomogeneous2D> ContField3DHomogeneous2DSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIERGIONS_CONTFIELD3DHOMO1D_H diff --git a/library/MultiRegions/DisContField.cpp b/library/MultiRegions/DisContField.cpp index 9f11bf28db..a0142fd642 100644 --- a/library/MultiRegions/DisContField.cpp +++ b/library/MultiRegions/DisContField.cpp @@ -47,9 +47,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class DisContField @@ -4423,5 +4421,4 @@ void DisContField::v_AddTraceIntegralToOffDiag( m_trace->IProductWRTBase(BwdFlux, FCoeffs); m_locTraceToTraceMap->AddTraceCoeffsToFieldCoeffs(0, FCoeffs, outarray); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/DisContField.h b/library/MultiRegions/DisContField.h index 4f9962531d..735e42f916 100644 --- a/library/MultiRegions/DisContField.h +++ b/library/MultiRegions/DisContField.h @@ -46,9 +46,7 @@ #include <SpatialDomains/Conditions.h> #include <boost/algorithm/string.hpp> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /// This class is the abstractio n of a global discontinuous two- @@ -100,7 +98,7 @@ public: MULTI_REGIONS_EXPORT DisContField(const ExpList &In); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~DisContField(); + MULTI_REGIONS_EXPORT ~DisContField() override; /// For a given key, returns the associated global linear system. MULTI_REGIONS_EXPORT GlobalLinSysSharedPtr @@ -219,34 +217,32 @@ protected: bool IsLeftAdjacentTrace(const int n, const int e); - virtual ExpListSharedPtr &v_GetTrace() override; + ExpListSharedPtr &v_GetTrace() override; - virtual AssemblyMapDGSharedPtr &v_GetTraceMap(void) override; + AssemblyMapDGSharedPtr &v_GetTraceMap(void) override; - virtual const LocTraceToTraceMapSharedPtr &v_GetLocTraceToTraceMap( + const LocTraceToTraceMapSharedPtr &v_GetLocTraceToTraceMap( void) const override; - virtual std::vector<bool> &v_GetLeftAdjacentTraces(void) override; + std::vector<bool> &v_GetLeftAdjacentTraces(void) override; - virtual void v_AddTraceIntegral(const Array<OneD, const NekDouble> &Fn, - Array<OneD, NekDouble> &outarray) override; + void v_AddTraceIntegral(const Array<OneD, const NekDouble> &Fn, + Array<OneD, NekDouble> &outarray) override; - virtual void v_AddFwdBwdTraceIntegral( - const Array<OneD, const NekDouble> &Fwd, - const Array<OneD, const NekDouble> &Bwd, - Array<OneD, NekDouble> &outarray) override; + void v_AddFwdBwdTraceIntegral(const Array<OneD, const NekDouble> &Fwd, + const Array<OneD, const NekDouble> &Bwd, + Array<OneD, NekDouble> &outarray) override; - virtual void v_AddTraceQuadPhysToField( - const Array<OneD, const NekDouble> &Fwd, - const Array<OneD, const NekDouble> &Bwd, - Array<OneD, NekDouble> &field) override; + void v_AddTraceQuadPhysToField(const Array<OneD, const NekDouble> &Fwd, + const Array<OneD, const NekDouble> &Bwd, + Array<OneD, NekDouble> &field) override; - virtual void v_ExtractTracePhys(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_ExtractTracePhys(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_ExtractTracePhys(Array<OneD, NekDouble> &outarray) override; + void v_ExtractTracePhys(Array<OneD, NekDouble> &outarray) override; - virtual void v_GetLocTraceFromTracePts( + void v_GetLocTraceFromTracePts( const Array<OneD, const NekDouble> &Fwd, const Array<OneD, const NekDouble> &Bwd, Array<OneD, NekDouble> &locTraceFwd, @@ -255,76 +251,69 @@ protected: void GenerateFieldBnd1D(SpatialDomains::BoundaryConditions &bcs, const std::string variable); - virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo() override; + std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo() override; - virtual const Array<OneD, const MultiRegions::ExpListSharedPtr> + const Array<OneD, const MultiRegions::ExpListSharedPtr> &v_GetBndCondExpansions() override; - virtual const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> + const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> &v_GetBndConditions() override; - virtual MultiRegions::ExpListSharedPtr &v_UpdateBndCondExpansion( - int i) override; + MultiRegions::ExpListSharedPtr &v_UpdateBndCondExpansion(int i) override; - virtual Array<OneD, SpatialDomains::BoundaryConditionShPtr> - &v_UpdateBndConditions() override; + Array<OneD, SpatialDomains::BoundaryConditionShPtr> &v_UpdateBndConditions() + override; - virtual void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID, - Array<OneD, int> &TraceID) override; - virtual void v_GetBndElmtExpansion( - int i, std::shared_ptr<ExpList> &result, - const bool DeclareCoeffPhysArrays) override; + void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID, + Array<OneD, int> &TraceID) override; + void v_GetBndElmtExpansion(int i, std::shared_ptr<ExpList> &result, + const bool DeclareCoeffPhysArrays) override; - virtual void v_Reset() override; + void v_Reset() override; /// Evaluate all boundary conditions at a given time.. - virtual void v_EvaluateBoundaryConditions( + void v_EvaluateBoundaryConditions( const NekDouble time = 0.0, const std::string varName = "", const NekDouble x2_in = NekConstants::kNekUnsetDouble, const NekDouble x3_in = NekConstants::kNekUnsetDouble) override; /// Solve the Helmholtz equation. - virtual GlobalLinSysKey v_HelmSolve( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::ConstFactorMap &factors, - const StdRegions::VarCoeffMap &varcoeff, - const MultiRegions::VarFactorsMap &varfactors, - const Array<OneD, const NekDouble> &dirForcing, - const bool PhysSpaceForcing) override; - - virtual void v_PeriodicBwdCopy(const Array<OneD, const NekDouble> &Fwd, - Array<OneD, NekDouble> &Bwd) override; - - virtual void v_FillBwdWithBwdWeight( - Array<OneD, NekDouble> &weightave, - Array<OneD, NekDouble> &weightjmp) override; - - virtual void v_GetFwdBwdTracePhys(Array<OneD, NekDouble> &Fwd, - Array<OneD, NekDouble> &Bwd) override; - - virtual void v_GetFwdBwdTracePhys(const Array<OneD, const NekDouble> &field, - Array<OneD, NekDouble> &Fwd, - Array<OneD, NekDouble> &Bwd, - bool FillBnd = true, - bool PutFwdInBwdOnBCs = false, - bool DoExchange = true) override; - - virtual void v_FillBwdWithBoundCond(const Array<OneD, NekDouble> &Fwd, - Array<OneD, NekDouble> &Bwd, - bool PutFwdInBwdOnBCs) override; - - virtual const Array<OneD, const NekDouble> &v_GetBndCondBwdWeight() - override; + GlobalLinSysKey v_HelmSolve(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::ConstFactorMap &factors, + const StdRegions::VarCoeffMap &varcoeff, + const MultiRegions::VarFactorsMap &varfactors, + const Array<OneD, const NekDouble> &dirForcing, + const bool PhysSpaceForcing) override; + + void v_PeriodicBwdCopy(const Array<OneD, const NekDouble> &Fwd, + Array<OneD, NekDouble> &Bwd) override; + + void v_FillBwdWithBwdWeight(Array<OneD, NekDouble> &weightave, + Array<OneD, NekDouble> &weightjmp) override; + + void v_GetFwdBwdTracePhys(Array<OneD, NekDouble> &Fwd, + Array<OneD, NekDouble> &Bwd) override; + + void v_GetFwdBwdTracePhys(const Array<OneD, const NekDouble> &field, + Array<OneD, NekDouble> &Fwd, + Array<OneD, NekDouble> &Bwd, bool FillBnd = true, + bool PutFwdInBwdOnBCs = false, + bool DoExchange = true) override; + + void v_FillBwdWithBoundCond(const Array<OneD, NekDouble> &Fwd, + Array<OneD, NekDouble> &Bwd, + bool PutFwdInBwdOnBCs) override; + + const Array<OneD, const NekDouble> &v_GetBndCondBwdWeight() override; - virtual void v_SetBndCondBwdWeight(const int index, - const NekDouble value) override; + void v_SetBndCondBwdWeight(const int index, const NekDouble value) override; - virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, - PeriodicMap &periodicEdges, - PeriodicMap &periodicFaces) override; + void v_GetPeriodicEntities(PeriodicMap &periodicVerts, + PeriodicMap &periodicEdges, + PeriodicMap &periodicFaces) override; - virtual void v_AddTraceIntegralToOffDiag( + void v_AddTraceIntegralToOffDiag( const Array<OneD, const NekDouble> &FwdFlux, const Array<OneD, const NekDouble> &BwdFlux, Array<OneD, NekDouble> &outarray) override; @@ -340,7 +329,6 @@ private: typedef std::shared_ptr<DisContField> DisContFieldSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD1D_H diff --git a/library/MultiRegions/DisContField3DHomogeneous1D.cpp b/library/MultiRegions/DisContField3DHomogeneous1D.cpp index 3cd80a6b2d..1db35b2104 100644 --- a/library/MultiRegions/DisContField3DHomogeneous1D.cpp +++ b/library/MultiRegions/DisContField3DHomogeneous1D.cpp @@ -40,9 +40,7 @@ #include <MultiRegions/DisContField3DHomogeneous1D.h> #include <MultiRegions/ExpList2DHomogeneous1D.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(void) @@ -769,5 +767,4 @@ void DisContField3DHomogeneous1D::v_SetBndCondBwdWeight(const int index, { m_bndCondBndWeight[index] = value; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/DisContField3DHomogeneous1D.h b/library/MultiRegions/DisContField3DHomogeneous1D.h index ef87ead70f..cf89b5c9de 100644 --- a/library/MultiRegions/DisContField3DHomogeneous1D.h +++ b/library/MultiRegions/DisContField3DHomogeneous1D.h @@ -44,9 +44,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <SpatialDomains/Conditions.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class DisContField3DHomogeneous1D : public ExpList3DHomogeneous1D { @@ -73,7 +71,7 @@ public: const bool DeclarePlanesSetCoeffPhys = true); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~DisContField3DHomogeneous1D(); + MULTI_REGIONS_EXPORT ~DisContField3DHomogeneous1D() override; MULTI_REGIONS_EXPORT void SetupBoundaryConditions( const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom, @@ -120,49 +118,47 @@ protected: /// Set up all DG member variables and maps MULTI_REGIONS_EXPORT void SetUpDG(); - virtual GlobalLinSysKey v_HelmSolve( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::ConstFactorMap &factors, - const StdRegions::VarCoeffMap &varcoeff, - const MultiRegions::VarFactorsMap &varfactors, - const Array<OneD, const NekDouble> &dirForcing, - const bool PhysSpaceForcing) override; + GlobalLinSysKey v_HelmSolve(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::ConstFactorMap &factors, + const StdRegions::VarCoeffMap &varcoeff, + const MultiRegions::VarFactorsMap &varfactors, + const Array<OneD, const NekDouble> &dirForcing, + const bool PhysSpaceForcing) override; /// @todo Fix in another way considering all the planes - virtual ExpListSharedPtr &v_GetTrace() override; + ExpListSharedPtr &v_GetTrace() override; /// @todo Fix in another way considering all the planes - virtual AssemblyMapDGSharedPtr &v_GetTraceMap() override; + AssemblyMapDGSharedPtr &v_GetTraceMap() override; - virtual void v_ExtractTracePhys(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_ExtractTracePhys(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_ExtractTracePhys(Array<OneD, NekDouble> &outarray) override; + void v_ExtractTracePhys(Array<OneD, NekDouble> &outarray) override; - virtual const Array<OneD, const int> &v_GetTraceBndMap() override; + const Array<OneD, const int> &v_GetTraceBndMap() override; - virtual void v_GetBndElmtExpansion( - int i, std::shared_ptr<ExpList> &result, - const bool DeclareCoeffPhysArrays) override; + void v_GetBndElmtExpansion(int i, std::shared_ptr<ExpList> &result, + const bool DeclareCoeffPhysArrays) override; - virtual void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID, - Array<OneD, int> &EdgeID) override; + void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID, + Array<OneD, int> &EdgeID) override; - virtual void v_GetBCValues(Array<OneD, NekDouble> &BndVals, - const Array<OneD, NekDouble> &TotField, - int BndID) override; + void v_GetBCValues(Array<OneD, NekDouble> &BndVals, + const Array<OneD, NekDouble> &TotField, + int BndID) override; - virtual void v_NormVectorIProductWRTBase(Array<OneD, const NekDouble> &V1, - Array<OneD, const NekDouble> &V2, - Array<OneD, NekDouble> &outarray, - int BndID) override; + void v_NormVectorIProductWRTBase(Array<OneD, const NekDouble> &V1, + Array<OneD, const NekDouble> &V2, + Array<OneD, NekDouble> &outarray, + int BndID) override; - virtual void v_GetBoundaryNormals( + void v_GetBoundaryNormals( int i, Array<OneD, Array<OneD, NekDouble>> &normals) override; /// @todo Fix Robin BCs for homogeneous case - virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo() override; + std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo() override; /** * \brief This function evaluates the boundary conditions @@ -196,27 +192,25 @@ protected: * \param time The time at which the boundary conditions should be * evaluated */ - virtual void v_EvaluateBoundaryConditions( + void v_EvaluateBoundaryConditions( const NekDouble time = 0.0, const std::string varName = "", const NekDouble x2_in = NekConstants::kNekUnsetDouble, const NekDouble x3_in = NekConstants::kNekUnsetDouble) override; - virtual const Array<OneD, const MultiRegions::ExpListSharedPtr> + const Array<OneD, const MultiRegions::ExpListSharedPtr> &v_GetBndCondExpansions(void) override; - virtual const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> + const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> &v_GetBndConditions() override; - virtual std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i) override; + std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i) override; - virtual Array<OneD, SpatialDomains::BoundaryConditionShPtr> - &v_UpdateBndConditions() override; + Array<OneD, SpatialDomains::BoundaryConditionShPtr> &v_UpdateBndConditions() + override; - virtual void v_SetBndCondBwdWeight(const int index, - const NekDouble value) override; + void v_SetBndCondBwdWeight(const int index, const NekDouble value) override; }; typedef std::shared_ptr<DisContField3DHomogeneous1D> DisContField3DHomogeneous1DSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/DisContField3DHomogeneous2D.cpp b/library/MultiRegions/DisContField3DHomogeneous2D.cpp index 3bc56b00e5..4a92542e53 100644 --- a/library/MultiRegions/DisContField3DHomogeneous2D.cpp +++ b/library/MultiRegions/DisContField3DHomogeneous2D.cpp @@ -39,9 +39,7 @@ #include <MultiRegions/DisContField3DHomogeneous2D.h> #include <MultiRegions/ExpList2DHomogeneous2D.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(void) @@ -390,5 +388,4 @@ void DisContField3DHomogeneous2D::v_SetBndCondBwdWeight(const int index, { m_bndCondBndWeight[index] = value; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/DisContField3DHomogeneous2D.h b/library/MultiRegions/DisContField3DHomogeneous2D.h index e55fd5b7ce..9cd135ce93 100644 --- a/library/MultiRegions/DisContField3DHomogeneous2D.h +++ b/library/MultiRegions/DisContField3DHomogeneous2D.h @@ -39,9 +39,7 @@ #include <MultiRegions/ExpList3DHomogeneous2D.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class DisContField3DHomogeneous2D : public ExpList3DHomogeneous2D { @@ -72,7 +70,7 @@ public: const bool DeclareLinesSetCoeffPhys = true); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~DisContField3DHomogeneous2D(); + MULTI_REGIONS_EXPORT ~DisContField3DHomogeneous2D() override; MULTI_REGIONS_EXPORT void SetupBoundaryConditions( const LibUtilities::BasisKey &HomoBasis_y, @@ -95,49 +93,45 @@ protected: Array<OneD, SpatialDomains::BoundaryConditionShPtr> m_bndConditions; - virtual GlobalLinSysKey v_HelmSolve( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, - const StdRegions::ConstFactorMap &factors, - const StdRegions::VarCoeffMap &varcoeff, - const MultiRegions::VarFactorsMap &varfactors, - const Array<OneD, const NekDouble> &dirForcing, - const bool PhysSpaceForcing) override; + GlobalLinSysKey v_HelmSolve(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + const StdRegions::ConstFactorMap &factors, + const StdRegions::VarCoeffMap &varcoeff, + const MultiRegions::VarFactorsMap &varfactors, + const Array<OneD, const NekDouble> &dirForcing, + const bool PhysSpaceForcing) override; - virtual void v_GetBndElmtExpansion( - int i, std::shared_ptr<ExpList> &result, - const bool DeclareCoeffPhysArrays) override; + void v_GetBndElmtExpansion(int i, std::shared_ptr<ExpList> &result, + const bool DeclareCoeffPhysArrays) override; - virtual void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID, - Array<OneD, int> &EdgeID) override; + void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID, + Array<OneD, int> &EdgeID) override; /// @todo Fix Robin BCs for homogeneous case - virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo() override; + std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo() override; - virtual void v_EvaluateBoundaryConditions( + void v_EvaluateBoundaryConditions( const NekDouble time = 0.0, const std::string varName = "", const NekDouble x2_in = NekConstants::kNekUnsetDouble, const NekDouble x3_in = NekConstants::kNekUnsetDouble) override; - virtual const Array<OneD, const std::shared_ptr<ExpList>> - &v_GetBndCondExpansions(void) override; + const Array<OneD, const std::shared_ptr<ExpList>> &v_GetBndCondExpansions( + void) override; - virtual const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> + const Array<OneD, const SpatialDomains::BoundaryConditionShPtr> &v_GetBndConditions() override; - virtual std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i) override; + std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i) override; - virtual Array<OneD, SpatialDomains::BoundaryConditionShPtr> - &v_UpdateBndConditions() override; + Array<OneD, SpatialDomains::BoundaryConditionShPtr> &v_UpdateBndConditions() + override; - virtual void v_SetBndCondBwdWeight(const int index, - const NekDouble value) override; + void v_SetBndCondBwdWeight(const int index, const NekDouble value) override; }; typedef std::shared_ptr<DisContField3DHomogeneous2D> DisContField3DHomogeneous2DSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIERGIONS_DISCONTFIELD3DHOMO2D_H diff --git a/library/MultiRegions/ExpList.cpp b/library/MultiRegions/ExpList.cpp index 26d58dba2a..4b3f522b62 100644 --- a/library/MultiRegions/ExpList.cpp +++ b/library/MultiRegions/ExpList.cpp @@ -75,9 +75,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class ExpList @@ -3317,7 +3315,7 @@ void ExpList::v_WriteTecplotField(std::ostream &outfile, int expansion) void ExpList::WriteVtkHeader(std::ostream &outfile) { outfile << "<?xml version=\"1.0\"?>" << endl; - outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" " + outfile << R"(<VTKFile type="UnstructuredGrid" version="0.1" )" << "byte_order=\"LittleEndian\">" << endl; outfile << " <UnstructuredGrid>" << endl; } @@ -3354,7 +3352,7 @@ void ExpList::v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, << ntotminus << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float64\" " - << "NumberOfComponents=\"3\" format=\"ascii\">" << endl; + << R"(NumberOfComponents="3" format="ascii">)" << endl; outfile << " "; for (i = 0; i < ntot; ++i) { @@ -3370,7 +3368,7 @@ void ExpList::v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; int ns = 0; // pow(2,dim) for later usage string ostr; @@ -3443,7 +3441,7 @@ void ExpList::v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << i * ns + ns << " "; @@ -3451,7 +3449,7 @@ void ExpList::v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << ostr; @@ -3476,7 +3474,7 @@ void ExpList::v_WriteVtkPieceData(std::ostream &outfile, int expansion, int nq = (*m_exp)[expansion]->GetTotPoints(); // printing the fields of that zone - outfile << " <DataArray type=\"Float64\" Name=\"" << var << "\">" + outfile << R"( <DataArray type="Float64" Name=")" << var << "\">" << endl; outfile << " "; @@ -6376,5 +6374,4 @@ const LocTraceToTraceMapSharedPtr &ExpList::v_GetLocTraceToTraceMap() const return NullLocTraceToTraceMapSharedPtr; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpList.h b/library/MultiRegions/ExpList.h index 3515bef7f1..d1d417be5b 100644 --- a/library/MultiRegions/ExpList.h +++ b/library/MultiRegions/ExpList.h @@ -53,9 +53,7 @@ #include <SpatialDomains/Movement/Movement.h> #include <tinyxml.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations @@ -2313,7 +2311,6 @@ inline std::vector<bool> &ExpList::GetLeftAdjacentTraces(void) const static Array<OneD, ExpListSharedPtr> NullExpListSharedPtrArray; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLIST_H diff --git a/library/MultiRegions/ExpList2DHomogeneous1D.cpp b/library/MultiRegions/ExpList2DHomogeneous1D.cpp index 4047187b14..38819dfce2 100644 --- a/library/MultiRegions/ExpList2DHomogeneous1D.cpp +++ b/library/MultiRegions/ExpList2DHomogeneous1D.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs ExpList2DHomogeneous1D::ExpList2DHomogeneous1D() : ExpListHomogeneous1D(e2DH1D) @@ -392,7 +390,7 @@ void ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, << ntotminus << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float64\" " - << "NumberOfComponents=\"3\" format=\"ascii\">" << endl; + << R"(NumberOfComponents="3" format="ascii">)" << endl; outfile << " "; for (i = 0; i < ntot; ++i) { @@ -407,7 +405,7 @@ void ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; for (i = 0; i < nquad0 - 1; ++i) { for (j = 0; j < nquad1 - 1; ++j) @@ -420,7 +418,7 @@ void ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << i * 4 + 4 << " "; @@ -428,7 +426,7 @@ void ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << "9 "; @@ -466,5 +464,4 @@ void ExpList2DHomogeneous1D::v_GetNormals( } } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpList2DHomogeneous1D.h b/library/MultiRegions/ExpList2DHomogeneous1D.h index b7caac6cae..0c6a565b86 100644 --- a/library/MultiRegions/ExpList2DHomogeneous1D.h +++ b/library/MultiRegions/ExpList2DHomogeneous1D.h @@ -40,9 +40,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs @@ -83,7 +81,7 @@ public: const ExpList2DHomogeneous1D &In); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ExpList2DHomogeneous1D(); + MULTI_REGIONS_EXPORT ~ExpList2DHomogeneous1D() override; protected: /// Definition of the total number of degrees of freedom and @@ -93,27 +91,24 @@ protected: // virtual functions - virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0, - Array<OneD, NekDouble> &coord_1, - Array<OneD, NekDouble> &coord_2) override; + void v_GetCoords(Array<OneD, NekDouble> &coord_0, + Array<OneD, NekDouble> &coord_1, + Array<OneD, NekDouble> &coord_2) override; - virtual void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, - Array<OneD, NekDouble> &xc1, - Array<OneD, NekDouble> &xc2) override; + void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, + Array<OneD, NekDouble> &xc1, + Array<OneD, NekDouble> &xc2) override; - virtual void v_WriteTecplotZone(std::ostream &outfile, - int expansion) override; + void v_WriteTecplotZone(std::ostream &outfile, int expansion) override; - virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, - int istrip) override; + void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, + int istrip) override; - virtual void v_GetNormals( - Array<OneD, Array<OneD, NekDouble>> &normals) override; + void v_GetNormals(Array<OneD, Array<OneD, NekDouble>> &normals) override; private: }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLIST3DHOMO1D_H diff --git a/library/MultiRegions/ExpList2DHomogeneous2D.cpp b/library/MultiRegions/ExpList2DHomogeneous2D.cpp index 7dba040273..5c94368a2f 100644 --- a/library/MultiRegions/ExpList2DHomogeneous2D.cpp +++ b/library/MultiRegions/ExpList2DHomogeneous2D.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs ExpList2DHomogeneous2D::ExpList2DHomogeneous2D() : ExpListHomogeneous2D(eNoType) @@ -335,7 +333,7 @@ void ExpList2DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, << ntotminus << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float32\" " - << "NumberOfComponents=\"3\" format=\"ascii\">" << endl; + << R"(NumberOfComponents="3" format="ascii">)" << endl; outfile << " "; for (i = 0; i < ntot; ++i) { @@ -350,7 +348,7 @@ void ExpList2DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; for (i = 0; i < nquad0; ++i) { for (j = 0; j < nquad1 - 1; ++j) @@ -363,7 +361,7 @@ void ExpList2DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << i * 4 + 4 << " "; @@ -371,7 +369,7 @@ void ExpList2DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << "9 "; @@ -382,5 +380,4 @@ void ExpList2DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << " <PointData>" << endl; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpList2DHomogeneous2D.h b/library/MultiRegions/ExpList2DHomogeneous2D.h index b5fe280c20..ee7eecc526 100644 --- a/library/MultiRegions/ExpList2DHomogeneous2D.h +++ b/library/MultiRegions/ExpList2DHomogeneous2D.h @@ -40,9 +40,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs @@ -74,7 +72,7 @@ public: const ExpList2DHomogeneous2D &In); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ExpList2DHomogeneous2D(); + MULTI_REGIONS_EXPORT ~ExpList2DHomogeneous2D() override; // MULTI_REGIONS_EXPORT void HomoFwdTrans2D(const Array<OneD, const // NekDouble> &inarray, Array<OneD, NekDouble> &outarray); @@ -87,36 +85,32 @@ protected: // virtual functions - virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0, - Array<OneD, NekDouble> &coord_1, - Array<OneD, NekDouble> &coord_2) override; + void v_GetCoords(Array<OneD, NekDouble> &coord_0, + Array<OneD, NekDouble> &coord_1, + Array<OneD, NekDouble> &coord_2) override; - virtual void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, - Array<OneD, NekDouble> &xc1, - Array<OneD, NekDouble> &xc2) override; + void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, + Array<OneD, NekDouble> &xc1, + Array<OneD, NekDouble> &xc2) override; - virtual void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_FwdTransLocalElmt( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTransLocalElmt(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; // This is same as fwdtrans for this expansion - virtual void v_FwdTransBndConstrained( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTransBndConstrained(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_WriteTecplotZone(std::ostream &outfile, - int expansion) override; + void v_WriteTecplotZone(std::ostream &outfile, int expansion) override; - virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, - int istrip) override; + void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, + int istrip) override; private: }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLIST3DHOMO1D_H diff --git a/library/MultiRegions/ExpList3DHomogeneous1D.cpp b/library/MultiRegions/ExpList3DHomogeneous1D.cpp index b190e59a6e..92ff07168c 100644 --- a/library/MultiRegions/ExpList3DHomogeneous1D.cpp +++ b/library/MultiRegions/ExpList3DHomogeneous1D.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs ExpList3DHomogeneous1D::ExpList3DHomogeneous1D() : ExpListHomogeneous1D(e3DH1D) @@ -411,7 +409,7 @@ void ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, << ntotminus << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float64\" " - << "NumberOfComponents=\"3\" format=\"ascii\">" << endl; + << R"(NumberOfComponents="3" format="ascii">)" << endl; outfile << " "; for (i = 0; i < ntot; ++i) { @@ -426,7 +424,7 @@ void ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; for (i = 0; i < nq0 - 1; ++i) { for (j = 0; j < nq1 - 1; ++j) @@ -447,7 +445,7 @@ void ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << i * 8 + 8 << " "; @@ -455,7 +453,7 @@ void ExpList3DHomogeneous1D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << "12 "; @@ -549,5 +547,4 @@ Array<OneD, const NekDouble> ExpList3DHomogeneous1D::v_HomogeneousEnergy(void) return energy; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpList3DHomogeneous1D.h b/library/MultiRegions/ExpList3DHomogeneous1D.h index 8bb42da87b..63ece846cd 100644 --- a/library/MultiRegions/ExpList3DHomogeneous1D.h +++ b/library/MultiRegions/ExpList3DHomogeneous1D.h @@ -42,9 +42,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs @@ -101,7 +99,7 @@ public: Collections::eNoImpType); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ExpList3DHomogeneous1D(); + MULTI_REGIONS_EXPORT ~ExpList3DHomogeneous1D() override; protected: /// Definition of the total number of degrees of freedom and @@ -110,29 +108,29 @@ protected: void SetCoeffPhys(void); // virtual functions - virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0, - Array<OneD, NekDouble> &coord_1, - Array<OneD, NekDouble> &coord_2) override; + void v_GetCoords(Array<OneD, NekDouble> &coord_0, + Array<OneD, NekDouble> &coord_1, + Array<OneD, NekDouble> &coord_2) override; - virtual void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, - Array<OneD, NekDouble> &xc1, - Array<OneD, NekDouble> &xc2) override final; + void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, + Array<OneD, NekDouble> &xc1, + Array<OneD, NekDouble> &xc2) final; - virtual void v_WriteTecplotConnectivity(std::ostream &outfile, - int expansion) override; + void v_WriteTecplotConnectivity(std::ostream &outfile, + int expansion) override; - virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, - int istrip) override; + void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, + int istrip) override; - virtual NekDouble v_L2(const Array<OneD, const NekDouble> &inarray, - const Array<OneD, const NekDouble> &soln = - NullNekDouble1DArray) override; + NekDouble v_L2(const Array<OneD, const NekDouble> &inarray, + const Array<OneD, const NekDouble> &soln = + NullNekDouble1DArray) override; - virtual Array<OneD, const NekDouble> v_HomogeneousEnergy(void) override; + Array<OneD, const NekDouble> v_HomogeneousEnergy(void) override; - virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, - PeriodicMap &periodicEdges, - PeriodicMap &periodicFaces) override + void v_GetPeriodicEntities(PeriodicMap &periodicVerts, + PeriodicMap &periodicEdges, + PeriodicMap &periodicFaces) override { boost::ignore_unused(periodicFaces); m_planes[0]->GetPeriodicEntities(periodicVerts, periodicEdges); @@ -144,7 +142,6 @@ private: const Collections::ImplementationType ImpType); }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLIST3DHOMO1D_H diff --git a/library/MultiRegions/ExpList3DHomogeneous2D.cpp b/library/MultiRegions/ExpList3DHomogeneous2D.cpp index c2a47259f4..4a96c7e858 100644 --- a/library/MultiRegions/ExpList3DHomogeneous2D.cpp +++ b/library/MultiRegions/ExpList3DHomogeneous2D.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs ExpList3DHomogeneous2D::ExpList3DHomogeneous2D() : ExpListHomogeneous2D(e3DH2D) @@ -376,7 +374,7 @@ void ExpList3DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, << ntotminus << "\">" << endl; outfile << " <Points>" << endl; outfile << " <DataArray type=\"Float64\" " - << "NumberOfComponents=\"3\" format=\"ascii\">" << endl; + << R"(NumberOfComponents="3" format="ascii">)" << endl; outfile << " "; for (i = 0; i < ntot; ++i) { @@ -391,7 +389,7 @@ void ExpList3DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << " </Points>" << endl; outfile << " <Cells>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"connectivity\" format=\"ascii\">" << endl; + << R"(Name="connectivity" format="ascii">)" << endl; for (i = 0; i < nquad0 - 1; ++i) { for (j = 0; j < nquad1 - 1; ++j) @@ -414,7 +412,7 @@ void ExpList3DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"Int32\" " - << "Name=\"offsets\" format=\"ascii\">" << endl; + << R"(Name="offsets" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << i * 8 + 8 << " "; @@ -422,7 +420,7 @@ void ExpList3DHomogeneous2D::v_WriteVtkPieceHeader(std::ostream &outfile, outfile << endl; outfile << " </DataArray>" << endl; outfile << " <DataArray type=\"UInt8\" " - << "Name=\"types\" format=\"ascii\">" << endl; + << R"(Name="types" format="ascii">)" << endl; for (i = 0; i < ntotminus; ++i) { outfile << "12 "; @@ -458,5 +456,4 @@ NekDouble ExpList3DHomogeneous2D::v_L2( return sqrt(err); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpList3DHomogeneous2D.h b/library/MultiRegions/ExpList3DHomogeneous2D.h index 05bff6841e..8e02427f17 100644 --- a/library/MultiRegions/ExpList3DHomogeneous2D.h +++ b/library/MultiRegions/ExpList3DHomogeneous2D.h @@ -40,9 +40,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs @@ -93,7 +91,7 @@ public: Collections::eNoImpType); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ExpList3DHomogeneous2D(); + MULTI_REGIONS_EXPORT ~ExpList3DHomogeneous2D() override; protected: /// Definition of the total number of degrees of freedom and @@ -102,28 +100,26 @@ protected: void SetCoeffPhys(void); // virtual functions - virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0, - Array<OneD, NekDouble> &coord_1, - Array<OneD, NekDouble> &coord_2) override; + void v_GetCoords(Array<OneD, NekDouble> &coord_0, + Array<OneD, NekDouble> &coord_1, + Array<OneD, NekDouble> &coord_2) override; - virtual void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, - Array<OneD, NekDouble> &xc1, - Array<OneD, NekDouble> &xc2) override final; + void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0, + Array<OneD, NekDouble> &xc1, + Array<OneD, NekDouble> &xc2) final; - virtual void v_WriteTecplotZone(std::ostream &outfile, - int expansion) override; + void v_WriteTecplotZone(std::ostream &outfile, int expansion) override; - virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, - int istrip) override; + void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, + int istrip) override; - virtual NekDouble v_L2(const Array<OneD, const NekDouble> &inarray, - const Array<OneD, const NekDouble> &soln = - NullNekDouble1DArray) override; + NekDouble v_L2(const Array<OneD, const NekDouble> &inarray, + const Array<OneD, const NekDouble> &soln = + NullNekDouble1DArray) override; private: }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLIST3DHOMO2D_H diff --git a/library/MultiRegions/ExpListHomogeneous1D.cpp b/library/MultiRegions/ExpListHomogeneous1D.cpp index 828b611413..658ecc56c1 100644 --- a/library/MultiRegions/ExpListHomogeneous1D.cpp +++ b/library/MultiRegions/ExpListHomogeneous1D.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs ExpListHomogeneous1D::ExpListHomogeneous1D(const ExpansionType type) @@ -1296,7 +1294,7 @@ void ExpListHomogeneous1D::v_WriteVtkPieceData(std::ostream &outfile, } // printing the fields of that zone - outfile << " <DataArray type=\"Float64\" Name=\"" << var << "\">" + outfile << R"( <DataArray type="Float64" Name=")" << var << "\">" << endl; outfile << " "; for (int n = 0; n < m_planes.size(); ++n) @@ -1668,5 +1666,4 @@ NekDouble ExpListHomogeneous1D::v_Integral( return val; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpListHomogeneous1D.h b/library/MultiRegions/ExpListHomogeneous1D.h index 7f8212c1a2..dc854d7a09 100644 --- a/library/MultiRegions/ExpListHomogeneous1D.h +++ b/library/MultiRegions/ExpListHomogeneous1D.h @@ -42,9 +42,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { enum Homogeneous1DMatType @@ -93,7 +91,7 @@ public: Collections::eNoImpType); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ExpListHomogeneous1D(); + MULTI_REGIONS_EXPORT ~ExpListHomogeneous1D() override; MULTI_REGIONS_EXPORT void Homogeneous1DTrans( const int npts, const Array<OneD, const NekDouble> &inarray, @@ -159,129 +157,122 @@ protected: } // virtual functions - virtual void v_SetHomo1DSpecVanVisc(Array<OneD, NekDouble> visc) override + void v_SetHomo1DSpecVanVisc(Array<OneD, NekDouble> visc) override { m_specVanVisc = visc; } - virtual size_t v_GetNumElmts(void) override + size_t v_GetNumElmts(void) override { return m_planes[0]->GetExpSize(); } - virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void) override + LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void) override { return GetHomogeneousBasis(); } - virtual void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_FwdTransLocalElmt( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTransLocalElmt(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_FwdTransBndConstrained( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTransBndConstrained(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_BwdTrans(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_BwdTrans(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_IProductWRTBase(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_IProductWRTBase(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_IProductWRTDerivBase( - const int dir, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_IProductWRTDerivBase(const int dir, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_IProductWRTDerivBase( + void v_IProductWRTDerivBase( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, NekDouble> &outarray) override; - virtual std::vector<LibUtilities::FieldDefinitionsSharedPtr> - v_GetFieldDefinitions(void) override; + std::vector<LibUtilities::FieldDefinitionsSharedPtr> v_GetFieldDefinitions( + void) override; - virtual void v_GetFieldDefinitions( + void v_GetFieldDefinitions( std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef) override; - virtual void v_AppendFieldData( - LibUtilities::FieldDefinitionsSharedPtr &fielddef, - std::vector<NekDouble> &fielddata) override; + void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, + std::vector<NekDouble> &fielddata) override; - virtual void v_AppendFieldData( - LibUtilities::FieldDefinitionsSharedPtr &fielddef, - std::vector<NekDouble> &fielddata, - Array<OneD, NekDouble> &coeffs) override; + void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, + std::vector<NekDouble> &fielddata, + Array<OneD, NekDouble> &coeffs) override; - virtual void v_ExtractDataToCoeffs( + void v_ExtractDataToCoeffs( LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector<NekDouble> &fielddata, std::string &field, Array<OneD, NekDouble> &coeffs, std::unordered_map<int, int> zIdToPlane) override; - virtual void v_ExtractCoeffsToCoeffs( - const std::shared_ptr<ExpList> &fromExpList, - const Array<OneD, const NekDouble> &fromCoeffs, - Array<OneD, NekDouble> &toCoeffs) override; + void v_ExtractCoeffsToCoeffs(const std::shared_ptr<ExpList> &fromExpList, + const Array<OneD, const NekDouble> &fromCoeffs, + Array<OneD, NekDouble> &toCoeffs) override; - virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, - std::string var) override; + void v_WriteVtkPieceData(std::ostream &outfile, int expansion, + std::string var) override; - virtual void v_PhysInterp1DScaled( - const NekDouble scale, const Array<OneD, NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_PhysInterp1DScaled(const NekDouble scale, + const Array<OneD, NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_PhysGalerkinProjection1DScaled( + void v_PhysGalerkinProjection1DScaled( const NekDouble scale, const Array<OneD, NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - virtual void v_HomogeneousFwdTrans( - const int npts, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, bool Shuff = true, - bool UnShuff = true) override; + void v_HomogeneousFwdTrans(const int npts, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + bool Shuff = true, bool UnShuff = true) override; - virtual void v_HomogeneousBwdTrans( - const int npts, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, bool Shuff = true, - bool UnShuff = true) override; + void v_HomogeneousBwdTrans(const int npts, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + bool Shuff = true, bool UnShuff = true) override; - virtual void v_DealiasedProd(const int num_dofs, - const Array<OneD, NekDouble> &inarray1, - const Array<OneD, NekDouble> &inarray2, - Array<OneD, NekDouble> &outarray) override; + void v_DealiasedProd(const int num_dofs, + const Array<OneD, NekDouble> &inarray1, + const Array<OneD, NekDouble> &inarray2, + Array<OneD, NekDouble> &outarray) override; - virtual void v_DealiasedDotProd( + void v_DealiasedDotProd( const int num_dofs, const Array<OneD, Array<OneD, NekDouble>> &inarray1, const Array<OneD, Array<OneD, NekDouble>> &inarray2, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - virtual void v_PhysDeriv(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &out_d0, - Array<OneD, NekDouble> &out_d1, - Array<OneD, NekDouble> &out_d2) override; + void v_PhysDeriv(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &out_d0, + Array<OneD, NekDouble> &out_d1, + Array<OneD, NekDouble> &out_d2) override; - virtual void v_PhysDeriv(Direction edir, - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &out_d) override; + void v_PhysDeriv(Direction edir, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &out_d) override; - virtual LibUtilities::TranspositionSharedPtr v_GetTransposition( - void) override; + LibUtilities::TranspositionSharedPtr v_GetTransposition(void) override; - virtual Array<OneD, const unsigned int> v_GetZIDs(void) override; + Array<OneD, const unsigned int> v_GetZIDs(void) override; - virtual ExpListSharedPtr &v_GetPlane(int n) override + ExpListSharedPtr &v_GetPlane(int n) override { return GetPlane(n); } - virtual NekDouble v_GetHomoLen(void) override; + NekDouble v_GetHomoLen(void) override; - virtual void v_SetHomoLen(const NekDouble lhom) override; + void v_SetHomoLen(const NekDouble lhom) override; - virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + NekDouble v_Integral(const Array<OneD, const NekDouble> &inarray) override; private: // Padding operations variables @@ -292,7 +283,6 @@ private: Array<OneD, NekDouble> m_specVanVisc; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLISTHOMO1D_H diff --git a/library/MultiRegions/ExpListHomogeneous2D.cpp b/library/MultiRegions/ExpListHomogeneous2D.cpp index cc686a46d7..8204f59a7a 100644 --- a/library/MultiRegions/ExpListHomogeneous2D.cpp +++ b/library/MultiRegions/ExpListHomogeneous2D.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declaration for typedefs ExpListHomogeneous2D::ExpListHomogeneous2D(const ExpansionType type) @@ -800,7 +798,7 @@ void ExpListHomogeneous2D::v_WriteVtkPieceData(std::ostream &outfile, int npoints_per_line = m_lines[0]->GetTotPoints(); // printing the fields of that zone - outfile << " <DataArray type=\"Float64\" Name=\"" << var << "\">" + outfile << R"( <DataArray type="Float64" Name=")" << var << "\">" << endl; outfile << " "; for (int n = 0; n < m_lines.size(); ++n) @@ -1106,5 +1104,4 @@ void ExpListHomogeneous2D::SetPaddingBase(void) MatFwdPAD = StdQuad.GetStdMatrix(matkey1); MatBwdPAD = StdQuad.GetStdMatrix(matkey2); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/ExpListHomogeneous2D.h b/library/MultiRegions/ExpListHomogeneous2D.h index 9a31e9d334..b2dc2eb892 100644 --- a/library/MultiRegions/ExpListHomogeneous2D.h +++ b/library/MultiRegions/ExpListHomogeneous2D.h @@ -42,9 +42,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { enum Homogeneous2DMatType @@ -95,7 +93,7 @@ public: MULTI_REGIONS_EXPORT ExpListHomogeneous2D( const ExpListHomogeneous2D &In, const std::vector<unsigned int> &eIDs); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~ExpListHomogeneous2D(); + MULTI_REGIONS_EXPORT ~ExpListHomogeneous2D() override; MULTI_REGIONS_EXPORT void Homogeneous2DTrans( const int npts, const Array<OneD, const NekDouble> &inarray, @@ -151,81 +149,77 @@ protected: Homogeneous2DMatType mattype) const; // virtual functions - virtual size_t v_GetNumElmts(void) override + size_t v_GetNumElmts(void) override { return m_lines[0]->GetExpSize(); } - virtual void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTrans(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_FwdTransLocalElmt( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTransLocalElmt(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_FwdTransBndConstrained( - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_FwdTransBndConstrained(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_BwdTrans(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_BwdTrans(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual void v_IProductWRTBase(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray) override; + void v_IProductWRTBase(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray) override; - virtual std::vector<LibUtilities::FieldDefinitionsSharedPtr> - v_GetFieldDefinitions(void) override; + std::vector<LibUtilities::FieldDefinitionsSharedPtr> v_GetFieldDefinitions( + void) override; - virtual void v_GetFieldDefinitions( + void v_GetFieldDefinitions( std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef) override; - virtual void v_AppendFieldData( - LibUtilities::FieldDefinitionsSharedPtr &fielddef, - std::vector<NekDouble> &fielddata) override; + void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, + std::vector<NekDouble> &fielddata) override; - virtual void v_AppendFieldData( - LibUtilities::FieldDefinitionsSharedPtr &fielddef, - std::vector<NekDouble> &fielddata, - Array<OneD, NekDouble> &coeffs) override; + void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, + std::vector<NekDouble> &fielddata, + Array<OneD, NekDouble> &coeffs) override; - virtual void v_ExtractDataToCoeffs( + void v_ExtractDataToCoeffs( LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector<NekDouble> &fielddata, std::string &field, Array<OneD, NekDouble> &coeffs, std::unordered_map<int, int> zIdToPlane) override; - virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, - std::string var) override; + void v_WriteVtkPieceData(std::ostream &outfile, int expansion, + std::string var) override; - virtual void v_HomogeneousFwdTrans( - const int npts, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, bool Shuff = true, - bool UnShuff = true) override; + void v_HomogeneousFwdTrans(const int npts, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + bool Shuff = true, bool UnShuff = true) override; - virtual void v_HomogeneousBwdTrans( - const int npts, const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &outarray, bool Shuff = true, - bool UnShuff = true) override; + void v_HomogeneousBwdTrans(const int npts, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &outarray, + bool Shuff = true, bool UnShuff = true) override; - virtual void v_DealiasedProd(const int num_dofs, - const Array<OneD, NekDouble> &inarray1, - const Array<OneD, NekDouble> &inarray2, - Array<OneD, NekDouble> &outarray) override; + void v_DealiasedProd(const int num_dofs, + const Array<OneD, NekDouble> &inarray1, + const Array<OneD, NekDouble> &inarray2, + Array<OneD, NekDouble> &outarray) override; - virtual void v_DealiasedDotProd( + void v_DealiasedDotProd( const int num_dofs, const Array<OneD, Array<OneD, NekDouble>> &inarray1, const Array<OneD, Array<OneD, NekDouble>> &inarray2, Array<OneD, Array<OneD, NekDouble>> &outarray) override; - virtual void v_PhysDeriv(const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &out_d0, - Array<OneD, NekDouble> &out_d1, - Array<OneD, NekDouble> &out_d2) override; + void v_PhysDeriv(const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &out_d0, + Array<OneD, NekDouble> &out_d1, + Array<OneD, NekDouble> &out_d2) override; - virtual void v_PhysDeriv(Direction edir, - const Array<OneD, const NekDouble> &inarray, - Array<OneD, NekDouble> &out_d) override; + void v_PhysDeriv(Direction edir, + const Array<OneD, const NekDouble> &inarray, + Array<OneD, NekDouble> &out_d) override; private: // Padding operations variables @@ -236,7 +230,6 @@ private: DNekMatSharedPtr MatBwdPAD; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // EXPLISTHOMO2D_H diff --git a/library/MultiRegions/GJPStabilisation.cpp b/library/MultiRegions/GJPStabilisation.cpp index c798870c97..2857530aeb 100644 --- a/library/MultiRegions/GJPStabilisation.cpp +++ b/library/MultiRegions/GJPStabilisation.cpp @@ -34,9 +34,7 @@ #include <MultiRegions/GJPStabilisation.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { std::string GJPStabilisation::GJPStabilisationLookupIds[2] = { LibUtilities::SessionReader::RegisterEnumValue( @@ -399,5 +397,4 @@ void GJPStabilisation::MultiplyByStdDerivBaseOnTraceMat( cnt1 += rows * it.first; } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GJPStabilisation.h b/library/MultiRegions/GJPStabilisation.h index 2aafa23d07..74990e48aa 100644 --- a/library/MultiRegions/GJPStabilisation.h +++ b/library/MultiRegions/GJPStabilisation.h @@ -40,9 +40,7 @@ #include <MultiRegions/GlobalMatrix.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class GJPStabilisation @@ -103,6 +101,5 @@ private: }; typedef std::shared_ptr<GJPStabilisation> GJPStabilisationSharedPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // GJP diff --git a/library/MultiRegions/GlobalLinSys.cpp b/library/MultiRegions/GlobalLinSys.cpp index 2d06ab3e87..1f39937e1c 100644 --- a/library/MultiRegions/GlobalLinSys.cpp +++ b/library/MultiRegions/GlobalLinSys.cpp @@ -43,9 +43,7 @@ #include <LibUtilities/LinearAlgebra/NekMatrix.hpp> #include <LibUtilities/LinearAlgebra/NekTypeDefs.hpp> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { std::string GlobalLinSys::lookupIds[12] = { LibUtilities::SessionReader::RegisterEnumValue( @@ -427,5 +425,4 @@ void GlobalLinSys::v_Initialise( boost::ignore_unused(pLocToGloMap); NEKERROR(ErrorUtil::efatal, "Method does not exist"); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSys.h b/library/MultiRegions/GlobalLinSys.h index d49487da68..f6c4f29fcb 100644 --- a/library/MultiRegions/GlobalLinSys.h +++ b/library/MultiRegions/GlobalLinSys.h @@ -40,9 +40,7 @@ #include <MultiRegions/GlobalLinSysKey.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -232,7 +230,6 @@ inline int GlobalLinSys::GetNumBlocks() { return v_GetNumBlocks(); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysDirect.cpp b/library/MultiRegions/GlobalLinSysDirect.cpp index a1d1098b8f..feb5042900 100644 --- a/library/MultiRegions/GlobalLinSysDirect.cpp +++ b/library/MultiRegions/GlobalLinSysDirect.cpp @@ -36,9 +36,7 @@ #include <MultiRegions/GlobalLinSysDirect.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysDirect @@ -58,5 +56,4 @@ GlobalLinSysDirect::~GlobalLinSysDirect() { } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysDirect.h b/library/MultiRegions/GlobalLinSysDirect.h index ae756a67a4..60cc1b7752 100644 --- a/library/MultiRegions/GlobalLinSysDirect.h +++ b/library/MultiRegions/GlobalLinSysDirect.h @@ -37,9 +37,7 @@ #include <MultiRegions/GlobalLinSys.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -52,13 +50,13 @@ public: const GlobalLinSysKey &pKey, const std::weak_ptr<ExpList> &pExp, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysDirect(); + MULTI_REGIONS_EXPORT ~GlobalLinSysDirect() override; protected: /// Basic linear system object. DNekLinSysSharedPtr m_linSys; }; -} // namespace MultiRegions -} // namespace Nektar + +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysDirectFull.cpp b/library/MultiRegions/GlobalLinSysDirectFull.cpp index 157fb9e453..10f62d39e0 100644 --- a/library/MultiRegions/GlobalLinSysDirectFull.cpp +++ b/library/MultiRegions/GlobalLinSysDirectFull.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysDirect @@ -291,5 +289,4 @@ void GlobalLinSysDirectFull::v_SolveLinearSystem( pLocToGloMap->GlobalToLocal(global, pOutput); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysDirectFull.h b/library/MultiRegions/GlobalLinSysDirectFull.h index 7b0058055b..95d36a8017 100644 --- a/library/MultiRegions/GlobalLinSysDirectFull.h +++ b/library/MultiRegions/GlobalLinSysDirectFull.h @@ -37,9 +37,7 @@ #include <MultiRegions/GlobalLinSysDirect.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations @@ -69,28 +67,27 @@ public: const std::weak_ptr<ExpList> &pExpList, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysDirectFull(); + MULTI_REGIONS_EXPORT ~GlobalLinSysDirectFull() override; protected: /// Solve the linear system for given input and output vectors /// using a specified local to global map. - virtual void v_Solve(const Array<OneD, const NekDouble> &pLocInput, - Array<OneD, NekDouble> &pLocalOutput, - const AssemblyMapSharedPtr &locToGloMap, - const Array<OneD, const NekDouble> &dirForcing = - NullNekDouble1DArray) override; + void v_Solve(const Array<OneD, const NekDouble> &pLocInput, + Array<OneD, NekDouble> &pLocalOutput, + const AssemblyMapSharedPtr &locToGloMap, + const Array<OneD, const NekDouble> &dirForcing = + NullNekDouble1DArray) override; private: void AssembleFullMatrix(const std::shared_ptr<AssemblyMap> &locToGloMap); /// Solve the linear system for given input and output vectors. - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysDirectStaticCond.cpp b/library/MultiRegions/GlobalLinSysDirectStaticCond.cpp index 9f9b70fdb7..85b0770664 100644 --- a/library/MultiRegions/GlobalLinSysDirectStaticCond.cpp +++ b/library/MultiRegions/GlobalLinSysDirectStaticCond.cpp @@ -34,9 +34,7 @@ #include <MultiRegions/GlobalLinSysDirectStaticCond.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysDirect @@ -306,5 +304,5 @@ void GlobalLinSysDirectStaticCond::v_SolveLinearSystem( pLocToGloMap->GlobalToLocalBnd(global, pOutput); } -} // namespace MultiRegions -} // namespace Nektar + +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysDirectStaticCond.h b/library/MultiRegions/GlobalLinSysDirectStaticCond.h index 7d35a5a4f8..93ebf975eb 100644 --- a/library/MultiRegions/GlobalLinSysDirectStaticCond.h +++ b/library/MultiRegions/GlobalLinSysDirectStaticCond.h @@ -38,9 +38,7 @@ #include <MultiRegions/GlobalLinSysStaticCond.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -84,12 +82,12 @@ public: const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr<AssemblyMap> &locToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysDirectStaticCond(); + MULTI_REGIONS_EXPORT ~GlobalLinSysDirectStaticCond() override; protected: - virtual void v_AssembleSchurComplement( + void v_AssembleSchurComplement( std::shared_ptr<AssemblyMap> pLocToGloMap) override; - virtual GlobalLinSysStaticCondSharedPtr v_Recurse( + GlobalLinSysStaticCondSharedPtr v_Recurse( const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, @@ -102,13 +100,12 @@ private: const std::shared_ptr<AssemblyMap> &locToGloMap); /// Solve the linear system for given input and output vectors. - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysIterative.cpp b/library/MultiRegions/GlobalLinSysIterative.cpp index 3b86183a54..e6f6c4496b 100644 --- a/library/MultiRegions/GlobalLinSysIterative.cpp +++ b/library/MultiRegions/GlobalLinSysIterative.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { std::string GlobalLinSysIterative::IteratSolverlookupIds[4] = { LibUtilities::SessionReader::RegisterEnumValue( @@ -223,14 +221,18 @@ void GlobalLinSysIterative::DoProjection( if (m_verbose) { if (m_root) + { cout << "SuccessiveRHS: " << m_prevBasis.size() << "-bases projection reduces L2-norm of RHS from " << std::sqrt(rhsNorm) << " to "; + } NekDouble tmprhsNorm = Vmath::Dot2(nNonDir, pb_s + nDir, pb_s + nDir, m_map + nDir); vComm->AllReduce(tmprhsNorm, Nektar::LibUtilities::ReduceSum); if (m_root) + { cout << std::sqrt(tmprhsNorm) << endl; + } } // solve the system with projected rhs @@ -314,7 +316,9 @@ void GlobalLinSysIterative::UpdateKnownSolutions( for (int i = 0; i < m_prevBasis.size(); ++i) { if (i == insertLocation) + { continue; + } int skip = i > insertLocation; y_s[i - skip] = Vmath::Dot2(nNonDir, m_prevBasis[i], tmpAx_s + nDir, m_map + nDir); @@ -330,12 +334,16 @@ void GlobalLinSysIterative::UpdateKnownSolutions( for (int i = 0; i < m_numSuccessiveRHS; ++i) { if (i == insertLocation) + { continue; + } int iskip = i > insertLocation; for (int j = i; j < m_numSuccessiveRHS; ++j) { if (j == insertLocation) + { continue; + } int jskip = j > insertLocation; tilCoeffMatrix->SetValue(i - iskip, j - jskip, m_coeffMatrix->GetValue(i, j)); @@ -381,11 +389,15 @@ void GlobalLinSysIterative::UpdateKnownSolutions( residual -= y_s[i] * invMy_s[i]; } if (m_verbose && m_root) + { cout << "SuccessiveRHS: residual " << residual; + } if (residual < epsilon) { if (m_verbose && m_root) + { cout << " < " << epsilon << ", reject" << endl; + } return; } @@ -401,7 +413,9 @@ void GlobalLinSysIterative::UpdateKnownSolutions( for (int i = 0; i < m_numSuccessiveRHS; ++i) { if (i == insertLocation) + { continue; + } int iskip = i > insertLocation; newCoeffMatrix->SetValue(insertLocation, i, y_s[i - iskip]); } @@ -428,11 +442,15 @@ void GlobalLinSysIterative::UpdateKnownSolutions( if (info3) { if (m_verbose && m_root) + { cout << " >= " << epsilon << ", reject (Dsptrf fails)" << endl; + } return; } if (m_verbose && m_root) + { cout << " >= " << epsilon << ", accept" << endl; + } // if success, update basis, rhs, coefficient matrix, and its factor if (m_prevBasis.size() < m_numSuccessiveRHS) @@ -495,5 +513,4 @@ void GlobalLinSysIterative::Set_Rhs_Magnitude(const NekVector<NekDouble> &pIn) } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysIterative.h b/library/MultiRegions/GlobalLinSysIterative.h index e433a2b14d..934630c9c9 100644 --- a/library/MultiRegions/GlobalLinSysIterative.h +++ b/library/MultiRegions/GlobalLinSysIterative.h @@ -39,9 +39,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -55,7 +53,7 @@ public: const GlobalLinSysKey &pKey, const std::weak_ptr<ExpList> &pExpList, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysIterative(); + MULTI_REGIONS_EXPORT ~GlobalLinSysIterative() override; void DoMatrixMultiply(const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput) @@ -157,7 +155,6 @@ private: m_precon->DoAssembleLoc(pInput, pOutput, ZeroDir); } }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysIterativeFull.cpp b/library/MultiRegions/GlobalLinSysIterativeFull.cpp index 046b1054a3..7b0f38fb81 100644 --- a/library/MultiRegions/GlobalLinSysIterativeFull.cpp +++ b/library/MultiRegions/GlobalLinSysIterativeFull.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysIterativeCG @@ -323,5 +321,5 @@ void GlobalLinSysIterativeFull::v_SolveLinearSystem( } } } -} // namespace MultiRegions -} // namespace Nektar + +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysIterativeFull.h b/library/MultiRegions/GlobalLinSysIterativeFull.h index d8a984c962..53c67d94bf 100644 --- a/library/MultiRegions/GlobalLinSysIterativeFull.h +++ b/library/MultiRegions/GlobalLinSysIterativeFull.h @@ -36,9 +36,7 @@ #include <MultiRegions/GlobalLinSysIterative.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -66,34 +64,33 @@ public: const std::weak_ptr<ExpList> &pExpList, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysIterativeFull(); + MULTI_REGIONS_EXPORT ~GlobalLinSysIterativeFull() override; protected: /// Solve the linear system for given input and output vectors /// using a specified local to global map. - virtual void v_Solve(const Array<OneD, const NekDouble> &in, - Array<OneD, NekDouble> &out, - const AssemblyMapSharedPtr &locToGloMap, - const Array<OneD, const NekDouble> &dirForcing = - NullNekDouble1DArray) override; + void v_Solve(const Array<OneD, const NekDouble> &in, + Array<OneD, NekDouble> &out, + const AssemblyMapSharedPtr &locToGloMap, + const Array<OneD, const NekDouble> &dirForcing = + NullNekDouble1DArray) override; - virtual void v_DoMatrixMultiply(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput) override; + void v_DoMatrixMultiply(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput) override; - virtual void v_UniqueMap() override; + void v_UniqueMap() override; private: // Local to global map. std::weak_ptr<AssemblyMap> m_locToGloMap; /// Solve the matrix system - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysIterativeStaticCond.cpp b/library/MultiRegions/GlobalLinSysIterativeStaticCond.cpp index 91534902ce..1fb3e845f9 100644 --- a/library/MultiRegions/GlobalLinSysIterativeStaticCond.cpp +++ b/library/MultiRegions/GlobalLinSysIterativeStaticCond.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysIterativeStaticCond @@ -250,7 +248,7 @@ void GlobalLinSysIterativeStaticCond::PrepareLocalSchurComplement() // Assemble dense storage blocks. DNekScalMatSharedPtr loc_mat; m_denseBlocks.resize(nBlk); - double *ptr = 0; + double *ptr = nullptr; if (MultiRegions::eContiguous == storageStrategy) { @@ -524,6 +522,7 @@ GlobalLinSysStaticCondSharedPtr GlobalLinSysIterativeStaticCond::v_Recurse( sys->Initialise(l2gMap); return sys; } + /** * */ @@ -588,5 +587,5 @@ void GlobalLinSysIterativeStaticCond::v_SolveLinearSystem( } } } -} // namespace MultiRegions -} // namespace Nektar + +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysIterativeStaticCond.h b/library/MultiRegions/GlobalLinSysIterativeStaticCond.h index ae362e13b0..b68a80021c 100644 --- a/library/MultiRegions/GlobalLinSysIterativeStaticCond.h +++ b/library/MultiRegions/GlobalLinSysIterativeStaticCond.h @@ -39,9 +39,7 @@ #include <MultiRegions/GlobalLinSysStaticCond.h> #include <MultiRegions/GlobalMatrix.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -101,36 +99,34 @@ public: const std::shared_ptr<AssemblyMap> &locToGloMap, const PreconditionerSharedPtr pPrecon); - virtual ~GlobalLinSysIterativeStaticCond(); + ~GlobalLinSysIterativeStaticCond() override; protected: - virtual void v_InitObject() override; + void v_InitObject() override; /// Assemble the Schur complement matrix. - virtual void v_AssembleSchurComplement( + void v_AssembleSchurComplement( const std::shared_ptr<AssemblyMap> locToGloMap) override; /// Perform a Shur-complement matrix multiply operation. - virtual void v_DoMatrixMultiply(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput) override; + void v_DoMatrixMultiply(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput) override; - virtual void v_UniqueMap() override; + void v_UniqueMap() override; - virtual DNekScalBlkMatSharedPtr v_GetStaticCondBlock( - unsigned int n) override; - virtual GlobalLinSysStaticCondSharedPtr v_Recurse( + DNekScalBlkMatSharedPtr v_GetStaticCondBlock(unsigned int n) override; + GlobalLinSysStaticCondSharedPtr v_Recurse( const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr<AssemblyMap> &locToGloMap) override; - virtual void v_PreSolve(int scLevel, - Array<OneD, NekDouble> &F_bnd) override; - virtual void v_BasisFwdTransform(Array<OneD, NekDouble> &pInOut) override; - virtual void v_CoeffsBwdTransform(Array<OneD, NekDouble> &pInOut) override; - virtual void v_CoeffsFwdTransform(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput) override; + void v_PreSolve(int scLevel, Array<OneD, NekDouble> &F_bnd) override; + void v_BasisFwdTransform(Array<OneD, NekDouble> &pInOut) override; + void v_CoeffsBwdTransform(Array<OneD, NekDouble> &pInOut) override; + void v_CoeffsFwdTransform(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput) override; private: /// Dense storage for block Schur complement matrix @@ -152,13 +148,12 @@ private: void PrepareLocalSchurComplement(); /// Solve the matrix system - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysKey.cpp b/library/MultiRegions/GlobalLinSysKey.cpp index 704b424442..a65655b622 100644 --- a/library/MultiRegions/GlobalLinSysKey.cpp +++ b/library/MultiRegions/GlobalLinSysKey.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysKey @@ -168,5 +166,4 @@ std::ostream &operator<<(std::ostream &os, const GlobalLinSysKey &rhs) return os; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysKey.h b/library/MultiRegions/GlobalLinSysKey.h index f4622cd2cc..db2c9e9be3 100644 --- a/library/MultiRegions/GlobalLinSysKey.h +++ b/library/MultiRegions/GlobalLinSysKey.h @@ -38,9 +38,7 @@ #include <MultiRegions/MultiRegions.hpp> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { typedef std::map<StdRegions::ConstFactorType, Array<OneD, NekDouble>> @@ -63,7 +61,7 @@ public: MULTI_REGIONS_EXPORT GlobalLinSysKey(const GlobalLinSysKey &key); /// Destructor. - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysKey(); + MULTI_REGIONS_EXPORT ~GlobalLinSysKey() override; /// Less-than operator for GlobalLinSysKey comparison. MULTI_REGIONS_EXPORT friend bool operator<(const GlobalLinSysKey &lhs, @@ -116,7 +114,6 @@ inline const VarFactorsMap &GlobalLinSysKey::GetVarFactors() const { return m_varFactors; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysPETSc.cpp b/library/MultiRegions/GlobalLinSysPETSc.cpp index 1e198616e3..270e86ec49 100644 --- a/library/MultiRegions/GlobalLinSysPETSc.cpp +++ b/library/MultiRegions/GlobalLinSysPETSc.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { std::string GlobalLinSysPETSc::matMult = LibUtilities::SessionReader::RegisterDefaultSolverInfo("PETScMatMult", @@ -525,5 +523,4 @@ void GlobalLinSysPETSc::SetUpSolver(NekDouble tolerance) KSPSetPC(m_ksp, m_pc); } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysPETSc.h b/library/MultiRegions/GlobalLinSysPETSc.h index d6e2c1bd4e..e0a4c1fc6d 100644 --- a/library/MultiRegions/GlobalLinSysPETSc.h +++ b/library/MultiRegions/GlobalLinSysPETSc.h @@ -40,9 +40,7 @@ #include <petscksp.h> #include <petscmat.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -63,7 +61,7 @@ public: const GlobalLinSysKey &pKey, const std::weak_ptr<ExpList> &pExp, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysPETSc(); + MULTI_REGIONS_EXPORT ~GlobalLinSysPETSc() override; protected: /// PETSc matrix object. @@ -117,11 +115,11 @@ protected: const Array<OneD, const int> &glo2unique, const AssemblyMapSharedPtr &pLocToGloMap); - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; virtual void v_DoMatrixMultiply(const Array<OneD, const NekDouble> &pInput, Array<OneD, NekDouble> &pOutput) = 0; @@ -136,7 +134,6 @@ private: static PetscErrorCode DoDestroyMatCtx(Mat M); static PetscErrorCode DoDestroyPCCtx(PC pc); }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysPETScFull.cpp b/library/MultiRegions/GlobalLinSysPETScFull.cpp index 0d0ebe8bc0..8d7e492e1d 100644 --- a/library/MultiRegions/GlobalLinSysPETScFull.cpp +++ b/library/MultiRegions/GlobalLinSysPETScFull.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysPETScFull @@ -223,5 +221,4 @@ void GlobalLinSysPETScFull::v_DoMatrixMultiply( m_locToGloMap->Assemble(tmp1, output); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysPETScFull.h b/library/MultiRegions/GlobalLinSysPETScFull.h index 14ce45746a..72af9cccbd 100644 --- a/library/MultiRegions/GlobalLinSysPETScFull.h +++ b/library/MultiRegions/GlobalLinSysPETScFull.h @@ -39,9 +39,7 @@ #include <MultiRegions/GlobalLinSysPETSc.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations @@ -71,24 +69,23 @@ public: const std::weak_ptr<ExpList> &pExpList, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysPETScFull(); + MULTI_REGIONS_EXPORT ~GlobalLinSysPETScFull() override; protected: /// Solve the linear system for given input and output vectors /// using a specified local to global map. - virtual void v_Solve(const Array<OneD, const NekDouble> &in, - Array<OneD, NekDouble> &out, - const AssemblyMapSharedPtr &locToGloMap, - const Array<OneD, const NekDouble> &dirForcing = - NullNekDouble1DArray) override; - virtual void v_DoMatrixMultiply(const Array<OneD, const NekDouble> &input, - Array<OneD, NekDouble> &output) override; + void v_Solve(const Array<OneD, const NekDouble> &in, + Array<OneD, NekDouble> &out, + const AssemblyMapSharedPtr &locToGloMap, + const Array<OneD, const NekDouble> &dirForcing = + NullNekDouble1DArray) override; + void v_DoMatrixMultiply(const Array<OneD, const NekDouble> &input, + Array<OneD, NekDouble> &output) override; private: // Local to global map. std::shared_ptr<AssemblyMap> m_locToGloMap; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysPETScStaticCond.cpp b/library/MultiRegions/GlobalLinSysPETScStaticCond.cpp index 5265786847..7612c0241c 100644 --- a/library/MultiRegions/GlobalLinSysPETScStaticCond.cpp +++ b/library/MultiRegions/GlobalLinSysPETScStaticCond.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysPETSc @@ -391,5 +389,4 @@ GlobalLinSysStaticCondSharedPtr GlobalLinSysPETScStaticCond::v_Recurse( sys->Initialise(l2gMap); return sys; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysPETScStaticCond.h b/library/MultiRegions/GlobalLinSysPETScStaticCond.h index d528a6f45f..1f08a2edac 100644 --- a/library/MultiRegions/GlobalLinSysPETScStaticCond.h +++ b/library/MultiRegions/GlobalLinSysPETScStaticCond.h @@ -39,9 +39,7 @@ #include <MultiRegions/GlobalLinSysStaticCond.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -86,39 +84,36 @@ public: const std::shared_ptr<AssemblyMap> &locToGloMap, const PreconditionerSharedPtr pPrecon = PreconditionerSharedPtr()); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysPETScStaticCond(); + MULTI_REGIONS_EXPORT ~GlobalLinSysPETScStaticCond() override; protected: - virtual void v_InitObject() override; + void v_InitObject() override; /// Assemble the Schur complement matrix. - virtual void v_AssembleSchurComplement( + void v_AssembleSchurComplement( std::shared_ptr<AssemblyMap> locToGloMap) override; - virtual void v_DoMatrixMultiply(const Array<OneD, const NekDouble> &input, - Array<OneD, NekDouble> &output) override; - virtual DNekScalBlkMatSharedPtr v_GetStaticCondBlock( - unsigned int n) override; - virtual void v_PreSolve(int scLevel, - Array<OneD, NekDouble> &F_bBnd) override; - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_DoMatrixMultiply(const Array<OneD, const NekDouble> &input, + Array<OneD, NekDouble> &output) override; + DNekScalBlkMatSharedPtr v_GetStaticCondBlock(unsigned int n) override; + void v_PreSolve(int scLevel, Array<OneD, NekDouble> &F_bBnd) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; - virtual void v_BasisFwdTransform(Array<OneD, NekDouble> &pInOut) override; - virtual void v_CoeffsBwdTransform(Array<OneD, NekDouble> &pInOut) override; - virtual void v_CoeffsFwdTransform(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput) override; + void v_BasisFwdTransform(Array<OneD, NekDouble> &pInOut) override; + void v_CoeffsBwdTransform(Array<OneD, NekDouble> &pInOut) override; + void v_CoeffsFwdTransform(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput) override; - virtual GlobalLinSysStaticCondSharedPtr v_Recurse( + GlobalLinSysStaticCondSharedPtr v_Recurse( const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr<AssemblyMap> &locToGloMap) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysStaticCond.cpp b/library/MultiRegions/GlobalLinSysStaticCond.cpp index 425360d4bc..612e0473a7 100644 --- a/library/MultiRegions/GlobalLinSysStaticCond.cpp +++ b/library/MultiRegions/GlobalLinSysStaticCond.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysStaticCond @@ -584,5 +582,4 @@ void GlobalLinSysStaticCond::ConstructNextLevelCondensedSystem( v_Recurse(m_linSysKey, m_expList, blkMatrices[0], blkMatrices[1], blkMatrices[2], blkMatrices[3], pLocToGloMap); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysStaticCond.h b/library/MultiRegions/GlobalLinSysStaticCond.h index da01b78203..2346530e3e 100644 --- a/library/MultiRegions/GlobalLinSysStaticCond.h +++ b/library/MultiRegions/GlobalLinSysStaticCond.h @@ -41,9 +41,7 @@ #include <MultiRegions/GlobalLinSysIterative.h> #include <MultiRegions/GlobalMatrix.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class ExpList; @@ -60,7 +58,7 @@ public: const std::weak_ptr<ExpList> &pExpList, const std::shared_ptr<AssemblyMap> &locToGloMap); - virtual ~GlobalLinSysStaticCond(); + ~GlobalLinSysStaticCond() override; protected: virtual void v_PreSolve(int scLevel, Array<OneD, NekDouble> &F_bnd) @@ -90,7 +88,7 @@ protected: boost::ignore_unused(pLoctoGloMap); } - virtual int v_GetNumBlocks() override; + int v_GetNumBlocks() override; virtual GlobalLinSysStaticCondSharedPtr v_Recurse( const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList, @@ -118,17 +116,16 @@ protected: /// Solve the linear system for given input and output vectors /// using a specified local to global map. - virtual void v_Solve(const Array<OneD, const NekDouble> &in, - Array<OneD, NekDouble> &out, - const AssemblyMapSharedPtr &locToGloMap, - const Array<OneD, const NekDouble> &dirForcing = - NullNekDouble1DArray) override; + void v_Solve(const Array<OneD, const NekDouble> &in, + Array<OneD, NekDouble> &out, + const AssemblyMapSharedPtr &locToGloMap, + const Array<OneD, const NekDouble> &dirForcing = + NullNekDouble1DArray) override; - virtual void v_InitObject() override; + void v_InitObject() override; /// Initialise this object - virtual void v_Initialise( - const std::shared_ptr<AssemblyMap> &locToGloMap) override; + void v_Initialise(const std::shared_ptr<AssemblyMap> &locToGloMap) override; /// Set up the storage for the Schur complement or the top level /// of the multi-level Schur complement. @@ -138,7 +135,6 @@ protected: void ConstructNextLevelCondensedSystem( const std::shared_ptr<AssemblyMap> &locToGloMap); }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysXxt.cpp b/library/MultiRegions/GlobalLinSysXxt.cpp index 007d8faa0b..37351041a3 100644 --- a/library/MultiRegions/GlobalLinSysXxt.cpp +++ b/library/MultiRegions/GlobalLinSysXxt.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Communication/Xxt.hpp> #include <MultiRegions/GlobalLinSysXxt.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysXxt @@ -53,7 +51,7 @@ GlobalLinSysXxt::GlobalLinSysXxt( const std::shared_ptr<AssemblyMap> &pLocToGloMap) : GlobalLinSys(pKey, pExp, pLocToGloMap) { - m_crsData = 0; + m_crsData = nullptr; } GlobalLinSysXxt::~GlobalLinSysXxt() @@ -61,5 +59,4 @@ GlobalLinSysXxt::~GlobalLinSysXxt() Xxt::Finalise(m_crsData); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysXxt.h b/library/MultiRegions/GlobalLinSysXxt.h index 6d904039d4..87e7f49d77 100644 --- a/library/MultiRegions/GlobalLinSysXxt.h +++ b/library/MultiRegions/GlobalLinSysXxt.h @@ -44,9 +44,7 @@ namespace Xxt struct crs_data; } -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations @@ -61,7 +59,7 @@ public: const GlobalLinSysKey &pKey, const std::weak_ptr<ExpList> &pExp, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysXxt(); + MULTI_REGIONS_EXPORT ~GlobalLinSysXxt() override; protected: struct Xxt::crs_data *m_crsData; @@ -69,6 +67,5 @@ protected: Array<OneD, unsigned int> m_Aj; Array<OneD, double> m_Ar; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif /* GLOBALLINSYSXXT_H_ */ diff --git a/library/MultiRegions/GlobalLinSysXxtFull.cpp b/library/MultiRegions/GlobalLinSysXxtFull.cpp index 034d954cbf..4d02f660df 100644 --- a/library/MultiRegions/GlobalLinSysXxtFull.cpp +++ b/library/MultiRegions/GlobalLinSysXxtFull.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysXxtFull @@ -253,5 +251,4 @@ void GlobalLinSysXxtFull::v_SolveLinearSystem( } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysXxtFull.h b/library/MultiRegions/GlobalLinSysXxtFull.h index 8d57c4c2f0..30fe2654f6 100644 --- a/library/MultiRegions/GlobalLinSysXxtFull.h +++ b/library/MultiRegions/GlobalLinSysXxtFull.h @@ -37,9 +37,7 @@ #include <MultiRegions/GlobalLinSysXxt.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations @@ -69,28 +67,27 @@ public: const std::weak_ptr<ExpList> &pExpList, const std::shared_ptr<AssemblyMap> &pLocToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysXxtFull(); + MULTI_REGIONS_EXPORT ~GlobalLinSysXxtFull() override; protected: /// Solve the linear system for given input and output vectors /// using a specified local to global map. - virtual void v_Solve(const Array<OneD, const NekDouble> &in, - Array<OneD, NekDouble> &out, - const AssemblyMapSharedPtr &locToGloMap, - const Array<OneD, const NekDouble> &dirForcing = - NullNekDouble1DArray) override; + void v_Solve(const Array<OneD, const NekDouble> &in, + Array<OneD, NekDouble> &out, + const AssemblyMapSharedPtr &locToGloMap, + const Array<OneD, const NekDouble> &dirForcing = + NullNekDouble1DArray) override; private: void AssembleMatrixArrays(const std::shared_ptr<AssemblyMap> &pLocToGloMap); /// Solve the linear system for given input and output vectors. - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir = 0) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir = 0) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalLinSysXxtStaticCond.cpp b/library/MultiRegions/GlobalLinSysXxtStaticCond.cpp index 234b01e369..0c03a1b101 100644 --- a/library/MultiRegions/GlobalLinSysXxtStaticCond.cpp +++ b/library/MultiRegions/GlobalLinSysXxtStaticCond.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * @class GlobalLinSysIterativeStaticCond @@ -253,5 +251,5 @@ void GlobalLinSysXxtStaticCond::v_SolveLinearSystem( Xxt::Solve(pOutput, m_crsData, pInput); } } -} // namespace MultiRegions -} // namespace Nektar + +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalLinSysXxtStaticCond.h b/library/MultiRegions/GlobalLinSysXxtStaticCond.h index e175745204..73f3db7e10 100644 --- a/library/MultiRegions/GlobalLinSysXxtStaticCond.h +++ b/library/MultiRegions/GlobalLinSysXxtStaticCond.h @@ -41,9 +41,7 @@ #include <MultiRegions/GlobalLinSysXxt.h> #include <MultiRegions/GlobalMatrix.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Forward declarations class AssemblyMapCG; @@ -88,14 +86,14 @@ public: const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr<AssemblyMap> &locToGloMap); - MULTI_REGIONS_EXPORT virtual ~GlobalLinSysXxtStaticCond(); + MULTI_REGIONS_EXPORT ~GlobalLinSysXxtStaticCond() override; protected: /// Assemble the Schur complement matrix. - virtual void v_AssembleSchurComplement( + void v_AssembleSchurComplement( std::shared_ptr<AssemblyMap> locToGloMap) override; - virtual GlobalLinSysStaticCondSharedPtr v_Recurse( + GlobalLinSysStaticCondSharedPtr v_Recurse( const GlobalLinSysKey &mkey, const std::weak_ptr<ExpList> &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, @@ -104,13 +102,12 @@ protected: private: /// Solve the linear system for given input and output vectors. - virtual void v_SolveLinearSystem(const int pNumRows, - const Array<OneD, const NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const AssemblyMapSharedPtr &locToGloMap, - const int pNumDir) override; + void v_SolveLinearSystem(const int pNumRows, + const Array<OneD, const NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const AssemblyMapSharedPtr &locToGloMap, + const int pNumDir) override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalMatrix.cpp b/library/MultiRegions/GlobalMatrix.cpp index ac33880ffb..6dadeb846b 100644 --- a/library/MultiRegions/GlobalMatrix.cpp +++ b/library/MultiRegions/GlobalMatrix.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { std::string GlobalMatrix::def = LibUtilities::SessionReader::RegisterDefaultSolverInfo( @@ -95,7 +93,9 @@ GlobalMatrix::GlobalMatrix(const LibUtilities::SessionReaderSharedPtr &pSession, bcols = columns / block_size + (columns % block_size > 0); if (rows % block_size > 0) + { m_copyOp = true; + } if (m_copyOp) { @@ -155,7 +155,9 @@ void GlobalMatrix::Multiply(const Array<OneD, const NekDouble> &in, if (!m_copyOp) { if (m_smvbsrmatrix) + { m_smvbsrmatrix->Multiply(in, out); + } } else { @@ -164,7 +166,9 @@ void GlobalMatrix::Multiply(const Array<OneD, const NekDouble> &in, Vmath::Vcopy(m_rows, &in[0], 1, &m_tmpin[0], 1); if (m_smvbsrmatrix) + { m_smvbsrmatrix->Multiply(m_tmpin, m_tmpout); + } Vmath::Vcopy(m_rows, &m_tmpout[0], 1, &out[0], 1); } @@ -175,16 +179,19 @@ void GlobalMatrix::Multiply(const Array<OneD, const NekDouble> &in, unsigned long GlobalMatrix::GetMulCallsCounter() const { if (m_smvbsrmatrix) + { return m_smvbsrmatrix->GetMulCallsCounter(); + } return -1; } unsigned int GlobalMatrix::GetNumNonZeroEntries() const { if (m_smvbsrmatrix) + { return m_smvbsrmatrix->GetNumNonZeroEntries(); + } return -1; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalMatrix.h b/library/MultiRegions/GlobalMatrix.h index c19aaed1c4..ceee68094c 100644 --- a/library/MultiRegions/GlobalMatrix.h +++ b/library/MultiRegions/GlobalMatrix.h @@ -37,9 +37,7 @@ #include <MultiRegions/GlobalMatrixKey.h> #include <MultiRegions/MultiRegionsDeclspec.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /// Represents a matrix of all degrees of freedom. @@ -89,7 +87,6 @@ typedef std::map<GlobalMatrixKey, GlobalMatrixSharedPtr> GlobalMatrixMap; /// Shared pointer to a global matrix map. typedef std::shared_ptr<GlobalMatrixMap> GlobalMatrixMapShPtr; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/GlobalMatrixKey.cpp b/library/MultiRegions/GlobalMatrixKey.cpp index 19a36eb3b9..1eb0ebe17b 100644 --- a/library/MultiRegions/GlobalMatrixKey.cpp +++ b/library/MultiRegions/GlobalMatrixKey.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { GlobalMatrixKey::GlobalMatrixKey(const StdRegions::MatrixType matrixType, const AssemblyMapSharedPtr &locToGloMap, @@ -171,5 +169,4 @@ std::ostream &operator<<(std::ostream &os, const GlobalMatrixKey &rhs) return os; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/GlobalMatrixKey.h b/library/MultiRegions/GlobalMatrixKey.h index fd5296e921..85880bf6e2 100644 --- a/library/MultiRegions/GlobalMatrixKey.h +++ b/library/MultiRegions/GlobalMatrixKey.h @@ -38,9 +38,7 @@ #include <MultiRegions/AssemblyMap/AssemblyMap.h> #include <StdRegions/StdRegions.hpp> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /// Describes a matrix with ordering defined by a local to global map. @@ -127,7 +125,7 @@ inline LibUtilities::ShapeType GlobalMatrixKey::GetShapeType() const inline bool GlobalMatrixKey::LocToGloMapIsDefined(void) const { - if (m_locToGloMap.lock().get() == 0) // NullAssemblyMapSharedPtr) + if (m_locToGloMap.lock().get() == nullptr) // NullAssemblyMapSharedPtr) { return false; } @@ -170,7 +168,6 @@ inline const StdRegions::VarCoeffMap &GlobalMatrixKey::GetVarCoeffs() const { return m_varCoeffs; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/MultiRegions.hpp b/library/MultiRegions/MultiRegions.hpp index dc0393f2fc..86b7b53cee 100644 --- a/library/MultiRegions/MultiRegions.hpp +++ b/library/MultiRegions/MultiRegions.hpp @@ -38,9 +38,7 @@ #include <SpatialDomains/Conditions.h> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // Orientation of adjacent edge for use with boundary @@ -196,7 +194,6 @@ struct RotPeriodicInfo NekDouble m_tol; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/Preconditioner.cpp b/library/MultiRegions/Preconditioner.cpp index 03f1673051..94c6db6ec2 100644 --- a/library/MultiRegions/Preconditioner.cpp +++ b/library/MultiRegions/Preconditioner.cpp @@ -39,9 +39,7 @@ #include <MultiRegions/Preconditioner.h> #include <cmath> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { // register default solver value as diagonal @@ -240,5 +238,4 @@ Array<OneD, NekDouble> Preconditioner::AssembleStaticCondGlobalDiagonals() return diagonals; } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/Preconditioner.h b/library/MultiRegions/Preconditioner.h index cfef101678..dcb3b215d6 100644 --- a/library/MultiRegions/Preconditioner.h +++ b/library/MultiRegions/Preconditioner.h @@ -44,9 +44,7 @@ #include <memory> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class AssemblyMap; typedef std::shared_ptr<AssemblyMap> AssemblyMapSharedPtr; @@ -242,7 +240,6 @@ inline void Preconditioner::BuildPreconditioner() { v_BuildPreconditioner(); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerBlock.cpp b/library/MultiRegions/PreconditionerBlock.cpp index 156bc4db0a..c2b6aa61df 100644 --- a/library/MultiRegions/PreconditionerBlock.cpp +++ b/library/MultiRegions/PreconditionerBlock.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * Registers the class with the Factory. @@ -817,5 +815,4 @@ void PreconditionerBlock::v_DoPreconditioner( z = M * r; } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/PreconditionerBlock.h b/library/MultiRegions/PreconditionerBlock.h index ceab044b65..2d1248b6b4 100644 --- a/library/MultiRegions/PreconditionerBlock.h +++ b/library/MultiRegions/PreconditionerBlock.h @@ -40,9 +40,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class PreconditionerBlock; typedef std::shared_ptr<PreconditionerBlock> PreconditionerBlockSharedPtr; @@ -70,7 +68,7 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerBlock() + ~PreconditionerBlock() override { } @@ -78,18 +76,17 @@ protected: bool m_isFull; DNekBlkMatSharedPtr m_blkMat; - virtual void v_InitObject() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_InitObject() override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; private: void BlockPreconditionerCG(void); void BlockPreconditionerHDG(void); }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerDiagonal.cpp b/library/MultiRegions/PreconditionerDiagonal.cpp index 63a3f8d9c2..983696c12c 100644 --- a/library/MultiRegions/PreconditionerDiagonal.cpp +++ b/library/MultiRegions/PreconditionerDiagonal.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * Registers the class with the Factory. @@ -377,5 +375,4 @@ void PreconditionerJacobi::v_DoPreconditioner( } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/PreconditionerDiagonal.h b/library/MultiRegions/PreconditionerDiagonal.h index 6b7eec7e75..9043fe4532 100644 --- a/library/MultiRegions/PreconditionerDiagonal.h +++ b/library/MultiRegions/PreconditionerDiagonal.h @@ -38,9 +38,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class PreconditionerDiagonal; typedef std::shared_ptr<PreconditionerDiagonal> PreconditionerDiagonalSharedPtr; @@ -69,20 +67,20 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerDiagonal() + ~PreconditionerDiagonal() override { } protected: Array<OneD, NekDouble> m_diagonals; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &IsLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &IsLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; private: void DiagonalPreconditionerSum(void); @@ -119,17 +117,17 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerNull() + ~PreconditionerNull() override { } - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; private: static std::string lookupIds[]; @@ -163,18 +161,18 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerJacobi() + ~PreconditionerJacobi() override { } protected: - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &IsLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &IsLocal = false) override; private: int m_niter; @@ -183,7 +181,6 @@ private: static std::string def; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerLinear.cpp b/library/MultiRegions/PreconditionerLinear.cpp index ade9a5bcfa..beb336d71a 100644 --- a/library/MultiRegions/PreconditionerLinear.cpp +++ b/library/MultiRegions/PreconditionerLinear.cpp @@ -47,9 +47,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * Registers the class with the Factory. @@ -311,6 +309,7 @@ void PreconditionerLinear::v_DoPreconditionerWithNonVertOutput( break; } } + /** * Create the inverse multiplicity map. * @param locToGloMap Local to global mapping information. @@ -340,5 +339,5 @@ void PreconditionerLinear::SetupInvMult( m_invMult[i] = 1.0 / vCounts[vMap[i]]; } } -} // namespace MultiRegions -} // namespace Nektar + +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/PreconditionerLinear.h b/library/MultiRegions/PreconditionerLinear.h index 2554f56182..8cbc57dc66 100644 --- a/library/MultiRegions/PreconditionerLinear.h +++ b/library/MultiRegions/PreconditionerLinear.h @@ -40,9 +40,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { enum LinearPreconSolver { @@ -76,7 +74,7 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerLinear() + ~PreconditionerLinear() override { } @@ -86,18 +84,18 @@ protected: Array<OneD, NekDouble> m_invMult; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconditionerWithNonVertOutput( + void v_DoPreconditionerWithNonVertOutput( const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput, const Array<OneD, NekDouble> &pNonVertOutput, Array<OneD, NekDouble> &pVertForce) override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; void SetupInvMult(const std::shared_ptr<AssemblyMap> &pLocToGloMap); @@ -105,7 +103,6 @@ private: static std::string solveType; static std::string solveTypeIds[]; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerLinearWithBlock.cpp b/library/MultiRegions/PreconditionerLinearWithBlock.cpp index ac1f8f8cd9..96db4a1d4f 100644 --- a/library/MultiRegions/PreconditionerLinearWithBlock.cpp +++ b/library/MultiRegions/PreconditionerLinearWithBlock.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * Registers the class with the Factory. @@ -109,5 +107,4 @@ void PreconditionerLinearWithBlock::v_DoPreconditioner( OutputBlock); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/PreconditionerLinearWithBlock.h b/library/MultiRegions/PreconditionerLinearWithBlock.h index be2e2c74c9..bae4e60988 100644 --- a/library/MultiRegions/PreconditionerLinearWithBlock.h +++ b/library/MultiRegions/PreconditionerLinearWithBlock.h @@ -38,9 +38,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class PreconditionerLinearWithBlock; typedef std::shared_ptr<PreconditionerLinearWithBlock> @@ -69,7 +67,7 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerLinearWithBlock() + ~PreconditionerLinearWithBlock() override { } @@ -77,15 +75,14 @@ protected: PreconditionerSharedPtr m_linSpacePrecon; PreconditionerSharedPtr m_blockPrecon; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerLinearWithDiag.cpp b/library/MultiRegions/PreconditionerLinearWithDiag.cpp index 16bb946033..e2b52572d6 100644 --- a/library/MultiRegions/PreconditionerLinearWithDiag.cpp +++ b/library/MultiRegions/PreconditionerLinearWithDiag.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * Registers the class with the Factory. @@ -105,5 +103,4 @@ void PreconditionerLinearWithDiag::v_DoPreconditioner( OutputDiag); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/PreconditionerLinearWithDiag.h b/library/MultiRegions/PreconditionerLinearWithDiag.h index 86ed05ea43..75d1c31339 100644 --- a/library/MultiRegions/PreconditionerLinearWithDiag.h +++ b/library/MultiRegions/PreconditionerLinearWithDiag.h @@ -40,9 +40,7 @@ #include <MultiRegions/Preconditioner.h> #include <MultiRegions/PreconditionerLinear.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class PreconditionerLinearWithDiag; typedef std::shared_ptr<PreconditionerLinearWithDiag> @@ -71,7 +69,7 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerLinearWithDiag() + ~PreconditionerLinearWithDiag() override { } @@ -79,15 +77,14 @@ protected: PreconditionerSharedPtr m_linSpacePrecon; PreconditionerSharedPtr m_diagonalPrecon; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerLinearWithLowEnergy.cpp b/library/MultiRegions/PreconditionerLinearWithLowEnergy.cpp index 6031523355..a710e121fe 100644 --- a/library/MultiRegions/PreconditionerLinearWithLowEnergy.cpp +++ b/library/MultiRegions/PreconditionerLinearWithLowEnergy.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { /** * Registers the class with the Factory. @@ -191,5 +189,4 @@ void PreconditionerLinearWithLowEnergy::v_DoPreconditioner( Vmath::Vadd(nGlobHomBndDofs, pOutput, 1, OutputLowEnergy, 1, pOutput, 1); } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/PreconditionerLinearWithLowEnergy.h b/library/MultiRegions/PreconditionerLinearWithLowEnergy.h index 0f726965c0..433a4be864 100644 --- a/library/MultiRegions/PreconditionerLinearWithLowEnergy.h +++ b/library/MultiRegions/PreconditionerLinearWithLowEnergy.h @@ -38,9 +38,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class PreconditionerLinearWithLowEnergy; typedef std::shared_ptr<PreconditionerLinearWithLowEnergy> @@ -69,7 +67,7 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerLinearWithLowEnergy() + ~PreconditionerLinearWithLowEnergy() override { } @@ -79,33 +77,31 @@ protected: Array<OneD, NekDouble> m_invMultiplicity; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoTransformBasisToLowEnergy( - Array<OneD, NekDouble> &pInOut) override; + void v_DoTransformBasisToLowEnergy(Array<OneD, NekDouble> &pInOut) override; - virtual void v_DoTransformCoeffsFromLowEnergy( + void v_DoTransformCoeffsFromLowEnergy( Array<OneD, NekDouble> &pInOut) override; - virtual void v_DoTransformCoeffsToLowEnergy( + void v_DoTransformCoeffsToLowEnergy( const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput) override; - virtual void v_DoTransformBasisFromLowEnergy( + void v_DoTransformBasisFromLowEnergy( const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput) override; - virtual DNekScalMatSharedPtr v_TransformedSchurCompl( + DNekScalMatSharedPtr v_TransformedSchurCompl( int n, int offset, const std::shared_ptr<DNekScalMat> &loc_mat) override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/PreconditionerLowEnergy.h b/library/MultiRegions/PreconditionerLowEnergy.h index 71fb6935e4..144b7a7a1c 100644 --- a/library/MultiRegions/PreconditionerLowEnergy.h +++ b/library/MultiRegions/PreconditionerLowEnergy.h @@ -42,9 +42,7 @@ #include <MultiRegions/MultiRegionsDeclspec.h> #include <MultiRegions/Preconditioner.h> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class PreconditionerLowEnergy; typedef std::shared_ptr<PreconditionerLowEnergy> @@ -73,7 +71,7 @@ public: const AssemblyMapSharedPtr &pLocToGloMap); MULTI_REGIONS_EXPORT - virtual ~PreconditionerLowEnergy() + ~PreconditionerLowEnergy() override { } @@ -90,29 +88,28 @@ protected: // are in R and Rinv std::vector<std::pair<int, int>> m_sameBlock; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, - Array<OneD, NekDouble> &pOutput, - const bool &isLocal = false) override; + void v_DoPreconditioner(const Array<OneD, NekDouble> &pInput, + Array<OneD, NekDouble> &pOutput, + const bool &isLocal = false) override; - virtual void v_BuildPreconditioner() override; + void v_BuildPreconditioner() override; - virtual DNekScalMatSharedPtr v_TransformedSchurCompl( + DNekScalMatSharedPtr v_TransformedSchurCompl( int n, int offset, const std::shared_ptr<DNekScalMat> &loc_mat) override; - virtual void v_DoTransformBasisToLowEnergy( - Array<OneD, NekDouble> &pInOut) override; + void v_DoTransformBasisToLowEnergy(Array<OneD, NekDouble> &pInOut) override; - virtual void v_DoTransformCoeffsFromLowEnergy( + void v_DoTransformCoeffsFromLowEnergy( Array<OneD, NekDouble> &pInOut) override; - virtual void v_DoTransformBasisFromLowEnergy( + void v_DoTransformBasisFromLowEnergy( const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput) override; - virtual void v_DoTransformCoeffsToLowEnergy( + void v_DoTransformCoeffsToLowEnergy( const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput) override; @@ -168,7 +165,6 @@ private: SpatialDomains::PrismGeomSharedPtr CreateRefPrismGeom(void); SpatialDomains::HexGeomSharedPtr CreateRefHexGeom(void); }; -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif diff --git a/library/MultiRegions/SubStructuredGraph.cpp b/library/MultiRegions/SubStructuredGraph.cpp index ee6a391f8a..0471cd12ff 100644 --- a/library/MultiRegions/SubStructuredGraph.cpp +++ b/library/MultiRegions/SubStructuredGraph.cpp @@ -65,9 +65,7 @@ using std::max; } #endif -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { PatchMap::PatchMap(void) { @@ -1025,5 +1023,4 @@ void NoReordering(const BoostGraph &graph, Array<OneD, int> &perm, iperm[i] = i; } } -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions diff --git a/library/MultiRegions/SubStructuredGraph.h b/library/MultiRegions/SubStructuredGraph.h index 9abdf1d618..71592f48e8 100644 --- a/library/MultiRegions/SubStructuredGraph.h +++ b/library/MultiRegions/SubStructuredGraph.h @@ -49,9 +49,7 @@ #include <set> #include <vector> -namespace Nektar -{ -namespace MultiRegions +namespace Nektar::MultiRegions { class BottomUpSubStructuredGraph; class SubGraph; @@ -270,7 +268,6 @@ MULTI_REGIONS_EXPORT void MultiLevelBisectionReordering( MULTI_REGIONS_EXPORT void NoReordering(const BoostGraph &graph, Array<OneD, int> &perm, Array<OneD, int> &iperm); -} // namespace MultiRegions -} // namespace Nektar +} // namespace Nektar::MultiRegions #endif // MULTIREGIONS_SUBSTRUCTUREDGRAPH_H diff --git a/library/NekMesh/2DGenerator/2DGenerator.cpp b/library/NekMesh/2DGenerator/2DGenerator.cpp index 33d779f22e..3a06277d4e 100644 --- a/library/NekMesh/2DGenerator/2DGenerator.cpp +++ b/library/NekMesh/2DGenerator/2DGenerator.cpp @@ -43,9 +43,7 @@ #include <boost/algorithm/string.hpp> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey Generator2D::className = GetModuleFactory().RegisterCreatorFunction( @@ -919,5 +917,4 @@ void Generator2D::Report() m_log(VERBOSE) << " - Triangles : " << ts << endl; m_log(VERBOSE) << " - Euler-Poincaré: " << ep << endl; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/2DGenerator/2DGenerator.h b/library/NekMesh/2DGenerator/2DGenerator.h index 0feea31c8b..b9b9216c7a 100644 --- a/library/NekMesh/2DGenerator/2DGenerator.h +++ b/library/NekMesh/2DGenerator/2DGenerator.h @@ -41,9 +41,7 @@ #include <LibUtilities/Interpreter/Interpreter.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -61,9 +59,9 @@ public: Generator2D(MeshSharedPtr m); - virtual ~Generator2D(); + ~Generator2D() override; - virtual void Process() override; + void Process() override; private: void FindBLEnds(); @@ -102,7 +100,6 @@ private: /// map of BL curve nodes to adjacent edges std::map<NodeSharedPtr, std::vector<EdgeSharedPtr>> m_nodesToEdge; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/CADCurve.cpp b/library/NekMesh/CADSystem/CADCurve.cpp index e987f2b39f..6a44fb904f 100644 --- a/library/NekMesh/CADSystem/CADCurve.cpp +++ b/library/NekMesh/CADSystem/CADCurve.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { Array<OneD, NekDouble> CADCurve::NormalWRT(NekDouble t, int surf) @@ -102,5 +100,4 @@ CADOrientation::Orientation CADCurve::GetOrienationWRT(int surf) m_log(FATAL) << "Unable to find surface in adjacency list." << endl; return CADOrientation::eUnknown; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/CADCurve.h b/library/NekMesh/CADSystem/CADCurve.h index 7c738e3779..885c00f361 100644 --- a/library/NekMesh/CADSystem/CADCurve.h +++ b/library/NekMesh/CADSystem/CADCurve.h @@ -40,9 +40,7 @@ #include <NekMesh/CADSystem/CADObject.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { // forward declarations @@ -68,7 +66,7 @@ public: m_type = CADType::eCurve; } - virtual ~CADCurve() + ~CADCurve() override { } @@ -230,7 +228,6 @@ typedef std::shared_ptr<CADCurve> CADCurveSharedPtr; typedef LibUtilities::NekFactory<std::string, CADCurve> CADCurveFactory; CADCurveFactory &GetCADCurveFactory(); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/CADObject.h b/library/NekMesh/CADSystem/CADObject.h index 3550af4077..69a7471564 100644 --- a/library/NekMesh/CADSystem/CADObject.h +++ b/library/NekMesh/CADSystem/CADObject.h @@ -39,9 +39,7 @@ #include <NekMesh/Module/Log.hpp> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { namespace CADType @@ -157,7 +155,6 @@ protected: }; typedef std::shared_ptr<CADObject> CADObjectSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/CADSurf.cpp b/library/NekMesh/CADSystem/CADSurf.cpp index 1d8e40d311..5a1de332ae 100644 --- a/library/NekMesh/CADSystem/CADSurf.cpp +++ b/library/NekMesh/CADSystem/CADSurf.cpp @@ -44,9 +44,7 @@ typedef bg::model::d2::point_xy<double> point_xy; using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void CADSurf::OrientateEdges(CADSurfSharedPtr surf, @@ -165,5 +163,4 @@ void CADSurf::OrientateEdges(CADSurfSharedPtr surf, } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/CADSurf.h b/library/NekMesh/CADSystem/CADSurf.h index 97151b67f0..9110330810 100644 --- a/library/NekMesh/CADSystem/CADSurf.h +++ b/library/NekMesh/CADSystem/CADSurf.h @@ -40,9 +40,7 @@ #include <NekMesh/CADSystem/CADObject.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class CADCurve; @@ -82,7 +80,7 @@ public: m_orientation = CADOrientation::eForwards; } - virtual ~CADSurf() + ~CADSurf() override { } @@ -208,7 +206,7 @@ public: /** * @brief query reversed normal */ - CADOrientation::Orientation Orientation() + CADOrientation::Orientation Orientation() override { return m_orientation; } @@ -226,7 +224,6 @@ typedef std::shared_ptr<CADSurf> CADSurfSharedPtr; typedef LibUtilities::NekFactory<std::string, CADSurf> CADSurfFactory; CADSurfFactory &GetCADSurfFactory(); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/CADSystem.cpp b/library/NekMesh/CADSystem/CADSystem.cpp index 6b401c4e07..fa7ae67f04 100644 --- a/library/NekMesh/CADSystem/CADSystem.cpp +++ b/library/NekMesh/CADSystem/CADSystem.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { EngineFactory &GetEngineFactory() @@ -106,5 +104,4 @@ Array<OneD, NekDouble> CADSystem::GetPeriodicTranslationVector(int first, return ret; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/CADSystem.h b/library/NekMesh/CADSystem/CADSystem.h index de9626c01d..baba5dc3e3 100644 --- a/library/NekMesh/CADSystem/CADSystem.h +++ b/library/NekMesh/CADSystem/CADSystem.h @@ -50,9 +50,7 @@ #include "CADObject.h" -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { // forward declorators @@ -295,7 +293,6 @@ typedef LibUtilities::NekFactory<std::string, CADSystem, std::string> EngineFactory; EngineFactory &GetEngineFactory(); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/CADVert.cpp b/library/NekMesh/CADSystem/CADVert.cpp index 8f02bc9675..b4e76e8556 100644 --- a/library/NekMesh/CADSystem/CADVert.cpp +++ b/library/NekMesh/CADSystem/CADVert.cpp @@ -35,9 +35,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void CADVert::SetDegen(int s, CADSurfSharedPtr su, NekDouble u, NekDouble v) @@ -66,5 +64,4 @@ NekDouble CADVert::DistanceTo(Array<OneD, NekDouble> xyz) (m_node->m_z - xyz[2]) * (m_node->m_z - xyz[2])); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/CADVert.h b/library/NekMesh/CADSystem/CADVert.h index 3b333b3499..65f30ca6d7 100644 --- a/library/NekMesh/CADSystem/CADVert.h +++ b/library/NekMesh/CADSystem/CADVert.h @@ -42,9 +42,7 @@ #include <NekMesh/MeshElements/Node.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { // forward decleration @@ -72,7 +70,7 @@ public: m_type = CADType::eVert; } - virtual ~CADVert(){}; + ~CADVert() override{}; /** * @brief Get x,y,z location of the vertex @@ -142,7 +140,6 @@ typedef LibUtilities::NekFactory<std::string, CADVert> CADVertFactory; CADVertFactory &GetCADVertFactory(); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/OCE/CADCurveOCE.cpp b/library/NekMesh/CADSystem/OCE/CADCurveOCE.cpp index d3e90f86ea..8bf3f4c6ae 100644 --- a/library/NekMesh/CADSystem/OCE/CADCurveOCE.cpp +++ b/library/NekMesh/CADSystem/OCE/CADCurveOCE.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { std::string CADCurveOCE::key = GetCADCurveFactory().RegisterCreatorFunction( @@ -200,5 +198,4 @@ Array<OneD, NekDouble> CADCurveOCE::GetMinMax() return locs; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/OCE/CADCurveOCE.h b/library/NekMesh/CADSystem/OCE/CADCurveOCE.h index 085178b069..7cb09cdbfa 100644 --- a/library/NekMesh/CADSystem/OCE/CADCurveOCE.h +++ b/library/NekMesh/CADSystem/OCE/CADCurveOCE.h @@ -38,9 +38,7 @@ #include <NekMesh/CADSystem/CADCurve.h> #include <NekMesh/CADSystem/OCE/OpenCascade.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class CADCurveOCE : public CADCurve @@ -57,22 +55,22 @@ public: { } - ~CADCurveOCE() + ~CADCurveOCE() override { } - virtual Array<OneD, NekDouble> GetBounds(); - virtual void GetBounds(NekDouble &tmin, NekDouble &tmax); - virtual NekDouble Length(NekDouble ti, NekDouble tf); - virtual Array<OneD, NekDouble> P(NekDouble t); - virtual void P(NekDouble t, NekDouble &x, NekDouble &y, NekDouble &z); - virtual Array<OneD, NekDouble> D2(NekDouble t); - virtual NekDouble tAtArcLength(NekDouble s); - virtual Array<OneD, NekDouble> GetMinMax(); - virtual NekDouble loct(Array<OneD, NekDouble> xyz, NekDouble &t); - virtual NekDouble GetMinDistance(Array<OneD, NekDouble> &xyz); - virtual NekDouble Curvature(NekDouble t); - virtual Array<OneD, NekDouble> N(NekDouble t); + Array<OneD, NekDouble> GetBounds() override; + void GetBounds(NekDouble &tmin, NekDouble &tmax) override; + NekDouble Length(NekDouble ti, NekDouble tf) override; + Array<OneD, NekDouble> P(NekDouble t) override; + void P(NekDouble t, NekDouble &x, NekDouble &y, NekDouble &z) override; + Array<OneD, NekDouble> D2(NekDouble t) override; + NekDouble tAtArcLength(NekDouble s) override; + Array<OneD, NekDouble> GetMinMax() override; + NekDouble loct(Array<OneD, NekDouble> xyz, NekDouble &t) override; + NekDouble GetMinDistance(Array<OneD, NekDouble> &xyz) override; + NekDouble Curvature(NekDouble t) override; + Array<OneD, NekDouble> N(NekDouble t) override; void Initialise(int i, TopoDS_Shape in); @@ -84,7 +82,6 @@ private: /// store the parametric bounds of the curve Array<OneD, NekDouble> m_b; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/OCE/CADSurfOCE.cpp b/library/NekMesh/CADSystem/OCE/CADSurfOCE.cpp index 520a10a6ab..28779b12dc 100644 --- a/library/NekMesh/CADSystem/OCE/CADSurfOCE.cpp +++ b/library/NekMesh/CADSystem/OCE/CADSurfOCE.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { std::string CADSurfOCE::key = GetCADSurfFactory().RegisterCreatorFunction( @@ -345,5 +343,4 @@ void CADSurfOCE::Test(Array<OneD, NekDouble> uv) (void)passed; // suppress warning } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/OCE/CADSurfOCE.h b/library/NekMesh/CADSystem/OCE/CADSurfOCE.h index f6fac331a4..31fff60f1b 100644 --- a/library/NekMesh/CADSystem/OCE/CADSurfOCE.h +++ b/library/NekMesh/CADSystem/OCE/CADSurfOCE.h @@ -38,9 +38,7 @@ #include <NekMesh/CADSystem/CADSurf.h> #include <NekMesh/CADSystem/OCE/OpenCascade.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class CADSurfOCE : public CADSurf @@ -57,30 +55,30 @@ public: { } - ~CADSurfOCE() + ~CADSurfOCE() override { } void Initialise(int i, TopoDS_Shape in); - virtual Array<OneD, NekDouble> GetBounds(); - virtual void GetBounds(NekDouble &umin, NekDouble &umax, NekDouble &vmin, - NekDouble &vmax); - virtual Array<OneD, NekDouble> N(Array<OneD, NekDouble> uv); - virtual Array<OneD, NekDouble> D1(Array<OneD, NekDouble> uv); - virtual Array<OneD, NekDouble> D2(Array<OneD, NekDouble> uv); - virtual Array<OneD, NekDouble> P(Array<OneD, NekDouble> uv); - virtual void P(Array<OneD, NekDouble> uv, NekDouble &x, NekDouble &y, - NekDouble &z); - virtual Array<OneD, NekDouble> locuv(Array<OneD, NekDouble> p, - NekDouble &dist); - virtual NekDouble Curvature(Array<OneD, NekDouble> uv); - virtual Array<OneD, NekDouble> BoundingBox(); - virtual bool IsPlanar(); + Array<OneD, NekDouble> GetBounds() override; + void GetBounds(NekDouble &umin, NekDouble &umax, NekDouble &vmin, + NekDouble &vmax) override; + Array<OneD, NekDouble> N(Array<OneD, NekDouble> uv) override; + Array<OneD, NekDouble> D1(Array<OneD, NekDouble> uv) override; + Array<OneD, NekDouble> D2(Array<OneD, NekDouble> uv) override; + Array<OneD, NekDouble> P(Array<OneD, NekDouble> uv) override; + void P(Array<OneD, NekDouble> uv, NekDouble &x, NekDouble &y, + NekDouble &z) override; + Array<OneD, NekDouble> locuv(Array<OneD, NekDouble> p, + NekDouble &dist) override; + NekDouble Curvature(Array<OneD, NekDouble> uv) override; + Array<OneD, NekDouble> BoundingBox() override; + bool IsPlanar() override; private: /// Function which tests the the value of uv used is within the surface - void Test(Array<OneD, NekDouble> uv); + void Test(Array<OneD, NekDouble> uv) override; /// OpenCascade object for surface. Handle(Geom_Surface) m_s; /// parametric bounds @@ -95,7 +93,6 @@ private: bool m_isTransfiniteSurf; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/OCE/CADSystemOCE.cpp b/library/NekMesh/CADSystem/OCE/CADSystemOCE.cpp index 0ab734bd55..8b163e3d1d 100644 --- a/library/NekMesh/CADSystem/OCE/CADSystemOCE.cpp +++ b/library/NekMesh/CADSystem/OCE/CADSystemOCE.cpp @@ -65,9 +65,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { std::string CADSystemOCE::key = GetEngineFactory().RegisterCreatorFunction( @@ -299,23 +297,31 @@ bool CADSystemOCE::LoadCAD() { if (!Model->Value(i)->DynamicType()->SubType( "StepRepr_RepresentationItem")) + { continue; + } Handle(StepRepr_RepresentationItem) enti = Handle(StepRepr_RepresentationItem)::DownCast(Model->Value(i)); Handle(TCollection_HAsciiString) name = enti->Name(); if (name->IsEmpty()) + { continue; + } Handle(Transfer_Binder) binder = TP->Find(Model->Value(i)); if (binder.IsNull() || !binder->HasResult()) + { continue; + } TopoDS_Shape S = TransferBRep::ShapeResult(TP, binder); if (S.IsNull()) + { continue; + } if (S.ShapeType() == TopAbs_FACE) { @@ -1232,5 +1238,4 @@ TopoDS_Shape CADSystemOCE::BuildGeo(string geo) return cVolumes.begin()->second; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/OCE/CADSystemOCE.h b/library/NekMesh/CADSystem/OCE/CADSystemOCE.h index 437d9b55f7..771d85d1b6 100644 --- a/library/NekMesh/CADSystem/OCE/CADSystemOCE.h +++ b/library/NekMesh/CADSystem/OCE/CADSystemOCE.h @@ -38,9 +38,7 @@ #include <NekMesh/CADSystem/CADSystem.h> #include <NekMesh/CADSystem/OCE/OpenCascade.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class CADSystemOCE : public CADSystem @@ -59,11 +57,11 @@ public: CADSystemOCE(std::string name) : CADSystem(name, "oce") { } - ~CADSystemOCE(){}; + ~CADSystemOCE() override{}; - bool LoadCAD(); + bool LoadCAD() override; - Array<OneD, NekDouble> GetBoundingBox(); + Array<OneD, NekDouble> GetBoundingBox() override; TopoDS_Shape GetShape() { @@ -87,7 +85,6 @@ private: typedef std::shared_ptr<CADSystemOCE> CADSystemOCESharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/OCE/CADVertOCE.cpp b/library/NekMesh/CADSystem/OCE/CADVertOCE.cpp index 7859d312d9..b04b736b40 100644 --- a/library/NekMesh/CADSystem/OCE/CADVertOCE.cpp +++ b/library/NekMesh/CADSystem/OCE/CADVertOCE.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { std::string CADVertOCE::key = GetCADVertFactory().RegisterCreatorFunction( @@ -64,5 +62,4 @@ void CADVertOCE::Initialise(int i, TopoDS_Shape in) degen = false; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/OCE/CADVertOCE.h b/library/NekMesh/CADSystem/OCE/CADVertOCE.h index f04a5aded6..ea1598da77 100644 --- a/library/NekMesh/CADSystem/OCE/CADVertOCE.h +++ b/library/NekMesh/CADSystem/OCE/CADVertOCE.h @@ -38,9 +38,7 @@ #include <NekMesh/CADSystem/CADVert.h> #include <NekMesh/CADSystem/OCE/OpenCascade.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class CADVertOCE : public CADVert @@ -60,13 +58,13 @@ public: { } - ~CADVertOCE() + ~CADVertOCE() override { } void Initialise(int i, TopoDS_Shape in); - NekDouble DistanceTo(Array<OneD, NekDouble> l) + NekDouble DistanceTo(Array<OneD, NekDouble> l) override { gp_Pnt lp(l[0], l[1], l[2]); return m_occVert.Distance(lp); @@ -77,7 +75,6 @@ private: gp_Pnt m_occVert; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/CADSystem/OCE/GeoParser.hpp b/library/NekMesh/CADSystem/OCE/GeoParser.hpp index bf0b15567c..1aade58faf 100644 --- a/library/NekMesh/CADSystem/OCE/GeoParser.hpp +++ b/library/NekMesh/CADSystem/OCE/GeoParser.hpp @@ -39,9 +39,7 @@ #include <LibUtilities/Interpreter/Interpreter.h> #include <NekMesh/Module/Log.hpp> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { namespace qi = boost::spirit::qi; @@ -286,5 +284,4 @@ struct GeoParser : qi::grammar<Iterator, GeoAst::GeoFile(), Skipper> /// Logger for warnings. Logger &m_log; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/OCE/TransfiniteSurface.h b/library/NekMesh/CADSystem/OCE/TransfiniteSurface.h index 615a820fd5..fe3b9ebb3d 100644 --- a/library/NekMesh/CADSystem/OCE/TransfiniteSurface.h +++ b/library/NekMesh/CADSystem/OCE/TransfiniteSurface.h @@ -129,7 +129,7 @@ public: * then given a value #m_val \f$ a \f$ this will be defined by \f$ * \mathbf{c}_2(1-a) \f$. */ - virtual gp_Pnt EndPoint() const override + gp_Pnt EndPoint() const override { return m_uvDir ? m_edges[2]->Value(Map(0, 1 - m_val)) : m_edges[1]->Value(Map(0, m_val)); @@ -140,7 +140,7 @@ public: * true, then given a value #m_val \f$ a \f$ this will be defined by \f$ * \mathbf{c}_0(a) \f$. */ - virtual gp_Pnt StartPoint() const override + gp_Pnt StartPoint() const override { return m_uvDir ? m_edges[0]->Value(Map(0, m_val)) : m_edges[3]->Value(Map(0, 1 - m_val)); @@ -149,7 +149,7 @@ public: /** * @brief Reverses the direction of the curve. Unimplemented in this class. */ - virtual void Reverse() override + void Reverse() override { throw new NekMeshError("Unsupported function."); ; @@ -159,8 +159,7 @@ public: * @brief Returns the reversed parameter for this curve. Unimplemented in * this class. */ - virtual Standard_Real ReversedParameter( - const Standard_Real U) const override + Standard_Real ReversedParameter(const Standard_Real U) const override { boost::ignore_unused(U); throw new NekMeshError("Unsupported function."); @@ -171,8 +170,8 @@ public: * @brief Returns the transformed parameter for this curve. Unimplemented in * this class. */ - virtual Standard_Real TransformedParameter(const Standard_Real U, - const gp_Trsf &T) const override + Standard_Real TransformedParameter(const Standard_Real U, + const gp_Trsf &T) const override { boost::ignore_unused(U, T); throw new NekMeshError("Unsupported function."); @@ -183,8 +182,7 @@ public: * @brief Returns a parametric transformation for this curve. Unimplemented * in this class. */ - virtual Standard_Real ParametricTransformation( - const gp_Trsf &T) const override + Standard_Real ParametricTransformation(const gp_Trsf &T) const override { boost::ignore_unused(T); throw new NekMeshError("Unsupported function."); @@ -195,7 +193,7 @@ public: * @brief Defines the lower range of the parametrisation. Always `0.0` for * this class. */ - virtual Standard_Real FirstParameter() const override + Standard_Real FirstParameter() const override { return 0.0; } @@ -204,7 +202,7 @@ public: * @brief Defines the upper range of the parametrisation. Always `1.0` for * this class. */ - virtual Standard_Real LastParameter() const override + Standard_Real LastParameter() const override { return 1.0; } @@ -213,7 +211,7 @@ public: * @brief Determines whether this curve is closed; always true for this * class. */ - virtual Standard_Boolean IsClosed() const override + Standard_Boolean IsClosed() const override { return true; } @@ -222,7 +220,7 @@ public: * @brief Determines whether this curve is periodic; always false for this * class. */ - virtual Standard_Boolean IsPeriodic() const override + Standard_Boolean IsPeriodic() const override { return false; } @@ -231,7 +229,7 @@ public: * @brief Determines the period of this curve, which is not defined for this * class. */ - virtual Standard_Real Period() const override + Standard_Real Period() const override { throw new NekMeshError("Unsupported function."); return 0.0; @@ -241,7 +239,7 @@ public: * @brief Returns the continuity of this curve; we only define up to * second-order derivatives, so return C^2 continuity. */ - virtual GeomAbs_Shape Continuity() const override + GeomAbs_Shape Continuity() const override { return GeomAbs_C2; } @@ -251,7 +249,7 @@ public: * differentiable for a given order \f$ N \f$; we only define up to * second-order derivatives, so return true only if \f$ 0\leq N\leq 2 \f$. */ - virtual Standard_Boolean IsCN(const Standard_Integer N) const override + Standard_Boolean IsCN(const Standard_Integer N) const override { if (N > 2 || N < 0) { @@ -266,7 +264,7 @@ public: * * This evaluates the expression from Geom_TransfiniteSurface::D0. */ - virtual void D0(const Standard_Real U1, gp_Pnt &P) const override + void D0(const Standard_Real U1, gp_Pnt &P) const override { double U = m_uvDir ? m_val : U1; double V = m_uvDir ? U1 : m_val; @@ -290,8 +288,7 @@ public: * * This evaluates the expression from Geom_TransfiniteSurface::D1. */ - virtual void D1(const Standard_Real U1, gp_Pnt &P, - gp_Vec &V1) const override + void D1(const Standard_Real U1, gp_Pnt &P, gp_Vec &V1) const override { double U = m_uvDir ? m_val : U1; double V = m_uvDir ? U1 : m_val; @@ -349,8 +346,8 @@ public: * * This evaluates the expression from Geom_TransfiniteSurface::D2. */ - virtual void D2(const Standard_Real U1, gp_Pnt &P, gp_Vec &V1, - gp_Vec &V2) const override + void D2(const Standard_Real U1, gp_Pnt &P, gp_Vec &V1, + gp_Vec &V2) const override { double U = m_uvDir ? m_val : U1; double V = m_uvDir ? U1 : m_val; @@ -422,8 +419,8 @@ public: * Since we're lazy and D3 isn't called in the mesh generation pipeline, * this isn't implemented in this class (even though it is well-defined). */ - virtual void D3(const Standard_Real U, gp_Pnt &P, gp_Vec &V1, gp_Vec &V2, - gp_Vec &V3) const override + void D3(const Standard_Real U, gp_Pnt &P, gp_Vec &V1, gp_Vec &V2, + gp_Vec &V3) const override { boost::ignore_unused(U, P, V1, V2, V3); throw new NekMeshError("Unsupported function."); @@ -436,8 +433,7 @@ public: * Since we're lazy and DN isn't called in the mesh generation pipeline, * this isn't implemented in this class (even though it is well-defined). */ - virtual gp_Vec DN(const Standard_Real U, - const Standard_Integer N) const override + gp_Vec DN(const Standard_Real U, const Standard_Integer N) const override { boost::ignore_unused(U, N); throw new NekMeshError("Unsupported function."); @@ -447,7 +443,7 @@ public: /** * @brief Returns a copy of this geometry. */ - virtual Handle(Geom_Geometry) Copy() const override + Handle(Geom_Geometry) Copy() const override { Handle(Geom_TransfiniteCurve) tmp = new Geom_TransfiniteCurve( m_uvDir, m_val, m_edges, m_fwd, m_clims, m_verts); @@ -458,7 +454,7 @@ public: * @brief Transform this shape according to the transformation @p * T. Unimplemented in this class. */ - virtual void Transform(const gp_Trsf &T) override + void Transform(const gp_Trsf &T) override { throw new NekMeshError("Unsupported function."); @@ -554,13 +550,12 @@ public: /** * @brief Reverses the direction of U. Unimplemented in this class. */ - virtual void UReverse() override + void UReverse() override { throw new NekMeshError("Unsupported function."); } - virtual Standard_Real UReversedParameter( - const Standard_Real U) const override + Standard_Real UReversedParameter(const Standard_Real U) const override { boost::ignore_unused(U); throw new NekMeshError("Unsupported function."); @@ -570,13 +565,12 @@ public: /** * @brief Reverses the direction of V. Unimplemented in this class. */ - virtual void VReverse() override + void VReverse() override { throw new NekMeshError("Unsupported function."); } - virtual Standard_Real VReversedParameter( - const Standard_Real V) const override + Standard_Real VReversedParameter(const Standard_Real V) const override { boost::ignore_unused(V); throw new NekMeshError("Unsupported function."); @@ -587,7 +581,7 @@ public: * @brief Transform this shape according to the transformation @p * T. Unimplemented in this class. */ - virtual void Transform(const gp_Trsf &T) override + void Transform(const gp_Trsf &T) override { throw new NekMeshError("Unsupported function."); @@ -603,21 +597,21 @@ public: } } - virtual Handle(Geom_Geometry) Copy() const override + Handle(Geom_Geometry) Copy() const override { Handle(Geom_TransfiniteSurface) tmp = new Geom_TransfiniteSurface(m_edges, m_fwd, m_clims, m_verts); return tmp; } - virtual void TransformParameters(Standard_Real &U, Standard_Real &V, - const gp_Trsf &T) const override + void TransformParameters(Standard_Real &U, Standard_Real &V, + const gp_Trsf &T) const override { boost::ignore_unused(U, V, T); throw new NekMeshError("Unsupported function."); } - virtual gp_GTrsf2d ParametricTransformation(const gp_Trsf &T) const override + gp_GTrsf2d ParametricTransformation(const gp_Trsf &T) const override { boost::ignore_unused(T); throw new NekMeshError("Unsupported function."); @@ -629,8 +623,8 @@ public: * that \f$ U_{\min{}} = V_{\min{}} = 0 \f$ and \f$ U_{\max{}} = V_{\max{}} * = 1 \f$. */ - virtual void Bounds(Standard_Real &U1, Standard_Real &U2, Standard_Real &V1, - Standard_Real &V2) const override + void Bounds(Standard_Real &U1, Standard_Real &U2, Standard_Real &V1, + Standard_Real &V2) const override { U1 = V1 = 0.0; U2 = V2 = 1.0; @@ -640,7 +634,7 @@ public: * @brief Returns whether the surface is closed in the \f$ u\f$ direction, * which is always true for this surface. */ - virtual Standard_Boolean IsUClosed() const override + Standard_Boolean IsUClosed() const override { return true; } @@ -649,7 +643,7 @@ public: * @brief Returns whether the surface is closed in the \f$ v\f$ direction, * which is always true for this surface. */ - virtual Standard_Boolean IsVClosed() const override + Standard_Boolean IsVClosed() const override { return true; } @@ -658,7 +652,7 @@ public: * @brief Returns whether the surface is periodic in the \f$ u\f$ direction, * which is always false for this surface. */ - virtual Standard_Boolean IsUPeriodic() const override + Standard_Boolean IsUPeriodic() const override { return false; } @@ -667,7 +661,7 @@ public: * @brief Returns the period of this surface in the \f$ u\f$ direction, * which is not defined for this surface. */ - virtual Standard_Real UPeriod() const override + Standard_Real UPeriod() const override { throw new NekMeshError("Unsupported function."); return 0.0; @@ -677,7 +671,7 @@ public: * @brief Returns whether the surface is periodic in the \f$ v\f$ direction, * which is always false for this surface. */ - virtual Standard_Boolean IsVPeriodic() const override + Standard_Boolean IsVPeriodic() const override { return false; } @@ -686,7 +680,7 @@ public: * @brief Returns the period of this surface in the \f$ v\f$ direction, * which is not defined for this surface. */ - virtual Standard_Real VPeriod() const override + Standard_Real VPeriod() const override { throw new NekMeshError("Unsupported function."); return 0.0; @@ -696,7 +690,7 @@ public: * @brief Construct an isoline in the \f$ v\f$ direction of the surface * according to a fixed parameter @p U. */ - virtual Handle(Geom_Curve) UIso(const Standard_Real U) const override + Handle(Geom_Curve) UIso(const Standard_Real U) const override { Handle(Geom_Curve) c = new Geom_TransfiniteCurve( true, U, m_edges, m_fwd, m_clims, m_verts); @@ -707,7 +701,7 @@ public: * @brief Construct an isoline in the \f$ u\f$ direction of the surface * according to a fixed parameter @p V. */ - virtual Handle(Geom_Curve) VIso(const Standard_Real V) const override + Handle(Geom_Curve) VIso(const Standard_Real V) const override { Handle(Geom_Curve) c = new Geom_TransfiniteCurve( false, V, m_edges, m_fwd, m_clims, m_verts); @@ -718,7 +712,7 @@ public: * @brief Returns the continuity of this curve; we only define up to * second-order derivatives, so return C^2 continuity. */ - virtual GeomAbs_Shape Continuity() const override + GeomAbs_Shape Continuity() const override { return GeomAbs_C2; } @@ -729,7 +723,7 @@ public: * only define up to second-order derivatives, so return true only if \f$ * 0\leq N\leq 2 \f$. */ - virtual Standard_Boolean IsCNu(const Standard_Integer N) const override + Standard_Boolean IsCNu(const Standard_Integer N) const override { if (N > 2 || N < 0) { @@ -744,7 +738,7 @@ public: * only define up to second-order derivatives, so return true only if \f$ * 0\leq N\leq 2 \f$. */ - virtual Standard_Boolean IsCNv(const Standard_Integer N) const override + Standard_Boolean IsCNv(const Standard_Integer N) const override { if (N > 2 || N < 0) { @@ -765,8 +759,8 @@ public: * & - [ (1-u)(1-v) P_0 + u(1-v) P_1 + uv P_2 + (1-u)v P_3 ] * \f} */ - virtual void D0(const Standard_Real U, const Standard_Real V, - gp_Pnt &P) const override + void D0(const Standard_Real U, const Standard_Real V, + gp_Pnt &P) const override { gp_XYZ c0 = m_edges[0]->Value(Map(0, U)).XYZ(); gp_XYZ c1 = m_edges[1]->Value(Map(1, V)).XYZ(); @@ -809,8 +803,8 @@ public: * where \f$ \mathbf{c}'_i \f$ denotes the derivative of curve \f$ i \f$, * which can be obtained from the D1 routines of each curve. */ - virtual void D1(const Standard_Real U, const Standard_Real V, gp_Pnt &P, - gp_Vec &D1U, gp_Vec &D1V) const override + void D1(const Standard_Real U, const Standard_Real V, gp_Pnt &P, + gp_Vec &D1U, gp_Vec &D1V) const override { // Compute first-order derivatives from OCC curves. gp_Pnt t0, t1, t2, t3; @@ -878,9 +872,9 @@ public: * where \f$ \mathbf{c}'_i \f$ denotes the derivative of curve \f$ i \f$, * which can be obtained from the D1 routines of each curve. */ - virtual void D2(const Standard_Real U, const Standard_Real V, gp_Pnt &P, - gp_Vec &D1U, gp_Vec &D1V, gp_Vec &D2U, gp_Vec &D2V, - gp_Vec &D2UV) const override + void D2(const Standard_Real U, const Standard_Real V, gp_Pnt &P, + gp_Vec &D1U, gp_Vec &D1V, gp_Vec &D2U, gp_Vec &D2V, + gp_Vec &D2UV) const override { gp_Pnt t0, t1, t2, t3; gp_Vec d0, d1, d2, d3, dd0, dd1, dd2, dd3; @@ -942,10 +936,10 @@ public: * @brief Compute a point on the curve @p P, alongside its first-, second- * and third-order derivatives. */ - virtual void D3(const Standard_Real U, const Standard_Real V, gp_Pnt &P, - gp_Vec &D1U, gp_Vec &D1V, gp_Vec &D2U, gp_Vec &D2V, - gp_Vec &D2UV, gp_Vec &D3U, gp_Vec &D3V, gp_Vec &D3UUV, - gp_Vec &D3UVV) const override + void D3(const Standard_Real U, const Standard_Real V, gp_Pnt &P, + gp_Vec &D1U, gp_Vec &D1V, gp_Vec &D2U, gp_Vec &D2V, gp_Vec &D2UV, + gp_Vec &D3U, gp_Vec &D3V, gp_Vec &D3UUV, + gp_Vec &D3UVV) const override { gp_Pnt t0, t1, t2, t3; gp_Vec d0, d1, d2, d3, dd0, dd1, dd2, dd3; @@ -1030,9 +1024,9 @@ public: * Since we're lazy and DN isn't called in the mesh generation pipeline, * this isn't implemented in this class (even though it is well-defined). */ - virtual gp_Vec DN(const Standard_Real U, const Standard_Real V, - const Standard_Integer Nu, - const Standard_Integer Nv) const override + gp_Vec DN(const Standard_Real U, const Standard_Real V, + const Standard_Integer Nu, + const Standard_Integer Nv) const override { boost::ignore_unused(U, V, Nu, Nv); throw new NekMeshError("Unsupported function."); diff --git a/library/NekMesh/CADSystem/ProcessLoadCAD.cpp b/library/NekMesh/CADSystem/ProcessLoadCAD.cpp index 1967a4fe35..bf961de1d6 100644 --- a/library/NekMesh/CADSystem/ProcessLoadCAD.cpp +++ b/library/NekMesh/CADSystem/ProcessLoadCAD.cpp @@ -39,9 +39,7 @@ #include <boost/filesystem.hpp> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessLoadCAD::className = @@ -130,5 +128,4 @@ void ProcessLoadCAD::Process() ASSERTL0(m_mesh->m_cad->LoadCAD(), "Failed to load CAD"); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/CADSystem/ProcessLoadCAD.h b/library/NekMesh/CADSystem/ProcessLoadCAD.h index 69624519c9..923f72538b 100644 --- a/library/NekMesh/CADSystem/ProcessLoadCAD.h +++ b/library/NekMesh/CADSystem/ProcessLoadCAD.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessLoadCAD : public ProcessModule @@ -53,16 +51,15 @@ public: static ModuleKey className; ProcessLoadCAD(MeshSharedPtr m); - virtual ~ProcessLoadCAD(); + ~ProcessLoadCAD() override; - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "LoadCAD"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/ExtLibInterface/TetGenInterface.cpp b/library/NekMesh/ExtLibInterface/TetGenInterface.cpp index 7452f0d8a0..d2430712b4 100644 --- a/library/NekMesh/ExtLibInterface/TetGenInterface.cpp +++ b/library/NekMesh/ExtLibInterface/TetGenInterface.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void TetGenInterface::InitialMesh(map<int, NodeSharedPtr> tgidton, @@ -78,7 +76,7 @@ void TetGenInterface::InitialMesh(map<int, NodeSharedPtr> tgidton, f->numberofpolygons = 1; f->polygonlist = new tetgenio::polygon[f->numberofpolygons]; f->numberofholes = 0; - f->holelist = NULL; + f->holelist = nullptr; p = &f->polygonlist[0]; p->numberofvertices = 3; p->vertexlist = new int[p->numberofvertices]; @@ -102,7 +100,7 @@ void TetGenInterface::InitialMesh(map<int, NodeSharedPtr> tgidton, } else { - surface.holelist = NULL; + surface.holelist = nullptr; } string cmd = "pYzqQ"; @@ -174,5 +172,4 @@ void TetGenInterface::freetet() output.clean_memory(); #endif } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/ExtLibInterface/TetGenInterface.h b/library/NekMesh/ExtLibInterface/TetGenInterface.h index 8036047f77..fe194fcb9a 100644 --- a/library/NekMesh/ExtLibInterface/TetGenInterface.h +++ b/library/NekMesh/ExtLibInterface/TetGenInterface.h @@ -46,9 +46,7 @@ #define TETLIBRARY #include <tetgen.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -103,6 +101,5 @@ private: }; typedef std::shared_ptr<TetGenInterface> TetGenInterfaceSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/ExtLibInterface/TriangleInterface.cpp b/library/NekMesh/ExtLibInterface/TriangleInterface.cpp index b6d20de14c..5bc76fd615 100644 --- a/library/NekMesh/ExtLibInterface/TriangleInterface.cpp +++ b/library/NekMesh/ExtLibInterface/TriangleInterface.cpp @@ -37,9 +37,7 @@ #include <sstream> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void TriangleInterface::Mesh(bool Quality) @@ -129,62 +127,62 @@ void TriangleInterface::Mesh(bool Quality) void TriangleInterface::SetUp() { - dt.in.pointlist = (double *)NULL; - dt.in.pointattributelist = (double *)NULL; - dt.in.pointmarkerlist = (int *)NULL; + dt.in.pointlist = (double *)nullptr; + dt.in.pointattributelist = (double *)nullptr; + dt.in.pointmarkerlist = (int *)nullptr; dt.in.numberofpoints = 0; dt.in.numberofpointattributes = 0; // - dt.in.trianglelist = (int *)NULL; - dt.in.triangleattributelist = (double *)NULL; - dt.in.trianglearealist = (double *)NULL; - dt.in.neighborlist = (int *)NULL; + dt.in.trianglelist = (int *)nullptr; + dt.in.triangleattributelist = (double *)nullptr; + dt.in.trianglearealist = (double *)nullptr; + dt.in.neighborlist = (int *)nullptr; dt.in.numberoftriangles = 0; dt.in.numberofcorners = 0; dt.in.numberoftriangleattributes = 0; // - dt.in.segmentlist = (int *)NULL; - dt.in.segmentmarkerlist = (int *)NULL; + dt.in.segmentlist = (int *)nullptr; + dt.in.segmentmarkerlist = (int *)nullptr; dt.in.numberofsegments = 0; // - dt.in.holelist = (double *)NULL; + dt.in.holelist = (double *)nullptr; dt.in.numberofholes = 0; // - dt.in.regionlist = (double *)NULL; + dt.in.regionlist = (double *)nullptr; dt.in.numberofregions = 0; // - dt.in.edgelist = (int *)NULL; - dt.in.edgemarkerlist = (int *)NULL; - dt.in.normlist = (double *)NULL; + dt.in.edgelist = (int *)nullptr; + dt.in.edgemarkerlist = (int *)nullptr; + dt.in.normlist = (double *)nullptr; dt.in.numberofedges = 0; // - dt.out.pointlist = (double *)NULL; - dt.out.pointattributelist = (double *)NULL; - dt.out.pointmarkerlist = (int *)NULL; + dt.out.pointlist = (double *)nullptr; + dt.out.pointattributelist = (double *)nullptr; + dt.out.pointmarkerlist = (int *)nullptr; dt.out.numberofpoints = 0; dt.out.numberofpointattributes = 0; // - dt.out.trianglelist = (int *)NULL; - dt.out.triangleattributelist = (double *)NULL; - dt.out.trianglearealist = (double *)NULL; - dt.out.neighborlist = (int *)NULL; + dt.out.trianglelist = (int *)nullptr; + dt.out.triangleattributelist = (double *)nullptr; + dt.out.trianglearealist = (double *)nullptr; + dt.out.neighborlist = (int *)nullptr; dt.out.numberoftriangles = 0; dt.out.numberofcorners = 0; dt.out.numberoftriangleattributes = 0; // - dt.out.segmentlist = (int *)NULL; - dt.out.segmentmarkerlist = (int *)NULL; + dt.out.segmentlist = (int *)nullptr; + dt.out.segmentmarkerlist = (int *)nullptr; dt.out.numberofsegments = 0; // - dt.out.holelist = (double *)NULL; + dt.out.holelist = (double *)nullptr; dt.out.numberofholes = 0; // - dt.out.regionlist = (double *)NULL; + dt.out.regionlist = (double *)nullptr; dt.out.numberofregions = 0; // - dt.out.edgelist = (int *)NULL; - dt.out.edgemarkerlist = (int *)NULL; - dt.out.normlist = (double *)NULL; + dt.out.edgelist = (int *)nullptr; + dt.out.edgemarkerlist = (int *)nullptr; + dt.out.normlist = (double *)nullptr; dt.out.numberofedges = 0; } @@ -209,5 +207,4 @@ void TriangleInterface::Extract(std::vector<std::vector<NodeSharedPtr>> &Connec) Connec.push_back(tri); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/ExtLibInterface/TriangleInterface.h b/library/NekMesh/ExtLibInterface/TriangleInterface.h index 37d0226ba3..25cc6f5b24 100644 --- a/library/NekMesh/ExtLibInterface/TriangleInterface.h +++ b/library/NekMesh/ExtLibInterface/TriangleInterface.h @@ -49,9 +49,7 @@ extern "C" #include <triangle.h> } -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -106,7 +104,7 @@ private: public: void Run(char *cmd) { - triangulate(cmd, &in, &out, NULL); + triangulate(cmd, &in, &out, nullptr); } struct triangulateio in, out; }; @@ -128,7 +126,6 @@ private: }; typedef std::shared_ptr<TriangleInterface> TriangleInterfaceSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/BooleanOperators.cpp b/library/NekMesh/MeshElements/BooleanOperators.cpp index e2042f0340..bc7c1b05b9 100644 --- a/library/NekMesh/MeshElements/BooleanOperators.cpp +++ b/library/NekMesh/MeshElements/BooleanOperators.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -79,7 +77,9 @@ bool operator==(HOSurfSharedPtr const &p1, HOSurfSharedPtr const &p2) for (int i = 0; i < ids1.size(); ++i) { if (ids1[i] != ids2[i]) + { return false; + } } return true; @@ -199,5 +199,4 @@ bool operator<(FaceSharedPtr const &p1, FaceSharedPtr const &p2) return p1->m_id < p2->m_id; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Composite.h b/library/NekMesh/MeshElements/Composite.h index f56520ebd1..b59caf3c3d 100644 --- a/library/NekMesh/MeshElements/Composite.h +++ b/library/NekMesh/MeshElements/Composite.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A composite is a collection of elements. @@ -71,7 +69,6 @@ typedef std::shared_ptr<Composite> CompositeSharedPtr; /// Container of composites; key is the composite id, value is the /// composite. typedef std::map<unsigned int, CompositeSharedPtr> CompositeMap; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Edge.cpp b/library/NekMesh/MeshElements/Edge.cpp index 030f5a0f03..ceee9ba02a 100644 --- a/library/NekMesh/MeshElements/Edge.cpp +++ b/library/NekMesh/MeshElements/Edge.cpp @@ -39,9 +39,7 @@ #include <NekMesh/CADSystem/CADSurf.h> #include <NekMesh/MeshElements/Edge.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { using namespace std; @@ -189,5 +187,4 @@ void Edge::MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Edge.h b/library/NekMesh/MeshElements/Edge.h index 74b18ef956..6327190461 100644 --- a/library/NekMesh/MeshElements/Edge.h +++ b/library/NekMesh/MeshElements/Edge.h @@ -41,9 +41,7 @@ #include <NekMesh/MeshElements/Node.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class Element; @@ -155,7 +153,6 @@ struct EdgeHash } }; typedef std::unordered_set<EdgeSharedPtr, EdgeHash> EdgeSet; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Element.cpp b/library/NekMesh/MeshElements/Element.cpp index 6f5afd8ab7..d22a35178c 100644 --- a/library/NekMesh/MeshElements/Element.cpp +++ b/library/NekMesh/MeshElements/Element.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ElementFactory &GetElementFactory() @@ -227,5 +225,4 @@ string Element::GetXmlCurveString() return s.str(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Element.h b/library/NekMesh/MeshElements/Element.h index 24c3d8e34a..69308c9626 100644 --- a/library/NekMesh/MeshElements/Element.h +++ b/library/NekMesh/MeshElements/Element.h @@ -45,9 +45,7 @@ #include <NekMesh/MeshElements/Face.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -69,10 +67,14 @@ public: /// boundary elements). size_t GetId() const { - if (m_faceLink.get() != 0) + if (m_faceLink.get() != nullptr) + { return m_faceLink->m_id; - if (m_edgeLink.get() != 0) + } + if (m_edgeLink.get() != nullptr) + { return m_edgeLink->m_id; + } return m_id; } /// Returns the expansion dimension of the element. @@ -93,10 +95,14 @@ public: /// Returns the tag which defines the element shape. std::string GetTag() const { - if (m_faceLink.get() != 0) + if (m_faceLink.get() != nullptr) + { return "F"; - if (m_edgeLink.get() != 0) + } + if (m_edgeLink.get() != nullptr) + { return "E"; + } return m_tag; } /// Access a vertex node. @@ -500,13 +506,13 @@ struct element_id_less_than bool operator()(const pT a, const pT b) const { // check for 0 - if (a.get() == 0) + if (a.get() == nullptr) { // if b is also 0, then they are equal, hence a is not // less than b - return b.get() != 0; + return b.get() != nullptr; } - else if (b.get() == 0) + else if (b.get() == nullptr) { return false; } @@ -516,7 +522,6 @@ struct element_id_less_than } } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/ElementConfig.h b/library/NekMesh/MeshElements/ElementConfig.h index 5e64eaf338..447a57d13a 100644 --- a/library/NekMesh/MeshElements/ElementConfig.h +++ b/library/NekMesh/MeshElements/ElementConfig.h @@ -37,9 +37,7 @@ #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -96,6 +94,5 @@ struct ElmtConfig NEKMESH_EXPORT bool operator==(ElmtConfig const &c1, ElmtConfig const &c2); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Face.cpp b/library/NekMesh/MeshElements/Face.cpp index 43b3eebc88..9e5447cfe7 100644 --- a/library/NekMesh/MeshElements/Face.cpp +++ b/library/NekMesh/MeshElements/Face.cpp @@ -38,9 +38,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void Face::GetCurvedNodes(std::vector<NodeSharedPtr> &nodeList) @@ -409,5 +407,4 @@ SpatialDomains::Geometry2DSharedPtr Face::GetGeom(int coordDim) return ret; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Face.h b/library/NekMesh/MeshElements/Face.h index a98877b150..1b4915eda6 100644 --- a/library/NekMesh/MeshElements/Face.h +++ b/library/NekMesh/MeshElements/Face.h @@ -45,9 +45,7 @@ #include <NekMesh/MeshElements/Node.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class Element; @@ -174,7 +172,6 @@ struct FaceHash }; typedef std::unordered_set<FaceSharedPtr, FaceHash> FaceSet; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/HOAlignment.h b/library/NekMesh/MeshElements/HOAlignment.h index dc19e4b27b..1c1eadebde 100644 --- a/library/NekMesh/MeshElements/HOAlignment.h +++ b/library/NekMesh/MeshElements/HOAlignment.h @@ -37,9 +37,7 @@ #include <NekMesh/MeshElements/Node.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A lightweight struct for dealing with high-order triangle @@ -355,6 +353,5 @@ template <typename T> struct HOQuadrilateral } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Hexahedron.cpp b/library/NekMesh/MeshElements/Hexahedron.cpp index 32c9bb54b1..148e59c9cf 100644 --- a/library/NekMesh/MeshElements/Hexahedron.cpp +++ b/library/NekMesh/MeshElements/Hexahedron.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Hexahedron::m_type = @@ -267,11 +265,16 @@ unsigned int Hexahedron::GetNumNodes(ElmtConfig pConf) { int n = pConf.m_order; if (pConf.m_faceNodes && pConf.m_volumeNodes) + { return (n + 1) * (n + 1) * (n + 1); + } else if (pConf.m_faceNodes && !pConf.m_volumeNodes) + { return 6 * (n + 1) * (n + 1) - 12 * (n + 1) + 8; + } else + { return 12 * (n + 1) - 16; + } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Hexahedron.h b/library/NekMesh/MeshElements/Hexahedron.h index 44207e345d..e1ac8e6486 100644 --- a/library/NekMesh/MeshElements/Hexahedron.h +++ b/library/NekMesh/MeshElements/Hexahedron.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A 3-dimensional six-faced element. @@ -67,21 +65,21 @@ public: std::vector<int> pTagList); /// copy hex element NEKMESH_EXPORT Hexahedron(const Hexahedron &pSrc); - NEKMESH_EXPORT virtual ~Hexahedron() + NEKMESH_EXPORT ~Hexahedron() override { } - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); - NEKMESH_EXPORT virtual StdRegions::Orientation GetEdgeOrient( - int edgeId, EdgeSharedPtr edge); - NEKMESH_EXPORT virtual void MakeOrder( - int order, SpatialDomains::GeometrySharedPtr geom, - LibUtilities::PointsType pType, int coordDim, int &id, - bool justConfig = false); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; + NEKMESH_EXPORT StdRegions::Orientation GetEdgeOrient( + int edgeId, EdgeSharedPtr edge) override; + NEKMESH_EXPORT void MakeOrder(int order, + SpatialDomains::GeometrySharedPtr geom, + LibUtilities::PointsType pType, int coordDim, + int &id, bool justConfig = false) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); - NEKMESH_EXPORT virtual int GetFaceVertex(int i, int j) + NEKMESH_EXPORT int GetFaceVertex(int i, int j) override { return m_faceIds[i][j]; } @@ -89,7 +87,6 @@ public: private: static int m_faceIds[6][4]; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Line.cpp b/library/NekMesh/MeshElements/Line.cpp index b871eea5ff..bbdd2e42d7 100644 --- a/library/NekMesh/MeshElements/Line.cpp +++ b/library/NekMesh/MeshElements/Line.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Line::m_type = @@ -183,5 +181,4 @@ unsigned int Line::GetNumNodes(ElmtConfig pConf) { return pConf.m_order + 1; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Line.h b/library/NekMesh/MeshElements/Line.h index 98f1d29a86..204cfe44b4 100644 --- a/library/NekMesh/MeshElements/Line.h +++ b/library/NekMesh/MeshElements/Line.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A 1-dimensional line between two vertex nodes. @@ -60,22 +58,21 @@ public: NEKMESH_EXPORT Line(ElmtConfig pConf, std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); - NEKMESH_EXPORT virtual ~Line() + NEKMESH_EXPORT ~Line() override { } - NEKMESH_EXPORT virtual void GetCurvedNodes( - std::vector<NodeSharedPtr> &nodeList) const; + NEKMESH_EXPORT void GetCurvedNodes( + std::vector<NodeSharedPtr> &nodeList) const override; - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); - NEKMESH_EXPORT virtual void MakeOrder( - int order, SpatialDomains::GeometrySharedPtr geom, - LibUtilities::PointsType pType, int coordDim, int &id, - bool justConfig = false); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; + NEKMESH_EXPORT void MakeOrder(int order, + SpatialDomains::GeometrySharedPtr geom, + LibUtilities::PointsType pType, int coordDim, + int &id, bool justConfig = false) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Mesh.cpp b/library/NekMesh/MeshElements/Mesh.cpp index 84c08fa913..927dc5fec6 100644 --- a/library/NekMesh/MeshElements/Mesh.cpp +++ b/library/NekMesh/MeshElements/Mesh.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -62,7 +60,9 @@ unsigned int Mesh::GetNumBndryElements() unsigned int i, nElmt = 0; for (i = 0; i < m_expDim; ++i) + { nElmt += m_element[i].size(); + } return nElmt; } @@ -380,5 +380,4 @@ void Mesh::PrintStats(Logger &log) } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Mesh.h b/library/NekMesh/MeshElements/Mesh.h index 284f59cecb..7cbb7ae3ef 100644 --- a/library/NekMesh/MeshElements/Mesh.h +++ b/library/NekMesh/MeshElements/Mesh.h @@ -43,9 +43,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class Octree; @@ -154,7 +152,6 @@ public: /// Shared pointer to a mesh. typedef std::shared_ptr<Mesh> MeshSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Node.cpp b/library/NekMesh/MeshElements/Node.cpp index dafa4ddd65..e1e9c48406 100644 --- a/library/NekMesh/MeshElements/Node.cpp +++ b/library/NekMesh/MeshElements/Node.cpp @@ -34,9 +34,7 @@ #include <NekMesh/MeshElements/Node.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Define node equality based on coordinate with optional custom tolerance @@ -59,5 +57,4 @@ NEKMESH_EXPORT bool IsNodeClose(const Node &n1, const Node &n2, LibUtilities::IsRealClose(n1.m_z, n2.m_z, tol); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Node.h b/library/NekMesh/MeshElements/Node.h index 01270918af..59dbc80e0d 100644 --- a/library/NekMesh/MeshElements/Node.h +++ b/library/NekMesh/MeshElements/Node.h @@ -45,9 +45,7 @@ #include <NekMesh/CADSystem/CADSystem.h> #include <SpatialDomains/PointGeom.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class Node; typedef std::shared_ptr<Node> NodeSharedPtr; @@ -226,7 +224,9 @@ public: NekDouble an = atan2(sinw, cosw); if (an < 0) + { an += 6.2831853071796; + } return an; } @@ -458,7 +458,6 @@ struct NodeHash } }; typedef std::unordered_set<NodeSharedPtr, NodeHash> NodeSet; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Point.cpp b/library/NekMesh/MeshElements/Point.cpp index a5a7202be1..052aced8a2 100644 --- a/library/NekMesh/MeshElements/Point.cpp +++ b/library/NekMesh/MeshElements/Point.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Point::m_type = @@ -68,5 +66,4 @@ unsigned int Point::GetNumNodes(ElmtConfig pConf) boost::ignore_unused(pConf); return 1; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Point.h b/library/NekMesh/MeshElements/Point.h index d4ba1b77ed..22dfcb75bf 100644 --- a/library/NekMesh/MeshElements/Point.h +++ b/library/NekMesh/MeshElements/Point.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A 0-dimensional vertex. @@ -61,13 +59,12 @@ public: NEKMESH_EXPORT Point(ElmtConfig pConf, std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); NEKMESH_EXPORT Point(const Point &pSrc); - NEKMESH_EXPORT virtual ~Point() + NEKMESH_EXPORT ~Point() override { } NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Prism.cpp b/library/NekMesh/MeshElements/Prism.cpp index 794420f40a..e4808799a0 100644 --- a/library/NekMesh/MeshElements/Prism.cpp +++ b/library/NekMesh/MeshElements/Prism.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Prism::m_type = @@ -231,12 +229,18 @@ unsigned int Prism::GetNumNodes(ElmtConfig pConf) { int n = pConf.m_order; if (pConf.m_faceNodes && pConf.m_volumeNodes) + { return (n + 1) * (n + 1) * (n + 2) / 2; + } else if (pConf.m_faceNodes && !pConf.m_volumeNodes) + { return 3 * (n + 1) * (n + 1) + 2 * (n + 1) * (n + 2) / 2 - 9 * (n + 1) + 6; + } else + { return 9 * (n + 1) - 12; + } } SpatialDomains::GeometrySharedPtr Prism::GetGeom(int coordDim) @@ -567,5 +571,4 @@ void Prism::OrientPrism() cerr << "Warning: possible prism orientation problem." << endl; } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Prism.h b/library/NekMesh/MeshElements/Prism.h index 47c0a516d3..e2c8a84d8d 100644 --- a/library/NekMesh/MeshElements/Prism.h +++ b/library/NekMesh/MeshElements/Prism.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A 3-dimensional five-faced element (2 triangles, 3 @@ -62,23 +60,23 @@ public: NEKMESH_EXPORT Prism(ElmtConfig pConf, std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); NEKMESH_EXPORT Prism(const Prism &pSrc); - NEKMESH_EXPORT virtual ~Prism() + NEKMESH_EXPORT ~Prism() override { } - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); - NEKMESH_EXPORT virtual void GetCurvedNodes( - std::vector<NodeSharedPtr> &nodeList) const; - NEKMESH_EXPORT virtual StdRegions::Orientation GetEdgeOrient( - int edgeId, EdgeSharedPtr edge); - NEKMESH_EXPORT virtual void MakeOrder( - int order, SpatialDomains::GeometrySharedPtr geom, - LibUtilities::PointsType pType, int coordDim, int &id, - bool justConfig = false); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; + NEKMESH_EXPORT void GetCurvedNodes( + std::vector<NodeSharedPtr> &nodeList) const override; + NEKMESH_EXPORT StdRegions::Orientation GetEdgeOrient( + int edgeId, EdgeSharedPtr edge) override; + NEKMESH_EXPORT void MakeOrder(int order, + SpatialDomains::GeometrySharedPtr geom, + LibUtilities::PointsType pType, int coordDim, + int &id, bool justConfig = false) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); - NEKMESH_EXPORT virtual int GetFaceVertex(int i, int j) + NEKMESH_EXPORT int GetFaceVertex(int i, int j) override { return m_faceIds[i][j]; } @@ -95,7 +93,6 @@ protected: private: static int m_faceIds[5][4]; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Pyramid.cpp b/library/NekMesh/MeshElements/Pyramid.cpp index 68807ccbf9..43c59f2b58 100644 --- a/library/NekMesh/MeshElements/Pyramid.cpp +++ b/library/NekMesh/MeshElements/Pyramid.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Pyramid::type = @@ -184,5 +182,4 @@ unsigned int Pyramid::GetNumNodes(ElmtConfig pConf) return 5 + 8 * (n - 1); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Pyramid.h b/library/NekMesh/MeshElements/Pyramid.h index 0b9cf3e943..2b196d92d4 100644 --- a/library/NekMesh/MeshElements/Pyramid.h +++ b/library/NekMesh/MeshElements/Pyramid.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief A 3-dimensional square-based pyramidic element @@ -62,14 +60,14 @@ public: std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); NEKMESH_EXPORT Pyramid(const Pyramid &pSrc); - NEKMESH_EXPORT virtual ~Pyramid() + NEKMESH_EXPORT ~Pyramid() override { } - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); - NEKMESH_EXPORT virtual int GetFaceVertex(int i, int j) + NEKMESH_EXPORT int GetFaceVertex(int i, int j) override { return m_faceIds[i][j]; } @@ -82,7 +80,6 @@ public: private: static int m_faceIds[5][4]; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Quadrilateral.cpp b/library/NekMesh/MeshElements/Quadrilateral.cpp index 33dbd227f2..90bc4255e7 100644 --- a/library/NekMesh/MeshElements/Quadrilateral.cpp +++ b/library/NekMesh/MeshElements/Quadrilateral.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Quadrilateral::m_type = @@ -265,9 +263,12 @@ unsigned int Quadrilateral::GetNumNodes(ElmtConfig pConf) { int n = pConf.m_order; if (!pConf.m_faceNodes) + { return 4 * n; + } else + { return (n + 1) * (n + 1); + } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Quadrilateral.h b/library/NekMesh/MeshElements/Quadrilateral.h index e39379ad71..1efe1ac2fc 100644 --- a/library/NekMesh/MeshElements/Quadrilateral.h +++ b/library/NekMesh/MeshElements/Quadrilateral.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -63,25 +61,24 @@ public: std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); NEKMESH_EXPORT Quadrilateral(const Quadrilateral &pSrc); - NEKMESH_EXPORT virtual ~Quadrilateral() + NEKMESH_EXPORT ~Quadrilateral() override { } - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); - NEKMESH_EXPORT virtual void GetCurvedNodes( - std::vector<NodeSharedPtr> &nodeList) const; - NEKMESH_EXPORT virtual StdRegions::Orientation GetEdgeOrient( - int edgeId, EdgeSharedPtr edge); - NEKMESH_EXPORT virtual void MakeOrder( - int order, SpatialDomains::GeometrySharedPtr geom, - LibUtilities::PointsType pType, int coordDim, int &id, - bool justConfig = false); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; + NEKMESH_EXPORT void GetCurvedNodes( + std::vector<NodeSharedPtr> &nodeList) const override; + NEKMESH_EXPORT StdRegions::Orientation GetEdgeOrient( + int edgeId, EdgeSharedPtr edge) override; + NEKMESH_EXPORT void MakeOrder(int order, + SpatialDomains::GeometrySharedPtr geom, + LibUtilities::PointsType pType, int coordDim, + int &id, bool justConfig = false) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Tetrahedron.cpp b/library/NekMesh/MeshElements/Tetrahedron.cpp index 0fa94c32bf..784b7d8afa 100644 --- a/library/NekMesh/MeshElements/Tetrahedron.cpp +++ b/library/NekMesh/MeshElements/Tetrahedron.cpp @@ -44,9 +44,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Tetrahedron::m_type = @@ -340,11 +338,17 @@ unsigned int Tetrahedron::GetNumNodes(ElmtConfig pConf) { int n = pConf.m_order; if (pConf.m_volumeNodes && pConf.m_faceNodes) + { return (n + 1) * (n + 2) * (n + 3) / 6; + } else if (!pConf.m_volumeNodes && pConf.m_faceNodes) + { return 4 * (n + 1) * (n + 2) / 2 - 6 * (n + 1) + 4; + } else + { return 6 * (n + 1) - 8; + } } void Tetrahedron::GetCurvedNodes(std::vector<NodeSharedPtr> &nodeList) const @@ -581,5 +585,4 @@ void Tetrahedron::OrientTet() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Tetrahedron.h b/library/NekMesh/MeshElements/Tetrahedron.h index f9f4593393..2b38299108 100644 --- a/library/NekMesh/MeshElements/Tetrahedron.h +++ b/library/NekMesh/MeshElements/Tetrahedron.h @@ -38,9 +38,7 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -63,23 +61,23 @@ public: std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); NEKMESH_EXPORT Tetrahedron(const Tetrahedron &pSrc); - NEKMESH_EXPORT virtual ~Tetrahedron() + NEKMESH_EXPORT ~Tetrahedron() override { } - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); - NEKMESH_EXPORT virtual void GetCurvedNodes( - std::vector<NodeSharedPtr> &nodeList) const; - NEKMESH_EXPORT virtual StdRegions::Orientation GetEdgeOrient( - int edgeId, EdgeSharedPtr edge); - NEKMESH_EXPORT virtual void MakeOrder( - int order, SpatialDomains::GeometrySharedPtr geom, - LibUtilities::PointsType pType, int coordDim, int &id, - bool justConfig = false); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; + NEKMESH_EXPORT void GetCurvedNodes( + std::vector<NodeSharedPtr> &nodeList) const override; + NEKMESH_EXPORT StdRegions::Orientation GetEdgeOrient( + int edgeId, EdgeSharedPtr edge) override; + NEKMESH_EXPORT void MakeOrder(int order, + SpatialDomains::GeometrySharedPtr geom, + LibUtilities::PointsType pType, int coordDim, + int &id, bool justConfig = false) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); - NEKMESH_EXPORT virtual int GetFaceVertex(int i, int j) + NEKMESH_EXPORT int GetFaceVertex(int i, int j) override { return m_faceVertMap[i][j]; } @@ -95,7 +93,6 @@ private: static int m_faceVertMap[4][3]; static int m_faceEdgeMap[4][3]; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/MeshElements/Triangle.cpp b/library/NekMesh/MeshElements/Triangle.cpp index 5b67fc1bf8..08e9bca4d5 100644 --- a/library/NekMesh/MeshElements/Triangle.cpp +++ b/library/NekMesh/MeshElements/Triangle.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { LibUtilities::ShapeType Triangle::m_type = @@ -158,9 +156,13 @@ unsigned int Triangle::GetNumNodes(ElmtConfig pConf) { int n = pConf.m_order; if (!pConf.m_faceNodes) + { return (n + 1) + 2 * (n - 1) + 1; + } else + { return (n + 1) * (n + 2) / 2; + } } void Triangle::GetCurvedNodes(std::vector<NodeSharedPtr> &nodeList) const @@ -298,5 +300,4 @@ Array<OneD, NekDouble> Triangle::Normal(bool inward) return ret; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/MeshElements/Triangle.h b/library/NekMesh/MeshElements/Triangle.h index de51ecb310..6ece0fc9b5 100644 --- a/library/NekMesh/MeshElements/Triangle.h +++ b/library/NekMesh/MeshElements/Triangle.h @@ -39,9 +39,7 @@ #include <NekMesh/MeshElements/HOAlignment.h> #include <NekMesh/NekMeshDeclspec.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -64,26 +62,25 @@ public: std::vector<NodeSharedPtr> pNodeList, std::vector<int> pTagList); NEKMESH_EXPORT Triangle(const Triangle &pSrc); - NEKMESH_EXPORT virtual ~Triangle() + NEKMESH_EXPORT ~Triangle() override { } - NEKMESH_EXPORT virtual SpatialDomains::GeometrySharedPtr GetGeom( - int coordDim); - NEKMESH_EXPORT virtual void GetCurvedNodes( - std::vector<NodeSharedPtr> &nodeList) const; - NEKMESH_EXPORT virtual StdRegions::Orientation GetEdgeOrient( - int edgeId, EdgeSharedPtr edge); - NEKMESH_EXPORT virtual void MakeOrder( - int order, SpatialDomains::GeometrySharedPtr geom, - LibUtilities::PointsType pType, int coordDim, int &id, - bool justConfig = false); + NEKMESH_EXPORT SpatialDomains::GeometrySharedPtr GetGeom( + int coordDim) override; + NEKMESH_EXPORT void GetCurvedNodes( + std::vector<NodeSharedPtr> &nodeList) const override; + NEKMESH_EXPORT StdRegions::Orientation GetEdgeOrient( + int edgeId, EdgeSharedPtr edge) override; + NEKMESH_EXPORT void MakeOrder(int order, + SpatialDomains::GeometrySharedPtr geom, + LibUtilities::PointsType pType, int coordDim, + int &id, bool justConfig = false) override; NEKMESH_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf); - NEKMESH_EXPORT Array<OneD, NekDouble> Normal(bool inward = false); + NEKMESH_EXPORT Array<OneD, NekDouble> Normal(bool inward = false) override; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputGmsh.cpp b/library/NekMesh/Module/InputModules/InputGmsh.cpp index 4f1e988fdd..ebedceb9c3 100644 --- a/library/NekMesh/Module/InputModules/InputGmsh.cpp +++ b/library/NekMesh/Module/InputModules/InputGmsh.cpp @@ -52,9 +52,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputGmsh::className = GetModuleFactory().RegisterCreatorFunction( @@ -2036,5 +2034,4 @@ std::map<unsigned int, ElmtConfig> InputGmsh::GenElmMap() return tmp; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputGmsh.h b/library/NekMesh/Module/InputModules/InputGmsh.h index a9d881d7a9..0c9be31743 100644 --- a/library/NekMesh/Module/InputModules/InputGmsh.h +++ b/library/NekMesh/Module/InputModules/InputGmsh.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -49,8 +47,8 @@ class InputGmsh : public NekMesh::InputModule { public: InputGmsh(NekMesh::MeshSharedPtr m); - virtual ~InputGmsh(); - virtual void Process(); + ~InputGmsh() override; + void Process() override; /// Creates an instance of this class static NekMesh::ModuleSharedPtr create(NekMesh::MeshSharedPtr m) @@ -68,7 +66,7 @@ public: static std::vector<int> CreateReordering(unsigned int InputGmshEntity, Logger &log); - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputGmsh"; } @@ -101,7 +99,6 @@ private: void SaveNode(int id, NekDouble x = 0, NekDouble y = 0, NekDouble z = 0); void ReadNextElement(int tag = 0, int elm_type = 0); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputMCF.cpp b/library/NekMesh/Module/InputModules/InputMCF.cpp index 47da020309..3046ee8eee 100644 --- a/library/NekMesh/Module/InputModules/InputMCF.cpp +++ b/library/NekMesh/Module/InputModules/InputMCF.cpp @@ -45,9 +45,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputMCF::className = GetModuleFactory().RegisterCreatorFunction( @@ -760,5 +758,4 @@ void InputMCF::Process() m_log(VERBOSE) << "Input mesh generation complete." << endl; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputMCF.h b/library/NekMesh/Module/InputModules/InputMCF.h index 345177d9dc..22bdf752bd 100644 --- a/library/NekMesh/Module/InputModules/InputMCF.h +++ b/library/NekMesh/Module/InputModules/InputMCF.h @@ -37,17 +37,15 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class InputMCF : public InputModule { public: InputMCF(MeshSharedPtr m); - virtual ~InputMCF(); - virtual void Process(); + ~InputMCF() override; + void Process() override; /// Creates an instance of this class static ModuleSharedPtr create(MeshSharedPtr m) @@ -59,7 +57,7 @@ public: void ParseFile(std::string nm); - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputMCF"; } @@ -74,7 +72,6 @@ private: m_naca, m_adjust, m_adjustall, m_smoothbl, m_manifold, m_spaceoutbl, m_curverefine; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputNek.cpp b/library/NekMesh/Module/InputModules/InputNek.cpp index 09c7105c41..0e0cc613f5 100644 --- a/library/NekMesh/Module/InputModules/InputNek.cpp +++ b/library/NekMesh/Module/InputModules/InputNek.cpp @@ -48,9 +48,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputNek::className = GetModuleFactory().RegisterCreatorFunction( @@ -1129,5 +1127,4 @@ int InputNek::GetNnodes(LibUtilities::ShapeType InputNekEntity) return nNodes; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputNek.h b/library/NekMesh/Module/InputModules/InputNek.h index a8eb4141f3..495495d39f 100644 --- a/library/NekMesh/Module/InputModules/InputNek.h +++ b/library/NekMesh/Module/InputModules/InputNek.h @@ -42,9 +42,7 @@ #include <NekMesh/MeshElements/Triangle.h> #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { enum NekCurve @@ -60,8 +58,8 @@ class InputNek : public NekMesh::InputModule { public: InputNek(NekMesh::MeshSharedPtr p_m); - virtual ~InputNek(); - virtual void Process(); + ~InputNek() override; + void Process() override; /// Creates an instance of this class. static NekMesh::ModuleSharedPtr create(NekMesh::MeshSharedPtr m) @@ -71,7 +69,7 @@ public: /// %ModuleKey for class. static NekMesh::ModuleKey className; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputNek"; } @@ -95,7 +93,6 @@ private: */ std::map<int, int> hoMap; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputNek5000.cpp b/library/NekMesh/Module/InputModules/InputNek5000.cpp index adddb77682..e32373983b 100644 --- a/library/NekMesh/Module/InputModules/InputNek5000.cpp +++ b/library/NekMesh/Module/InputModules/InputNek5000.cpp @@ -47,9 +47,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputNek5000::className = GetModuleFactory().RegisterCreatorFunction( @@ -726,5 +724,4 @@ void InputNek5000::Process() } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputNek5000.h b/library/NekMesh/Module/InputModules/InputNek5000.h index ad5431a337..5e36100d52 100644 --- a/library/NekMesh/Module/InputModules/InputNek5000.h +++ b/library/NekMesh/Module/InputModules/InputNek5000.h @@ -42,9 +42,7 @@ #include <NekMesh/MeshElements/Triangle.h> #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -54,8 +52,8 @@ class InputNek5000 : public NekMesh::InputModule { public: InputNek5000(NekMesh::MeshSharedPtr p_m); - virtual ~InputNek5000(); - virtual void Process(); + ~InputNek5000() override; + void Process() override; /// Creates an instance of this class. static NekMesh::ModuleSharedPtr create(NekMesh::MeshSharedPtr m) @@ -65,7 +63,7 @@ public: /// %ModuleKey for class. static NekMesh::ModuleKey className; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputNek5000"; } @@ -73,7 +71,6 @@ public: private: void LoadHOSurfaces(); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputNekpp.cpp b/library/NekMesh/Module/InputModules/InputNekpp.cpp index b0a4f3211e..0f4e31d6ee 100644 --- a/library/NekMesh/Module/InputModules/InputNekpp.cpp +++ b/library/NekMesh/Module/InputModules/InputNekpp.cpp @@ -40,9 +40,7 @@ using namespace std; #include <NekMesh/MeshElements/Element.h> #include <SpatialDomains/MeshGraph.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { using namespace Nektar::NekMesh; @@ -323,5 +321,4 @@ void InputNekpp::Process() } ProcessComposites(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputNekpp.h b/library/NekMesh/Module/InputModules/InputNekpp.h index 9443f3b30b..a25e73351e 100644 --- a/library/NekMesh/Module/InputModules/InputNekpp.h +++ b/library/NekMesh/Module/InputModules/InputNekpp.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -49,8 +47,8 @@ class InputNekpp : public NekMesh::InputModule { public: InputNekpp(NekMesh::MeshSharedPtr m); - virtual ~InputNekpp(); - virtual void Process(); + ~InputNekpp() override; + void Process() override; /// Creates an instance of this class static NekMesh::ModuleSharedPtr create(NekMesh::MeshSharedPtr m) @@ -60,12 +58,11 @@ public: /// %ModuleKey for class. static NekMesh::ModuleKey className; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputNekpp"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputPly.cpp b/library/NekMesh/Module/InputModules/InputPly.cpp index 55e37529a9..bb113c6341 100644 --- a/library/NekMesh/Module/InputModules/InputPly.cpp +++ b/library/NekMesh/Module/InputModules/InputPly.cpp @@ -39,9 +39,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputPly::className = GetModuleFactory().RegisterCreatorFunction( @@ -202,5 +200,4 @@ void InputPly::ReadPly(io::filtering_istream &mshFile, NekDouble scale) } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputPly.h b/library/NekMesh/Module/InputModules/InputPly.h index c0700bf977..c33141e0b2 100644 --- a/library/NekMesh/Module/InputModules/InputPly.h +++ b/library/NekMesh/Module/InputModules/InputPly.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for Ply files. @@ -54,12 +52,12 @@ public: static NekMesh::ModuleKey className; InputPly(NekMesh::MeshSharedPtr m); - virtual ~InputPly(); + ~InputPly() override; /// Populate and validate required data structures. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputPly"; } @@ -70,7 +68,6 @@ private: }; typedef std::shared_ptr<InputPly> InputPlySharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputSem.cpp b/library/NekMesh/Module/InputModules/InputSem.cpp index 21df55a71f..fe490770ac 100644 --- a/library/NekMesh/Module/InputModules/InputSem.cpp +++ b/library/NekMesh/Module/InputModules/InputSem.cpp @@ -39,9 +39,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputSem::className = GetModuleFactory().RegisterCreatorFunction( @@ -180,7 +178,9 @@ void InputSem::Process() { getline(m_fileStream, line); if (line.length() < 7) + { continue; + } ss.clear(); ss.str(line); double x = 0, y = 0, z = 0; @@ -664,5 +664,4 @@ void InputSem::insertEdge(int elmt, int side, int tagId) LibUtilities::eSegment, conf, edgeNodes, tags); m_mesh->m_element[1].push_back(E); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputSem.h b/library/NekMesh/Module/InputModules/InputSem.h index cacb93dba2..46b15154de 100644 --- a/library/NekMesh/Module/InputModules/InputSem.h +++ b/library/NekMesh/Module/InputModules/InputSem.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -49,8 +47,8 @@ class InputSem : public NekMesh::InputModule { public: InputSem(NekMesh::MeshSharedPtr m); - virtual ~InputSem(); - virtual void Process(); + ~InputSem() override; + void Process() override; /// Creates an instance of this class static NekMesh::ModuleSharedPtr create(NekMesh::MeshSharedPtr m) @@ -60,7 +58,7 @@ public: /// %ModuleKey for class. static NekMesh::ModuleKey className; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputSem"; } @@ -72,7 +70,6 @@ private: /// Maps Semtex sections to positions inside the input file. std::map<std::string, std::streampos> sectionMap; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputStar.cpp b/library/NekMesh/Module/InputModules/InputStar.cpp index 1aeaa38c2e..2b573d3342 100644 --- a/library/NekMesh/Module/InputModules/InputStar.cpp +++ b/library/NekMesh/Module/InputModules/InputStar.cpp @@ -942,7 +942,7 @@ void InputStar::InitCCM(void) // need to pass in NULL (which always means kCCMIONoErr) // and then assign the return value to 'err'.). string fname = m_config["infile"].as<string>(); - m_ccmErr = CCMIOOpenFile(NULL, fname.c_str(), kCCMIORead, &root); + m_ccmErr = CCMIOOpenFile(nullptr, fname.c_str(), kCCMIORead, &root); if (m_ccmErr != kCCMIONoErr) { @@ -980,14 +980,14 @@ void InputStar::ReadNodes(std::vector<NodeSharedPtr> &Nodes) int dims = 1; CCMIOReadProcessor(&m_ccmErr, m_ccmProcessor, &vertices, &m_ccmTopology, - NULL, NULL); + nullptr, nullptr); if (m_ccmErr != kCCMIONoErr) { m_log(FATAL) << "CCM error: error reading processor" << endl; } - CCMIOEntitySize(&m_ccmErr, vertices, &nVertices, NULL); + CCMIOEntitySize(&m_ccmErr, vertices, &nVertices, nullptr); if (m_ccmErr != kCCMIONoErr) { m_log(FATAL) << "CCM error: error reading NextEntitySize in ReadNodes" @@ -1045,17 +1045,17 @@ void InputStar::ReadInternalFaces(unordered_map<int, vector<int>> &FacesNodes, // Read the internal faces. CCMIOGetEntity(&m_ccmErr, m_ccmTopology, kCCMIOInternalFaces, 0, &id); - CCMIOEntitySize(&m_ccmErr, id, &nFaces, NULL); + CCMIOEntitySize(&m_ccmErr, id, &nFaces, nullptr); int nf = nFaces; mapData.resize(nf); faceCells.resize(2 * nf); - CCMIOReadFaces(&m_ccmErr, id, kCCMIOInternalFaces, NULL, &size, NULL, + CCMIOReadFaces(&m_ccmErr, id, kCCMIOInternalFaces, nullptr, &size, nullptr, kCCMIOStart, kCCMIOEnd); faces.resize((size_t)size); - CCMIOReadFaces(&m_ccmErr, id, kCCMIOInternalFaces, &mapID, NULL, &faces[0], - kCCMIOStart, kCCMIOEnd); + CCMIOReadFaces(&m_ccmErr, id, kCCMIOInternalFaces, &mapID, nullptr, + &faces[0], kCCMIOStart, kCCMIOEnd); CCMIOReadFaceCells(&m_ccmErr, id, kCCMIOInternalFaces, &faceCells[0], kCCMIOStart, kCCMIOEnd); CCMIOReadMap(&m_ccmErr, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd); @@ -1123,20 +1123,20 @@ void InputStar::ReadBoundaryFaces(vector<vector<int>> &BndElementFaces, vector<int> faces, faceCells, mapData; vector<string> facelabel; - while (CCMIONextEntity(NULL, m_ccmTopology, kCCMIOBoundaryFaces, &index, + while (CCMIONextEntity(nullptr, m_ccmTopology, kCCMIOBoundaryFaces, &index, &id) == kCCMIONoErr) { int boundaryVal; - CCMIOEntitySize(&m_ccmErr, id, &nFaces, NULL); + CCMIOEntitySize(&m_ccmErr, id, &nFaces, nullptr); CCMIOSize nf = nFaces; mapData.resize(nf); faceCells.resize(nf); - CCMIOReadFaces(&m_ccmErr, id, kCCMIOBoundaryFaces, NULL, &size, NULL, - kCCMIOStart, kCCMIOEnd); + CCMIOReadFaces(&m_ccmErr, id, kCCMIOBoundaryFaces, nullptr, &size, + nullptr, kCCMIOStart, kCCMIOEnd); faces.resize((size_t)size); - CCMIOReadFaces(&m_ccmErr, id, kCCMIOBoundaryFaces, &mapID, NULL, + CCMIOReadFaces(&m_ccmErr, id, kCCMIOBoundaryFaces, &mapID, nullptr, &faces[0], kCCMIOStart, kCCMIOEnd); CCMIOReadFaceCells(&m_ccmErr, id, kCCMIOBoundaryFaces, &faceCells[0], kCCMIOStart, kCCMIOEnd); @@ -1147,10 +1147,11 @@ void InputStar::ReadBoundaryFaces(vector<vector<int>> &BndElementFaces, // check to see if we have a label for this boundary faces int size; char *name; - if (CCMIOReadOptstr(NULL, id, "Label", &size, NULL) == kCCMIONoErr) + if (CCMIOReadOptstr(nullptr, id, "Label", &size, nullptr) == + kCCMIONoErr) { name = new char[size + 1]; - CCMIOReadOptstr(NULL, id, "Label", NULL, name); + CCMIOReadOptstr(nullptr, id, "Label", nullptr, name); Facelabels.push_back(string(name)); } else diff --git a/library/NekMesh/Module/InputModules/InputStar.h b/library/NekMesh/Module/InputModules/InputStar.h index d534f641af..3355907670 100644 --- a/library/NekMesh/Module/InputModules/InputStar.h +++ b/library/NekMesh/Module/InputModules/InputStar.h @@ -39,9 +39,7 @@ #include <libccmio/ccmio.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for VTK files. class InputStar : public NekMesh::InputModule @@ -55,14 +53,14 @@ public: static NekMesh::ModuleKey className; InputStar(NekMesh::MeshSharedPtr m); - virtual ~InputStar(); + ~InputStar() override; /// Populate and validate required data structures. - virtual void Process(); + void Process() override; void ReadZone(int &nComposite); - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputStar"; } @@ -110,7 +108,6 @@ private: void SetupElements(void); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputStarTec.cpp b/library/NekMesh/Module/InputModules/InputStarTec.cpp index 58e51b57d1..4433700ac3 100644 --- a/library/NekMesh/Module/InputModules/InputStarTec.cpp +++ b/library/NekMesh/Module/InputModules/InputStarTec.cpp @@ -46,9 +46,7 @@ using namespace std; using namespace Nektar::NekMesh; namespace io = boost::iostreams; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputTec::className = GetModuleFactory().RegisterCreatorFunction( @@ -1095,5 +1093,4 @@ Array<OneD, int> InputTec::SortFaceNodes(vector<NodeSharedPtr> &Vnodes, return returnval; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputStarTec.h b/library/NekMesh/Module/InputModules/InputStarTec.h index 6950202b7d..31909de619 100644 --- a/library/NekMesh/Module/InputModules/InputStarTec.h +++ b/library/NekMesh/Module/InputModules/InputStarTec.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for VTK files. class InputTec : public NekMesh::InputModule @@ -53,14 +51,14 @@ public: static NekMesh::ModuleKey className; InputTec(NekMesh::MeshSharedPtr m); - virtual ~InputTec(); + ~InputTec() override; /// Populate and validate required data structures. - virtual void Process(); + void Process() override; void ReadZone(int &nComposite); - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputStarTec"; } @@ -87,7 +85,6 @@ protected: Array<OneD, std::vector<int>> &ElementFaces, std::vector<std::vector<int>> &FaceNodes); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputSwan.cpp b/library/NekMesh/Module/InputModules/InputSwan.cpp index ab1d91d939..d57a11a9de 100644 --- a/library/NekMesh/Module/InputModules/InputSwan.cpp +++ b/library/NekMesh/Module/InputModules/InputSwan.cpp @@ -38,9 +38,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputSwan::className = GetModuleFactory().RegisterCreatorFunction( @@ -203,5 +201,4 @@ void InputSwan::Process() PrintSummary(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputSwan.h b/library/NekMesh/Module/InputModules/InputSwan.h index 1350b888c2..60f157db19 100644 --- a/library/NekMesh/Module/InputModules/InputSwan.h +++ b/library/NekMesh/Module/InputModules/InputSwan.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for Swansea mesh format. @@ -54,17 +52,16 @@ public: static NekMesh::ModuleKey className; InputSwan(NekMesh::MeshSharedPtr m); - virtual ~InputSwan(); + ~InputSwan() override; /// Populate and validate required data structures. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputSwan"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/InputModules/InputVtk.cpp b/library/NekMesh/Module/InputModules/InputVtk.cpp index 7a9f3ec9b0..4d19d3b0ce 100644 --- a/library/NekMesh/Module/InputModules/InputVtk.cpp +++ b/library/NekMesh/Module/InputModules/InputVtk.cpp @@ -45,9 +45,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey InputVtk::className = GetModuleFactory().RegisterCreatorFunction( @@ -101,7 +99,7 @@ void InputVtk::Process() #if VTK_MAJOR_VERSION >= 9 || \ (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 90) - const vtkIdType *pts = 0; + const vtkIdType *pts = nullptr; #else vtkIdType *pts = 0; #endif @@ -169,5 +167,4 @@ void InputVtk::Process() ProcessElements(); ProcessComposites(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/InputModules/InputVtk.h b/library/NekMesh/Module/InputModules/InputVtk.h index f54fa2c1b9..e5a5faaae2 100644 --- a/library/NekMesh/Module/InputModules/InputVtk.h +++ b/library/NekMesh/Module/InputModules/InputVtk.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for VTK files. @@ -54,17 +52,16 @@ public: static NekMesh::ModuleKey className; InputVtk(NekMesh::MeshSharedPtr m); - virtual ~InputVtk(); + ~InputVtk() override; /// Populate and validate required data structures. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "InputVtk"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/Log.hpp b/library/NekMesh/Module/Log.hpp index 107ac17ce6..9f7e6573fc 100644 --- a/library/NekMesh/Module/Log.hpp +++ b/library/NekMesh/Module/Log.hpp @@ -52,9 +52,7 @@ #define ISSTDERRTTY isatty(fileno(stderr)) #endif -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -158,7 +156,7 @@ public: } /// Default destructor. - virtual ~StreamOutput() = default; + ~StreamOutput() override = default; /** * @brief Writes a log message to @p m_os. @@ -564,7 +562,6 @@ private: } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/Module.cpp b/library/NekMesh/Module/Module.cpp index 7c5ded7d4c..a1b2fddf40 100644 --- a/library/NekMesh/Module/Module.cpp +++ b/library/NekMesh/Module/Module.cpp @@ -40,9 +40,7 @@ using namespace std; namespace io = boost::iostreams; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -233,7 +231,9 @@ void Module::ProcessVertices() void Module::ProcessEdges(bool ReprocessEdges) { if (m_mesh->m_expDim < 2) + { return; + } if (ReprocessEdges) { @@ -348,7 +348,9 @@ void Module::ProcessEdges(bool ReprocessEdges) void Module::ProcessFaces(bool ReprocessFaces) { if (m_mesh->m_expDim < 3) + { return; + } if (ReprocessFaces) { @@ -996,5 +998,4 @@ void InputModule::PrintSummary() << m_mesh->GetNumBndryElements() << endl; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/Module.h b/library/NekMesh/Module/Module.h index 059a3d62bd..de551238cf 100644 --- a/library/NekMesh/Module/Module.h +++ b/library/NekMesh/Module/Module.h @@ -54,9 +54,7 @@ namespace io = boost::iostreams; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * Denotes different types of mesh converter modules: so far only @@ -290,7 +288,6 @@ typedef LibUtilities::NekFactory<ModuleKey, Module, MeshSharedPtr> ModuleFactory; NEKMESH_EXPORT ModuleFactory &GetModuleFactory(); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/OutputModules/OutputGmsh.cpp b/library/NekMesh/Module/OutputModules/OutputGmsh.cpp index e5551ad1f0..82b677613d 100644 --- a/library/NekMesh/Module/OutputModules/OutputGmsh.cpp +++ b/library/NekMesh/Module/OutputModules/OutputGmsh.cpp @@ -35,16 +35,14 @@ #include <NekMesh/MeshElements/Element.h> #include <NekMesh/MeshElements/Quadrilateral.h> #include <NekMesh/MeshElements/Triangle.h> +#include <NekMesh/Module/InputModules/InputGmsh.h> -#include "../InputModules/InputGmsh.h" #include "OutputGmsh.h" using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey OutputGmsh::className = GetModuleFactory().RegisterCreatorFunction( @@ -313,5 +311,4 @@ void OutputGmsh::Process() } m_mshFile << "$EndElements" << endl; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/OutputModules/OutputGmsh.h b/library/NekMesh/Module/OutputModules/OutputGmsh.h index e3764786eb..99d7bfd7ba 100644 --- a/library/NekMesh/Module/OutputModules/OutputGmsh.h +++ b/library/NekMesh/Module/OutputModules/OutputGmsh.h @@ -38,9 +38,7 @@ #include <LibUtilities/BasicUtils/HashUtils.hpp> #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { struct ElmtConfigHash @@ -64,12 +62,12 @@ public: static NekMesh::ModuleKey className; OutputGmsh(NekMesh::MeshSharedPtr m); - virtual ~OutputGmsh(); + ~OutputGmsh() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "OutputGmsh"; } @@ -79,7 +77,6 @@ private: elmMap; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/OutputModules/OutputNekpp.cpp b/library/NekMesh/Module/OutputModules/OutputNekpp.cpp index 8ccdb0b04e..7f75696c3c 100644 --- a/library/NekMesh/Module/OutputModules/OutputNekpp.cpp +++ b/library/NekMesh/Module/OutputModules/OutputNekpp.cpp @@ -57,9 +57,7 @@ namespace io = boost::iostreams; using namespace Nektar::NekMesh; using namespace Nektar::SpatialDomains; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey OutputNekpp::className1 = GetModuleFactory().RegisterCreatorFunction( ModuleKey(eOutputModule, "xml"), OutputNekpp::create, @@ -807,5 +805,4 @@ void OutputNekpp::TransferDomain(MeshGraphSharedPtr graph) } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/OutputModules/OutputNekpp.h b/library/NekMesh/Module/OutputModules/OutputNekpp.h index 1883244b4c..1902ff5410 100644 --- a/library/NekMesh/Module/OutputModules/OutputNekpp.h +++ b/library/NekMesh/Module/OutputModules/OutputNekpp.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for Gmsh files. @@ -54,7 +52,7 @@ public: static NekMesh::ModuleKey className1, className2; OutputNekpp(NekMesh::MeshSharedPtr m); - virtual ~OutputNekpp(); + ~OutputNekpp() override; /// Write mesh to output file. void Process() override; @@ -79,7 +77,6 @@ private: void TransferComposites(SpatialDomains::MeshGraphSharedPtr graph); void TransferDomain(SpatialDomains::MeshGraphSharedPtr graph); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/OutputModules/OutputSTL.cpp b/library/NekMesh/Module/OutputModules/OutputSTL.cpp index 8cf16b2463..744418878b 100644 --- a/library/NekMesh/Module/OutputModules/OutputSTL.cpp +++ b/library/NekMesh/Module/OutputModules/OutputSTL.cpp @@ -39,9 +39,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey OutputSTL::className = GetModuleFactory().RegisterCreatorFunction( @@ -154,5 +152,4 @@ void OutputSTL::Process() m_mshFile << "endsolid" << endl; } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/OutputModules/OutputSTL.h b/library/NekMesh/Module/OutputModules/OutputSTL.h index eeb6d0a6f7..7b823ea3f1 100644 --- a/library/NekMesh/Module/OutputModules/OutputSTL.h +++ b/library/NekMesh/Module/OutputModules/OutputSTL.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class OutputSTL : public NekMesh::OutputModule @@ -53,19 +51,18 @@ public: static NekMesh::ModuleKey className; OutputSTL(NekMesh::MeshSharedPtr m); - virtual ~OutputSTL(); + ~OutputSTL() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "OutputSTL"; } private: }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/OutputModules/OutputStdOut.cpp b/library/NekMesh/Module/OutputModules/OutputStdOut.cpp index a62bd1ff6d..082bdc8aae 100644 --- a/library/NekMesh/Module/OutputModules/OutputStdOut.cpp +++ b/library/NekMesh/Module/OutputModules/OutputStdOut.cpp @@ -38,9 +38,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey OutputStdOut::className = GetModuleFactory().RegisterCreatorFunction( @@ -58,5 +56,4 @@ void OutputStdOut::Process() { } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/OutputModules/OutputStdOut.h b/library/NekMesh/Module/OutputModules/OutputStdOut.h index 391d886eb3..d7233e8b2a 100644 --- a/library/NekMesh/Module/OutputModules/OutputStdOut.h +++ b/library/NekMesh/Module/OutputModules/OutputStdOut.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Dummy Output Module for no output file @@ -55,17 +53,16 @@ public: static NekMesh::ModuleKey className; OutputStdOut(NekMesh::MeshSharedPtr m); - virtual ~OutputStdOut(); + ~OutputStdOut() override; /// Process is essentially an empty function - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "OutputStdOut"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/OutputModules/OutputVtk.cpp b/library/NekMesh/Module/OutputModules/OutputVtk.cpp index 33dda111ab..19a91043fd 100644 --- a/library/NekMesh/Module/OutputModules/OutputVtk.cpp +++ b/library/NekMesh/Module/OutputModules/OutputVtk.cpp @@ -46,9 +46,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey OutputVtk::className = GetModuleFactory().RegisterCreatorFunction( @@ -178,5 +176,4 @@ void OutputVtk::Process() vtkMeshWriter->Update(); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/OutputModules/OutputVtk.h b/library/NekMesh/Module/OutputModules/OutputVtk.h index d37d96b0a8..908cd96d3f 100644 --- a/library/NekMesh/Module/OutputModules/OutputVtk.h +++ b/library/NekMesh/Module/OutputModules/OutputVtk.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /// Converter for VTK files. @@ -56,17 +54,16 @@ public: static NekMesh::ModuleKey className; OutputVtk(NekMesh::MeshSharedPtr m); - virtual ~OutputVtk(); + ~OutputVtk() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "OutputVTK"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessBL.cpp b/library/NekMesh/Module/ProcessModules/ProcessBL.cpp index 5d2a7bca8f..e6f5d56348 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessBL.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessBL.cpp @@ -49,9 +49,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessBL::className = GetModuleFactory().RegisterCreatorFunction( ModuleKey(eProcessModule, "bl"), ProcessBL::create, @@ -1529,5 +1527,4 @@ void ProcessBL::BoundaryLayer3D() ProcessElements(); ProcessComposites(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessBL.h b/library/NekMesh/Module/ProcessModules/ProcessBL.h index aada3fa61d..69d39ff862 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessBL.h +++ b/library/NekMesh/Module/ProcessModules/ProcessBL.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,9 +57,9 @@ public: static NekMesh::ModuleKey className; ProcessBL(NekMesh::MeshSharedPtr m); - virtual ~ProcessBL(); + ~ProcessBL() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessBL"; } @@ -71,9 +69,8 @@ public: // Create the boundary layer in 3D void BoundaryLayer3D(); /// Write mesh to output file. - virtual void Process(); + void Process() override; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessCurve.cpp b/library/NekMesh/Module/ProcessModules/ProcessCurve.cpp index 67307a95e6..0223de88c2 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessCurve.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessCurve.cpp @@ -49,9 +49,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessCurve::className = GetModuleFactory().RegisterCreatorFunction( @@ -226,5 +224,4 @@ NekDouble ProcessCurve::EvaluateCoordinate(NekDouble xCoord) } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessCurve.h b/library/NekMesh/Module/ProcessModules/ProcessCurve.h index 5ec9970af9..328925ed1c 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessCurve.h +++ b/library/NekMesh/Module/ProcessModules/ProcessCurve.h @@ -39,9 +39,7 @@ #include <LibUtilities/BasicUtils/PtsField.h> #include <LibUtilities/Interpreter/Interpreter.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessCurve : public ProcessCurvedEdges @@ -55,15 +53,15 @@ public: static NekMesh::ModuleKey className; ProcessCurve(NekMesh::MeshSharedPtr m); - virtual ~ProcessCurve(); + ~ProcessCurve() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessCurve"; } protected: - void v_GenerateEdgeNodes(NekMesh::EdgeSharedPtr edge); + void v_GenerateEdgeNodes(NekMesh::EdgeSharedPtr edge) override; private: NekDouble EvaluateCoordinate(NekDouble xCoord); @@ -73,7 +71,6 @@ private: int m_fExprId; LibUtilities::PtsFieldSharedPtr m_fieldPts; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.cpp b/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.cpp index 075b6d5f46..38439689f4 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.cpp @@ -46,9 +46,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief Default constructor. @@ -125,5 +123,4 @@ void ProcessCurvedEdges::Process() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.h b/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.h index 97d3c6e79b..63850bf5d6 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.h +++ b/library/NekMesh/Module/ProcessModules/ProcessCurvedEdges.h @@ -37,25 +37,23 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessCurvedEdges : public NekMesh::ProcessModule { public: ProcessCurvedEdges(NekMesh::MeshSharedPtr m); - virtual ~ProcessCurvedEdges(); + ~ProcessCurvedEdges() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; void GenerateEdgeNodes(NekMesh::EdgeSharedPtr edge) { v_GenerateEdgeNodes(edge); } - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessCurvedEdges"; } @@ -63,7 +61,6 @@ public: protected: virtual void v_GenerateEdgeNodes(NekMesh::EdgeSharedPtr edge) = 0; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessCyl.cpp b/library/NekMesh/Module/ProcessModules/ProcessCyl.cpp index 0c853c2a4e..26a790fd64 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessCyl.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessCyl.cpp @@ -46,9 +46,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessCyl::className = GetModuleFactory().RegisterCreatorFunction( @@ -106,5 +104,4 @@ void ProcessCyl::v_GenerateEdgeNodes(EdgeSharedPtr edge) } edge->m_curveType = LibUtilities::ePolyEvenlySpaced; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessCyl.h b/library/NekMesh/Module/ProcessModules/ProcessCyl.h index eed670fb44..c92e152ce5 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessCyl.h +++ b/library/NekMesh/Module/ProcessModules/ProcessCyl.h @@ -37,9 +37,7 @@ #include "ProcessCurvedEdges.h" -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessCyl : public ProcessCurvedEdges @@ -53,17 +51,16 @@ public: static NekMesh::ModuleKey className; ProcessCyl(NekMesh::MeshSharedPtr m); - virtual ~ProcessCyl(); + ~ProcessCyl() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessCyl"; } protected: - void v_GenerateEdgeNodes(NekMesh::EdgeSharedPtr edge); + void v_GenerateEdgeNodes(NekMesh::EdgeSharedPtr edge) override; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.cpp b/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.cpp index 8e1bdfb7e8..e1f1e04d0e 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.cpp @@ -39,9 +39,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessDetectSurf::className = @@ -233,5 +231,4 @@ void ProcessDetectSurf::FindContiguousSurface(ElementSharedPtr start, } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.h b/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.h index 7e3b5cea0e..1487a70fe4 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.h +++ b/library/NekMesh/Module/ProcessModules/ProcessDetectSurf.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,12 +57,12 @@ public: static NekMesh::ModuleKey className; ProcessDetectSurf(NekMesh::MeshSharedPtr m); - virtual ~ProcessDetectSurf(); + ~ProcessDetectSurf() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessDetectSurf"; } @@ -74,7 +72,6 @@ private: std::set<int> &doneIds, std::vector<NekMesh::ElementSharedPtr> &block); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.cpp b/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.cpp index 7fdd2f5653..9fe4d52f5d 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.cpp @@ -39,9 +39,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessExtractSurf::className = @@ -439,5 +437,4 @@ void ProcessExtractSurf::Process() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.h b/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.h index d8d58fccdf..b4f5b796ef 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.h +++ b/library/NekMesh/Module/ProcessModules/ProcessExtractSurf.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,17 +57,16 @@ public: static NekMesh::ModuleKey className; ProcessExtractSurf(NekMesh::MeshSharedPtr m); - virtual ~ProcessExtractSurf(); + ~ProcessExtractSurf() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessExtractSurf"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.cpp b/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.cpp index 5f85fc65c8..ca07488502 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.cpp @@ -43,9 +43,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessExtractTetPrismInterface::className = @@ -149,5 +147,4 @@ void ProcessExtractTetPrismInterface::Process() ProcessElements(); ProcessComposites(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.h b/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.h index 2db443b2f2..3ea6a4efec 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.h +++ b/library/NekMesh/Module/ProcessModules/ProcessExtractTetPrismInterface.h @@ -38,9 +38,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,17 +57,16 @@ public: static NekMesh::ModuleKey className; ProcessExtractTetPrismInterface(NekMesh::MeshSharedPtr m); - virtual ~ProcessExtractTetPrismInterface(); + ~ProcessExtractTetPrismInterface() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessExtractTetPrismInterface"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessExtrude.cpp b/library/NekMesh/Module/ProcessModules/ProcessExtrude.cpp index 5331108ec9..5eda6568e9 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessExtrude.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessExtrude.cpp @@ -38,9 +38,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessExtrude::className = GetModuleFactory().RegisterCreatorFunction( @@ -445,5 +443,4 @@ void ProcessExtrude::Process() // Remove all faces composite m_mesh->m_composite.erase(compAllFaceId); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessExtrude.h b/library/NekMesh/Module/ProcessModules/ProcessExtrude.h index 88f5ba27f5..ae7ccb661b 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessExtrude.h +++ b/library/NekMesh/Module/ProcessModules/ProcessExtrude.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief This processing module extrudes a 2d mesh in the z direction @@ -55,16 +53,15 @@ public: static NekMesh::ModuleKey className; ProcessExtrude(NekMesh::MeshSharedPtr m); - virtual ~ProcessExtrude(); + ~ProcessExtrude() override; - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessExtrude"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.cpp b/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.cpp index f76b59dfd5..35a5a4b636 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.cpp @@ -46,9 +46,7 @@ namespace bgi = boost::geometry::index; using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessInsertSurface::className = @@ -208,5 +206,4 @@ void ProcessInsertSurface::Process() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.h b/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.h index 7f056eb94f..3faa046e03 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.h +++ b/library/NekMesh/Module/ProcessModules/ProcessInsertSurface.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,17 +57,16 @@ public: static NekMesh::ModuleKey className; ProcessInsertSurface(NekMesh::MeshSharedPtr m); - virtual ~ProcessInsertSurface(); + ~ProcessInsertSurface() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessInsertSurface"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessJac.cpp b/library/NekMesh/Module/ProcessModules/ProcessJac.cpp index 8744b3611d..b9edc8f0cd 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessJac.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessJac.cpp @@ -38,9 +38,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessJac::className = GetModuleFactory().RegisterCreatorFunction( @@ -169,5 +167,4 @@ void ProcessJac::Process() << endl; } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessJac.h b/library/NekMesh/Module/ProcessModules/ProcessJac.h index 8aeb173f83..39b31fd19f 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessJac.h +++ b/library/NekMesh/Module/ProcessModules/ProcessJac.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,7 +57,7 @@ public: static NekMesh::ModuleKey className; ProcessJac(NekMesh::MeshSharedPtr m); - virtual ~ProcessJac(); + ~ProcessJac() override; /// Write mesh to output file. void Process() override; @@ -69,7 +67,6 @@ public: return "ProcessJac"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessLinear.cpp b/library/NekMesh/Module/ProcessModules/ProcessLinear.cpp index dd66a0bc5a..e6af7a9d9f 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessLinear.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessLinear.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { using namespace Nektar::NekMesh; @@ -309,5 +307,4 @@ bool ProcessLinear::Invalid(ElementSharedPtr el, NekDouble thr) return false; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessLinear.h b/library/NekMesh/Module/ProcessModules/ProcessLinear.h index bbc1c52ff0..e7a6130852 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessLinear.h +++ b/library/NekMesh/Module/ProcessModules/ProcessLinear.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** * @brief This processing module removes all the high-order information @@ -56,12 +54,12 @@ public: static NekMesh::ModuleKey className; ProcessLinear(NekMesh::MeshSharedPtr m); - virtual ~ProcessLinear(); + ~ProcessLinear() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessLinear"; } @@ -69,7 +67,6 @@ public: private: bool Invalid(NekMesh::ElementSharedPtr el, NekDouble thr); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.cpp b/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.cpp index 0fb47b49f0..e24610ca19 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.cpp @@ -38,9 +38,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessLinkCheck::className = @@ -100,5 +98,4 @@ void ProcessLinkCheck::Process() } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.h b/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.h index 90874ba81e..b87dfbee8f 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.h +++ b/library/NekMesh/Module/ProcessModules/ProcessLinkCheck.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,17 +57,16 @@ public: static NekMesh::ModuleKey className; ProcessLinkCheck(NekMesh::MeshSharedPtr m); - virtual ~ProcessLinkCheck(); + ~ProcessLinkCheck() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessLinkCheck"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.cpp b/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.cpp index 7d02855802..b62e3a6b66 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.cpp @@ -40,9 +40,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessOptiExtract::className = @@ -342,5 +340,4 @@ void ProcessOptiExtract::Process() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.h b/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.h index fd4458776e..396d4a5f0b 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.h +++ b/library/NekMesh/Module/ProcessModules/ProcessOptiExtract.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessOptiExtract : public NekMesh::ProcessModule @@ -53,17 +51,16 @@ public: static NekMesh::ModuleKey className; ProcessOptiExtract(NekMesh::MeshSharedPtr m); - virtual ~ProcessOptiExtract(); + ~ProcessOptiExtract() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessOptiExtract"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessPerAlign.cpp b/library/NekMesh/Module/ProcessModules/ProcessPerAlign.cpp index 0d4564699a..aefde097cf 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessPerAlign.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessPerAlign.cpp @@ -50,9 +50,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessPerAlign::className = @@ -436,5 +434,4 @@ void ProcessPerAlign::Process() } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessPerAlign.h b/library/NekMesh/Module/ProcessModules/ProcessPerAlign.h index 780734a12f..045401e416 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessPerAlign.h +++ b/library/NekMesh/Module/ProcessModules/ProcessPerAlign.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessPerAlign : public NekMesh::ProcessModule @@ -53,19 +51,18 @@ public: static NekMesh::ModuleKey className; ProcessPerAlign(NekMesh::MeshSharedPtr m); - virtual ~ProcessPerAlign(); + ~ProcessPerAlign() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessPerAlign"; } private: }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.cpp b/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.cpp index 2aca1e3bc5..ac244568b3 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.cpp @@ -45,9 +45,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { const NekDouble prismU1[6] = {-1.0, 1.0, 1.0, -1.0, -1.0, -1.0}; @@ -655,5 +653,4 @@ void ProcessProjectCAD::Process() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.h b/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.h index 92cbbd71f1..81a73911e8 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.h +++ b/library/NekMesh/Module/ProcessModules/ProcessProjectCAD.h @@ -50,9 +50,7 @@ typedef bg::model::point<float, 3, bg::cs::cartesian> point; typedef bg::model::box<point> box; typedef std::pair<box, unsigned> boxI; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessProjectCAD : public NekMesh::ProcessModule @@ -66,12 +64,12 @@ public: static NekMesh::ModuleKey className; ProcessProjectCAD(NekMesh::MeshSharedPtr m); - virtual ~ProcessProjectCAD(); + ~ProcessProjectCAD() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessProjectCAD"; } @@ -82,7 +80,6 @@ private: bool IsNotValid(std::vector<NekMesh::ElementSharedPtr> &els); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessScalar.cpp b/library/NekMesh/Module/ProcessModules/ProcessScalar.cpp index 238d10a2d8..475feb19fe 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessScalar.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessScalar.cpp @@ -41,9 +41,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessScalar::className = GetModuleFactory().RegisterCreatorFunction( @@ -141,5 +139,4 @@ void ProcessScalar::Process() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessScalar.h b/library/NekMesh/Module/ProcessModules/ProcessScalar.h index b85a9f9151..f3f3dc83e7 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessScalar.h +++ b/library/NekMesh/Module/ProcessModules/ProcessScalar.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,17 +57,16 @@ public: static NekMesh::ModuleKey className; ProcessScalar(NekMesh::MeshSharedPtr m); - virtual ~ProcessScalar(); + ~ProcessScalar() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessScalar"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessSpherigon.cpp b/library/NekMesh/Module/ProcessModules/ProcessSpherigon.cpp index 6077baf226..913734db13 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessSpherigon.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessSpherigon.cpp @@ -57,9 +57,7 @@ using namespace Nektar::NekMesh; #define TOL_BLEND 1.0e-8 -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessSpherigon::className = GetModuleFactory().RegisterCreatorFunction( @@ -998,5 +996,4 @@ void ProcessSpherigon::Process() m_mesh->m_vertexNormals.clear(); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessSpherigon.h b/library/NekMesh/Module/ProcessModules/ProcessSpherigon.h index 9f01523820..46ca19799a 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessSpherigon.h +++ b/library/NekMesh/Module/ProcessModules/ProcessSpherigon.h @@ -35,12 +35,10 @@ #ifndef UTILITIES_NEKMESH_PROCESSJAC #define UTILITIES_NEKMESH_PROCESSJAC -#include "../InputModules/InputPly.h" +#include <NekMesh/Module/InputModules/InputPly.h> #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessSpherigon : public NekMesh::ProcessModule @@ -54,12 +52,12 @@ public: static NekMesh::ModuleKey className; ProcessSpherigon(NekMesh::MeshSharedPtr m); - virtual ~ProcessSpherigon(); + ~ProcessSpherigon() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessSpherigon"; } @@ -78,7 +76,6 @@ protected: std::map<int, NekMesh::NodeSharedPtr> &surfverts); }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessTetSplit.cpp b/library/NekMesh/Module/ProcessModules/ProcessTetSplit.cpp index a31fbcb972..33529248d5 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessTetSplit.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessTetSplit.cpp @@ -44,9 +44,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { typedef std::pair<int, int> ipair; @@ -479,5 +477,4 @@ void ProcessTetSplit::Process() ProcessElements(); ProcessComposites(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessTetSplit.h b/library/NekMesh/Module/ProcessModules/ProcessTetSplit.h index 31384df9a4..665d211f45 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessTetSplit.h +++ b/library/NekMesh/Module/ProcessModules/ProcessTetSplit.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -59,17 +57,16 @@ public: static NekMesh::ModuleKey className; ProcessTetSplit(NekMesh::MeshSharedPtr m); - virtual ~ProcessTetSplit(); + ~ProcessTetSplit() override; /// Write mesh to output file. - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessTetSplit"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.cpp b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.cpp index da2794f667..bb3a80f220 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { std::mutex mtx2; @@ -834,5 +832,4 @@ ElUtilJob *ElUtil::GetJob(bool update) { return new ElUtilJob(this, update); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.h b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.h index 19f3545032..48322bf39b 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.h +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ElUtil.h @@ -44,9 +44,7 @@ typedef Nektar::LibUtilities::PtsFieldSharedPtr PtsFieldSharedPtr; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { using namespace NekMesh; @@ -137,7 +135,7 @@ public: { } - void Run() + void Run() override { el->Evaluate(); @@ -152,7 +150,6 @@ private: bool m_update; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Evaluator.hxx b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Evaluator.hxx index 63bd9fea62..fa3ad2339b 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Evaluator.hxx +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Evaluator.hxx @@ -39,9 +39,7 @@ #include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { using namespace std; @@ -274,7 +272,6 @@ template <> inline NekDouble FrobeniusNorm<3>(NekDouble inarray[][3]) inarray[2][2] * inarray[2][2]; } -} // namespace NekMesh } // namespace Nektar #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Hessian.hxx b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Hessian.hxx index f8ed65b00e..bedb29e81a 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Hessian.hxx +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/Hessian.hxx @@ -37,9 +37,7 @@ #include <NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -254,7 +252,6 @@ template <> void NodeOpti::MinEigen<3>(NekDouble &val) } } -} // namespace NekMesh } // namespace Nektar #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.cpp b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.cpp index 7deece0225..f9b8a09def 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.cpp @@ -43,9 +43,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { NodeOptiFactory &GetNodeOptiFactory() @@ -275,5 +273,4 @@ NodeOptiJob *NodeOpti::GetJob() { return new NodeOptiJob(this); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.h b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.h index 961b4d4581..36fdfc452e 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.h +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOpti.h @@ -44,9 +44,7 @@ #include "Evaluator.hxx" #include "ProcessVarOpti.h" -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class NodeOptiJob; @@ -152,9 +150,9 @@ public: { } - ~NodeOpti3D3D(){}; + ~NodeOpti3D3D() override{}; - void Optimise(); + void Optimise() override; static int m_type; static NodeOptiSharedPtr create( @@ -178,9 +176,9 @@ public: { } - ~NodeOpti2D2D(){}; + ~NodeOpti2D2D() override{}; - void Optimise(); + void Optimise() override; static int m_type; static NodeOptiSharedPtr create( @@ -200,7 +198,7 @@ public: { } - void Run() + void Run() override { node->Optimise(); } @@ -986,7 +984,6 @@ NekDouble NodeOpti::GetFunctional(NekDouble &minJacNew, bool gradient) return integral; // return sqrt(m_grad[0]*m_grad[0] + m_grad[1]*m_grad[1]); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.cpp b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.cpp index 95a133e865..8d6833c4d3 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.cpp @@ -38,9 +38,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { std::mutex mtx; @@ -443,5 +441,4 @@ void NodeOpti1D2D::ProcessGradient() d2[3] * (grad[2] * d2[3] + grad[3] * d2[4]) + d2[4] * (grad[3] * d2[3] + grad[4] * d2[4]); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.h b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.h index b7fcae8707..4ce80c03f7 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.h +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/NodeOptiCAD.h @@ -39,9 +39,7 @@ #include <NekMesh/CADSystem/CADCurve.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class NodeOpti1D3D : public NodeOpti // 1D optimsation in 3D space @@ -55,9 +53,9 @@ public: { } - ~NodeOpti1D3D(){}; + ~NodeOpti1D3D() override{}; - void Optimise(); + void Optimise() override; static int m_type; static NodeOptiSharedPtr create( @@ -84,9 +82,9 @@ public: { } - ~NodeOpti2D3D(){}; + ~NodeOpti2D3D() override{}; - void Optimise(); + void Optimise() override; static int m_type; static NodeOptiSharedPtr create( @@ -114,9 +112,9 @@ public: m_bd = curve->GetBounds(); } - ~NodeOpti1D2D(){}; + ~NodeOpti1D2D() override{}; - void Optimise(); + void Optimise() override; static int m_type; static NodeOptiSharedPtr create( @@ -132,7 +130,6 @@ private: CADCurveSharedPtr curve; Array<OneD, NekDouble> m_bd; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/PreProcessing.cpp b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/PreProcessing.cpp index 84a7f7bf29..41f2f68c8e 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/PreProcessing.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/PreProcessing.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { map<LibUtilities::ShapeType, DerivUtilSharedPtr> ProcessVarOpti::BuildDerivUtil( @@ -109,7 +107,7 @@ map<LibUtilities::ShapeType, DerivUtilSharedPtr> ProcessVarOpti::BuildDerivUtil( der->ptsStd = u1[0].size(); der->pts = u2[0].size(); - LibUtilities::NodalUtil *nodalUtil = NULL; + LibUtilities::NodalUtil *nodalUtil = nullptr; if (it.first == LibUtilities::eTriangle) { @@ -774,5 +772,4 @@ LibUtilities::Interpolator ProcessVarOpti::GetField( return ret; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.cpp b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.cpp index 3e0fd44807..1869437a7a 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.cpp +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.cpp @@ -62,9 +62,7 @@ using namespace std; using namespace Nektar::NekMesh; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessVarOpti::className = @@ -434,12 +432,12 @@ public: { } - virtual ~NodalUtilTriMonomial() + ~NodalUtilTriMonomial() override { } protected: - virtual NekVector<NekDouble> v_OrthoBasis(const size_t mode) override + NekVector<NekDouble> v_OrthoBasis(const size_t mode) override { // Monomial basis. std::pair<int, int> modes = m_ordering[mode]; @@ -454,15 +452,15 @@ protected: return ret; } - virtual NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, - const size_t mode) override + NekVector<NekDouble> v_OrthoBasisDeriv(const size_t dir, + const size_t mode) override { boost::ignore_unused(dir, mode); NEKERROR(ErrorUtil::efatal, "OrthoBasisDeriv: not supported"); return NekVector<NekDouble>(); } - virtual std::shared_ptr<NodalUtil> v_CreateUtil( + std::shared_ptr<NodalUtil> v_CreateUtil( Array<OneD, Array<OneD, NekDouble>> &xi) override { return MemoryManager<NodalUtilTriMonomial>::AllocateSharedPtr( @@ -543,5 +541,4 @@ void ProcessVarOpti::Analytics() } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.h b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.h index f08a789b83..c77e2683e8 100644 --- a/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.h +++ b/library/NekMesh/Module/ProcessModules/ProcessVarOpti/ProcessVarOpti.h @@ -39,9 +39,7 @@ #include "ElUtil.h" -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { struct DerivUtil @@ -90,11 +88,11 @@ public: static ModuleKey className; ProcessVarOpti(MeshSharedPtr m); - virtual ~ProcessVarOpti(); + ~ProcessVarOpti() override; - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "ProcessVarOpti"; } @@ -125,7 +123,6 @@ private: ResidualSharedPtr m_res; optiType m_opti; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Octree/Octant.cpp b/library/NekMesh/Octree/Octant.cpp index 04218e9264..c59caa09db 100644 --- a/library/NekMesh/Octree/Octant.cpp +++ b/library/NekMesh/Octree/Octant.cpp @@ -35,9 +35,7 @@ #include <NekMesh/Octree/Octant.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { inline OctantFace GetReverseFace(OctantFace f) @@ -500,5 +498,4 @@ bool operator==(OctantSharedPtr const &p1, OctantSharedPtr const &p2) return false; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Octree/Octant.h b/library/NekMesh/Octree/Octant.h index bb2a5114f9..a4f7d1c436 100644 --- a/library/NekMesh/Octree/Octant.h +++ b/library/NekMesh/Octree/Octant.h @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/Memory/NekMemoryManager.hpp> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -358,7 +356,6 @@ private: }; bool operator==(OctantSharedPtr const &p1, OctantSharedPtr const &p2); -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Octree/Octree.cpp b/library/NekMesh/Octree/Octree.cpp index 249f1b81d6..19a509b09e 100644 --- a/library/NekMesh/Octree/Octree.cpp +++ b/library/NekMesh/Octree/Octree.cpp @@ -42,9 +42,7 @@ #include <boost/algorithm/string.hpp> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void Octree::Process() @@ -961,9 +959,13 @@ void Octree::CompileSourcePointList() uv[0] = k * du + bounds[0]; uv[1] = j * dv + bounds[2]; if (j == 40 - 1) + { uv[1] = bounds[3]; + } if (k == 40 - 1) + { uv[0] = bounds[1]; + } samplepoints[k][j] = surf->P(uv); } } @@ -994,9 +996,13 @@ void Octree::CompileSourcePointList() samplepoints[k][j + 1][2])); if (deltau > DeltaU) + { DeltaU = deltau; + } if (deltav > DeltaV) + { DeltaV = deltav; + } } } @@ -1018,9 +1024,13 @@ void Octree::CompileSourcePointList() // this prevents round off error at the end of the surface // may not be neseercary but works if (j == nu - 1) + { uv[0] = bounds[1]; + } if (k == nv - 1) + { uv[1] = bounds[3]; + } NekDouble C = surf->Curvature(uv); @@ -1123,5 +1133,4 @@ NekDouble Octree::ddx(OctantSharedPtr i, OctantSharedPtr j) { return fabs(i->GetDelta() - j->GetDelta()) / i->Distance(j); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Octree/Octree.h b/library/NekMesh/Octree/Octree.h index 3936832d25..a42410c593 100644 --- a/library/NekMesh/Octree/Octree.h +++ b/library/NekMesh/Octree/Octree.h @@ -42,9 +42,7 @@ #include <string> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -327,7 +325,6 @@ private: }; typedef std::shared_ptr<Octree> OctreeSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Octree/ProcessLoadOctree.cpp b/library/NekMesh/Octree/ProcessLoadOctree.cpp index a7b8e99c86..98132c9bb3 100644 --- a/library/NekMesh/Octree/ProcessLoadOctree.cpp +++ b/library/NekMesh/Octree/ProcessLoadOctree.cpp @@ -36,9 +36,7 @@ #include <NekMesh/Octree/Octree.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey ProcessLoadOctree::className = @@ -98,5 +96,4 @@ void ProcessLoadOctree::Process() m_mesh->m_octree->WriteOctree(m_config["writeoctree"].as<string>()); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Octree/ProcessLoadOctree.h b/library/NekMesh/Octree/ProcessLoadOctree.h index 745da93388..b35e9df2b9 100644 --- a/library/NekMesh/Octree/ProcessLoadOctree.h +++ b/library/NekMesh/Octree/ProcessLoadOctree.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class ProcessLoadOctree : public ProcessModule @@ -53,16 +51,15 @@ public: static ModuleKey className; ProcessLoadOctree(MeshSharedPtr m); - virtual ~ProcessLoadOctree(); + ~ProcessLoadOctree() override; - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "LoadOctree"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Octree/SourcePoint.hpp b/library/NekMesh/Octree/SourcePoint.hpp index 6f5bf5cd44..cb95b545e3 100644 --- a/library/NekMesh/Octree/SourcePoint.hpp +++ b/library/NekMesh/Octree/SourcePoint.hpp @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <LibUtilities/Memory/NekMemoryManager.hpp> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { enum SPType @@ -179,12 +177,12 @@ public: m_type = eRCBoundary; } - ~CPoint(){}; + ~CPoint() override{}; /** * @brief get mesh spacing paramter */ - NekDouble GetDelta() + NekDouble GetDelta() override { return m_delta; } @@ -192,7 +190,7 @@ public: /** * @brief get mesh refinement spacing paramter */ - NekDouble GetRDelta() + NekDouble GetRDelta() override { return m_rdelta; } @@ -200,7 +198,7 @@ public: /** * @brief gets the corresponding cad information for the point */ - void GetCAD(int &surf, Array<OneD, NekDouble> &uv) + void GetCAD(int &surf, Array<OneD, NekDouble> &uv) override { surf = sid; uv = m_uv; @@ -211,7 +209,7 @@ public: m_rdelta = i; } - void SetDelta(NekDouble i) + void SetDelta(NekDouble i) override { m_delta = i; } @@ -246,31 +244,31 @@ public: m_type = ePBoundary; } - ~BPoint(){}; + ~BPoint() override{}; /** * @brief gets the corresponding cad information for the point */ - void GetCAD(int &surf, Array<OneD, NekDouble> &uv) + void GetCAD(int &surf, Array<OneD, NekDouble> &uv) override { surf = sid; uv = m_uv; } - NekDouble GetDelta() + NekDouble GetDelta() override { NEKERROR(ErrorUtil::efatal, "Cannot retrieve delta from this type"); return 0.0; } - void SetDelta(NekDouble i) + void SetDelta(NekDouble i) override { boost::ignore_unused(i); NEKERROR(ErrorUtil::efatal, "Cannot assign refinement delta to this type"); } - NekDouble GetRDelta() + NekDouble GetRDelta() override { NEKERROR(ErrorUtil::efatal, "Cannot retrieve refinment delta from this type"); @@ -308,12 +306,12 @@ public: m_type = eSrcPoint; } - ~SrcPoint(){}; + ~SrcPoint() override{}; /** * @brief get mesh spacing paramter */ - NekDouble GetRDelta() + NekDouble GetRDelta() override { return m_rdelta; } @@ -323,19 +321,19 @@ public: m_rdelta = i; } - NekDouble GetDelta() + NekDouble GetDelta() override { NEKERROR(ErrorUtil::efatal, "Cannot retrieve delta from this type"); return 0.0; } - void SetDelta(NekDouble i) + void SetDelta(NekDouble i) override { boost::ignore_unused(i); NEKERROR(ErrorUtil::efatal, "Cannot assign delta to this type"); } - void GetCAD(int &surf, Array<OneD, NekDouble> &uv) + void GetCAD(int &surf, Array<OneD, NekDouble> &uv) override { boost::ignore_unused(surf, uv); NEKERROR(ErrorUtil::efatal, "Cannot retrieve CAD from this type") @@ -347,7 +345,6 @@ private: }; typedef std::shared_ptr<SrcPoint> SrcPointSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Optimisation/BGFS-B.cpp b/library/NekMesh/Optimisation/BGFS-B.cpp index f522a2ec1a..a2fa29f1ce 100644 --- a/library/NekMesh/Optimisation/BGFS-B.cpp +++ b/library/NekMesh/Optimisation/BGFS-B.cpp @@ -39,9 +39,7 @@ #include <set> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { // this function will perform an update on the solution vector contained within @@ -250,5 +248,4 @@ bool BGFSUpdate(OptiObjSharedPtr opti, DNekMat &J, DNekMat &B, DNekMat &H) return true; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/Optimisation/BGFS-B.h b/library/NekMesh/Optimisation/BGFS-B.h index 9dc10f816a..f1735e7dbe 100644 --- a/library/NekMesh/Optimisation/BGFS-B.h +++ b/library/NekMesh/Optimisation/BGFS-B.h @@ -38,11 +38,8 @@ #include <NekMesh/CADSystem/CADSystem.h> #include <NekMesh/Optimisation/OptimiseObj.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { bool BGFSUpdate(OptiObjSharedPtr opti, DNekMat &J, DNekMat &B, DNekMat &H); -} -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Optimisation/OptimiseObj.h b/library/NekMesh/Optimisation/OptimiseObj.h index 4c16b9d95a..bda22f2bfc 100644 --- a/library/NekMesh/Optimisation/OptimiseObj.h +++ b/library/NekMesh/Optimisation/OptimiseObj.h @@ -39,9 +39,7 @@ #include <LibUtilities/LinearAlgebra/NekTypeDefs.hpp> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class OptiObj @@ -101,6 +99,5 @@ public: }; typedef std::shared_ptr<OptiObj> OptiObjSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/Python/Module.cpp b/library/NekMesh/Python/Module.cpp index 2d116ce56e..838f1d107b 100644 --- a/library/NekMesh/Python/Module.cpp +++ b/library/NekMesh/Python/Module.cpp @@ -103,7 +103,7 @@ struct ModuleWrap : public MODTYPE, public py::wrapper<MODTYPE> /** * @brief Concrete implementation of the Module::Process function. */ - void Process() + void Process() override { this->get_override("Process")(); } @@ -366,7 +366,7 @@ void ModuleCapsuleDestructor(void *ptr) void ModuleCapsuleDestructor(PyObject *ptr) { ModuleRegisterHelper *tmp = - (ModuleRegisterHelper *)PyCapsule_GetPointer(ptr, 0); + (ModuleRegisterHelper *)PyCapsule_GetPointer(ptr, nullptr); delete tmp; } #endif @@ -417,7 +417,7 @@ void Module_Register(ModuleType const &modType, std::string const &modName, py::handle<>(PyCObject_FromVoidPtr(helper, ModuleCapsuleDestructor))); #else py::object capsule( - py::handle<>(PyCapsule_New(helper, 0, ModuleCapsuleDestructor))); + py::handle<>(PyCapsule_New(helper, nullptr, ModuleCapsuleDestructor))); #endif // Embed this in __main__. diff --git a/library/NekMesh/Python/NekMesh.cpp b/library/NekMesh/Python/NekMesh.cpp index b04e302de7..426552c347 100644 --- a/library/NekMesh/Python/NekMesh.cpp +++ b/library/NekMesh/Python/NekMesh.cpp @@ -50,7 +50,7 @@ PyObject *CreateExceptionClass(const char *name, std::string qualifiedName0 = std::string("NekPy.NekMesh.") + name; PyObject *typeObj = PyErr_NewException( - const_cast<char *>(qualifiedName0.c_str()), baseTypeObj, 0); + const_cast<char *>(qualifiedName0.c_str()), baseTypeObj, nullptr); if (!typeObj) { diff --git a/library/NekMesh/SurfaceMeshing/CurveMesh.cpp b/library/NekMesh/SurfaceMeshing/CurveMesh.cpp index 04146627e2..5680846678 100644 --- a/library/NekMesh/SurfaceMeshing/CurveMesh.cpp +++ b/library/NekMesh/SurfaceMeshing/CurveMesh.cpp @@ -36,9 +36,7 @@ #include <NekMesh/SurfaceMeshing/CurveMesh.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void CurveMesh::ReMesh() @@ -457,5 +455,4 @@ void CurveMesh::PeriodicOverwrite(CurveMeshSharedPtr from) m_meshedges.push_back(e); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/SurfaceMeshing/CurveMesh.h b/library/NekMesh/SurfaceMeshing/CurveMesh.h index 698726c8f2..c0e7749598 100644 --- a/library/NekMesh/SurfaceMeshing/CurveMesh.h +++ b/library/NekMesh/SurfaceMeshing/CurveMesh.h @@ -43,9 +43,7 @@ #include <LibUtilities/Interpreter/Interpreter.h> #include <LibUtilities/Memory/NekMemoryManager.hpp> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class CurveMesh; @@ -202,7 +200,6 @@ private: Logger m_log; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/SurfaceMeshing/FaceMesh.cpp b/library/NekMesh/SurfaceMeshing/FaceMesh.cpp index 0c405133ad..d7fa740ab8 100644 --- a/library/NekMesh/SurfaceMeshing/FaceMesh.cpp +++ b/library/NekMesh/SurfaceMeshing/FaceMesh.cpp @@ -38,9 +38,7 @@ #include <limits> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { bool FaceMesh::ValidateCurves() @@ -350,7 +348,9 @@ void FaceMesh::Smoothing() (ui[1] - uj[1]) * (B[0] - A[0])); if (!(lam < 0) && !(lam > 1)) + { lambda.push_back(lam); + } } if (lambda.size() > 0) @@ -1192,5 +1192,4 @@ void FaceMesh::OrientateCurves() orderedLoops.push_back(cE); } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/SurfaceMeshing/FaceMesh.h b/library/NekMesh/SurfaceMeshing/FaceMesh.h index 6fe340475b..541382b76f 100644 --- a/library/NekMesh/SurfaceMeshing/FaceMesh.h +++ b/library/NekMesh/SurfaceMeshing/FaceMesh.h @@ -39,9 +39,7 @@ #include <NekMesh/MeshElements/Mesh.h> #include <NekMesh/SurfaceMeshing/CurveMesh.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -164,7 +162,6 @@ private: }; typedef std::shared_ptr<FaceMesh> FaceMeshSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.cpp b/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.cpp index 256b22d601..b6ff8c0565 100644 --- a/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.cpp +++ b/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.cpp @@ -45,9 +45,7 @@ #include <LocalRegions/MatrixKey.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey HOSurfaceMesh::className = GetModuleFactory().RegisterCreatorFunction( @@ -104,7 +102,9 @@ void HOSurfaceMesh::Process() { vector<EdgeSharedPtr> es = m_mesh->m_element[2][i]->GetEdgeList(); for (int j = 0; j < es.size(); j++) + { surfaceEdges.insert(es[j]); + } } for (int i = 0; i < m_mesh->m_element[2].size(); i++) @@ -522,5 +522,4 @@ void HOSurfaceMesh::Process() m_log(VERBOSE).Newline(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.h b/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.h index 65b55f2248..4181789006 100644 --- a/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.h +++ b/library/NekMesh/SurfaceMeshing/HOSurfaceMesh.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class HOSurfaceMesh : public ProcessModule @@ -53,16 +51,15 @@ public: static ModuleKey className; HOSurfaceMesh(MeshSharedPtr m); - virtual ~HOSurfaceMesh(); + ~HOSurfaceMesh() override; - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "HOSurfMesh"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/SurfaceMeshing/OptimiseFunctions.cpp b/library/NekMesh/SurfaceMeshing/OptimiseFunctions.cpp index 0e35ecf4ca..456ba390d1 100644 --- a/library/NekMesh/SurfaceMeshing/OptimiseFunctions.cpp +++ b/library/NekMesh/SurfaceMeshing/OptimiseFunctions.cpp @@ -36,9 +36,7 @@ #include <NekMesh/SurfaceMeshing/OptimiseFunctions.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { NekDouble Dot(Array<OneD, NekDouble> a, Array<OneD, NekDouble> b) @@ -358,5 +356,4 @@ void OptiEdge::Update(Array<OneD, NekDouble> xinew) } } } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/SurfaceMeshing/OptimiseFunctions.h b/library/NekMesh/SurfaceMeshing/OptimiseFunctions.h index 9cc92b3710..a851e46814 100644 --- a/library/NekMesh/SurfaceMeshing/OptimiseFunctions.h +++ b/library/NekMesh/SurfaceMeshing/OptimiseFunctions.h @@ -40,9 +40,7 @@ #include <NekMesh/CADSystem/CADSurf.h> #include <NekMesh/Optimisation/OptimiseObj.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class OptiEdge : public OptiObj @@ -58,14 +56,14 @@ public: o = ob; }; - ~OptiEdge(){}; + ~OptiEdge() override{}; - NekDouble F(Array<OneD, NekDouble> xitst); - DNekMat dF(Array<OneD, NekDouble> xitst); - Array<OneD, NekDouble> Getxi(); - Array<OneD, NekDouble> Getli(); - Array<OneD, NekDouble> Getui(); - void Update(Array<OneD, NekDouble> xinew); + NekDouble F(Array<OneD, NekDouble> xitst) override; + DNekMat dF(Array<OneD, NekDouble> xitst) override; + Array<OneD, NekDouble> Getxi() override; + Array<OneD, NekDouble> Getli() override; + Array<OneD, NekDouble> Getui() override; + void Update(Array<OneD, NekDouble> xinew) override; Array<OneD, NekDouble> GetSolution() { @@ -79,6 +77,5 @@ private: }; typedef std::shared_ptr<OptiEdge> OptiEdgeSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/SurfaceMeshing/SurfaceMesh.cpp b/library/NekMesh/SurfaceMeshing/SurfaceMesh.cpp index f6c2e5d642..07038f1f0c 100644 --- a/library/NekMesh/SurfaceMeshing/SurfaceMesh.cpp +++ b/library/NekMesh/SurfaceMeshing/SurfaceMesh.cpp @@ -37,9 +37,7 @@ #include <NekMesh/SurfaceMeshing/SurfaceMesh.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey SurfaceMesh::className = GetModuleFactory().RegisterCreatorFunction( @@ -141,5 +139,4 @@ void SurfaceMesh::Report() m_log(VERBOSE) << " - Euler-Poincaré: " << ep << endl; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/SurfaceMeshing/SurfaceMesh.h b/library/NekMesh/SurfaceMeshing/SurfaceMesh.h index f079cfa523..e766052817 100644 --- a/library/NekMesh/SurfaceMeshing/SurfaceMesh.h +++ b/library/NekMesh/SurfaceMeshing/SurfaceMesh.h @@ -39,9 +39,7 @@ #include <NekMesh/SurfaceMeshing/CurveMesh.h> #include <NekMesh/SurfaceMeshing/FaceMesh.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -58,11 +56,11 @@ public: static ModuleKey className; SurfaceMesh(MeshSharedPtr m); - virtual ~SurfaceMesh(); + ~SurfaceMesh() override; - virtual void Process(); + void Process() override; - std::string GetModuleName() + std::string GetModuleName() override { return "SurfaceMesh"; } @@ -75,7 +73,6 @@ private: std::map<int, CurveMeshSharedPtr> m_curvemeshes; }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.cpp b/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.cpp index da9220a4dc..4b3485d9c6 100644 --- a/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.cpp +++ b/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.cpp @@ -53,9 +53,7 @@ typedef bg::model::box<point> box; typedef std::pair<box, unsigned int> boxI; using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { inline box GetBox(ElementSharedPtr el, NekDouble ov) @@ -295,7 +293,9 @@ void BLMesh::GrowLayers() } } if (hit) + { break; + } } } @@ -1167,5 +1167,4 @@ void BLMesh::Setup() m_deriv[1] = *nodalPrism.GetVandermondeForDeriv(1) * VandermondeI; m_deriv[2] = *nodalPrism.GetVandermondeForDeriv(2) * VandermondeI; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.h b/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.h index 9fb6592b62..fdd101fee2 100644 --- a/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.h +++ b/library/NekMesh/VolumeMeshing/BLMeshing/BLMesh.h @@ -38,9 +38,7 @@ #include <LibUtilities/Memory/NekMemoryManager.hpp> #include <NekMesh/MeshElements/Mesh.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class BLMesh @@ -139,7 +137,6 @@ private: }; typedef std::shared_ptr<BLMesh> BLMeshSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.cpp b/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.cpp index f7235fca03..e6b6be9999 100644 --- a/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.cpp +++ b/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.cpp @@ -36,9 +36,7 @@ #include <NekMesh/VolumeMeshing/TetMeshing/TetMesh.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { void TetMesh::Mesh() @@ -138,5 +136,4 @@ void TetMesh::Mesh() m_log(VERBOSE) << " Volume meshing complete: " << m_tetconnect.size() << " tetrahedra generated." << endl; } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.h b/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.h index 0efaecfaff..a37a16dcb2 100644 --- a/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.h +++ b/library/NekMesh/VolumeMeshing/TetMeshing/TetMesh.h @@ -42,9 +42,7 @@ #include <NekMesh/ExtLibInterface/TetGenInterface.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { /** @@ -86,7 +84,6 @@ private: typedef std::shared_ptr<TetMesh> TetMeshSharedPtr; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/NekMesh/VolumeMeshing/VolumeMesh.cpp b/library/NekMesh/VolumeMeshing/VolumeMesh.cpp index adf8761bcd..32dd069f20 100644 --- a/library/NekMesh/VolumeMeshing/VolumeMesh.cpp +++ b/library/NekMesh/VolumeMeshing/VolumeMesh.cpp @@ -43,9 +43,7 @@ #include <NekMesh/VolumeMeshing/TetMeshing/TetMesh.h> using namespace std; -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { ModuleKey VolumeMesh::className = GetModuleFactory().RegisterCreatorFunction( @@ -318,5 +316,4 @@ void VolumeMesh::Process() ProcessComposites(); } -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh diff --git a/library/NekMesh/VolumeMeshing/VolumeMesh.h b/library/NekMesh/VolumeMeshing/VolumeMesh.h index f5b9872cc6..0097968f0e 100644 --- a/library/NekMesh/VolumeMeshing/VolumeMesh.h +++ b/library/NekMesh/VolumeMeshing/VolumeMesh.h @@ -37,9 +37,7 @@ #include <NekMesh/Module/Module.h> -namespace Nektar -{ -namespace NekMesh +namespace Nektar::NekMesh { class VolumeMesh : public ProcessModule @@ -53,16 +51,15 @@ public: static ModuleKey className; VolumeMesh(MeshSharedPtr m); - virtual ~VolumeMesh(); + ~VolumeMesh() override; - virtual void Process(); + void Process() override; - virtual std::string GetModuleName() + std::string GetModuleName() override { return "VolumeMesh"; } }; -} // namespace NekMesh -} // namespace Nektar +} // namespace Nektar::NekMesh #endif diff --git a/library/SolverUtils/Advection/Advection.cpp b/library/SolverUtils/Advection/Advection.cpp index a0c7c05185..0468a82cf8 100644 --- a/library/SolverUtils/Advection/Advection.cpp +++ b/library/SolverUtils/Advection/Advection.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/Advection/Advection.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** @@ -332,5 +330,4 @@ void Advection::v_SetBaseFlow( "A baseflow is not appropriate for this advection type."); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Advection/Advection.h b/library/SolverUtils/Advection/Advection.h index f695b39b25..d41b5f0aba 100644 --- a/library/SolverUtils/Advection/Advection.h +++ b/library/SolverUtils/Advection/Advection.h @@ -45,9 +45,7 @@ #include <SolverUtils/SolverUtilsDeclspec.h> #include <iomanip> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Advection; @@ -196,7 +194,6 @@ protected: const Array<OneD, MultiRegions::ExpListSharedPtr> &fields); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Advection/Advection3DHomogeneous1D.cpp b/library/SolverUtils/Advection/Advection3DHomogeneous1D.cpp index 408b32847b..733b2f5dc6 100644 --- a/library/SolverUtils/Advection/Advection3DHomogeneous1D.cpp +++ b/library/SolverUtils/Advection/Advection3DHomogeneous1D.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string Advection3DHomogeneous1D::type[] = { GetAdvectionFactory().RegisterCreatorFunction( @@ -254,5 +252,4 @@ void Advection3DHomogeneous1D::ModifiedFluxVector( // Increment the plane counter. m_planeCounter = (m_planeCounter + 1) % m_numPlanes; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Advection/Advection3DHomogeneous1D.h b/library/SolverUtils/Advection/Advection3DHomogeneous1D.h index 59a4fc3157..a766ca13ce 100644 --- a/library/SolverUtils/Advection/Advection3DHomogeneous1D.h +++ b/library/SolverUtils/Advection/Advection3DHomogeneous1D.h @@ -40,9 +40,7 @@ #include <SolverUtils/Advection/Advection.h> #include <SolverUtils/Advection/HomogeneousRSScalar.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Advection3DHomogeneous1D : public Advection { @@ -58,20 +56,20 @@ protected: std::string m_advType; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvField, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvField, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; private: SolverUtils::AdvectionSharedPtr m_planeAdv; @@ -93,7 +91,6 @@ private: const Array<OneD, Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Advection/AdvectionFR.cpp b/library/SolverUtils/Advection/AdvectionFR.cpp index 0f7c8847d3..bd13fcddf2 100644 --- a/library/SolverUtils/Advection/AdvectionFR.cpp +++ b/library/SolverUtils/Advection/AdvectionFR.cpp @@ -51,9 +51,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string AdvectionFR::type[] = { GetAdvectionFactory().RegisterCreatorFunction("FRDG", AdvectionFR::create), @@ -1661,5 +1659,4 @@ void AdvectionFR::DivCFlux_3D( numericalFlux, divCFlux); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Advection/AdvectionFR.h b/library/SolverUtils/Advection/AdvectionFR.h index fb3f28c728..8a581a47a7 100644 --- a/library/SolverUtils/Advection/AdvectionFR.h +++ b/library/SolverUtils/Advection/AdvectionFR.h @@ -39,9 +39,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <SolverUtils/Advection/Advection.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class AdvectionFR : public Advection { @@ -58,20 +56,20 @@ protected: std::string m_advType; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; private: Array<OneD, Array<OneD, NekDouble>> m_traceNormals; @@ -128,7 +126,6 @@ private: const Array<OneD, const NekDouble> &numericalFlux, Array<OneD, NekDouble> &divCFlux); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Advection/AdvectionNonConservative.cpp b/library/SolverUtils/Advection/AdvectionNonConservative.cpp index e46cf956ee..1d02cd8503 100644 --- a/library/SolverUtils/Advection/AdvectionNonConservative.cpp +++ b/library/SolverUtils/Advection/AdvectionNonConservative.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/Advection/AdvectionNonConservative.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string AdvectionNonConservative::type = GetAdvectionFactory().RegisterCreatorFunction( @@ -130,5 +128,4 @@ void AdvectionNonConservative::v_Advect( } } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Advection/AdvectionNonConservative.h b/library/SolverUtils/Advection/AdvectionNonConservative.h index 4b6a60890c..fdc1d875f0 100644 --- a/library/SolverUtils/Advection/AdvectionNonConservative.h +++ b/library/SolverUtils/Advection/AdvectionNonConservative.h @@ -39,9 +39,7 @@ #include <SolverUtils/Advection/Advection.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class AdvectionNonConservative : public Advection { @@ -57,22 +55,21 @@ public: protected: AdvectionNonConservative(); - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvective, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvective, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Advection/AdvectionWeakDG.cpp b/library/SolverUtils/Advection/AdvectionWeakDG.cpp index 1a42f1c967..69cc74e600 100644 --- a/library/SolverUtils/Advection/AdvectionWeakDG.cpp +++ b/library/SolverUtils/Advection/AdvectionWeakDG.cpp @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/Timer.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string AdvectionWeakDG::type = GetAdvectionFactory().RegisterCreatorFunction( @@ -232,5 +230,4 @@ void AdvectionWeakDG::AdvectTraceFlux( timer.AccumulateRegion("AdvWeakDG:_Riemann", 10); } -} // end of namespace SolverUtils -} // end of namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Advection/AdvectionWeakDG.h b/library/SolverUtils/Advection/AdvectionWeakDG.h index be92f6729a..c51e827189 100644 --- a/library/SolverUtils/Advection/AdvectionWeakDG.h +++ b/library/SolverUtils/Advection/AdvectionWeakDG.h @@ -39,9 +39,7 @@ #include <SolverUtils/Advection/Advection.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class AdvectionWeakDG : public Advection { @@ -86,11 +84,22 @@ public: protected: AdvectionWeakDG(); - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( + void v_Advect(const int nConvective, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; + + void v_AdvectCoeffs( const int nConvective, const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &advVel, @@ -99,9 +108,9 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pFwd = NullNekDoubleArrayOfArray, const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + NullNekDoubleArrayOfArray); }; -} // namespace SolverUtils -} // namespace Nektar + +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Advection/HomogeneousRSScalar.hpp b/library/SolverUtils/Advection/HomogeneousRSScalar.hpp index 04745ea82b..150d5c2aca 100644 --- a/library/SolverUtils/Advection/HomogeneousRSScalar.hpp +++ b/library/SolverUtils/Advection/HomogeneousRSScalar.hpp @@ -35,9 +35,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <SolverUtils/RiemannSolvers/RiemannSolver.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** * @brief Wrapper class for Riemann solver scalars. @@ -116,5 +114,4 @@ private: Array<OneD, Array<OneD, NekDouble>> m_tmp2; std::string m_desc; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/AdvectionSystem.cpp b/library/SolverUtils/AdvectionSystem.cpp index e150794f7c..a81bad6c57 100644 --- a/library/SolverUtils/AdvectionSystem.cpp +++ b/library/SolverUtils/AdvectionSystem.cpp @@ -34,9 +34,7 @@ #include <SolverUtils/AdvectionSystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** @@ -172,5 +170,4 @@ NekDouble AdvectionSystem::GetCFLEstimate(int &elmtid) return CFL; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/AdvectionSystem.h b/library/SolverUtils/AdvectionSystem.h index f3b53a1762..3a3739cf5b 100644 --- a/library/SolverUtils/AdvectionSystem.h +++ b/library/SolverUtils/AdvectionSystem.h @@ -38,9 +38,7 @@ #include <SolverUtils/Advection/Advection.h> #include <SolverUtils/UnsteadySystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// A base class for PDEs which include an advection component @@ -51,10 +49,9 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - SOLVER_UTILS_EXPORT virtual ~AdvectionSystem(); + SOLVER_UTILS_EXPORT ~AdvectionSystem() override; - SOLVER_UTILS_EXPORT virtual void v_InitObject( - bool DeclareField = true) override; + SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField = true) override; /// Returns the advection object held by this instance. SOLVER_UTILS_EXPORT AdvectionSharedPtr GetAdvObject() @@ -71,7 +68,7 @@ protected: /// Advection term SolverUtils::AdvectionSharedPtr m_advObject; - SOLVER_UTILS_EXPORT virtual bool v_PostIntegrate(int step) override; + SOLVER_UTILS_EXPORT bool v_PostIntegrate(int step) override; SOLVER_UTILS_EXPORT virtual Array<OneD, NekDouble> v_GetMaxStdVelocity( const NekDouble SpeedSoundFactor = 1.0) @@ -95,7 +92,6 @@ private: /// Shared pointer to an AdvectionSystem class typedef std::shared_ptr<AdvectionSystem> AdvectionSystemSharedPtr; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Core/Coupling.cpp b/library/SolverUtils/Core/Coupling.cpp index db6e3f9ef5..a9f5deda09 100644 --- a/library/SolverUtils/Core/Coupling.cpp +++ b/library/SolverUtils/Core/Coupling.cpp @@ -34,9 +34,7 @@ #include <LibUtilities/BasicUtils/ParseUtils.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { using namespace std; @@ -148,5 +146,4 @@ vector<int> Coupling::GenerateVariableMapping(vector<string> &vars, return transToVars; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Core/Coupling.h b/library/SolverUtils/Core/Coupling.h index d3a59674dc..31a4988620 100644 --- a/library/SolverUtils/Core/Coupling.h +++ b/library/SolverUtils/Core/Coupling.h @@ -37,9 +37,7 @@ #include <MultiRegions/ExpList.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Coupling; @@ -141,7 +139,6 @@ protected: SOLVER_UTILS_EXPORT std::vector<int> GenerateVariableMapping( std::vector<std::string> &vars, std::vector<std::string> &transVars); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Core/CouplingCwipi.cpp b/library/SolverUtils/Core/CouplingCwipi.cpp index 1535acca6e..005a5d44ac 100644 --- a/library/SolverUtils/Core/CouplingCwipi.cpp +++ b/library/SolverUtils/Core/CouplingCwipi.cpp @@ -48,9 +48,7 @@ #define OUTPUT_FREQ 0 -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { using namespace std; @@ -113,8 +111,9 @@ void CouplingCwipi::InterpCallback( CouplingCwipi::CouplingCwipi(MultiRegions::ExpListSharedPtr field) : Coupling(field), m_sendHandle(-1), m_recvHandle(-1), m_lastSend(-1E6), - m_lastReceive(-1E6), m_points(NULL), m_coords(NULL), m_connecIdx(NULL), - m_connec(NULL), m_rValsInterl(NULL), m_sValsInterl(NULL) + m_lastReceive(-1E6), m_points(nullptr), m_coords(nullptr), + m_connecIdx(nullptr), m_connec(nullptr), m_rValsInterl(nullptr), + m_sValsInterl(nullptr) { // defaults m_config["GEOMTOL"] = "0.1"; @@ -270,7 +269,7 @@ void CouplingCwipi::SetupReceive() m_recvField->GetCoords(coords[0], coords[1], coords[2]); m_points = (double *)malloc(sizeof(double) * 3 * m_nPoints); - ASSERTL1(m_points != NULL, "malloc failed for m_points"); + ASSERTL1(m_points != nullptr, "malloc failed for m_points"); for (int i = 0; i < m_nPoints; ++i) { @@ -298,7 +297,7 @@ void CouplingCwipi::SetupReceive() cwipi_set_points_to_locate(m_couplingName.c_str(), m_nPoints, m_points); m_rValsInterl = (double *)malloc(sizeof(double) * m_nPoints * m_nRecvVars); - ASSERTL1(m_rValsInterl != NULL, "malloc failed for m_rValsInterl"); + ASSERTL1(m_rValsInterl != nullptr, "malloc failed for m_rValsInterl"); } void CouplingCwipi::SetupSend() @@ -306,7 +305,7 @@ void CouplingCwipi::SetupSend() // this array is never used because of our send callback method m_sValsInterl = (double *)malloc( sizeof(double) * m_evalField->GetGraph()->GetNvertices() * m_nSendVars); - ASSERTL1(m_sValsInterl != NULL, "malloc failed for m_sValsInterl"); + ASSERTL1(m_sValsInterl != nullptr, "malloc failed for m_sValsInterl"); for (int i = 0; i < m_evalField->GetGraph()->GetNvertices() * m_nSendVars; ++i) { @@ -449,14 +448,14 @@ void CouplingCwipi::AnnounceMesh() // allocate CWIPI arrays m_coords = (double *)malloc(sizeof(double) * 3 * nVerts); - ASSERTL1(m_coords != NULL, "malloc failed for m_coords"); + ASSERTL1(m_coords != nullptr, "malloc failed for m_coords"); int tmp = 2 * seggeom.size() + 3 * trigeom.size() + 4 * quadgeom.size() + 4 * tetgeom.size() + 5 * pyrgeom.size() + 6 * prismgeom.size() + 8 * hexgeom.size(); m_connec = (int *)malloc(sizeof(int) * tmp); - ASSERTL1(m_connec != NULL, "malloc failed for m_connec"); + ASSERTL1(m_connec != nullptr, "malloc failed for m_connec"); m_connecIdx = (int *)malloc(sizeof(int) * (nElts + 1)); - ASSERTL1(m_connecIdx != NULL, "malloc failed for m_connecIdx"); + ASSERTL1(m_connecIdx != nullptr, "malloc failed for m_connecIdx"); m_connecIdx[0] = 0; int coordsPos = 0; @@ -1066,5 +1065,4 @@ void CouplingCwipi::DumpRawFields(const NekDouble time, cout << "DumpRawFields total time: " << timer1.TimePerTest(1) << endl; } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Core/CouplingCwipi.h b/library/SolverUtils/Core/CouplingCwipi.h index 01dbb6d13d..7392257748 100644 --- a/library/SolverUtils/Core/CouplingCwipi.h +++ b/library/SolverUtils/Core/CouplingCwipi.h @@ -41,9 +41,7 @@ #include <functional> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class CouplingCwipi; @@ -65,7 +63,7 @@ public: SOLVER_UTILS_EXPORT CouplingCwipi(MultiRegions::ExpListSharedPtr field); - SOLVER_UTILS_EXPORT virtual ~CouplingCwipi(); + SOLVER_UTILS_EXPORT ~CouplingCwipi() override; SOLVER_UTILS_EXPORT void SendCallback( Array<OneD, Array<OneD, NekDouble>> &interpField, @@ -126,19 +124,19 @@ protected: FieldUtils::Interpolator<std::vector<MultiRegions::ExpListSharedPtr>>> m_extrapInterpolator; - SOLVER_UTILS_EXPORT virtual void v_Init() override; + SOLVER_UTILS_EXPORT void v_Init() override; - SOLVER_UTILS_EXPORT virtual void v_Send( + SOLVER_UTILS_EXPORT void v_Send( const int step, const NekDouble time, const Array<OneD, const Array<OneD, NekDouble>> &field, std::vector<std::string> &varNames) override; - SOLVER_UTILS_EXPORT virtual void v_Receive( + SOLVER_UTILS_EXPORT void v_Receive( const int step, const NekDouble time, Array<OneD, Array<OneD, NekDouble>> &field, std::vector<std::string> &varNames) override; - SOLVER_UTILS_EXPORT virtual void v_Finalize() override; + SOLVER_UTILS_EXPORT void v_Finalize() override; SOLVER_UTILS_EXPORT NekDouble GetSendField(const int i, const int j) const { @@ -182,7 +180,6 @@ typedef std::function<void(Array<OneD, Array<OneD, NekDouble>> &interpField, SendCallbackType; static std::map<std::string, SendCallbackType> SendCallbackMap; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Core/CouplingFile.cpp b/library/SolverUtils/Core/CouplingFile.cpp index b661020ed7..3937573a2d 100644 --- a/library/SolverUtils/Core/CouplingFile.cpp +++ b/library/SolverUtils/Core/CouplingFile.cpp @@ -39,9 +39,7 @@ #include <boost/format.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { using namespace std; @@ -188,5 +186,4 @@ void CouplingFile::v_Receive(const int step, const NekDouble time, field[recvVarsToVars[i]], 1); } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Core/CouplingFile.h b/library/SolverUtils/Core/CouplingFile.h index 4cb2d8c0dc..2e5ec4dba0 100644 --- a/library/SolverUtils/Core/CouplingFile.h +++ b/library/SolverUtils/Core/CouplingFile.h @@ -37,9 +37,7 @@ #include <SolverUtils/Core/Coupling.h> #include <SolverUtils/Core/SessionFunction.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class CouplingFile; @@ -62,17 +60,17 @@ public: SOLVER_UTILS_EXPORT CouplingFile(MultiRegions::ExpListSharedPtr field); - SOLVER_UTILS_EXPORT virtual ~CouplingFile(); + SOLVER_UTILS_EXPORT ~CouplingFile() override; protected: - SOLVER_UTILS_EXPORT virtual void v_Init() override; + SOLVER_UTILS_EXPORT void v_Init() override; - SOLVER_UTILS_EXPORT virtual void v_Send( + SOLVER_UTILS_EXPORT void v_Send( const int step, const NekDouble time, const Array<OneD, const Array<OneD, NekDouble>> &field, std::vector<std::string> &varNames) override; - SOLVER_UTILS_EXPORT virtual void v_Receive( + SOLVER_UTILS_EXPORT void v_Receive( const int step, const NekDouble time, Array<OneD, Array<OneD, NekDouble>> &field, std::vector<std::string> &varNames) override; @@ -83,7 +81,6 @@ private: SessionFunctionSharedPtr m_inputFunction; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Core/Misc.cpp b/library/SolverUtils/Core/Misc.cpp index ceca934a3e..8e8f7208f0 100644 --- a/library/SolverUtils/Core/Misc.cpp +++ b/library/SolverUtils/Core/Misc.cpp @@ -39,9 +39,7 @@ #include <boost/format.hpp> #include <boost/lexical_cast.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** * Adds an item to a SummaryList @@ -65,5 +63,4 @@ void AddSummaryItem(SummaryList &l, const std::string &name, l.push_back(std::make_pair(name, str(boost::format("%g") % value))); } -} // end namespace SolverUtils -} // end namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Core/Misc.h b/library/SolverUtils/Core/Misc.h index 39fadade58..d90e40dded 100644 --- a/library/SolverUtils/Core/Misc.h +++ b/library/SolverUtils/Core/Misc.h @@ -40,9 +40,7 @@ #include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { typedef std::vector<std::pair<std::string, std::string>> SummaryList; @@ -59,7 +57,6 @@ SOLVER_UTILS_EXPORT void AddSummaryItem(SummaryList &l, const std::string &name, SOLVER_UTILS_EXPORT void AddSummaryItem(SummaryList &l, const std::string &name, const NekDouble &value); -} // end namespace SolverUtils -} // end namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Core/SessionFunction.cpp b/library/SolverUtils/Core/SessionFunction.cpp index f7f24d1c3e..a66a55d4c6 100644 --- a/library/SolverUtils/Core/SessionFunction.cpp +++ b/library/SolverUtils/Core/SessionFunction.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** @@ -521,5 +519,4 @@ void SessionFunction::EvaluatePts(string pFieldName, } // end of namespaces -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/Diffusion.cpp b/library/SolverUtils/Diffusion/Diffusion.cpp index ded02737c3..45d4956c6e 100644 --- a/library/SolverUtils/Diffusion/Diffusion.cpp +++ b/library/SolverUtils/Diffusion/Diffusion.cpp @@ -34,9 +34,7 @@ #include <SolverUtils/Diffusion/Diffusion.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { DiffusionFactory &GetDiffusionFactory() { @@ -110,5 +108,4 @@ void Diffusion::v_DiffuseTraceFlux( NEKERROR(ErrorUtil::efatal, "Not defined function DiffuseTraceFLux."); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/Diffusion.h b/library/SolverUtils/Diffusion/Diffusion.h index 238b53ef35..f43d560516 100644 --- a/library/SolverUtils/Diffusion/Diffusion.h +++ b/library/SolverUtils/Diffusion/Diffusion.h @@ -47,9 +47,7 @@ #include <SolverUtils/RiemannSolvers/RiemannSolver.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Diffusion; @@ -418,7 +416,6 @@ protected: &v_GetTraceNormal(); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.cpp b/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.cpp index f250ddbf93..cda215a39c 100644 --- a/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.cpp +++ b/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.cpp @@ -40,9 +40,7 @@ using namespace std; #include <SolverUtils/Diffusion/Diffusion3DHomogeneous1D.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string Diffusion3DHomogeneous1D::type[] = { GetDiffusionFactory().RegisterCreatorFunction( @@ -301,5 +299,4 @@ void Diffusion3DHomogeneous1D::v_Diffuse( } } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.h b/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.h index 1ba5920e57..471f7bf1e0 100644 --- a/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.h +++ b/library/SolverUtils/Diffusion/Diffusion3DHomogeneous1D.h @@ -37,9 +37,7 @@ #include <SolverUtils/Diffusion/Diffusion.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Diffusion3DHomogeneous1D : public Diffusion { @@ -55,19 +53,18 @@ protected: std::string m_diffType; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Diffuse( - const size_t nConvective, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Diffuse(const size_t nConvective, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; private: LibUtilities::TranspositionSharedPtr m_trans; @@ -84,7 +81,6 @@ private: Array<OneD, Array<OneD, NekDouble>> m_outarrayPlane; Array<OneD, MultiRegions::ExpListSharedPtr> m_fieldsPlane; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Diffusion/DiffusionIP.cpp b/library/SolverUtils/Diffusion/DiffusionIP.cpp index 00ad7d59c5..57070dd2b4 100644 --- a/library/SolverUtils/Diffusion/DiffusionIP.cpp +++ b/library/SolverUtils/Diffusion/DiffusionIP.cpp @@ -40,9 +40,7 @@ #include <LibUtilities/BasicUtils/Timer.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DiffusionIP::type = GetDiffusionFactory().RegisterCreatorFunction( "InteriorPenalty", DiffusionIP::create, "Interior Penalty"); @@ -903,5 +901,4 @@ void DiffusionIP::ApplyFluxBndConds( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/DiffusionIP.h b/library/SolverUtils/Diffusion/DiffusionIP.h index a835086ae4..d240688ba5 100644 --- a/library/SolverUtils/Diffusion/DiffusionIP.h +++ b/library/SolverUtils/Diffusion/DiffusionIP.h @@ -38,9 +38,7 @@ #include <SolverUtils/Diffusion/Diffusion.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class DiffusionIP : public Diffusion { @@ -56,19 +54,18 @@ public: protected: DiffusionIP(); - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Diffuse( - const std::size_t nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; + void v_Diffuse(const std::size_t nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseCoeffs( + void v_DiffuseCoeffs( const std::size_t nConvectiveFields, const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, @@ -76,14 +73,14 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseVolumeFlux( + void v_DiffuseVolumeFlux( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, TensorOfArray3D<NekDouble> &VolumeFlux, Array<OneD, int> &nonZeroIndex) override; - virtual void v_DiffuseTraceFlux( + void v_DiffuseTraceFlux( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, @@ -93,15 +90,14 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pBwd, Array<OneD, int> &nonZeroIndex) override; - virtual void v_DiffuseCalcDerivative( + void v_DiffuseCalcDerivative( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfield, const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual const Array<OneD, const Array<OneD, NekDouble>> &v_GetTraceNormal() - override + const Array<OneD, const Array<OneD, NekDouble>> &v_GetTraceNormal() override { return m_traceNormals; } @@ -259,7 +255,6 @@ private: const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, Array<OneD, Array<OneD, NekDouble>> &flux); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Diffusion/DiffusionLDG.cpp b/library/SolverUtils/Diffusion/DiffusionLDG.cpp index ca0c5f9ba8..6a05a16335 100644 --- a/library/SolverUtils/Diffusion/DiffusionLDG.cpp +++ b/library/SolverUtils/Diffusion/DiffusionLDG.cpp @@ -39,9 +39,7 @@ #include <SolverUtils/Diffusion/DiffusionLDG.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DiffusionLDG::type = GetDiffusionFactory().RegisterCreatorFunction( "LDG", DiffusionLDG::create, "Local Discontinuous Galkerin"); @@ -490,5 +488,4 @@ void DiffusionLDG::ApplyVectorBCs( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/DiffusionLDG.h b/library/SolverUtils/Diffusion/DiffusionLDG.h index 9e0caa0113..1c8c71026e 100644 --- a/library/SolverUtils/Diffusion/DiffusionLDG.h +++ b/library/SolverUtils/Diffusion/DiffusionLDG.h @@ -39,9 +39,7 @@ #include <SolverUtils/Diffusion/Diffusion.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class DiffusionLDG : public Diffusion { @@ -57,19 +55,18 @@ public: protected: DiffusionLDG(); - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Diffuse( - const std::size_t nConvective, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; + void v_Diffuse(const std::size_t nConvective, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseCoeffs( + void v_DiffuseCoeffs( const std::size_t nConvective, const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, @@ -77,21 +74,21 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseCalcDerivative( + void v_DiffuseCalcDerivative( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseVolumeFlux( + void v_DiffuseVolumeFlux( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, TensorOfArray3D<NekDouble> &VolumeFlux, Array<OneD, int> &nonZeroIndex) override; - virtual void v_DiffuseTraceFlux( + void v_DiffuseTraceFlux( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, @@ -138,7 +135,6 @@ private: const Array<OneD, const NekDouble> &qBwd, Array<OneD, NekDouble> &penaltyflux); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Diffusion/DiffusionLFR.cpp b/library/SolverUtils/Diffusion/DiffusionLFR.cpp index 63cabfb51a..8840d62df2 100644 --- a/library/SolverUtils/Diffusion/DiffusionLFR.cpp +++ b/library/SolverUtils/Diffusion/DiffusionLFR.cpp @@ -44,9 +44,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DiffusionLFR::type[] = { GetDiffusionFactory().RegisterCreatorFunction("LFRDG", DiffusionLFR::create, @@ -2282,5 +2280,4 @@ void DiffusionLFR::DivCFlux_2D_Gauss( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/DiffusionLFR.h b/library/SolverUtils/Diffusion/DiffusionLFR.h index 9c9dbe6bad..fdb183572e 100644 --- a/library/SolverUtils/Diffusion/DiffusionLFR.h +++ b/library/SolverUtils/Diffusion/DiffusionLFR.h @@ -37,9 +37,7 @@ #include <SolverUtils/Diffusion/Diffusion.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class DiffusionLFR : public Diffusion { @@ -56,17 +54,16 @@ protected: std::string m_diffType; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Diffuse( - const size_t nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; + void v_Diffuse(const size_t nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; private: Array<OneD, Array<OneD, NekDouble>> m_traceNormals; @@ -158,7 +155,6 @@ private: const Array<OneD, const NekDouble> &numericalFlux, Array<OneD, NekDouble> &divCFlux); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Diffusion/DiffusionLFRNS.cpp b/library/SolverUtils/Diffusion/DiffusionLFRNS.cpp index 104a54c473..0db7b5534a 100644 --- a/library/SolverUtils/Diffusion/DiffusionLFRNS.cpp +++ b/library/SolverUtils/Diffusion/DiffusionLFRNS.cpp @@ -42,9 +42,7 @@ #include <iomanip> #include <iostream> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DiffusionLFRNS::type[] = { GetDiffusionFactory().RegisterCreatorFunction("LFRDGNS", @@ -2466,5 +2464,4 @@ void DiffusionLFRNS::DivCFlux_2D_Gauss( } } -} // end of namespace SolverUtils -} // end of namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Diffusion/DiffusionLFRNS.h b/library/SolverUtils/Diffusion/DiffusionLFRNS.h index 1cd9c8a23f..c6e3302e92 100644 --- a/library/SolverUtils/Diffusion/DiffusionLFRNS.h +++ b/library/SolverUtils/Diffusion/DiffusionLFRNS.h @@ -37,9 +37,7 @@ #include <SolverUtils/Diffusion/Diffusion.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class DiffusionLFRNS : public Diffusion { @@ -56,26 +54,23 @@ protected: std::string m_diffType; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Diffuse( - const std::size_t nConvective, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; + void v_Diffuse(const std::size_t nConvective, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_SetHomoDerivs( - Array<OneD, Array<OneD, NekDouble>> &deriv) override + void v_SetHomoDerivs(Array<OneD, Array<OneD, NekDouble>> &deriv) override { m_homoDerivs = deriv; } - virtual Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &v_GetFluxTensor() - override + Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &v_GetFluxTensor() override { return m_viscTensor; } @@ -188,7 +183,6 @@ private: }; typedef std::shared_ptr<DiffusionLFRNS> DiffusionLFRNSSharedPtr; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Driver.cpp b/library/SolverUtils/Driver.cpp index 2d3ae870c6..d7b4889da9 100644 --- a/library/SolverUtils/Driver.cpp +++ b/library/SolverUtils/Driver.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string Driver::evolutionOperatorLookupIds[6] = { @@ -208,5 +206,4 @@ void Driver::v_InitObject(ostream &out) } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Driver.h b/library/SolverUtils/Driver.h index 4ddb8dbb0f..ca46d8d43d 100644 --- a/library/SolverUtils/Driver.h +++ b/library/SolverUtils/Driver.h @@ -43,9 +43,7 @@ #include <SolverUtils/EquationSystem.h> #include <SolverUtils/SolverUtils.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Driver; @@ -131,7 +129,6 @@ inline Array<OneD, EquationSystemSharedPtr> Driver::GetEqu() return m_equ; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERS_AUXILIARY_ADRBASE_H diff --git a/library/SolverUtils/DriverAdaptive.cpp b/library/SolverUtils/DriverAdaptive.cpp index 2b0e129233..90289fcc60 100644 --- a/library/SolverUtils/DriverAdaptive.cpp +++ b/library/SolverUtils/DriverAdaptive.cpp @@ -47,9 +47,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { string DriverAdaptive::className = GetDriverFactory().RegisterCreatorFunction( @@ -667,5 +665,4 @@ void DriverAdaptive::ReplaceExpansion( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverAdaptive.h b/library/SolverUtils/DriverAdaptive.h index f13ef76a62..2eb4de1ba7 100644 --- a/library/SolverUtils/DriverAdaptive.h +++ b/library/SolverUtils/DriverAdaptive.h @@ -38,9 +38,7 @@ #include <MultiRegions/GlobalLinSys.h> #include <SolverUtils/Driver.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for the adaptive polynomial order driver. @@ -70,15 +68,14 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - SOLVER_UTILS_EXPORT virtual ~DriverAdaptive(); + SOLVER_UTILS_EXPORT ~DriverAdaptive() override; /// Virtual function for initialisation implementation. - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - SOLVER_UTILS_EXPORT virtual void v_Execute( - std::ostream &out = std::cout) override; + SOLVER_UTILS_EXPORT void v_Execute(std::ostream &out = std::cout) override; static std::string driverLookupId; @@ -88,7 +85,6 @@ private: std::map<int, int> deltaP); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERADAPTIVE_H diff --git a/library/SolverUtils/DriverArnoldi.cpp b/library/SolverUtils/DriverArnoldi.cpp index 61eee1f9e3..8457e1f289 100644 --- a/library/SolverUtils/DriverArnoldi.cpp +++ b/library/SolverUtils/DriverArnoldi.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** @@ -435,7 +433,9 @@ void DriverArnoldi::MaskInit() } } if (unmask == 1) + { break; + } } for (int j = 0; j < m_nfields; ++j) { @@ -452,5 +452,4 @@ void DriverArnoldi::MaskInit() } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverArnoldi.h b/library/SolverUtils/DriverArnoldi.h index 9b17c22da2..e832108ae4 100644 --- a/library/SolverUtils/DriverArnoldi.h +++ b/library/SolverUtils/DriverArnoldi.h @@ -37,9 +37,7 @@ #include <SolverUtils/Driver.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for the development of solvers. @@ -85,13 +83,13 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - virtual ~DriverArnoldi() = default; + ~DriverArnoldi() override = default; /// Virtual function for initialisation implementation. - virtual void v_InitObject(std::ostream &out = std::cout) override; + void v_InitObject(std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - virtual void v_Execute(std::ostream &out = std::cout) override; + void v_Execute(std::ostream &out = std::cout) override; /// Copy Arnoldi storage to fields. void CopyArnoldiArrayToField(Array<OneD, NekDouble> &array); @@ -123,7 +121,6 @@ protected: SOLVER_UTILS_EXPORT void ArnoldiSummary(std::ostream &out); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERARNOLDI_H diff --git a/library/SolverUtils/DriverArpack.cpp b/library/SolverUtils/DriverArpack.cpp index 5314ed43c6..3a4a232ae5 100644 --- a/library/SolverUtils/DriverArpack.cpp +++ b/library/SolverUtils/DriverArpack.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DriverArpack::arpackProblemTypeLookupIds[6] = { @@ -252,7 +250,9 @@ void DriverArpack::v_Execute(ostream &out) } if (ido == 99) + { break; + } switch (ido) { @@ -416,5 +416,4 @@ void DriverArpack::v_Execute(ostream &out) } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverArpack.h b/library/SolverUtils/DriverArpack.h index a99201ed05..f36a02318f 100644 --- a/library/SolverUtils/DriverArpack.h +++ b/library/SolverUtils/DriverArpack.h @@ -39,9 +39,7 @@ #include <SolverUtils/DriverArnoldi.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for the development of solvers. @@ -75,13 +73,13 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - virtual ~DriverArpack() = default; + ~DriverArpack() override = default; /// Virtual function for initialisation implementation. - virtual void v_InitObject(std::ostream &out = std::cout) override; + void v_InitObject(std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - virtual void v_Execute(std::ostream &out = std::cout) override; + void v_Execute(std::ostream &out = std::cout) override; static std::string driverLookupId; @@ -91,7 +89,6 @@ private: static std::string ArpackProblemTypeTrans[]; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERARPACK_H diff --git a/library/SolverUtils/DriverModifiedArnoldi.cpp b/library/SolverUtils/DriverModifiedArnoldi.cpp index b45e69f035..a24c35e3a0 100644 --- a/library/SolverUtils/DriverModifiedArnoldi.cpp +++ b/library/SolverUtils/DriverModifiedArnoldi.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { string DriverModifiedArnoldi::className = @@ -427,8 +425,8 @@ void DriverModifiedArnoldi::EV_small( alpha[kdim] * std::fabs(R[kdim * kdimp + kdim] / R[(kdim - 1) * kdimp + kdim - 1]); - Lapack::dgeev_('N', 'V', kdim, &H[0], kdim, &wr[0], &wi[0], 0, 1, &zvec[0], - kdim, &rwork[0], lwork, ier); + Lapack::dgeev_('N', 'V', kdim, &H[0], kdim, &wr[0], &wi[0], nullptr, 1, + &zvec[0], kdim, &rwork[0], lwork, ier); ASSERTL0(!ier, "Error with dgeev"); @@ -685,5 +683,4 @@ void DriverModifiedArnoldi::EV_big(Array<OneD, Array<OneD, NekDouble>> &bvecs, } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverModifiedArnoldi.h b/library/SolverUtils/DriverModifiedArnoldi.h index 834f4324f2..e2c4e2705a 100644 --- a/library/SolverUtils/DriverModifiedArnoldi.h +++ b/library/SolverUtils/DriverModifiedArnoldi.h @@ -38,9 +38,7 @@ #include <SolverUtils/DriverArnoldi.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class DriverModifiedArnoldi : public DriverArnoldi @@ -69,13 +67,13 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - virtual ~DriverModifiedArnoldi() = default; + ~DriverModifiedArnoldi() override = default; /// Virtual function for initialisation implementation. - virtual void v_InitObject(std::ostream &out = std::cout) override; + void v_InitObject(std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - virtual void v_Execute(std::ostream &out = std::cout) override; + void v_Execute(std::ostream &out = std::cout) override; static std::string driverLookupId; @@ -113,7 +111,6 @@ private: Array<OneD, NekDouble> &wr, Array<OneD, NekDouble> &wi); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERS_AUXILIARY_ADRBASE_H diff --git a/library/SolverUtils/DriverPFASST.cpp b/library/SolverUtils/DriverPFASST.cpp index 28c233c9aa..6975fce9fb 100644 --- a/library/SolverUtils/DriverPFASST.cpp +++ b/library/SolverUtils/DriverPFASST.cpp @@ -39,9 +39,7 @@ #include <SolverUtils/DriverPFASST.h> #include <boost/format.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DriverPFASST::className = GetDriverFactory().RegisterCreatorFunction("PFASST", DriverPFASST::create); @@ -1154,5 +1152,4 @@ NekDouble DriverPFASST::EstimateOverheadTime(void) return timer.Elapsed().count() / niter; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverPFASST.h b/library/SolverUtils/DriverPFASST.h index 5b25c720bc..7ae4c8afe9 100644 --- a/library/SolverUtils/DriverPFASST.h +++ b/library/SolverUtils/DriverPFASST.h @@ -39,9 +39,7 @@ #include <SolverUtils/DriverParallelInTime.h> #include <SolverUtils/UnsteadySystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { typedef Array<OneD, Array<OneD, Array<OneD, NekDouble>>> SDCarray; @@ -73,15 +71,14 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - SOLVER_UTILS_EXPORT virtual ~DriverPFASST() = default; + SOLVER_UTILS_EXPORT ~DriverPFASST() override = default; /// Virtual function for initialisation implementation. - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - SOLVER_UTILS_EXPORT virtual void v_Execute( - std::ostream &out = std::cout) override; + SOLVER_UTILS_EXPORT void v_Execute(std::ostream &out = std::cout) override; static std::string driverLookupId; @@ -184,7 +181,6 @@ private: bool m_updateResidual = false; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERPFASST_H diff --git a/library/SolverUtils/DriverParallelInTime.cpp b/library/SolverUtils/DriverParallelInTime.cpp index a893a0fb9a..9f70b0d832 100644 --- a/library/SolverUtils/DriverParallelInTime.cpp +++ b/library/SolverUtils/DriverParallelInTime.cpp @@ -38,9 +38,7 @@ #include <SolverUtils/DriverParallelInTime.h> #include <boost/format.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** @@ -690,5 +688,4 @@ void InterpExp1ToExp2( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverParallelInTime.h b/library/SolverUtils/DriverParallelInTime.h index 418924000e..aacc5ee424 100644 --- a/library/SolverUtils/DriverParallelInTime.h +++ b/library/SolverUtils/DriverParallelInTime.h @@ -38,9 +38,7 @@ #include <SolverUtils/Driver.h> #include <SolverUtils/UnsteadySystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for the development of parallel-in-time solvers. @@ -54,15 +52,14 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - SOLVER_UTILS_EXPORT virtual ~DriverParallelInTime() = default; + SOLVER_UTILS_EXPORT ~DriverParallelInTime() override = default; /// Virtual function for initialisation implementation. - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - SOLVER_UTILS_EXPORT virtual void v_Execute( - std::ostream &out = std::cout) override; + SOLVER_UTILS_EXPORT void v_Execute(std::ostream &out = std::cout) override; void SetParallelInTimeEquationSystem(std::string AdvectiveType); @@ -189,7 +186,6 @@ void InterpExp1ToExp2( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray); -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERPARALLELINTIME_H diff --git a/library/SolverUtils/DriverParareal.cpp b/library/SolverUtils/DriverParareal.cpp index e4d82d31dd..408ce18a4a 100644 --- a/library/SolverUtils/DriverParareal.cpp +++ b/library/SolverUtils/DriverParareal.cpp @@ -38,9 +38,7 @@ #include <SolverUtils/DriverParareal.h> #include <boost/format.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string DriverParareal::className = GetDriverFactory().RegisterCreatorFunction("Parareal", @@ -664,5 +662,4 @@ NekDouble DriverParareal::EstimatePredictorTime(void) return EstimateSolverTime(m_coarseLevel, 10); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverParareal.h b/library/SolverUtils/DriverParareal.h index 7037a1d824..c8b0c001a1 100644 --- a/library/SolverUtils/DriverParareal.h +++ b/library/SolverUtils/DriverParareal.h @@ -37,9 +37,7 @@ #include <SolverUtils/DriverParallelInTime.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for the development of solvers. @@ -69,15 +67,14 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - SOLVER_UTILS_EXPORT virtual ~DriverParareal() = default; + SOLVER_UTILS_EXPORT ~DriverParareal() override = default; /// Virtual function for initialisation implementation. - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - SOLVER_UTILS_EXPORT virtual void v_Execute( - std::ostream &out = std::cout) override; + SOLVER_UTILS_EXPORT void v_Execute(std::ostream &out = std::cout) override; static std::string driverLookupId; @@ -134,7 +131,6 @@ private: Array<OneD, Array<OneD, NekDouble>> m_coarseSolution; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERPARAREAL_H diff --git a/library/SolverUtils/DriverStandard.cpp b/library/SolverUtils/DriverStandard.cpp index 714c4f27ca..9e9046bf17 100644 --- a/library/SolverUtils/DriverStandard.cpp +++ b/library/SolverUtils/DriverStandard.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { string DriverStandard::className = GetDriverFactory().RegisterCreatorFunction( "Standard", DriverStandard::create); @@ -118,5 +116,4 @@ void DriverStandard::v_Execute(ostream &out) } } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverStandard.h b/library/SolverUtils/DriverStandard.h index 84e271fa22..a077d7687d 100644 --- a/library/SolverUtils/DriverStandard.h +++ b/library/SolverUtils/DriverStandard.h @@ -37,9 +37,7 @@ #include <SolverUtils/Driver.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for the development of solvers. class DriverStandard : public Driver @@ -68,20 +66,18 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - SOLVER_UTILS_EXPORT virtual ~DriverStandard() = default; + SOLVER_UTILS_EXPORT ~DriverStandard() override = default; /// Virtual function for initialisation implementation. - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - SOLVER_UTILS_EXPORT virtual void v_Execute( - std::ostream &out = std::cout) override; + SOLVER_UTILS_EXPORT void v_Execute(std::ostream &out = std::cout) override; static std::string driverLookupId; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERSTANDARD_H diff --git a/library/SolverUtils/DriverSteadyState.cpp b/library/SolverUtils/DriverSteadyState.cpp index d92e1512cc..4be40c4f81 100644 --- a/library/SolverUtils/DriverSteadyState.cpp +++ b/library/SolverUtils/DriverSteadyState.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { string DriverSteadyState::className = @@ -665,5 +663,4 @@ void DriverSteadyState::PrintSummarySFD() << endl; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/DriverSteadyState.h b/library/SolverUtils/DriverSteadyState.h index 2e2b66f855..fbbcc9f729 100644 --- a/library/SolverUtils/DriverSteadyState.h +++ b/library/SolverUtils/DriverSteadyState.h @@ -38,9 +38,7 @@ #include <LibUtilities/BasicUtils/Timer.h> #include <SolverUtils/DriverModifiedArnoldi.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class DriverSteadyState : public DriverModifiedArnoldi @@ -69,15 +67,14 @@ protected: const SpatialDomains::MeshGraphSharedPtr pGraph); /// Destructor - SOLVER_UTILS_EXPORT virtual ~DriverSteadyState() = default; + SOLVER_UTILS_EXPORT ~DriverSteadyState() override = default; /// Initialises EquationSystem class members. - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( std::ostream &out = std::cout) override; /// Virtual function for solve implementation. - SOLVER_UTILS_EXPORT virtual void v_Execute( - std::ostream &out = std::cout) override; + SOLVER_UTILS_EXPORT void v_Execute(std::ostream &out = std::cout) override; private: int m_stepCounter; @@ -147,7 +144,6 @@ private: static std::string driverLookupId; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif // NEKTAR_SOLVERUTILS_DRIVERSTEADYSTATE_H diff --git a/library/SolverUtils/EquationSystem.cpp b/library/SolverUtils/EquationSystem.cpp index e5501311d2..6dfa2a02a8 100644 --- a/library/SolverUtils/EquationSystem.cpp +++ b/library/SolverUtils/EquationSystem.cpp @@ -59,9 +59,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string EquationSystem::equationSystemTypeLookupIds[2] = { @@ -1621,5 +1619,4 @@ void EquationSystem::v_ExtraFldOutput( boost::ignore_unused(fieldcoeffs, variables); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/Filter.cpp b/library/SolverUtils/Filters/Filter.cpp index 15ef97d42d..d7919880dd 100644 --- a/library/SolverUtils/Filters/Filter.cpp +++ b/library/SolverUtils/Filters/Filter.cpp @@ -34,9 +34,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { FilterFactory &GetFilterFactory() { @@ -54,5 +52,4 @@ Filter::~Filter() { } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/Filter.h b/library/SolverUtils/Filters/Filter.h index 0d2abd8b21..0155a2476d 100644 --- a/library/SolverUtils/Filters/Filter.h +++ b/library/SolverUtils/Filters/Filter.h @@ -42,9 +42,7 @@ #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class Filter; class EquationSystem; @@ -122,6 +120,5 @@ inline bool Filter::IsTimeDependent() { return v_IsTimeDependent(); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTER_FILTER_H */ diff --git a/library/SolverUtils/Filters/FilterAeroForces.cpp b/library/SolverUtils/Filters/FilterAeroForces.cpp index 5230180ff6..5b5e56fb92 100644 --- a/library/SolverUtils/Filters/FilterAeroForces.cpp +++ b/library/SolverUtils/Filters/FilterAeroForces.cpp @@ -47,9 +47,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterAeroForces::className = GetFilterFactory().RegisterCreatorFunction("AeroForces", @@ -1953,5 +1951,4 @@ void FilterAeroForces::CalculateForcesMapping( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterAeroForces.h b/library/SolverUtils/Filters/FilterAeroForces.h index 4804f13e05..180ce7df9c 100644 --- a/library/SolverUtils/Filters/FilterAeroForces.h +++ b/library/SolverUtils/Filters/FilterAeroForces.h @@ -72,7 +72,7 @@ public: const std::weak_ptr<EquationSystem> &pEquation, const std::map<std::string, std::string> &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterAeroForces(); + SOLVER_UTILS_EXPORT ~FilterAeroForces() override; SOLVER_UTILS_EXPORT void GetForces( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, @@ -83,16 +83,16 @@ public: Array<OneD, NekDouble> &moments, const NekDouble &time); protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: /// ID's of boundary regions where we want the forces diff --git a/library/SolverUtils/Filters/FilterAverageFields.cpp b/library/SolverUtils/Filters/FilterAverageFields.cpp index d6b11fe72d..7fd8646cf0 100644 --- a/library/SolverUtils/Filters/FilterAverageFields.cpp +++ b/library/SolverUtils/Filters/FilterAverageFields.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/Filters/FilterAverageFields.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterAverageFields::className = GetFilterFactory().RegisterCreatorFunction("AverageFields", @@ -94,5 +92,4 @@ NekDouble FilterAverageFields::v_GetScale() return 1.0 / m_numSamples; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterAverageFields.h b/library/SolverUtils/Filters/FilterAverageFields.h index 6da0d15196..168ebbfe5f 100644 --- a/library/SolverUtils/Filters/FilterAverageFields.h +++ b/library/SolverUtils/Filters/FilterAverageFields.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/FilterFieldConvert.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterAverageFields : public FilterFieldConvert { @@ -65,29 +63,28 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterAverageFields(); + SOLVER_UTILS_EXPORT ~FilterAverageFields() override; protected: - virtual void v_ProcessSample( + void v_ProcessSample( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, std::vector<Array<OneD, NekDouble>> &fieldcoeffs, const NekDouble &time) override; - virtual void v_PrepareOutput( + void v_PrepareOutput( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual NekDouble v_GetScale() override; - virtual std::string v_GetFileSuffix() override + NekDouble v_GetScale() override; + std::string v_GetFileSuffix() override { return "_avg"; } - virtual void v_FillVariablesName( + void v_FillVariablesName( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields) override { FilterFieldConvert::v_FillVariablesName(pFields); } }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERCHECKPOINT_H */ diff --git a/library/SolverUtils/Filters/FilterBodyFittedVelocity.cpp b/library/SolverUtils/Filters/FilterBodyFittedVelocity.cpp index 906dba5d8a..98d8d05c82 100755 --- a/library/SolverUtils/Filters/FilterBodyFittedVelocity.cpp +++ b/library/SolverUtils/Filters/FilterBodyFittedVelocity.cpp @@ -47,9 +47,7 @@ using std::cout; using std::endl; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterBodyFittedVelocity::className = GetFilterFactory().RegisterCreatorFunction( @@ -503,5 +501,4 @@ NekDouble FilterBodyFittedVelocity::v_GetScale() return 1.0; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterBodyFittedVelocity.h b/library/SolverUtils/Filters/FilterBodyFittedVelocity.h old mode 100755 new mode 100644 index 4491babf73..c8f0e83b78 --- a/library/SolverUtils/Filters/FilterBodyFittedVelocity.h +++ b/library/SolverUtils/Filters/FilterBodyFittedVelocity.h @@ -39,9 +39,7 @@ #include <SolverUtils/Filters/FilterFieldConvert.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterBodyFittedVelocity : public FilterFieldConvert { @@ -67,7 +65,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterBodyFittedVelocity(); + SOLVER_UTILS_EXPORT ~FilterBodyFittedVelocity() override; protected: // Enumerate types as flags @@ -103,20 +101,21 @@ protected: std::vector<Array<OneD, NekDouble>> m_curFieldsThermalVars; std::vector<Array<OneD, NekDouble>> m_outFieldsThermalVars; - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual void v_FillVariablesName( - const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields); - virtual void v_ProcessSample( + const NekDouble &time) override; + void v_FillVariablesName( + const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields) + override; + void v_ProcessSample( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, std::vector<Array<OneD, NekDouble>> &fieldcoeffs, - const NekDouble &time); - virtual void v_PrepareOutput( + const NekDouble &time) override; + void v_PrepareOutput( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual NekDouble v_GetScale(); - virtual std::string v_GetFileSuffix() + const NekDouble &time) override; + NekDouble v_GetScale() override; + std::string v_GetFileSuffix() override { if (m_filterType == eMax) { @@ -135,7 +134,6 @@ protected: private: bool m_initialized; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERCHECKPOINT_H */ diff --git a/library/SolverUtils/Filters/FilterCheckpoint.cpp b/library/SolverUtils/Filters/FilterCheckpoint.cpp index 8ffeeec21c..b50e48b32c 100644 --- a/library/SolverUtils/Filters/FilterCheckpoint.cpp +++ b/library/SolverUtils/Filters/FilterCheckpoint.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/Filters/FilterCheckpoint.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterCheckpoint::className = GetFilterFactory().RegisterCreatorFunction("Checkpoint", @@ -138,5 +136,4 @@ bool FilterCheckpoint::v_IsTimeDependent() { return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterCheckpoint.h b/library/SolverUtils/Filters/FilterCheckpoint.h index 237a43abd4..6f4825c07a 100644 --- a/library/SolverUtils/Filters/FilterCheckpoint.h +++ b/library/SolverUtils/Filters/FilterCheckpoint.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterCheckpoint : public Filter { @@ -64,19 +62,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterCheckpoint(); + SOLVER_UTILS_EXPORT ~FilterCheckpoint() override; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: unsigned int m_index; @@ -87,7 +85,6 @@ private: NekDouble m_outputStartTime; LibUtilities::FieldIOSharedPtr m_fld; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERCHECKPOINT_H */ diff --git a/library/SolverUtils/Filters/FilterEnergy.cpp b/library/SolverUtils/Filters/FilterEnergy.cpp index 99d4f9ce1c..794adccc3a 100644 --- a/library/SolverUtils/Filters/FilterEnergy.cpp +++ b/library/SolverUtils/Filters/FilterEnergy.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterEnergy::className = SolverUtils::GetFilterFactory().RegisterCreatorFunction( @@ -275,5 +273,4 @@ bool FilterEnergy::v_IsTimeDependent() return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterEnergy.h b/library/SolverUtils/Filters/FilterEnergy.h index 65ddb8ce2a..2c4ad796e7 100644 --- a/library/SolverUtils/Filters/FilterEnergy.h +++ b/library/SolverUtils/Filters/FilterEnergy.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterEnergy : public Filter { @@ -63,19 +61,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT ~FilterEnergy(); + SOLVER_UTILS_EXPORT ~FilterEnergy() override; protected: - SOLVER_UTILS_EXPORT virtual void v_Initialise( + SOLVER_UTILS_EXPORT void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Update( + SOLVER_UTILS_EXPORT void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Finalise( + SOLVER_UTILS_EXPORT void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual bool v_IsTimeDependent() override; + SOLVER_UTILS_EXPORT bool v_IsTimeDependent() override; private: unsigned int m_index; @@ -87,7 +85,6 @@ private: LibUtilities::CommSharedPtr m_comm; Array<OneD, unsigned int> m_planes; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Filters/FilterEnergy1D.cpp b/library/SolverUtils/Filters/FilterEnergy1D.cpp index 20b59beb87..2ee9bb2ac9 100644 --- a/library/SolverUtils/Filters/FilterEnergy1D.cpp +++ b/library/SolverUtils/Filters/FilterEnergy1D.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterEnergy1D::className = GetFilterFactory().RegisterCreatorFunction("Energy1D", @@ -179,5 +177,4 @@ bool FilterEnergy1D::v_IsTimeDependent() { return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterEnergy1D.h b/library/SolverUtils/Filters/FilterEnergy1D.h index 9e43831773..967fbb92e7 100644 --- a/library/SolverUtils/Filters/FilterEnergy1D.h +++ b/library/SolverUtils/Filters/FilterEnergy1D.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** * @brief Filter for one-dimensional energy spectrum. @@ -72,19 +70,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT ~FilterEnergy1D(); + SOLVER_UTILS_EXPORT ~FilterEnergy1D() override; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: /// Output file. @@ -94,7 +92,6 @@ private: /// Current index counter. unsigned int m_index; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Filters/FilterError.cpp b/library/SolverUtils/Filters/FilterError.cpp index 899ca57424..b0f6b4fdae 100644 --- a/library/SolverUtils/Filters/FilterError.cpp +++ b/library/SolverUtils/Filters/FilterError.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/Filters/FilterError.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterError::className = GetFilterFactory().RegisterCreatorFunction("Error", FilterError::create); @@ -178,5 +176,4 @@ bool FilterError::v_IsTimeDependent() { return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterError.h b/library/SolverUtils/Filters/FilterError.h index 004924d6a8..e3b60165d1 100644 --- a/library/SolverUtils/Filters/FilterError.h +++ b/library/SolverUtils/Filters/FilterError.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterError : public Filter { @@ -64,19 +62,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterError() = default; + SOLVER_UTILS_EXPORT ~FilterError() override = default; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time) override final; - virtual void v_Update( + const NekDouble &time) final; + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time) override final; - virtual void v_Finalise( + const NekDouble &time) final; + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time) override final; - virtual bool v_IsTimeDependent() override final; + const NekDouble &time) final; + bool v_IsTimeDependent() final; private: size_t m_index = 0; @@ -86,7 +84,6 @@ private: std::ofstream m_outFile; LibUtilities::CommSharedPtr m_comm; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERERROR_H */ diff --git a/library/SolverUtils/Filters/FilterFieldConvert.cpp b/library/SolverUtils/Filters/FilterFieldConvert.cpp index ce28164f4d..84f0dd57d5 100644 --- a/library/SolverUtils/Filters/FilterFieldConvert.cpp +++ b/library/SolverUtils/Filters/FilterFieldConvert.cpp @@ -40,9 +40,7 @@ #include <boost/core/ignore_unused.hpp> #include <boost/program_options.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterFieldConvert::className = GetFilterFactory().RegisterCreatorFunction("FieldConvert", @@ -791,5 +789,4 @@ void FilterFieldConvert::CheckModules(std::vector<ModuleSharedPtr> &modules) } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterFieldConvert.h b/library/SolverUtils/Filters/FilterFieldConvert.h index 67dd87a4f2..f616dad629 100644 --- a/library/SolverUtils/Filters/FilterFieldConvert.h +++ b/library/SolverUtils/Filters/FilterFieldConvert.h @@ -43,9 +43,7 @@ using namespace Nektar::FieldUtils; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterFieldConvert : public Filter { @@ -71,18 +69,18 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterFieldConvert(); + SOLVER_UTILS_EXPORT ~FilterFieldConvert() override; protected: - SOLVER_UTILS_EXPORT virtual void v_Initialise( + SOLVER_UTILS_EXPORT void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; SOLVER_UTILS_EXPORT virtual void v_FillVariablesName( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields); - SOLVER_UTILS_EXPORT virtual void v_Update( + SOLVER_UTILS_EXPORT void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Finalise( + SOLVER_UTILS_EXPORT void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; SOLVER_UTILS_EXPORT virtual void v_ProcessSample( @@ -109,7 +107,7 @@ protected: const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, int dump = -1); - SOLVER_UTILS_EXPORT virtual bool v_IsTimeDependent() override; + SOLVER_UTILS_EXPORT bool v_IsTimeDependent() override; void CreateModules(std::vector<std::string> &modcmds); @@ -140,7 +138,6 @@ protected: FieldSharedPtr m_f; po::variables_map m_vm; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERFIELDCONVERT_H */ diff --git a/library/SolverUtils/Filters/FilterHistoryPoints.cpp b/library/SolverUtils/Filters/FilterHistoryPoints.cpp index c001eeb3d3..3b5d3a1e62 100644 --- a/library/SolverUtils/Filters/FilterHistoryPoints.cpp +++ b/library/SolverUtils/Filters/FilterHistoryPoints.cpp @@ -42,9 +42,7 @@ using namespace std; #include <boost/core/ignore_unused.hpp> #include <boost/format.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterHistoryPoints::className = GetFilterFactory().RegisterCreatorFunction("HistoryPoints", @@ -704,5 +702,4 @@ bool FilterHistoryPoints::v_IsTimeDependent() { return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterHistoryPoints.h b/library/SolverUtils/Filters/FilterHistoryPoints.h index ef4ba22875..1a627e3ebf 100644 --- a/library/SolverUtils/Filters/FilterHistoryPoints.h +++ b/library/SolverUtils/Filters/FilterHistoryPoints.h @@ -39,9 +39,7 @@ #include "LibUtilities/BasicUtils/SharedArray.hpp" #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterHistoryPoints : public Filter @@ -68,19 +66,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT ~FilterHistoryPoints(); + SOLVER_UTILS_EXPORT ~FilterHistoryPoints() override; protected: - SOLVER_UTILS_EXPORT virtual void v_Initialise( + SOLVER_UTILS_EXPORT void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Update( + SOLVER_UTILS_EXPORT void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Finalise( + SOLVER_UTILS_EXPORT void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual bool v_IsTimeDependent() override; + SOLVER_UTILS_EXPORT bool v_IsTimeDependent() override; bool GetPoint(Array<OneD, NekDouble> gloCoord, int I); SOLVER_UTILS_EXPORT void v_WriteData(const int &rank, const Array<OneD, NekDouble> &data, @@ -116,7 +114,6 @@ protected: bool m_adaptive; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERCHECKPOINT_H */ diff --git a/library/SolverUtils/Filters/FilterIntegral.cpp b/library/SolverUtils/Filters/FilterIntegral.cpp index ce164091ff..7ffe70a4de 100644 --- a/library/SolverUtils/Filters/FilterIntegral.cpp +++ b/library/SolverUtils/Filters/FilterIntegral.cpp @@ -41,9 +41,7 @@ #include <boost/algorithm/string.hpp> #include <boost/core/ignore_unused.hpp> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterIntegral::className = GetFilterFactory().RegisterCreatorFunction("Integral", @@ -375,5 +373,4 @@ bool FilterIntegral::v_IsTimeDependent() return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterIntegral.h b/library/SolverUtils/Filters/FilterIntegral.h index fd720e7ac8..18a3c7f03c 100644 --- a/library/SolverUtils/Filters/FilterIntegral.h +++ b/library/SolverUtils/Filters/FilterIntegral.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterIntegral : public Filter { @@ -67,7 +65,7 @@ public: const ParamMap &pParams); /// Default destructor - SOLVER_UTILS_EXPORT virtual ~FilterIntegral() = default; + SOLVER_UTILS_EXPORT ~FilterIntegral() override = default; protected: /** @@ -77,9 +75,9 @@ protected: * @param pFields Field data * @param time Current time */ - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time) override final; + const NekDouble &time) final; /** * Performs the integration on the stored composite expansions and outputs @@ -88,9 +86,9 @@ protected: * @param pFields Field data * @param time Current time */ - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time) override final; + const NekDouble &time) final; /** * Closes the output data file @@ -98,12 +96,12 @@ protected: * @param pFields Field data * @param time Current time */ - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time) override final; + const NekDouble &time) final; /// Returns true as filter depends on time - virtual bool v_IsTimeDependent() override final; + bool v_IsTimeDependent() final; private: size_t m_index = 0; @@ -125,7 +123,6 @@ private: std::map<int, std::vector<std::pair<LocalRegions::ExpansionSharedPtr, int>>> m_compExpMap; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERIntegral_H */ diff --git a/library/SolverUtils/Filters/FilterInterfaces.hpp b/library/SolverUtils/Filters/FilterInterfaces.hpp index b49e04a728..30e975679a 100644 --- a/library/SolverUtils/Filters/FilterInterfaces.hpp +++ b/library/SolverUtils/Filters/FilterInterfaces.hpp @@ -41,9 +41,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FluidInterface @@ -224,7 +222,6 @@ inline void FluidInterface::GetMovingFrameAngles( v_GetMovingFrameAngles(vFrameTheta); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Filters/FilterMaxMinFields.cpp b/library/SolverUtils/Filters/FilterMaxMinFields.cpp index d910e80f00..359dcb00ad 100644 --- a/library/SolverUtils/Filters/FilterMaxMinFields.cpp +++ b/library/SolverUtils/Filters/FilterMaxMinFields.cpp @@ -37,9 +37,7 @@ #include <CompressibleFlowSolver/Misc/VariableConverter.h> #include <SolverUtils/Filters/FilterMaxMinFields.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterMaxMinFields::className = GetFilterFactory().RegisterCreatorFunction("MaxMinFields", @@ -235,5 +233,4 @@ NekDouble FilterMaxMinFields::v_GetScale() return 1.0; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterMaxMinFields.h b/library/SolverUtils/Filters/FilterMaxMinFields.h index 69c56c9cfb..710b05a992 100644 --- a/library/SolverUtils/Filters/FilterMaxMinFields.h +++ b/library/SolverUtils/Filters/FilterMaxMinFields.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/FilterFieldConvert.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { enum ProblemType @@ -73,7 +71,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterMaxMinFields(); + SOLVER_UTILS_EXPORT ~FilterMaxMinFields() override; protected: bool m_isMax; @@ -81,24 +79,24 @@ protected: std::vector<Array<OneD, NekDouble>> m_curFieldsPhys; std::vector<Array<OneD, NekDouble>> m_outFieldsPhys; - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_FillVariablesName( + void v_FillVariablesName( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields) override { FilterFieldConvert::v_FillVariablesName(pFields); } - virtual void v_ProcessSample( + void v_ProcessSample( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, std::vector<Array<OneD, NekDouble>> &fieldcoeffs, const NekDouble &time) override; - virtual void v_PrepareOutput( + void v_PrepareOutput( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual NekDouble v_GetScale() override; - virtual std::string v_GetFileSuffix() override + NekDouble v_GetScale() override; + std::string v_GetFileSuffix() override { if (m_isMax) { @@ -113,7 +111,6 @@ protected: private: bool m_initialized; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERCHECKPOINT_H */ diff --git a/library/SolverUtils/Filters/FilterMean.cpp b/library/SolverUtils/Filters/FilterMean.cpp index 26de4ef6f1..27e8438bc9 100644 --- a/library/SolverUtils/Filters/FilterMean.cpp +++ b/library/SolverUtils/Filters/FilterMean.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterMean::className = SolverUtils::GetFilterFactory().RegisterCreatorFunction("Mean", @@ -136,7 +134,9 @@ void FilterMean::v_Initialise( m_outputStream.setf(ios::scientific, ios::floatfield); m_outputStream << "# Time"; for (int i = 0; i < pFields.size(); ++i) + { m_outputStream << setw(22) << equ->GetVariable(i); + } m_outputStream << setw(22) << volname[spacedim - 1] << " " << m_area; m_outputStream << endl; } @@ -169,23 +169,31 @@ void FilterMean::v_Update( if (m_homogeneous) { for (i = 0; i < pFields.size(); ++i) + { avg[i] = pFields[0]->GetPlane(0)->Integral(pFields[i]->GetPhys()) * m_homogeneousLength; + } } else { for (i = 0; i < pFields.size(); ++i) + { avg[i] = pFields[0]->Integral(pFields[i]->GetPhys()); + } } for (i = 0; i < pFields.size(); ++i) + { avg[i] /= m_area; + } if (vComm->GetRank() == 0) { m_outputStream << setw(17) << setprecision(8) << time; for (int i = 0; i < pFields.size(); ++i) + { m_outputStream << setw(22) << setprecision(11) << avg[i]; + } m_outputStream << endl; } } @@ -207,5 +215,4 @@ bool FilterMean::v_IsTimeDependent() return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterMean.h b/library/SolverUtils/Filters/FilterMean.h index c7287d7a0e..1330332f12 100644 --- a/library/SolverUtils/Filters/FilterMean.h +++ b/library/SolverUtils/Filters/FilterMean.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterMean : public Filter { @@ -63,19 +61,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT ~FilterMean(); + SOLVER_UTILS_EXPORT ~FilterMean() override; protected: - SOLVER_UTILS_EXPORT virtual void v_Initialise( + SOLVER_UTILS_EXPORT void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Update( + SOLVER_UTILS_EXPORT void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_Finalise( + SOLVER_UTILS_EXPORT void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pField, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual bool v_IsTimeDependent() override; + SOLVER_UTILS_EXPORT bool v_IsTimeDependent() override; private: unsigned int m_index; @@ -87,7 +85,6 @@ private: NekDouble m_area; Array<OneD, unsigned int> m_planes; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Filters/FilterModalEnergy.cpp b/library/SolverUtils/Filters/FilterModalEnergy.cpp index 26836ef3ec..a464f61ce9 100644 --- a/library/SolverUtils/Filters/FilterModalEnergy.cpp +++ b/library/SolverUtils/Filters/FilterModalEnergy.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterModalEnergy::className = GetFilterFactory().RegisterCreatorFunction("ModalEnergy", @@ -640,5 +638,4 @@ bool FilterModalEnergy::v_IsTimeDependent() { return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterModalEnergy.h b/library/SolverUtils/Filters/FilterModalEnergy.h index ab447ccf37..b8487ae5c8 100644 --- a/library/SolverUtils/Filters/FilterModalEnergy.h +++ b/library/SolverUtils/Filters/FilterModalEnergy.h @@ -44,9 +44,7 @@ #include <MultiRegions/ExpList3DHomogeneous1D.h> #include <MultiRegions/ExpList3DHomogeneous2D.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterModalEnergy : public Filter { @@ -70,19 +68,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterModalEnergy(); + SOLVER_UTILS_EXPORT ~FilterModalEnergy() override; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; NekDouble L2Error( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, unsigned int field, const NekDouble &time); @@ -124,7 +122,6 @@ private: bool m_homogen_dealiasing; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Filters/FilterMovingAverage.cpp b/library/SolverUtils/Filters/FilterMovingAverage.cpp index 13d6aa1cce..67d708770e 100644 --- a/library/SolverUtils/Filters/FilterMovingAverage.cpp +++ b/library/SolverUtils/Filters/FilterMovingAverage.cpp @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/FilterMovingAverage.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterMovingAverage::className = GetFilterFactory().RegisterCreatorFunction("MovingAverage", @@ -125,5 +123,4 @@ void FilterMovingAverage::v_ProcessSample( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterMovingAverage.h b/library/SolverUtils/Filters/FilterMovingAverage.h index 32c5b0220e..4225f1a17d 100644 --- a/library/SolverUtils/Filters/FilterMovingAverage.h +++ b/library/SolverUtils/Filters/FilterMovingAverage.h @@ -38,9 +38,7 @@ #include <SolverUtils/Filters/FilterFieldConvert.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterMovingAverage : public FilterFieldConvert { @@ -66,21 +64,20 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterMovingAverage(); + SOLVER_UTILS_EXPORT ~FilterMovingAverage() override; protected: - virtual void v_ProcessSample( + void v_ProcessSample( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, std::vector<Array<OneD, NekDouble>> &fieldcoeffs, const NekDouble &time) override; - virtual std::string v_GetFileSuffix() override + std::string v_GetFileSuffix() override { return "_movAvg"; } NekDouble m_alpha; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERMOVINGAVERAGE_H */ diff --git a/library/SolverUtils/Filters/FilterThresholdMax.cpp b/library/SolverUtils/Filters/FilterThresholdMax.cpp index e3afd4d897..0c1d127b75 100644 --- a/library/SolverUtils/Filters/FilterThresholdMax.cpp +++ b/library/SolverUtils/Filters/FilterThresholdMax.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterThresholdMax::className = @@ -164,5 +162,4 @@ bool FilterThresholdMax::v_IsTimeDependent() { return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterThresholdMax.h b/library/SolverUtils/Filters/FilterThresholdMax.h index 28cebf6e6e..e5dbb7cdad 100644 --- a/library/SolverUtils/Filters/FilterThresholdMax.h +++ b/library/SolverUtils/Filters/FilterThresholdMax.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterThresholdMax : public Filter @@ -66,23 +64,23 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterThresholdMax(); + SOLVER_UTILS_EXPORT ~FilterThresholdMax() override; protected: /// Initialises the filter. - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// For each point in domain test if solution is above threshold. - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Finalise the filter and write out data. - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Indicate that this filter is time dependent. - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: /// Storage for recording when each point in domain rises above threshold. @@ -100,7 +98,6 @@ private: /// FieldIO object for writing data. LibUtilities::FieldIOSharedPtr m_fld; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* FILTERTHRESHOLDMAX_H_ */ diff --git a/library/SolverUtils/Filters/FilterThresholdMin.cpp b/library/SolverUtils/Filters/FilterThresholdMin.cpp index b1c34b36b0..a11378d66e 100644 --- a/library/SolverUtils/Filters/FilterThresholdMin.cpp +++ b/library/SolverUtils/Filters/FilterThresholdMin.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterThresholdMin::className = @@ -185,5 +183,4 @@ bool FilterThresholdMin::v_IsTimeDependent() return true; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Filters/FilterThresholdMin.h b/library/SolverUtils/Filters/FilterThresholdMin.h index eec49486d5..874cc10428 100644 --- a/library/SolverUtils/Filters/FilterThresholdMin.h +++ b/library/SolverUtils/Filters/FilterThresholdMin.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterThresholdMin : public Filter @@ -65,23 +63,23 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation, const ParamMap &pParams); - SOLVER_UTILS_EXPORT virtual ~FilterThresholdMin(); + SOLVER_UTILS_EXPORT ~FilterThresholdMin() override; protected: /// Initialises the filter. - SOLVER_UTILS_EXPORT virtual void v_Initialise( + SOLVER_UTILS_EXPORT void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// For each point in domain test if solution is below threshold. - SOLVER_UTILS_EXPORT virtual void v_Update( + SOLVER_UTILS_EXPORT void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Finalise the filter and write out data. - SOLVER_UTILS_EXPORT virtual void v_Finalise( + SOLVER_UTILS_EXPORT void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Indicate that this filter is time dependent. - SOLVER_UTILS_EXPORT virtual bool v_IsTimeDependent() override; + SOLVER_UTILS_EXPORT bool v_IsTimeDependent() override; private: /// Storage for recording when each point in domain drops below threshold. @@ -100,7 +98,6 @@ private: LibUtilities::FieldIOSharedPtr m_fld; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* FILTERTHRESHOLDMAX_H_ */ diff --git a/library/SolverUtils/Forcing/Forcing.cpp b/library/SolverUtils/Forcing/Forcing.cpp index 6ef7c2df6d..df8332df65 100644 --- a/library/SolverUtils/Forcing/Forcing.cpp +++ b/library/SolverUtils/Forcing/Forcing.cpp @@ -37,9 +37,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { ForcingFactory &GetForcingFactory() { @@ -224,5 +222,4 @@ void Forcing::v_ApplyCoeff( boost::ignore_unused(fields, inarray, outarray, time); ASSERTL0(false, "v_ApplyCoeff not defined"); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Forcing/Forcing.h b/library/SolverUtils/Forcing/Forcing.h index 18bcb60dc8..aa655f3d0f 100644 --- a/library/SolverUtils/Forcing/Forcing.h +++ b/library/SolverUtils/Forcing/Forcing.h @@ -43,9 +43,7 @@ #include <SolverUtils/Core/SessionFunction.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { // Forward declaration class Forcing; @@ -165,7 +163,6 @@ protected: const NekDouble pTime, const LibUtilities::EquationSharedPtr &pEqn, Array<OneD, NekDouble> &pArray); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Forcing/ForcingAbsorption.cpp b/library/SolverUtils/Forcing/ForcingAbsorption.cpp index 5e00269e4f..865c28f3f7 100644 --- a/library/SolverUtils/Forcing/ForcingAbsorption.cpp +++ b/library/SolverUtils/Forcing/ForcingAbsorption.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string ForcingAbsorption::className = @@ -326,5 +324,4 @@ void ForcingAbsorption::CalculateForcing( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Forcing/ForcingAbsorption.h b/library/SolverUtils/Forcing/ForcingAbsorption.h index 2a7ef484bc..a281edf517 100644 --- a/library/SolverUtils/Forcing/ForcingAbsorption.h +++ b/library/SolverUtils/Forcing/ForcingAbsorption.h @@ -50,9 +50,7 @@ namespace bg = boost::geometry; namespace bgi = boost::geometry::index; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class ForcingAbsorption : public Forcing { @@ -94,18 +92,18 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &inarray, const NekDouble &time); - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - SOLVER_UTILS_EXPORT virtual void v_Apply( + SOLVER_UTILS_EXPORT void v_Apply( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_ApplyCoeff( + SOLVER_UTILS_EXPORT void v_ApplyCoeff( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -116,12 +114,12 @@ private: bool m_homogeneous; ForcingAbsorption(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation); - virtual ~ForcingAbsorption(void){}; + ~ForcingAbsorption(void) override{}; void CalcAbsorption( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const TiXmlElement *pForce); }; -} // namespace SolverUtils -} // namespace Nektar + +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Forcing/ForcingBody.cpp b/library/SolverUtils/Forcing/ForcingBody.cpp index fe235acade..cf0277df19 100644 --- a/library/SolverUtils/Forcing/ForcingBody.cpp +++ b/library/SolverUtils/Forcing/ForcingBody.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string ForcingBody::classNameBody = @@ -282,5 +280,4 @@ void ForcingBody::v_ApplyCoeff( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Forcing/ForcingBody.h b/library/SolverUtils/Forcing/ForcingBody.h index 0bac2e733a..91aac46fd1 100644 --- a/library/SolverUtils/Forcing/ForcingBody.h +++ b/library/SolverUtils/Forcing/ForcingBody.h @@ -43,9 +43,7 @@ #include <SolverUtils/Forcing/Forcing.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class ForcingBody : public Forcing { @@ -70,18 +68,18 @@ public: static std::string classNameField; protected: - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - SOLVER_UTILS_EXPORT virtual void v_Apply( + SOLVER_UTILS_EXPORT void v_Apply( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_ApplyCoeff( + SOLVER_UTILS_EXPORT void v_ApplyCoeff( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -98,14 +96,13 @@ private: ForcingBody(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation); - virtual ~ForcingBody(void){}; + ~ForcingBody(void) override{}; void Update(const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const Array<OneD, Array<OneD, NekDouble>> &inarray, const NekDouble &time); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.cpp b/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.cpp index dc89606038..85d677a251 100644 --- a/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.cpp +++ b/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.cpp @@ -50,9 +50,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string ForcingMovingReferenceFrame::classNameBody = @@ -603,5 +601,4 @@ void ForcingMovingReferenceFrame::CheckForRestartTheta( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.h b/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.h index 0a14acc938..c9861af0a6 100644 --- a/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.h +++ b/library/SolverUtils/Forcing/ForcingMovingReferenceFrame.h @@ -50,9 +50,7 @@ #include <boost/numeric/ublas/vector.hpp> #include <cmath> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { namespace bn = boost::numeric; @@ -81,18 +79,18 @@ public: static std::string classNameBody; protected: - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - SOLVER_UTILS_EXPORT virtual void v_Apply( + SOLVER_UTILS_EXPORT void v_Apply( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time) override; - SOLVER_UTILS_EXPORT virtual void v_PreApply( + SOLVER_UTILS_EXPORT void v_PreApply( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -153,7 +151,7 @@ private: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation); - virtual ~ForcingMovingReferenceFrame(void){}; + ~ForcingMovingReferenceFrame(void) override{}; void Update(const NekDouble &time); void UpdateTheta(const NekDouble &time); @@ -168,7 +166,6 @@ private: Array<OneD, Array<OneD, NekDouble>> &outarray); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Forcing/ForcingNoise.cpp b/library/SolverUtils/Forcing/ForcingNoise.cpp index e22484d6d6..7d3e2372cd 100644 --- a/library/SolverUtils/Forcing/ForcingNoise.cpp +++ b/library/SolverUtils/Forcing/ForcingNoise.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string ForcingNoise::className = @@ -141,5 +139,4 @@ void ForcingNoise::v_Apply( ++m_index; } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Forcing/ForcingNoise.h b/library/SolverUtils/Forcing/ForcingNoise.h index d3d8139253..6c827f5467 100644 --- a/library/SolverUtils/Forcing/ForcingNoise.h +++ b/library/SolverUtils/Forcing/ForcingNoise.h @@ -43,9 +43,7 @@ #include <SolverUtils/Forcing/Forcing.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class ForcingNoise : public Forcing { @@ -69,12 +67,12 @@ public: static std::string className; protected: - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - SOLVER_UTILS_EXPORT virtual void v_Apply( + SOLVER_UTILS_EXPORT void v_Apply( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -83,7 +81,7 @@ protected: private: ForcingNoise(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation); - virtual ~ForcingNoise(void){}; + ~ForcingNoise(void) override{}; int m_index; int m_updateFreq; @@ -91,7 +89,6 @@ private: NekDouble m_noise; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/Forcing/ForcingProgrammatic.cpp b/library/SolverUtils/Forcing/ForcingProgrammatic.cpp index 97e49928d1..f034044ca7 100644 --- a/library/SolverUtils/Forcing/ForcingProgrammatic.cpp +++ b/library/SolverUtils/Forcing/ForcingProgrammatic.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/Forcing/ForcingProgrammatic.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string ForcingProgrammatic::className = @@ -87,5 +85,4 @@ void ForcingProgrammatic::v_Apply( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/Forcing/ForcingProgrammatic.h b/library/SolverUtils/Forcing/ForcingProgrammatic.h index 248c5a8ba9..5fa6ba1122 100644 --- a/library/SolverUtils/Forcing/ForcingProgrammatic.h +++ b/library/SolverUtils/Forcing/ForcingProgrammatic.h @@ -43,9 +43,7 @@ #include <SolverUtils/Forcing/Forcing.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { // Forward declaration class ForcingProgrammatic; @@ -79,12 +77,12 @@ public: SOLVER_UTILS_EXPORT Array<OneD, Array<OneD, NekDouble>> &UpdateForces(); protected: - SOLVER_UTILS_EXPORT virtual void v_InitObject( + SOLVER_UTILS_EXPORT void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - SOLVER_UTILS_EXPORT virtual void v_Apply( + SOLVER_UTILS_EXPORT void v_Apply( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -93,10 +91,9 @@ protected: private: ForcingProgrammatic(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<EquationSystem> &pEquation); - virtual ~ForcingProgrammatic(void){}; + ~ForcingProgrammatic(void) override{}; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/MMFSystem.cpp b/library/SolverUtils/MMFSystem.cpp index 5947f9a7fe..a3eb72fd66 100644 --- a/library/SolverUtils/MMFSystem.cpp +++ b/library/SolverUtils/MMFSystem.cpp @@ -35,9 +35,7 @@ #include <MultiRegions/AssemblyMap/AssemblyMapDG.h> #include <SolverUtils/MMFSystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { MMFSystem::MMFSystem(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -150,21 +148,37 @@ void MMFSystem::SetUpMovingFrames( m_session->LoadParameter("MMFCircCentreY", m_MMFfactors[3], 0.0); if (conn == "TangentX") + { m_MMFdir = SpatialDomains::eTangentX; + } if (conn == "TangentY") + { m_MMFdir = SpatialDomains::eTangentY; + } if (conn == "TangentXY") + { m_MMFdir = SpatialDomains::eTangentXY; + } if (conn == "TangentZ") + { m_MMFdir = SpatialDomains::eTangentZ; + } if (conn == "TangentCircular") + { m_MMFdir = SpatialDomains::eTangentCircular; + } if (conn == "TangentIrregular") + { m_MMFdir = SpatialDomains::eTangentIrregular; + } if (conn == "TangentNonconvex") + { m_MMFdir = SpatialDomains::eTangentNonconvex; + } if (conn == "LOCAL") + { m_MMFdir = SpatialDomains::eLOCAL; + } // Get Tangetn vectors from GeomFactors2D, Orthonormalized = true m_fields[0]->GetMovingFrames(m_MMFdir, m_MMFfactors, m_movingframes); @@ -2502,5 +2516,4 @@ void MMFSystem::v_GenerateSummary(SummaryList &s) AddSummaryItem(s, "MMFCircCentreY", m_MMFfactors[3]); } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/MMFSystem.h b/library/SolverUtils/MMFSystem.h index 26aa13e21c..cc1997f664 100644 --- a/library/SolverUtils/MMFSystem.h +++ b/library/SolverUtils/MMFSystem.h @@ -37,9 +37,7 @@ #include <SolverUtils/UnsteadySystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { enum SurfaceType @@ -162,9 +160,9 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - SOLVER_UTILS_EXPORT virtual ~MMFSystem(); + SOLVER_UTILS_EXPORT ~MMFSystem() override; - SOLVER_UTILS_EXPORT virtual void v_GenerateSummary(SummaryList &s) override; + SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s) override; SOLVER_UTILS_EXPORT void MMFInitObject( const Array<OneD, const Array<OneD, NekDouble>> &Anisotropy, @@ -381,7 +379,6 @@ protected: // Shared pointer to an MMFSystem class typedef std::shared_ptr<MMFSystem> MMFSystemSharedPtr; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/RiemannSolvers/RiemannSolver.cpp b/library/SolverUtils/RiemannSolvers/RiemannSolver.cpp index f2c32a28ab..6974396aeb 100644 --- a/library/SolverUtils/RiemannSolvers/RiemannSolver.cpp +++ b/library/SolverUtils/RiemannSolvers/RiemannSolver.cpp @@ -57,9 +57,7 @@ using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** * Retrieves the singleton instance of the Riemann solver factory. @@ -553,5 +551,4 @@ void RiemannSolver::v_CalcFluxJacobian( NEKERROR(ErrorUtil::efatal, "v_CalcFluxJacobian not specified."); } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/RiemannSolvers/UpwindSolver.cpp b/library/SolverUtils/RiemannSolvers/UpwindSolver.cpp index 7c06021d76..4f192e5234 100644 --- a/library/SolverUtils/RiemannSolvers/UpwindSolver.cpp +++ b/library/SolverUtils/RiemannSolvers/UpwindSolver.cpp @@ -36,9 +36,7 @@ #include <SolverUtils/RiemannSolvers/UpwindSolver.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string UpwindSolver::solverName = GetRiemannSolverFactory().RegisterCreatorFunction( @@ -103,5 +101,4 @@ void UpwindSolver::v_Solve(const int nDim, } } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/RiemannSolvers/UpwindSolver.h b/library/SolverUtils/RiemannSolvers/UpwindSolver.h index ecc52ed798..602f1ce308 100644 --- a/library/SolverUtils/RiemannSolvers/UpwindSolver.h +++ b/library/SolverUtils/RiemannSolvers/UpwindSolver.h @@ -38,9 +38,7 @@ #include <SolverUtils/RiemannSolvers/RiemannSolver.h> #include <SolverUtils/SolverUtilsDeclspec.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class UpwindSolver : public RiemannSolver { @@ -56,12 +54,11 @@ public: protected: UpwindSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_Solve( - const int nDim, const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override final; + void v_Solve(const int nDim, + const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) final; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SolverUtils/SolverUtils.hpp b/library/SolverUtils/SolverUtils.hpp index a37743aa4d..d27e9fad85 100644 --- a/library/SolverUtils/SolverUtils.hpp +++ b/library/SolverUtils/SolverUtils.hpp @@ -32,9 +32,7 @@ // /////////////////////////////////////////////////////////////////////////////// -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { enum EvolutionOperatorType { @@ -45,5 +43,4 @@ enum EvolutionOperatorType eSkewSymmetric, eAdaptiveSFD }; -} -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/UnsteadySystem.cpp b/library/SolverUtils/UnsteadySystem.cpp index 16542b2fd7..f12f7a5062 100644 --- a/library/SolverUtils/UnsteadySystem.cpp +++ b/library/SolverUtils/UnsteadySystem.cpp @@ -43,9 +43,7 @@ using namespace std; #include <MultiRegions/AssemblyMap/AssemblyMapDG.h> #include <SolverUtils/UnsteadySystem.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string UnsteadySystem::cmdSetStartTime = LibUtilities::SessionReader::RegisterCmdLineArgument( @@ -211,7 +209,7 @@ LibUtilities::TimeIntegrationSchemeOperators &UnsteadySystem:: */ void UnsteadySystem::v_DoSolve() { - ASSERTL0(m_intScheme != 0, "No time integration scheme."); + ASSERTL0(m_intScheme != nullptr, "No time integration scheme."); int i = 1; int nvariables = 0; @@ -965,5 +963,4 @@ void UnsteadySystem::DoDummyProjection( } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/library/SolverUtils/UnsteadySystem.h b/library/SolverUtils/UnsteadySystem.h index a5920ba402..a3827d6ada 100644 --- a/library/SolverUtils/UnsteadySystem.h +++ b/library/SolverUtils/UnsteadySystem.h @@ -39,16 +39,14 @@ #include <SolverUtils/EquationSystem.h> #include <SolverUtils/Filters/Filter.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /// Base class for unsteady solvers. class UnsteadySystem : public EquationSystem { public: /// Destructor - SOLVER_UTILS_EXPORT virtual ~UnsteadySystem(); + SOLVER_UTILS_EXPORT ~UnsteadySystem() override; /// Calculate the larger time-step mantaining the problem stable. SOLVER_UTILS_EXPORT NekDouble @@ -136,11 +134,10 @@ protected: const SpatialDomains::MeshGraphSharedPtr &pGraph); /// Init object for UnsteadySystem class. - SOLVER_UTILS_EXPORT virtual void v_InitObject( - bool DeclareField = true) override; + SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField = true) override; /// Solves an unsteady problem. - SOLVER_UTILS_EXPORT virtual void v_DoSolve() override; + SOLVER_UTILS_EXPORT void v_DoSolve() override; /// Print Status Information SOLVER_UTILS_EXPORT virtual void v_PrintStatusInformation( @@ -151,11 +148,11 @@ protected: const NekDouble intTime); /// Sets up initial conditions. - SOLVER_UTILS_EXPORT virtual void v_DoInitialise( + SOLVER_UTILS_EXPORT void v_DoInitialise( bool dumpInitialConditions = true) override; /// Print a summary of time stepping parameters. - SOLVER_UTILS_EXPORT virtual void v_GenerateSummary(SummaryList &s) override; + SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s) override; SOLVER_UTILS_EXPORT virtual NekDouble v_GetTimeStep( const Array<OneD, const Array<OneD, NekDouble>> &inarray); @@ -197,7 +194,6 @@ private: bool CheckSteadyState(int step, const NekDouble &totCPUTime = 0.0); }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif diff --git a/library/SpatialDomains/Conditions.cpp b/library/SpatialDomains/Conditions.cpp index f55d2e0529..8e835090ab 100644 --- a/library/SpatialDomains/Conditions.cpp +++ b/library/SpatialDomains/Conditions.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** * Constructor - collective on the session's communicator. @@ -96,7 +94,9 @@ std::set<int> ShareAllBoundaryIDs( auto it = boundaryRegions.begin(), end = boundaryRegions.end(); int i = 0; for (; it != end; ++it, ++i) + { ids.insert(it->first); + } int np = comm->GetSize(); int ip = comm->GetRank(); @@ -151,16 +151,22 @@ std::set<int> ShareAllBoundaryIDs( // Bcast the size int nIds; if (ip == 0) + { nIds = ids.size(); + } comm->Bcast(nIds, 0); // Bcast the data Array<OneD, int> idsArray; if (ip == 0) + { idsArray = ToArray(ids); + } else + { idsArray = Array<OneD, int>(nIds); + } comm->Bcast(idsArray, 0); @@ -805,5 +811,4 @@ void BoundaryConditions::ReadBoundaryConditions(TiXmlElement *conditions) regionElement = regionElement->NextSiblingElement("REGION"); } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Curve.hpp b/library/SpatialDomains/Curve.hpp index b528d6ab0d..bbc94a432f 100644 --- a/library/SpatialDomains/Curve.hpp +++ b/library/SpatialDomains/Curve.hpp @@ -38,9 +38,7 @@ #include <SpatialDomains/PointGeom.h> #include <unordered_map> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { struct Curve { @@ -59,7 +57,6 @@ struct Curve typedef std::shared_ptr<Curve> CurveSharedPtr; typedef std::unordered_map<int, CurveSharedPtr> CurveMap; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/GeomFactors.cpp b/library/SpatialDomains/GeomFactors.cpp index 2c2f5f3fa8..780ffedd01 100644 --- a/library/SpatialDomains/GeomFactors.cpp +++ b/library/SpatialDomains/GeomFactors.cpp @@ -35,9 +35,7 @@ #include <LibUtilities/Foundations/Interp.h> #include <SpatialDomains/GeomFactors.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** * @class GeomFactors @@ -946,5 +944,4 @@ void GeomFactors::VectorCrossProd( Vmath::Vvtvm(nq, v1[0], 1, v2[1], 1, temp, 1, v3[2], 1); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/GeomFactors.h b/library/SpatialDomains/GeomFactors.h index 8aea730462..8a92ed4273 100644 --- a/library/SpatialDomains/GeomFactors.h +++ b/library/SpatialDomains/GeomFactors.h @@ -44,9 +44,7 @@ #include <StdRegions/StdExpansion.h> #include <StdRegions/StdRegions.hpp> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { // Forward declarations class GeomFactors; @@ -349,7 +347,6 @@ StdRegions::StdExpansionSharedPtr &GeomFactors::GetXmap(void) return m_xmap; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/Geometry.cpp b/library/SpatialDomains/Geometry.cpp index 6d00655642..b99c5c8569 100644 --- a/library/SpatialDomains/Geometry.cpp +++ b/library/SpatialDomains/Geometry.cpp @@ -40,9 +40,7 @@ #include <SpatialDomains/Geometry1D.h> #include <SpatialDomains/Geometry2D.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { // static class property @@ -586,5 +584,4 @@ bool Geometry::ClampLocCoords(Array<OneD, NekDouble> &locCoord, NekDouble tol) return clamp; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Geometry.h b/library/SpatialDomains/Geometry.h index 7214d9bb88..39678b128c 100644 --- a/library/SpatialDomains/Geometry.h +++ b/library/SpatialDomains/Geometry.h @@ -44,10 +44,7 @@ #include <array> #include <unordered_map> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { class Geometry; // Forward declaration for typedef. @@ -697,7 +694,6 @@ inline void Geometry::SetUpCoeffs(const int nCoeffs) } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_GEOMETRY_H diff --git a/library/SpatialDomains/Geometry0D.cpp b/library/SpatialDomains/Geometry0D.cpp index 75d2aaeaca..ed2678b456 100644 --- a/library/SpatialDomains/Geometry0D.cpp +++ b/library/SpatialDomains/Geometry0D.cpp @@ -34,9 +34,7 @@ //////////////////////////////////////////////////////////////////////////////// #include <SpatialDomains/Geometry0D.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { Geometry0D::Geometry0D() : Geometry() @@ -66,5 +64,4 @@ bool Geometry0D::v_ContainsPoint(const Array<OneD, const NekDouble> &gloCoord, return false; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Geometry0D.h b/library/SpatialDomains/Geometry0D.h index de370bba2f..6e6ed9d049 100644 --- a/library/SpatialDomains/Geometry0D.h +++ b/library/SpatialDomains/Geometry0D.h @@ -38,9 +38,7 @@ #include <SpatialDomains/Geometry.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class Geometry0D; @@ -55,18 +53,17 @@ class Geometry0D : public Geometry public: SPATIAL_DOMAINS_EXPORT Geometry0D(); SPATIAL_DOMAINS_EXPORT Geometry0D(const int coordim); - SPATIAL_DOMAINS_EXPORT virtual ~Geometry0D(); + SPATIAL_DOMAINS_EXPORT ~Geometry0D() override; SPATIAL_DOMAINS_EXPORT static const int kDim = 0; protected: - virtual bool v_ContainsPoint(const Array<OneD, const NekDouble> &gloCoord, - Array<OneD, NekDouble> &locCoord, - NekDouble tol, NekDouble &dist) override; - virtual int v_GetShapeDim() const override; + bool v_ContainsPoint(const Array<OneD, const NekDouble> &gloCoord, + Array<OneD, NekDouble> &locCoord, NekDouble tol, + NekDouble &dist) override; + int v_GetShapeDim() const override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_GEOMETRY1D_H diff --git a/library/SpatialDomains/Geometry1D.cpp b/library/SpatialDomains/Geometry1D.cpp index 47a6f6aeaf..ede05f6ee3 100644 --- a/library/SpatialDomains/Geometry1D.cpp +++ b/library/SpatialDomains/Geometry1D.cpp @@ -34,9 +34,7 @@ //////////////////////////////////////////////////////////////////////////////// #include <SpatialDomains/Geometry1D.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { Geometry1D::Geometry1D() @@ -96,5 +94,4 @@ NekDouble Geometry1D::v_GetLocCoords(const Array<OneD, const NekDouble> &coords, } return dist; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Geometry1D.h b/library/SpatialDomains/Geometry1D.h index fac21788fe..feb597895d 100644 --- a/library/SpatialDomains/Geometry1D.h +++ b/library/SpatialDomains/Geometry1D.h @@ -40,9 +40,7 @@ #include <SpatialDomains/SpatialDomainsDeclspec.h> #include <StdRegions/StdExpansion1D.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class Geometry1D; @@ -56,17 +54,16 @@ class Geometry1D : public Geometry public: SPATIAL_DOMAINS_EXPORT Geometry1D(); SPATIAL_DOMAINS_EXPORT Geometry1D(const int coordim); - SPATIAL_DOMAINS_EXPORT virtual ~Geometry1D(); + SPATIAL_DOMAINS_EXPORT ~Geometry1D() override; SPATIAL_DOMAINS_EXPORT static const int kDim = 1; protected: - virtual int v_GetShapeDim() const override; - virtual NekDouble v_GetLocCoords(const Array<OneD, const NekDouble> &coords, - Array<OneD, NekDouble> &Lcoords) override; + int v_GetShapeDim() const override; + NekDouble v_GetLocCoords(const Array<OneD, const NekDouble> &coords, + Array<OneD, NekDouble> &Lcoords) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_GEOMETRY1D_H diff --git a/library/SpatialDomains/Geometry2D.cpp b/library/SpatialDomains/Geometry2D.cpp index 3a249d3b16..f191aa7e8e 100644 --- a/library/SpatialDomains/Geometry2D.cpp +++ b/library/SpatialDomains/Geometry2D.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { Geometry2D::Geometry2D() @@ -637,5 +635,4 @@ void Geometry2D::v_CalculateInverseIsoParam() m_invIsoParam[1][1] = m_isoParameter[0][1] * Jac; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Geometry2D.h b/library/SpatialDomains/Geometry2D.h index 91bbaa10e9..c31f255c88 100644 --- a/library/SpatialDomains/Geometry2D.h +++ b/library/SpatialDomains/Geometry2D.h @@ -42,10 +42,7 @@ #include <SpatialDomains/Geometry.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { class Geometry0D; @@ -70,7 +67,7 @@ class Geometry2D : public Geometry public: SPATIAL_DOMAINS_EXPORT Geometry2D(); SPATIAL_DOMAINS_EXPORT Geometry2D(const int coordim, CurveSharedPtr curve); - SPATIAL_DOMAINS_EXPORT virtual ~Geometry2D(); + SPATIAL_DOMAINS_EXPORT ~Geometry2D() override; SPATIAL_DOMAINS_EXPORT static const int kDim = 2; SPATIAL_DOMAINS_EXPORT CurveSharedPtr GetCurve() @@ -86,9 +83,9 @@ protected: Array<OneD, int> m_manifold; Array<OneD, Array<OneD, NekDouble>> m_edgeNormal; - SPATIAL_DOMAINS_EXPORT virtual NekDouble v_GetLocCoords( - const Array<OneD, const NekDouble> &coords, - Array<OneD, NekDouble> &Lcoords) override; + SPATIAL_DOMAINS_EXPORT NekDouble + v_GetLocCoords(const Array<OneD, const NekDouble> &coords, + Array<OneD, NekDouble> &Lcoords) override; void NewtonIterationForLocCoord(const Array<OneD, const NekDouble> &coords, const Array<OneD, const NekDouble> &ptsx, @@ -97,24 +94,22 @@ protected: NekDouble &dist); void NewtonIterationForLocCoord(const Array<OneD, const NekDouble> &coords, Array<OneD, NekDouble> &Lcoords); - virtual void v_CalculateInverseIsoParam() override; - virtual int v_AllLeftCheck( - const Array<OneD, const NekDouble> &gloCoord) override; + void v_CalculateInverseIsoParam() override; + int v_AllLeftCheck(const Array<OneD, const NekDouble> &gloCoord) override; //--------------------------------------- // Helper functions //--------------------------------------- - virtual int v_GetShapeDim() const override; - virtual PointGeomSharedPtr v_GetVertex(int i) const override; - virtual Geometry1DSharedPtr v_GetEdge(int i) const override; - virtual int v_GetNumVerts() const override; - virtual int v_GetNumEdges() const override; - virtual StdRegions::Orientation v_GetEorient(const int i) const override; - virtual NekDouble v_FindDistance(const Array<OneD, const NekDouble> &xs, - Array<OneD, NekDouble> &xi) override; + int v_GetShapeDim() const override; + PointGeomSharedPtr v_GetVertex(int i) const override; + Geometry1DSharedPtr v_GetEdge(int i) const override; + int v_GetNumVerts() const override; + int v_GetNumEdges() const override; + StdRegions::Orientation v_GetEorient(const int i) const override; + NekDouble v_FindDistance(const Array<OneD, const NekDouble> &xs, + Array<OneD, NekDouble> &xi) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_GEOMETRY2D_H diff --git a/library/SpatialDomains/Geometry3D.cpp b/library/SpatialDomains/Geometry3D.cpp index f324ccd95c..fcfdb5257d 100644 --- a/library/SpatialDomains/Geometry3D.cpp +++ b/library/SpatialDomains/Geometry3D.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { Geometry3D::Geometry3D() @@ -593,5 +591,4 @@ void Geometry3D::v_CalculateInverseIsoParam() } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Geometry3D.h b/library/SpatialDomains/Geometry3D.h index 9a484fc72e..91f2a1a9a9 100644 --- a/library/SpatialDomains/Geometry3D.h +++ b/library/SpatialDomains/Geometry3D.h @@ -42,10 +42,7 @@ #include <SpatialDomains/Geometry1D.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { class Geometry2D; @@ -69,7 +66,7 @@ class Geometry3D : public Geometry public: SPATIAL_DOMAINS_EXPORT Geometry3D(); SPATIAL_DOMAINS_EXPORT Geometry3D(const int coordim); - SPATIAL_DOMAINS_EXPORT virtual ~Geometry3D(); + SPATIAL_DOMAINS_EXPORT ~Geometry3D() override; //--------------------------------------- // Helper functions @@ -89,9 +86,9 @@ protected: // 3D Geometry Methods //--------------------------------------- - SPATIAL_DOMAINS_EXPORT virtual NekDouble v_GetLocCoords( - const Array<OneD, const NekDouble> &coords, - Array<OneD, NekDouble> &Lcoords) override; + SPATIAL_DOMAINS_EXPORT NekDouble + v_GetLocCoords(const Array<OneD, const NekDouble> &coords, + Array<OneD, NekDouble> &Lcoords) override; void NewtonIterationForLocCoord(const Array<OneD, const NekDouble> &coords, const Array<OneD, const NekDouble> &ptsx, @@ -102,28 +99,26 @@ protected: void NewtonIterationForLocCoord(const Array<OneD, const NekDouble> &coords, Array<OneD, NekDouble> &Lcoords); - virtual void v_FillGeom() override; - virtual NekDouble v_GetCoord( - const int i, const Array<OneD, const NekDouble> &Lcoord) override; - virtual void v_CalculateInverseIsoParam() override; - virtual int v_AllLeftCheck( - const Array<OneD, const NekDouble> &gloCoord) override; + void v_FillGeom() override; + NekDouble v_GetCoord(const int i, + const Array<OneD, const NekDouble> &Lcoord) override; + void v_CalculateInverseIsoParam() override; + int v_AllLeftCheck(const Array<OneD, const NekDouble> &gloCoord) override; //--------------------------------------- // Helper functions //--------------------------------------- - virtual int v_GetShapeDim() const override; - virtual int v_GetNumVerts() const override; - virtual int v_GetNumEdges() const override; - virtual int v_GetNumFaces() const override; - virtual PointGeomSharedPtr v_GetVertex(int i) const override; - virtual Geometry1DSharedPtr v_GetEdge(int i) const override; - virtual Geometry2DSharedPtr v_GetFace(int i) const override; - virtual StdRegions::Orientation v_GetEorient(const int i) const override; - virtual StdRegions::Orientation v_GetForient(const int i) const override; + int v_GetShapeDim() const override; + int v_GetNumVerts() const override; + int v_GetNumEdges() const override; + int v_GetNumFaces() const override; + PointGeomSharedPtr v_GetVertex(int i) const override; + Geometry1DSharedPtr v_GetEdge(int i) const override; + Geometry2DSharedPtr v_GetFace(int i) const override; + StdRegions::Orientation v_GetEorient(const int i) const override; + StdRegions::Orientation v_GetForient(const int i) const override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_GEOMETRY3D_H diff --git a/library/SpatialDomains/HexGeom.cpp b/library/SpatialDomains/HexGeom.cpp index 1be5e004b0..df3e4dc726 100644 --- a/library/SpatialDomains/HexGeom.cpp +++ b/library/SpatialDomains/HexGeom.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { const unsigned int HexGeom::VertexEdgeConnectivity[8][3] = { @@ -828,5 +826,4 @@ void HexGeom::SetUpXmap() m_xmap = MemoryManager<StdRegions::StdHexExp>::AllocateSharedPtr(A, B, C); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/HexGeom.h b/library/SpatialDomains/HexGeom.h index a6225c04dc..af59c5f19d 100644 --- a/library/SpatialDomains/HexGeom.h +++ b/library/SpatialDomains/HexGeom.h @@ -38,9 +38,7 @@ #include <SpatialDomains/Geometry3D.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class QuadGeom; @@ -51,7 +49,7 @@ class HexGeom : public Geometry3D public: SPATIAL_DOMAINS_EXPORT HexGeom(); SPATIAL_DOMAINS_EXPORT HexGeom(int id, const QuadGeomSharedPtr faces[]); - SPATIAL_DOMAINS_EXPORT ~HexGeom(); + SPATIAL_DOMAINS_EXPORT ~HexGeom() override; SPATIAL_DOMAINS_EXPORT static const int kNverts = 8; SPATIAL_DOMAINS_EXPORT static const int kNedges = 12; @@ -61,15 +59,14 @@ public: SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType; protected: - virtual void v_GenGeomFactors() override; - virtual int v_GetVertexEdgeMap(const int i, const int j) const override; - virtual int v_GetVertexFaceMap(const int i, const int j) const override; - virtual int v_GetEdgeFaceMap(const int i, const int j) const override; - virtual int v_GetEdgeNormalToFaceVert(const int i, - const int j) const override; - virtual int v_GetDir(const int faceidx, const int facedir) const override; - virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; - virtual void v_Setup() override; + void v_GenGeomFactors() override; + int v_GetVertexEdgeMap(const int i, const int j) const override; + int v_GetVertexFaceMap(const int i, const int j) const override; + int v_GetEdgeFaceMap(const int i, const int j) const override; + int v_GetEdgeNormalToFaceVert(const int i, const int j) const override; + int v_GetDir(const int faceidx, const int facedir) const override; + void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; + void v_Setup() override; private: void SetUpLocalEdges(); @@ -86,7 +83,6 @@ private: typedef std::shared_ptr<HexGeom> HexGeomSharedPtr; typedef std::map<int, HexGeomSharedPtr> HexGeomMap; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshComponents.h b/library/SpatialDomains/MeshComponents.h index 05e745fe6a..9f5557be82 100644 --- a/library/SpatialDomains/MeshComponents.h +++ b/library/SpatialDomains/MeshComponents.h @@ -41,9 +41,7 @@ #include <SpatialDomains/SpatialDomainsDeclspec.h> #include <set> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { // ------------------------------------------------------------------------ /// Structure holding graphvertexobject id and local element facet id @@ -105,7 +103,6 @@ protected: private: }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_MESHCOMPONENTS_H diff --git a/library/SpatialDomains/MeshEntities.hpp b/library/SpatialDomains/MeshEntities.hpp index 75080686d1..0b6b846ff9 100644 --- a/library/SpatialDomains/MeshEntities.hpp +++ b/library/SpatialDomains/MeshEntities.hpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/PointsType.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { // Note: the following structs are defined using 64 bit ints so // that the structs are memory aligned in both 64 bit and 32 @@ -141,6 +139,5 @@ struct MeshEntity std::vector<unsigned int> list; bool ghost; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshGraph.cpp b/library/SpatialDomains/MeshGraph.cpp index be6a37917a..add4c26048 100644 --- a/library/SpatialDomains/MeshGraph.cpp +++ b/library/SpatialDomains/MeshGraph.cpp @@ -68,9 +68,7 @@ namespace bg = boost::geometry; using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** @@ -2856,7 +2854,7 @@ void MeshGraph::ReadRefinementInfo() "REFINEMENT section of input for the " "SPHERE TYPE"); - coord2Vector.empty(); + coord2Vector.clear(); } else { @@ -2909,7 +2907,7 @@ void MeshGraph::ReadRefinementInfo() n_modesRef = boost::lexical_cast<int>(numModesStr); } nModesVector.push_back(n_modesRef); - nPointsVector.empty(); // No points. + nPointsVector.clear(); // No points. } // Instantiate an object @@ -4166,5 +4164,4 @@ void MeshGraph::SetDomainRange(NekDouble xmin, NekDouble xmax, NekDouble ymin, } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshGraph.h b/library/SpatialDomains/MeshGraph.h index 36e765a25b..8f71a657ea 100644 --- a/library/SpatialDomains/MeshGraph.h +++ b/library/SpatialDomains/MeshGraph.h @@ -55,9 +55,7 @@ class TiXmlDocument; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { typedef std::map<int, std::pair<LibUtilities::ShapeType, std::vector<int>>> CompositeDescriptor; @@ -419,11 +417,15 @@ public: { auto it1 = m_triGeoms.find(gID); if (it1 != m_triGeoms.end()) + { return it1->second; + } auto it2 = m_quadGeoms.find(gID); if (it2 != m_quadGeoms.end()) + { return it2->second; + } return Geometry2DSharedPtr(); }; @@ -609,6 +611,6 @@ inline bool MeshGraph::ExpansionInfoDefined(const std::string var) return m_expansionMapShPtrMap.count(var); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains + #endif diff --git a/library/SpatialDomains/MeshGraphHDF5.cpp b/library/SpatialDomains/MeshGraphHDF5.cpp index 67569dd81c..c837f97533 100644 --- a/library/SpatialDomains/MeshGraphHDF5.cpp +++ b/library/SpatialDomains/MeshGraphHDF5.cpp @@ -54,9 +54,7 @@ using namespace std; using namespace Nektar::LibUtilities; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /// Version of the Nektar++ HDF5 geometry format, which is embedded into the @@ -1660,7 +1658,9 @@ void MeshGraphHDF5::v_WriteGeometry( } if (m_movement) + { m_movement->WriteMovement(root); + } doc->SaveFile(filenameXml); @@ -1707,5 +1707,4 @@ void MeshGraphHDF5::v_WriteGeometry( WriteDomain(m_domain); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshGraphHDF5.h b/library/SpatialDomains/MeshGraphHDF5.h index 286d55bc08..07b2b97358 100644 --- a/library/SpatialDomains/MeshGraphHDF5.h +++ b/library/SpatialDomains/MeshGraphHDF5.h @@ -40,9 +40,7 @@ #include <SpatialDomains/MeshEntities.hpp> #include <SpatialDomains/MeshGraph.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class MeshGraphHDF5 : public MeshGraph @@ -52,7 +50,7 @@ public: { } - virtual ~MeshGraphHDF5() + ~MeshGraphHDF5() override { } @@ -64,13 +62,13 @@ public: static std::string className, cmdSwitch; protected: - SPATIAL_DOMAINS_EXPORT virtual void v_WriteGeometry( + SPATIAL_DOMAINS_EXPORT void v_WriteGeometry( const std::string &outfilename, bool defaultExp = false, const LibUtilities::FieldMetaDataMap &metadata = LibUtilities::NullFieldMetaDataMap) override; - SPATIAL_DOMAINS_EXPORT virtual void v_ReadGeometry( + SPATIAL_DOMAINS_EXPORT void v_ReadGeometry( LibUtilities::DomainRangeShPtr rng, bool fillGraph) override; - SPATIAL_DOMAINS_EXPORT virtual void v_PartitionMesh( + SPATIAL_DOMAINS_EXPORT void v_PartitionMesh( LibUtilities::SessionReaderSharedPtr session) override; private: @@ -117,7 +115,6 @@ private: static const unsigned int FORMAT_VERSION; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshGraphXml.cpp b/library/SpatialDomains/MeshGraphXml.cpp index d0993b6442..d224068fb9 100644 --- a/library/SpatialDomains/MeshGraphXml.cpp +++ b/library/SpatialDomains/MeshGraphXml.cpp @@ -50,9 +50,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { std::string MeshGraphXml::className = @@ -949,7 +947,7 @@ void MeshGraphXml::v_ReadCurves() void MeshGraphXml::ReadDomain() { - TiXmlElement *domain = NULL; + TiXmlElement *domain = nullptr; /// Look for data in DOMAIN block. domain = m_xmlGeom->FirstChildElement("DOMAIN"); @@ -1287,7 +1285,7 @@ void MeshGraphXml::ReadElements() void MeshGraphXml::v_ReadElements1D() { - TiXmlElement *field = NULL; + TiXmlElement *field = nullptr; /// Look for elements in ELEMENT block. field = m_xmlGeom->FirstChildElement("ELEMENT"); @@ -1858,7 +1856,7 @@ void MeshGraphXml::v_ReadElements3D() void MeshGraphXml::ReadComposites() { - TiXmlElement *field = NULL; + TiXmlElement *field = nullptr; /// Look for elements in ELEMENT block. field = m_xmlGeom->FirstChildElement("COMPOSITE"); @@ -2803,7 +2801,9 @@ void MeshGraphXml::v_WriteGeometry( } if (m_movement) + { m_movement->WriteMovement(root); + } // Save file. doc.SaveFile(outfilename); @@ -3291,5 +3291,4 @@ CompositeOrdering MeshGraphXml::CreateCompositeOrdering() return ret; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshGraphXml.h b/library/SpatialDomains/MeshGraphXml.h index 13ad9785c3..c955ddc585 100644 --- a/library/SpatialDomains/MeshGraphXml.h +++ b/library/SpatialDomains/MeshGraphXml.h @@ -39,9 +39,7 @@ #include <SpatialDomains/MeshGraph.h> #include <SpatialDomains/MeshPartition.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class MeshGraphXml : public MeshGraph @@ -51,7 +49,7 @@ public: { } - virtual ~MeshGraphXml() + ~MeshGraphXml() override { } @@ -70,13 +68,13 @@ protected: // some of these functions are going to be virtual because they will be // inherited by the XmlCompressed version - SPATIAL_DOMAINS_EXPORT virtual void v_WriteGeometry( + SPATIAL_DOMAINS_EXPORT void v_WriteGeometry( const std::string &outfilename, bool defaultExp = false, const LibUtilities::FieldMetaDataMap &metadata = LibUtilities::NullFieldMetaDataMap) override; - SPATIAL_DOMAINS_EXPORT virtual void v_ReadGeometry( + SPATIAL_DOMAINS_EXPORT void v_ReadGeometry( LibUtilities::DomainRangeShPtr rng, bool fillGraph) override; - SPATIAL_DOMAINS_EXPORT virtual void v_PartitionMesh( + SPATIAL_DOMAINS_EXPORT void v_PartitionMesh( LibUtilities::SessionReaderSharedPtr session) override; virtual void v_ReadVertices(); @@ -124,7 +122,6 @@ protected: CompositeOrdering CreateCompositeOrdering(); }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshGraphXmlCompressed.cpp b/library/SpatialDomains/MeshGraphXmlCompressed.cpp index 5586254dca..95b9415479 100644 --- a/library/SpatialDomains/MeshGraphXmlCompressed.cpp +++ b/library/SpatialDomains/MeshGraphXmlCompressed.cpp @@ -56,9 +56,7 @@ #include <tinyxml.h> using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { std::string MeshGraphXmlCompressed::className = @@ -619,7 +617,7 @@ void MeshGraphXmlCompressed::v_ReadFaces() void MeshGraphXmlCompressed::v_ReadElements1D() { - TiXmlElement *field = NULL; + TiXmlElement *field = nullptr; /// Look for elements in ELEMENT block. field = m_xmlGeom->FirstChildElement("ELEMENT"); @@ -1404,5 +1402,4 @@ void MeshGraphXmlCompressed::v_WriteCurves(TiXmlElement *geomTag, geomTag->LinkEndChild(curveTag); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshGraphXmlCompressed.h b/library/SpatialDomains/MeshGraphXmlCompressed.h index 0c98c8c6cb..8c8c864d6f 100644 --- a/library/SpatialDomains/MeshGraphXmlCompressed.h +++ b/library/SpatialDomains/MeshGraphXmlCompressed.h @@ -36,9 +36,7 @@ #include "MeshGraphXml.h" -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class MeshGraphXmlCompressed : public MeshGraphXml @@ -48,7 +46,7 @@ public: { } - virtual ~MeshGraphXmlCompressed() + ~MeshGraphXmlCompressed() override { } @@ -60,33 +58,28 @@ public: static std::string className; protected: - virtual void v_ReadVertices() override; - virtual void v_ReadCurves() override; + void v_ReadVertices() override; + void v_ReadCurves() override; - virtual void v_ReadEdges() override; - virtual void v_ReadFaces() override; + void v_ReadEdges() override; + void v_ReadFaces() override; - virtual void v_ReadElements1D() override; - virtual void v_ReadElements2D() override; - virtual void v_ReadElements3D() override; + void v_ReadElements1D() override; + void v_ReadElements2D() override; + void v_ReadElements3D() override; - virtual void v_WriteVertices(TiXmlElement *geomTag, - PointGeomMap &verts) override; - virtual void v_WriteEdges(TiXmlElement *geomTag, - SegGeomMap &edges) override; - virtual void v_WriteTris(TiXmlElement *faceTag, TriGeomMap &tris) override; - virtual void v_WriteQuads(TiXmlElement *faceTag, - QuadGeomMap &quads) override; - virtual void v_WriteHexs(TiXmlElement *elmtTag, HexGeomMap &hexs) override; - virtual void v_WritePrisms(TiXmlElement *elmtTag, - PrismGeomMap &pris) override; - virtual void v_WritePyrs(TiXmlElement *elmtTag, PyrGeomMap &pyrs) override; - virtual void v_WriteTets(TiXmlElement *elmtTag, TetGeomMap &tets) override; - virtual void v_WriteCurves(TiXmlElement *geomTag, CurveMap &edges, - CurveMap &faces) override; + void v_WriteVertices(TiXmlElement *geomTag, PointGeomMap &verts) override; + void v_WriteEdges(TiXmlElement *geomTag, SegGeomMap &edges) override; + void v_WriteTris(TiXmlElement *faceTag, TriGeomMap &tris) override; + void v_WriteQuads(TiXmlElement *faceTag, QuadGeomMap &quads) override; + void v_WriteHexs(TiXmlElement *elmtTag, HexGeomMap &hexs) override; + void v_WritePrisms(TiXmlElement *elmtTag, PrismGeomMap &pris) override; + void v_WritePyrs(TiXmlElement *elmtTag, PyrGeomMap &pyrs) override; + void v_WriteTets(TiXmlElement *elmtTag, TetGeomMap &tets) override; + void v_WriteCurves(TiXmlElement *geomTag, CurveMap &edges, + CurveMap &faces) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshPartition.cpp b/library/SpatialDomains/MeshPartition.cpp index 6baad2981e..cd104e0920 100644 --- a/library/SpatialDomains/MeshPartition.cpp +++ b/library/SpatialDomains/MeshPartition.cpp @@ -62,9 +62,7 @@ #include <boost/graph/adjacency_list.hpp> #include <boost/graph/detail/edge.hpp> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { SPATIAL_DOMAINS_EXPORT MeshPartitionFactory &GetMeshPartitionFactory() @@ -963,5 +961,4 @@ int MeshPartition::CalculateEdgeWeight(LibUtilities::ShapeType elmtType, int na, return weight; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshPartition.h b/library/SpatialDomains/MeshPartition.h index bca0e7f460..ba9e0e4a1f 100644 --- a/library/SpatialDomains/MeshPartition.h +++ b/library/SpatialDomains/MeshPartition.h @@ -44,9 +44,7 @@ class TiXmlElement; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class MeshPartition; @@ -174,7 +172,6 @@ protected: typedef std::shared_ptr<MeshPartition> MeshPartitionSharedPtr; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshPartitionPtScotch.cpp b/library/SpatialDomains/MeshPartitionPtScotch.cpp index b2871d5e0a..aaa6c0033b 100644 --- a/library/SpatialDomains/MeshPartitionPtScotch.cpp +++ b/library/SpatialDomains/MeshPartitionPtScotch.cpp @@ -46,9 +46,7 @@ std::string(#scotchFunc)); \ } -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { std::string MeshPartitionPtScotch::className = @@ -91,7 +89,8 @@ void MeshPartitionPtScotch::v_PartitionGraphImpl( SCOTCH_CALL(SCOTCH_dgraphInit, (&scGraph, mpiComm->GetComm())); SCOTCH_CALL(SCOTCH_dgraphBuild, (&scGraph, 0, nVerts, nVerts, &xadj[0], &xadj[1], &vertWgt[0], - NULL, adjcy.size(), adjcy.size(), &adjcy[0], NULL, NULL)); + nullptr, adjcy.size(), adjcy.size(), &adjcy[0], nullptr, + nullptr)); SCOTCH_CALL(SCOTCH_dgraphCheck, (&scGraph)); SCOTCH_Strat strat; @@ -102,5 +101,4 @@ void MeshPartitionPtScotch::v_PartitionGraphImpl( SCOTCH_CALL(SCOTCH_dgraphPart, (&scGraph, nparts, &strat, &part[0])); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshPartitionPtScotch.h b/library/SpatialDomains/MeshPartitionPtScotch.h index a3ea97010f..8bcb7db3cc 100644 --- a/library/SpatialDomains/MeshPartitionPtScotch.h +++ b/library/SpatialDomains/MeshPartitionPtScotch.h @@ -37,9 +37,7 @@ #include <LibUtilities/Memory/NekMemoryManager.hpp> #include <SpatialDomains/MeshPartition.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class MeshPartitionPtScotch : public MeshPartition @@ -63,18 +61,18 @@ public: LibUtilities::CommSharedPtr comm, int meshDim, std::map<int, MeshEntity> element, CompositeDescriptor compMap); - virtual ~MeshPartitionPtScotch(); + ~MeshPartitionPtScotch() override; protected: - virtual void v_PartitionGraphImpl( - int &nVerts, int &nVertConds, Nektar::Array<Nektar::OneD, int> &xadj, - Nektar::Array<Nektar::OneD, int> &adjcy, - Nektar::Array<Nektar::OneD, int> &vertWgt, - Nektar::Array<Nektar::OneD, int> &vertSize, - Nektar::Array<Nektar::OneD, int> &edgeWgt, int &nparts, int &volume, - Nektar::Array<Nektar::OneD, int> &part) override final; + void v_PartitionGraphImpl(int &nVerts, int &nVertConds, + Nektar::Array<Nektar::OneD, int> &xadj, + Nektar::Array<Nektar::OneD, int> &adjcy, + Nektar::Array<Nektar::OneD, int> &vertWgt, + Nektar::Array<Nektar::OneD, int> &vertSize, + Nektar::Array<Nektar::OneD, int> &edgeWgt, + int &nparts, int &volume, + Nektar::Array<Nektar::OneD, int> &part) final; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/MeshPartitionScotch.cpp b/library/SpatialDomains/MeshPartitionScotch.cpp index 03a6f75843..73922ae299 100644 --- a/library/SpatialDomains/MeshPartitionScotch.cpp +++ b/library/SpatialDomains/MeshPartitionScotch.cpp @@ -36,9 +36,7 @@ #include <SpatialDomains/MeshPartitionScotch.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { std::string MeshPartitionScotch::className = @@ -73,8 +71,8 @@ void MeshPartitionScotch::v_PartitionGraphImpl( boost::ignore_unused(nVertConds, edgeWgt); int wgtflag = 0; - int *vwgt = 0; - int *vsize = 0; + int *vwgt = nullptr; + int *vsize = nullptr; if (vertWgt.size() > 0) { wgtflag += 1; @@ -110,18 +108,20 @@ void MeshPartitionScotch::PartGraphVKway( SCOTCH_Num *nghbtab; SCOTCH_Num commvol; - vsize2 = ((*wgtflag & 1) != 0) ? vsize : NULL; - vwgt2 = ((*wgtflag & 2) != 0) ? vwgt : NULL; + vsize2 = ((*wgtflag & 1) != 0) ? vsize : nullptr; + vwgt2 = ((*wgtflag & 2) != 0) ? vwgt : nullptr; baseval = *numflag; vertnbr = *n; edgetax = adjncy - baseval; // If no communication load data provided - if (vsize2 == NULL) + if (vsize2 == nullptr) { - if (PartGraph2(n, xadj, adjncy, vwgt2, NULL, numflag, nparts, part, + if (PartGraph2(n, xadj, adjncy, vwgt2, nullptr, numflag, nparts, part, SCOTCH_STRATQUALITY, 0.01) != 0) + { return; + } } // Will have to turn communication volumes into edge loads @@ -134,7 +134,7 @@ void MeshPartitionScotch::PartGraphVKway( edgenbr = xadj[vertnbr] - baseval; if ((edlotax = (SCOTCH_Num *)malloc(edgenbr * sizeof(SCOTCH_Num))) == - NULL) + nullptr) { return; } @@ -166,10 +166,13 @@ void MeshPartitionScotch::PartGraphVKway( free(edlotax + baseval); if (o != 0) + { return; + } } - if ((nghbtab = (SCOTCH_Num *)malloc(*nparts * sizeof(SCOTCH_Num))) == NULL) + if ((nghbtab = (SCOTCH_Num *)malloc(*nparts * sizeof(SCOTCH_Num))) == + nullptr) { return; } @@ -189,8 +192,10 @@ void MeshPartitionScotch::PartGraphVKway( partval = part[vertnum]; nghbtab[partval] = vertnum; // Do not count local neighbors in // communication volume - if (vsize2 != NULL) + if (vsize2 != nullptr) + { vsizval = vsize2[vertnum]; + } // Based traversal of edge array adjncy for (edgennd = xadj[vertnum + 1]; edgenum < edgennd; edgenum++) @@ -238,8 +243,9 @@ int MeshPartitionScotch::PartGraph2( vertnbr = *n; o = 1; // Assume something will go wrong - if (SCOTCH_graphBuild(grafdat, baseval, vertnbr, xadj, xadj + 1, vwgt, NULL, - xadj[vertnbr] - baseval, adjncy, adjwgt) == 0) + if (SCOTCH_graphBuild(grafdat, baseval, vertnbr, xadj, xadj + 1, vwgt, + nullptr, xadj[vertnbr] - baseval, adjncy, + adjwgt) == 0) { SCOTCH_stratInit(&stradat); SCOTCH_stratGraphMapBuild(&stradat, flagval, *nparts, kbalval); @@ -253,18 +259,21 @@ int MeshPartitionScotch::PartGraph2( SCOTCH_graphExit(grafdat); if (o != 0) + { return (1); + } if (baseval != 0) { // MeTiS part array is based, Scotch is not SCOTCH_Num vertnum; for (vertnum = 0; vertnum < vertnbr; vertnum++) + { part[vertnum] += baseval; + } } return (0); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/MeshPartitionScotch.h b/library/SpatialDomains/MeshPartitionScotch.h index a84840b207..fdd407bb37 100644 --- a/library/SpatialDomains/MeshPartitionScotch.h +++ b/library/SpatialDomains/MeshPartitionScotch.h @@ -44,9 +44,7 @@ #include <scotch.h> #endif -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class MeshPartitionScotch : public MeshPartition { @@ -69,16 +67,17 @@ public: LibUtilities::CommSharedPtr comm, int meshDim, std::map<int, MeshEntity> element, CompositeDescriptor compMap); - virtual ~MeshPartitionScotch(); + ~MeshPartitionScotch() override; protected: - virtual void v_PartitionGraphImpl( - int &nVerts, int &nVertConds, Nektar::Array<Nektar::OneD, int> &xadj, - Nektar::Array<Nektar::OneD, int> &adjcy, - Nektar::Array<Nektar::OneD, int> &vertWgt, - Nektar::Array<Nektar::OneD, int> &vertSize, - Nektar::Array<Nektar::OneD, int> &edgeWgt, int &nparts, int &volume, - Nektar::Array<Nektar::OneD, int> &part) override final; + void v_PartitionGraphImpl(int &nVerts, int &nVertConds, + Nektar::Array<Nektar::OneD, int> &xadj, + Nektar::Array<Nektar::OneD, int> &adjcy, + Nektar::Array<Nektar::OneD, int> &vertWgt, + Nektar::Array<Nektar::OneD, int> &vertSize, + Nektar::Array<Nektar::OneD, int> &edgeWgt, + int &nparts, int &volume, + Nektar::Array<Nektar::OneD, int> &part) final; private: void PartGraphVKway(const SCOTCH_Num *const n, const SCOTCH_Num *const xadj, @@ -98,7 +97,6 @@ private: SCOTCH_Num flagval, double kbalval); }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/SpatialDomains/Movement/InterfaceInterpolation.h b/library/SpatialDomains/Movement/InterfaceInterpolation.h index 8527960f74..9213b24cc3 100644 --- a/library/SpatialDomains/Movement/InterfaceInterpolation.h +++ b/library/SpatialDomains/Movement/InterfaceInterpolation.h @@ -39,10 +39,7 @@ #include <SpatialDomains/GeomFactors.h> #include <SpatialDomains/MeshGraph.h> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { // Fwd def to allow for inclusion in meshgraph @@ -159,7 +156,6 @@ public: typedef std::shared_ptr<InterfacePair> InterfacePairShPtr; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_INTERFACEINTERPOLATION_H diff --git a/library/SpatialDomains/Movement/Movement.cpp b/library/SpatialDomains/Movement/Movement.cpp index 9261e6a529..156864650d 100644 --- a/library/SpatialDomains/Movement/Movement.cpp +++ b/library/SpatialDomains/Movement/Movement.cpp @@ -43,9 +43,7 @@ #include <SpatialDomains/Movement/Movement.h> #include <tinyxml.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { std::string static inline ReadTag(std::string &tagStr) @@ -408,7 +406,9 @@ void Movement::ReadInterfaces(TiXmlElement *interfacesTag, MeshGraph *meshGraph) void Movement::WriteMovement(TiXmlElement *root) { if (m_zones.size() == 0 && m_interfaces.size() == 0) + { return; + } TiXmlElement *movement = new TiXmlElement("MOVEMENT"); root->LinkEndChild(movement); @@ -534,7 +534,9 @@ void Movement::AddZone(ZoneBaseShPtr zone) m_zones[zone->GetId()] = zone; MovementType mtype = zone->GetMovementType(); if (mtype != MovementType::eFixed && mtype != MovementType::eNone) + { m_moveFlag = true; + } } /// Store an interface pair with this Movement data @@ -546,5 +548,4 @@ void Movement::AddInterface(std::string name, InterfaceShPtr left, MemoryManager<InterfacePair>::AllocateSharedPtr(left, right)); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Movement/Movement.h b/library/SpatialDomains/Movement/Movement.h index b4d313c6f6..76ee12eac8 100644 --- a/library/SpatialDomains/Movement/Movement.h +++ b/library/SpatialDomains/Movement/Movement.h @@ -42,10 +42,7 @@ #include <SpatialDomains/Movement/InterfaceInterpolation.h> #include <SpatialDomains/Movement/Zones.h> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { typedef std::map<std::pair<int, std::string>, InterfacePairShPtr> @@ -105,7 +102,6 @@ private: typedef std::shared_ptr<Movement> MovementSharedPtr; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_MOVEMENT_H diff --git a/library/SpatialDomains/Movement/Zones.cpp b/library/SpatialDomains/Movement/Zones.cpp index 9a7baa4935..da698ace5b 100644 --- a/library/SpatialDomains/Movement/Zones.cpp +++ b/library/SpatialDomains/Movement/Zones.cpp @@ -39,9 +39,7 @@ #include <SpatialDomains/Movement/Zones.h> #include <tinyxml.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { ZoneBase::ZoneBase(MovementType type, int indx, int domainID, @@ -310,5 +308,4 @@ bool ZonePrescribe::v_Move(NekDouble time) return true; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/Movement/Zones.h b/library/SpatialDomains/Movement/Zones.h index f55ff8a443..64741511d2 100644 --- a/library/SpatialDomains/Movement/Zones.h +++ b/library/SpatialDomains/Movement/Zones.h @@ -39,10 +39,7 @@ #include <LibUtilities/BasicUtils/Equation.h> #include <SpatialDomains/MeshGraph.h> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { /// Enum of zone movement type @@ -168,7 +165,7 @@ struct ZoneRotate final : public ZoneBase const LibUtilities::EquationSharedPtr &angularVelEqn); /// Default destructor - virtual ~ZoneRotate() = default; + ~ZoneRotate() override = default; /// Return the angular velocity of the zone at @param time SPATIAL_DOMAINS_EXPORT NekDouble GetAngularVel(NekDouble &time) const; @@ -204,7 +201,7 @@ protected: DNekMat m_W2 = DNekMat(3, 3, 0.0); /// Virtual function for movement of the zone at @param time - SPATIAL_DOMAINS_EXPORT virtual bool v_Move(NekDouble time) final; + SPATIAL_DOMAINS_EXPORT bool v_Move(NekDouble time) final; }; /// Translating zone: addition of a constant vector to every point @@ -228,7 +225,7 @@ struct ZoneTranslate final : public ZoneBase } /// Default destructor - virtual ~ZoneTranslate() = default; + ~ZoneTranslate() override = default; /// Returns the velocity of the zone inline std::vector<NekDouble> GetVel() const @@ -240,7 +237,7 @@ protected: std::vector<NekDouble> m_velocity; /// Virtual function for movement of the zone at @param time - SPATIAL_DOMAINS_EXPORT virtual bool v_Move(NekDouble time) final; + SPATIAL_DOMAINS_EXPORT bool v_Move(NekDouble time) final; }; /// Prescribed zone: applies equation to every point @@ -268,7 +265,7 @@ struct ZonePrescribe final : public ZoneBase } /// Default destructor - virtual ~ZonePrescribe() = default; + ~ZonePrescribe() override = default; /** * Returns point @param x @param y @param z deformation in the x direction @@ -342,7 +339,7 @@ protected: LibUtilities::EquationSharedPtr m_zDeform; /// Virtual function for movement of the zone at @param time - SPATIAL_DOMAINS_EXPORT virtual bool v_Move(NekDouble time) final; + SPATIAL_DOMAINS_EXPORT bool v_Move(NekDouble time) final; }; /// Fixed zone: does not move @@ -356,11 +353,11 @@ struct ZoneFixed final : public ZoneBase } /// Default destructor - virtual ~ZoneFixed() = default; + ~ZoneFixed() override = default; protected: /// Virtual function for movement of the zone at @param time - SPATIAL_DOMAINS_EXPORT virtual bool v_Move(NekDouble time) final; + SPATIAL_DOMAINS_EXPORT bool v_Move(NekDouble time) final; }; typedef std::shared_ptr<ZoneRotate> ZoneRotateShPtr; @@ -368,7 +365,6 @@ typedef std::shared_ptr<ZoneTranslate> ZoneTranslateShPtr; typedef std::shared_ptr<ZonePrescribe> ZonePrescribeShPtr; typedef std::shared_ptr<ZoneFixed> ZoneFixedShPtr; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_ZONES_H diff --git a/library/SpatialDomains/PointGeom.cpp b/library/SpatialDomains/PointGeom.cpp index bcb5a4194b..3a652b3a25 100644 --- a/library/SpatialDomains/PointGeom.cpp +++ b/library/SpatialDomains/PointGeom.cpp @@ -38,9 +38,7 @@ #include <SpatialDomains/SegGeom.h> #include <StdRegions/StdRegions.hpp> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { PointGeom::PointGeom() : NekPoint<NekDouble>(0.0, 0.0, 0.0) { @@ -233,5 +231,4 @@ void PointGeom::v_GenGeomFactors() { } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/PointGeom.h b/library/SpatialDomains/PointGeom.h index 30065472dc..e947f2b846 100644 --- a/library/SpatialDomains/PointGeom.h +++ b/library/SpatialDomains/PointGeom.h @@ -40,10 +40,7 @@ #include <StdRegions/StdRegions.hpp> #include <memory> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { class PointGeom; @@ -63,7 +60,7 @@ public: NekDouble x, NekDouble y, NekDouble z); SPATIAL_DOMAINS_EXPORT PointGeom(const PointGeom &T); - SPATIAL_DOMAINS_EXPORT ~PointGeom(); + SPATIAL_DOMAINS_EXPORT ~PointGeom() override; SPATIAL_DOMAINS_EXPORT int GetVid() { @@ -97,11 +94,10 @@ public: const PointGeom &y); protected: - virtual void v_GenGeomFactors() override; - virtual PointGeomSharedPtr v_GetVertex(int i) const override; + void v_GenGeomFactors() override; + PointGeomSharedPtr v_GetVertex(int i) const override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_POINTGEOM_H diff --git a/library/SpatialDomains/PrismGeom.cpp b/library/SpatialDomains/PrismGeom.cpp index 9e3dbbba84..980b985785 100644 --- a/library/SpatialDomains/PrismGeom.cpp +++ b/library/SpatialDomains/PrismGeom.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { const unsigned int PrismGeom::VertexEdgeConnectivity[6][3] = { @@ -802,5 +800,4 @@ void PrismGeom::SetUpXmap() m_xmap = MemoryManager<StdRegions::StdPrismExp>::AllocateSharedPtr(A, B, C); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/PrismGeom.h b/library/SpatialDomains/PrismGeom.h index b96e58fa9e..fc21884ca4 100644 --- a/library/SpatialDomains/PrismGeom.h +++ b/library/SpatialDomains/PrismGeom.h @@ -39,9 +39,7 @@ #include <SpatialDomains/QuadGeom.h> #include <SpatialDomains/TriGeom.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class PrismGeom : public Geometry3D @@ -49,7 +47,7 @@ class PrismGeom : public Geometry3D public: SPATIAL_DOMAINS_EXPORT PrismGeom(); SPATIAL_DOMAINS_EXPORT PrismGeom(int id, const Geometry2DSharedPtr faces[]); - SPATIAL_DOMAINS_EXPORT ~PrismGeom(); + SPATIAL_DOMAINS_EXPORT ~PrismGeom() override; SPATIAL_DOMAINS_EXPORT static const int kNverts = 6; SPATIAL_DOMAINS_EXPORT static const int kNedges = 9; @@ -59,15 +57,14 @@ public: SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType; protected: - virtual void v_GenGeomFactors() override; - virtual int v_GetVertexEdgeMap(const int i, const int j) const override; - virtual int v_GetVertexFaceMap(const int i, const int j) const override; - virtual int v_GetEdgeFaceMap(const int i, const int j) const override; - virtual int v_GetEdgeNormalToFaceVert(const int i, - const int j) const override; - virtual int v_GetDir(const int faceidx, const int facedir) const override; - virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; - virtual void v_Setup() override; + void v_GenGeomFactors() override; + int v_GetVertexEdgeMap(const int i, const int j) const override; + int v_GetVertexFaceMap(const int i, const int j) const override; + int v_GetEdgeFaceMap(const int i, const int j) const override; + int v_GetEdgeNormalToFaceVert(const int i, const int j) const override; + int v_GetDir(const int faceidx, const int facedir) const override; + void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; + void v_Setup() override; private: void SetUpLocalEdges(); @@ -84,7 +81,6 @@ private: typedef std::shared_ptr<PrismGeom> PrismGeomSharedPtr; typedef std::map<int, PrismGeomSharedPtr> PrismGeomMap; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_PRISMGEOM_H diff --git a/library/SpatialDomains/PyrGeom.cpp b/library/SpatialDomains/PyrGeom.cpp index 4d83bb8345..dff710cd34 100644 --- a/library/SpatialDomains/PyrGeom.cpp +++ b/library/SpatialDomains/PyrGeom.cpp @@ -42,9 +42,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { const unsigned int PyrGeom::EdgeNormalToFaceVert[5][4] = { {4, 5, 6, 7}, {1, 3, 6, 7}, {0, 2, 4, 7}, {1, 3, 4, 5}, {0, 2, 5, 6}}; @@ -748,5 +746,4 @@ void PyrGeom::SetUpXmap() m_xmap = MemoryManager<StdRegions::StdPyrExp>::AllocateSharedPtr(A1, A2, C); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/PyrGeom.h b/library/SpatialDomains/PyrGeom.h index dc69794dfa..d7ad6fe495 100644 --- a/library/SpatialDomains/PyrGeom.h +++ b/library/SpatialDomains/PyrGeom.h @@ -38,9 +38,7 @@ #include <SpatialDomains/Geometry3D.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class PyrGeom : public Geometry3D @@ -48,7 +46,7 @@ class PyrGeom : public Geometry3D public: SPATIAL_DOMAINS_EXPORT PyrGeom(); SPATIAL_DOMAINS_EXPORT PyrGeom(int id, const Geometry2DSharedPtr faces[]); - SPATIAL_DOMAINS_EXPORT ~PyrGeom(); + SPATIAL_DOMAINS_EXPORT ~PyrGeom() override; SPATIAL_DOMAINS_EXPORT static const int kNverts = 5; SPATIAL_DOMAINS_EXPORT static const int kNedges = 8; @@ -58,11 +56,11 @@ public: SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType; protected: - virtual void v_GenGeomFactors(); - virtual int v_GetEdgeNormalToFaceVert(const int i, const int j) const; - virtual int v_GetDir(const int faceidx, const int facedir) const; - virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces); - virtual void v_Setup(); + void v_GenGeomFactors() override; + int v_GetEdgeNormalToFaceVert(const int i, const int j) const override; + int v_GetDir(const int faceidx, const int facedir) const override; + void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; + void v_Setup() override; private: void SetUpLocalEdges(); @@ -76,7 +74,6 @@ private: typedef std::shared_ptr<PyrGeom> PyrGeomSharedPtr; typedef std::map<int, PyrGeomSharedPtr> PyrGeomMap; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_PYRGEOM_H diff --git a/library/SpatialDomains/QuadGeom.cpp b/library/SpatialDomains/QuadGeom.cpp index c4b42c9f7d..fe89fac817 100644 --- a/library/SpatialDomains/QuadGeom.cpp +++ b/library/SpatialDomains/QuadGeom.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { QuadGeom::QuadGeom() @@ -498,5 +496,4 @@ void QuadGeom::v_Setup() } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/QuadGeom.h b/library/SpatialDomains/QuadGeom.h index 6dd652e30d..e16bf86650 100644 --- a/library/SpatialDomains/QuadGeom.h +++ b/library/SpatialDomains/QuadGeom.h @@ -42,9 +42,7 @@ #include <SpatialDomains/SegGeom.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class QuadGeom; @@ -61,7 +59,7 @@ public: SPATIAL_DOMAINS_EXPORT QuadGeom( const int id, const SegGeomSharedPtr edges[], const CurveSharedPtr curve = CurveSharedPtr()); - SPATIAL_DOMAINS_EXPORT ~QuadGeom(); + SPATIAL_DOMAINS_EXPORT ~QuadGeom() override; /// Get the orientation of face1. SPATIAL_DOMAINS_EXPORT static StdRegions::Orientation GetFaceOrientation( @@ -77,21 +75,20 @@ public: SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType; protected: - SPATIAL_DOMAINS_EXPORT virtual NekDouble v_GetCoord( + SPATIAL_DOMAINS_EXPORT NekDouble v_GetCoord( const int i, const Array<OneD, const NekDouble> &Lcoord) override; - SPATIAL_DOMAINS_EXPORT virtual void v_GenGeomFactors() override; - SPATIAL_DOMAINS_EXPORT virtual void v_FillGeom() override; - SPATIAL_DOMAINS_EXPORT virtual int v_GetDir( - const int faceidx, const int facedir) const override; - SPATIAL_DOMAINS_EXPORT virtual void v_Reset(CurveMap &curvedEdges, - CurveMap &curvedFaces) override; - SPATIAL_DOMAINS_EXPORT virtual void v_Setup() override; + SPATIAL_DOMAINS_EXPORT void v_GenGeomFactors() override; + SPATIAL_DOMAINS_EXPORT void v_FillGeom() override; + SPATIAL_DOMAINS_EXPORT int v_GetDir(const int faceidx, + const int facedir) const override; + SPATIAL_DOMAINS_EXPORT void v_Reset(CurveMap &curvedEdges, + CurveMap &curvedFaces) override; + SPATIAL_DOMAINS_EXPORT void v_Setup() override; private: void SetUpXmap(); }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_QUADGEOM_H diff --git a/library/SpatialDomains/RefRegion.cpp b/library/SpatialDomains/RefRegion.cpp index a3b0ba8f45..9c5503706a 100644 --- a/library/SpatialDomains/RefRegion.cpp +++ b/library/SpatialDomains/RefRegion.cpp @@ -39,9 +39,7 @@ #include <SpatialDomains/RefRegionParallelogram.h> #include <SpatialDomains/RefRegionSphere.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { RefRegion::RefRegion(const unsigned int coordim, NekDouble radius, @@ -58,5 +56,4 @@ RefRegion::~RefRegion() { } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/RefRegion.h b/library/SpatialDomains/RefRegion.h index 70258165fe..2953975104 100644 --- a/library/SpatialDomains/RefRegion.h +++ b/library/SpatialDomains/RefRegion.h @@ -40,9 +40,7 @@ #include <SpatialDomains/SpatialDomainsDeclspec.h> #include <vector> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** @@ -93,7 +91,6 @@ protected: std::vector<unsigned int> m_numPoints; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_REFREGION_H diff --git a/library/SpatialDomains/RefRegionCylinder.cpp b/library/SpatialDomains/RefRegionCylinder.cpp index 621c5d595f..051c5fc8f7 100644 --- a/library/SpatialDomains/RefRegionCylinder.cpp +++ b/library/SpatialDomains/RefRegionCylinder.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { RefRegionCylinder::RefRegionCylinder(const unsigned int coordim, @@ -171,5 +169,4 @@ bool RefRegionCylinder::v_Contains(const Array<OneD, NekDouble> &coords) } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/RefRegionCylinder.h b/library/SpatialDomains/RefRegionCylinder.h index 07b86798b2..2cbeb1845c 100644 --- a/library/SpatialDomains/RefRegionCylinder.h +++ b/library/SpatialDomains/RefRegionCylinder.h @@ -38,9 +38,7 @@ #include <SpatialDomains/RefRegion.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** @@ -57,7 +55,7 @@ public: std::vector<unsigned int> numModes, std::vector<unsigned int> numPoints); /// Destructor - SPATIAL_DOMAINS_EXPORT virtual ~RefRegionCylinder(); + SPATIAL_DOMAINS_EXPORT ~RefRegionCylinder() override; protected: /// Check if vertex is inside the surface region @@ -65,7 +63,6 @@ protected: const Array<OneD, NekDouble> &coords) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_REFREGIONCYLINDER_H diff --git a/library/SpatialDomains/RefRegionLine.cpp b/library/SpatialDomains/RefRegionLine.cpp index e45ac41afc..e843b40f5a 100644 --- a/library/SpatialDomains/RefRegionLine.cpp +++ b/library/SpatialDomains/RefRegionLine.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { RefRegionLine::RefRegionLine(const unsigned int coordim, NekDouble radius, @@ -85,5 +83,4 @@ bool RefRegionLine::v_Contains(const Array<OneD, NekDouble> &coords) return false; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/RefRegionLine.h b/library/SpatialDomains/RefRegionLine.h index 4e14e68dcf..8cc59525f5 100644 --- a/library/SpatialDomains/RefRegionLine.h +++ b/library/SpatialDomains/RefRegionLine.h @@ -38,9 +38,7 @@ #include <SpatialDomains/RefRegion.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** @@ -58,7 +56,7 @@ public: std::vector<unsigned int> numModes, std::vector<unsigned int> numPoints); /// Destructor - SPATIAL_DOMAINS_EXPORT virtual ~RefRegionLine(); + SPATIAL_DOMAINS_EXPORT ~RefRegionLine() override; protected: /// Check if vertex is inside the surface region @@ -66,7 +64,6 @@ protected: const Array<OneD, NekDouble> &coords) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_REFREGIONLINE_H diff --git a/library/SpatialDomains/RefRegionParallelogram.cpp b/library/SpatialDomains/RefRegionParallelogram.cpp index e00c1c9181..a04885320e 100644 --- a/library/SpatialDomains/RefRegionParallelogram.cpp +++ b/library/SpatialDomains/RefRegionParallelogram.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { RefRegionParallelogram::RefRegionParallelogram( @@ -134,5 +132,4 @@ bool RefRegionParallelogram::v_Contains(const Array<OneD, NekDouble> &coords) } } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/RefRegionParallelogram.h b/library/SpatialDomains/RefRegionParallelogram.h index e38f3cda86..e9e9ac3b4a 100644 --- a/library/SpatialDomains/RefRegionParallelogram.h +++ b/library/SpatialDomains/RefRegionParallelogram.h @@ -38,9 +38,7 @@ #include <SpatialDomains/RefRegion.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** @@ -57,7 +55,7 @@ public: std::vector<unsigned int> numModes, std::vector<unsigned int> numPoints); /// Destructor - SPATIAL_DOMAINS_EXPORT virtual ~RefRegionParallelogram(); + SPATIAL_DOMAINS_EXPORT ~RefRegionParallelogram() override; protected: /// Check if vertex is inside the surface region @@ -65,7 +63,6 @@ protected: const Array<OneD, NekDouble> &coords) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_REFREGIONPARALLELOGRAM_H diff --git a/library/SpatialDomains/RefRegionSphere.cpp b/library/SpatialDomains/RefRegionSphere.cpp index efd51ac0ea..45b0099c94 100644 --- a/library/SpatialDomains/RefRegionSphere.cpp +++ b/library/SpatialDomains/RefRegionSphere.cpp @@ -36,9 +36,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { RefRegionSphere::RefRegionSphere(const unsigned int coordim, NekDouble radius, @@ -97,5 +95,4 @@ bool RefRegionSphere::v_Contains(const Array<OneD, NekDouble> &coords) return false; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/RefRegionSphere.h b/library/SpatialDomains/RefRegionSphere.h index eb98f60db0..c9bf1cef0a 100644 --- a/library/SpatialDomains/RefRegionSphere.h +++ b/library/SpatialDomains/RefRegionSphere.h @@ -38,9 +38,7 @@ #include <SpatialDomains/RefRegion.h> #include <SpatialDomains/SpatialDomainsDeclspec.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** @@ -58,7 +56,7 @@ public: std::vector<unsigned int> numModes, std::vector<unsigned int> numPoints); /// Destructor - SPATIAL_DOMAINS_EXPORT virtual ~RefRegionSphere(); + SPATIAL_DOMAINS_EXPORT ~RefRegionSphere() override; /// Check if vertex is inside the surface region protected: @@ -66,7 +64,6 @@ protected: const Array<OneD, NekDouble> &coords) override; }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_REFREGIONSPHERE_H diff --git a/library/SpatialDomains/SegGeom.cpp b/library/SpatialDomains/SegGeom.cpp index dbabda1a0a..3b3e302d0f 100644 --- a/library/SpatialDomains/SegGeom.cpp +++ b/library/SpatialDomains/SegGeom.cpp @@ -40,9 +40,7 @@ #include <StdRegions/StdRegions.hpp> #include <StdRegions/StdSegExp.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { SegGeom::SegGeom() { @@ -493,5 +491,4 @@ NekDouble SegGeom::v_FindDistance(const Array<OneD, const NekDouble> &xs, return -1.0; } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/SegGeom.h b/library/SpatialDomains/SegGeom.h index 8f779b75ee..1a148ca24c 100644 --- a/library/SpatialDomains/SegGeom.h +++ b/library/SpatialDomains/SegGeom.h @@ -42,10 +42,7 @@ #include <SpatialDomains/SpatialDomainsDeclspec.h> #include <StdRegions/StdRegions.hpp> -namespace Nektar -{ - -namespace SpatialDomains +namespace Nektar::SpatialDomains { class SegGeom; typedef std::shared_ptr<SegGeom> SegGeomSharedPtr; @@ -63,7 +60,7 @@ public: SPATIAL_DOMAINS_EXPORT SegGeomSharedPtr GenerateOneSpaceDimGeom(void); - SPATIAL_DOMAINS_EXPORT ~SegGeom(); + SPATIAL_DOMAINS_EXPORT ~SegGeom() override; SPATIAL_DOMAINS_EXPORT static StdRegions::Orientation GetEdgeOrientation( const SegGeom &edge1, const SegGeom &edge2); @@ -79,17 +76,17 @@ protected: SpatialDomains::PointGeomSharedPtr m_verts[kNverts]; StdRegions::Orientation m_porient[kNverts]; - virtual PointGeomSharedPtr v_GetVertex(const int i) const override; + PointGeomSharedPtr v_GetVertex(const int i) const override; virtual LibUtilities::ShapeType v_GetShapeType() const; - virtual void v_GenGeomFactors() override; - virtual void v_FillGeom() override; - virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; - virtual void v_Setup() override; - virtual NekDouble v_GetCoord( - const int i, const Array<OneD, const NekDouble> &Lcoord) override; - virtual int v_GetNumVerts() const override; - virtual NekDouble v_FindDistance(const Array<OneD, const NekDouble> &xs, - Array<OneD, NekDouble> &xi) override; + void v_GenGeomFactors() override; + void v_FillGeom() override; + void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; + void v_Setup() override; + NekDouble v_GetCoord(const int i, + const Array<OneD, const NekDouble> &Lcoord) override; + int v_GetNumVerts() const override; + NekDouble v_FindDistance(const Array<OneD, const NekDouble> &xs, + Array<OneD, NekDouble> &xi) override; private: /// Boolean indicating whether object owns the data @@ -97,7 +94,6 @@ private: void SetUpXmap(); }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_SEGGEOM_H diff --git a/library/SpatialDomains/SpatialDomains.hpp b/library/SpatialDomains/SpatialDomains.hpp index ce14839a5f..c9c6407b8b 100644 --- a/library/SpatialDomains/SpatialDomains.hpp +++ b/library/SpatialDomains/SpatialDomains.hpp @@ -35,9 +35,7 @@ #ifndef NEKTAR_SPATIALDOMAINS_SPATIALDOMAINS_H #define NEKTAR_SPATIALDOMAINS_SPATIALDOMAINS_H -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { /** * @brief Indicates the type of element geometry. @@ -91,7 +89,6 @@ const char *const GeomMMFMap[] = { "TangentCircular", "TangentIrregular", "TangentNonconvex", "LOCAL", }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_SPATIALDOMAINS_H diff --git a/library/SpatialDomains/TetGeom.cpp b/library/SpatialDomains/TetGeom.cpp index 4a15edd504..e22578ca73 100644 --- a/library/SpatialDomains/TetGeom.cpp +++ b/library/SpatialDomains/TetGeom.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { const unsigned int TetGeom::VertexEdgeConnectivity[4][3] = { {0, 2, 3}, {0, 1, 4}, {1, 2, 5}, {3, 4, 5}}; @@ -687,5 +685,4 @@ void TetGeom::SetUpXmap() m_xmap = MemoryManager<StdRegions::StdTetExp>::AllocateSharedPtr(A, B, C); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/TetGeom.h b/library/SpatialDomains/TetGeom.h index d323b6d446..290ec4bcfd 100644 --- a/library/SpatialDomains/TetGeom.h +++ b/library/SpatialDomains/TetGeom.h @@ -39,9 +39,7 @@ #include <SpatialDomains/SpatialDomainsDeclspec.h> #include <SpatialDomains/TriGeom.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class TetGeom : public Geometry3D @@ -49,7 +47,7 @@ class TetGeom : public Geometry3D public: SPATIAL_DOMAINS_EXPORT TetGeom(); SPATIAL_DOMAINS_EXPORT TetGeom(int id, const TriGeomSharedPtr faces[]); - SPATIAL_DOMAINS_EXPORT ~TetGeom(); + SPATIAL_DOMAINS_EXPORT ~TetGeom() override; SPATIAL_DOMAINS_EXPORT static const int kNverts = 4; SPATIAL_DOMAINS_EXPORT static const int kNedges = 6; @@ -59,15 +57,14 @@ public: SPATIAL_DOMAINS_EXPORT static const std::string XMLElementType; protected: - virtual int v_GetVertexEdgeMap(const int i, const int j) const override; - virtual int v_GetVertexFaceMap(const int i, const int j) const override; - virtual int v_GetEdgeFaceMap(const int i, const int j) const override; - virtual int v_GetEdgeNormalToFaceVert(const int i, - const int j) const override; - virtual int v_GetDir(const int faceidx, const int facedir) const override; - virtual void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; - virtual void v_Setup() override; - virtual void v_GenGeomFactors() override; + int v_GetVertexEdgeMap(const int i, const int j) const override; + int v_GetVertexFaceMap(const int i, const int j) const override; + int v_GetEdgeFaceMap(const int i, const int j) const override; + int v_GetEdgeNormalToFaceVert(const int i, const int j) const override; + int v_GetDir(const int faceidx, const int facedir) const override; + void v_Reset(CurveMap &curvedEdges, CurveMap &curvedFaces) override; + void v_Setup() override; + void v_GenGeomFactors() override; private: void SetUpLocalEdges(); @@ -86,7 +83,6 @@ typedef std::shared_ptr<TetGeom> TetGeomSharedPtr; typedef std::vector<TetGeomSharedPtr> TetGeomVector; typedef std::map<int, TetGeomSharedPtr> TetGeomMap; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif // NEKTAR_SPATIALDOMAINS_TETGEOM diff --git a/library/SpatialDomains/TriGeom.cpp b/library/SpatialDomains/TriGeom.cpp index 45fb9033fd..11a75bb9c6 100644 --- a/library/SpatialDomains/TriGeom.cpp +++ b/library/SpatialDomains/TriGeom.cpp @@ -43,9 +43,7 @@ using namespace std; -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { TriGeom::TriGeom() @@ -574,5 +572,4 @@ void TriGeom::SetUpXmap() m_xmap = MemoryManager<StdRegions::StdTriExp>::AllocateSharedPtr(B0, B1); } -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains diff --git a/library/SpatialDomains/TriGeom.h b/library/SpatialDomains/TriGeom.h index b01540fabb..3e2057b7bd 100644 --- a/library/SpatialDomains/TriGeom.h +++ b/library/SpatialDomains/TriGeom.h @@ -44,9 +44,7 @@ #include <SpatialDomains/GeomFactors.h> #include <StdRegions/StdTriExp.h> -namespace Nektar -{ -namespace SpatialDomains +namespace Nektar::SpatialDomains { class TriGeom; @@ -66,7 +64,7 @@ public: SPATIAL_DOMAINS_EXPORT TriGeom( const int id, const SegGeomSharedPtr edges[], const CurveSharedPtr curve = CurveSharedPtr()); - SPATIAL_DOMAINS_EXPORT ~TriGeom(); + SPATIAL_DOMAINS_EXPORT ~TriGeom() override; /// Get the orientation of face1. SPATIAL_DOMAINS_EXPORT static const int kNedges = 3; @@ -81,21 +79,20 @@ public: int dir, NekDouble angle, NekDouble tol); protected: - SPATIAL_DOMAINS_EXPORT virtual NekDouble v_GetCoord( + SPATIAL_DOMAINS_EXPORT NekDouble v_GetCoord( const int i, const Array<OneD, const NekDouble> &Lcoord) override; - SPATIAL_DOMAINS_EXPORT virtual void v_GenGeomFactors() override; - SPATIAL_DOMAINS_EXPORT virtual void v_FillGeom() override; - SPATIAL_DOMAINS_EXPORT virtual int v_GetDir( - const int faceidx, const int facedir) const override; - SPATIAL_DOMAINS_EXPORT virtual void v_Reset(CurveMap &curvedEdges, - CurveMap &curvedFaces) override; - SPATIAL_DOMAINS_EXPORT virtual void v_Setup() override; + SPATIAL_DOMAINS_EXPORT void v_GenGeomFactors() override; + SPATIAL_DOMAINS_EXPORT void v_FillGeom() override; + SPATIAL_DOMAINS_EXPORT int v_GetDir(const int faceidx, + const int facedir) const override; + SPATIAL_DOMAINS_EXPORT void v_Reset(CurveMap &curvedEdges, + CurveMap &curvedFaces) override; + SPATIAL_DOMAINS_EXPORT void v_Setup() override; private: void SetUpXmap(); }; -} // namespace SpatialDomains -} // namespace Nektar +} // namespace Nektar::SpatialDomains #endif diff --git a/library/StdRegions/Python/VarCoeffEntry.cpp b/library/StdRegions/Python/VarCoeffEntry.cpp index 2e8e5336f4..ae70f838cb 100644 --- a/library/StdRegions/Python/VarCoeffEntry.cpp +++ b/library/StdRegions/Python/VarCoeffEntry.cpp @@ -51,7 +51,7 @@ void CapsuleDestructor(void *ptr) #else void CapsuleDestructor(PyObject *ptr) { - VarCoeffEntry *tmp = (VarCoeffEntry *)PyCapsule_GetPointer(ptr, 0); + VarCoeffEntry *tmp = (VarCoeffEntry *)PyCapsule_GetPointer(ptr, nullptr); delete tmp; } #endif @@ -68,7 +68,7 @@ struct VarCoeffEntryToPython new VarCoeffEntry(entry), CapsuleDestructor))); #else py::object capsule(py::handle<>( - PyCapsule_New(new VarCoeffEntry(entry), 0, + PyCapsule_New(new VarCoeffEntry(entry), nullptr, (PyCapsule_Destructor)&CapsuleDestructor))); #endif PyObject *tmp = @@ -101,20 +101,20 @@ struct PythonToVarCoeffEntry typename boost::remove_const<NekDouble>::type>(); if (dtype != array.get_dtype()) { - return 0; + return nullptr; } // Check shape is 1D if (array.get_nd() != 1) { - return 0; + return nullptr; } } catch (boost::python::error_already_set &) { py::handle_exception(); PyErr_Clear(); - return 0; + return nullptr; } return objPtr; diff --git a/library/StdRegions/StdExpansion.cpp b/library/StdRegions/StdExpansion.cpp index b51e7316ad..a27211e95e 100644 --- a/library/StdRegions/StdExpansion.cpp +++ b/library/StdRegions/StdExpansion.cpp @@ -38,9 +38,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> // for BasisManager, etc #include <StdRegions/StdExpansion.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { /** \brief Default constructor */ StdExpansion::StdExpansion() @@ -1703,5 +1701,4 @@ void StdExpansion::EquiSpacedToCoeffs( out = (*intmat) * in; } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdExpansion.h b/library/StdRegions/StdExpansion.h index 020a37f696..cee571ba19 100644 --- a/library/StdRegions/StdExpansion.h +++ b/library/StdRegions/StdExpansion.h @@ -47,18 +47,13 @@ #include <StdRegions/StdMatrixKey.h> #include <StdRegions/StdRegions.hpp> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace LocalRegions +namespace Nektar::LocalRegions { class MatrixKey; class Expansion; -} // namespace LocalRegions -} // namespace Nektar +} // namespace Nektar::LocalRegions -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { /** \brief The base class for all shapes @@ -1809,7 +1804,6 @@ inline void StdExpansion::FwdTrans(const Array<OneD, const NekDouble> &inarray, v_FwdTrans(inarray, outarray); } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STANDARDDEXPANSION_H diff --git a/library/StdRegions/StdExpansion0D.cpp b/library/StdRegions/StdExpansion0D.cpp index 21c3f48bca..b718803dc4 100644 --- a/library/StdRegions/StdExpansion0D.cpp +++ b/library/StdRegions/StdExpansion0D.cpp @@ -36,9 +36,7 @@ #include <StdRegions/StdExpansion0D.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdExpansion0D::StdExpansion0D() { @@ -104,5 +102,4 @@ NekDouble StdExpansion0D::v_PhysEvaluate( // return val; //} -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdExpansion0D.h b/library/StdRegions/StdExpansion0D.h index d3b7f2e9ec..61fac69544 100644 --- a/library/StdRegions/StdExpansion0D.h +++ b/library/StdRegions/StdExpansion0D.h @@ -40,9 +40,7 @@ #include <StdRegions/StdExpansion.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdExpansion0D : virtual public StdExpansion @@ -54,7 +52,7 @@ public: STD_REGIONS_EXPORT StdExpansion0D(int numcoeffs, const LibUtilities::BasisKey &Ba); STD_REGIONS_EXPORT StdExpansion0D(const StdExpansion0D &T); - STD_REGIONS_EXPORT virtual ~StdExpansion0D() override; + STD_REGIONS_EXPORT ~StdExpansion0D() override; STD_REGIONS_EXPORT void PhysTensorDeriv( const Array<OneD, const NekDouble> &inarray, @@ -62,19 +60,19 @@ public: // Virtual Functions ---------------------------------------- protected: - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coords, - const Array<OneD, const NekDouble> &physvals) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coords, + const Array<OneD, const NekDouble> &physvals) override; // STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( // const Array<OneD, DNekMatSharedPtr> &I, // const Array<OneD, const NekDouble> &physvals) override; - virtual int v_GetShapeDimension() const override final + int v_GetShapeDimension() const final { return 1; } - virtual int v_GetNtraces() const override final + int v_GetNtraces() const final { return 0; } @@ -82,7 +80,6 @@ protected: typedef std::shared_ptr<StdExpansion0D> StdExpansion0DSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDEXP0D_H diff --git a/library/StdRegions/StdExpansion1D.cpp b/library/StdRegions/StdExpansion1D.cpp index 0794c5b848..89cdf9dd36 100644 --- a/library/StdRegions/StdExpansion1D.cpp +++ b/library/StdRegions/StdExpansion1D.cpp @@ -36,9 +36,7 @@ #include <StdRegions/StdExpansion1D.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdExpansion1D::StdExpansion1D() { @@ -111,5 +109,4 @@ NekDouble StdExpansion1D::v_PhysEvaluate( return 0; } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdExpansion1D.h b/library/StdRegions/StdExpansion1D.h index 5609cda966..2cc47219f8 100644 --- a/library/StdRegions/StdExpansion1D.h +++ b/library/StdRegions/StdExpansion1D.h @@ -40,9 +40,7 @@ #include <StdRegions/StdExpansion.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdExpansion1D : virtual public StdExpansion @@ -53,7 +51,7 @@ public: STD_REGIONS_EXPORT StdExpansion1D(int numcoeffs, const LibUtilities::BasisKey &Ba); STD_REGIONS_EXPORT StdExpansion1D(const StdExpansion1D &T); - STD_REGIONS_EXPORT virtual ~StdExpansion1D() override; + STD_REGIONS_EXPORT ~StdExpansion1D() override; /** \brief Evaluate the derivative \f$ d/d{\xi_1} \f$ at the * physical quadrature points given by \a inarray and return in @@ -91,25 +89,25 @@ public: } protected: - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coords, - const Array<OneD, const NekDouble> &physvals) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coords, + const Array<OneD, const NekDouble> &physvals) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs, - std::array<NekDouble, 6> &secondOrderDerivs) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs, + std::array<NekDouble, 6> &secondOrderDerivs) override; private: // Virtual Functions ---------------------------------------- - virtual int v_GetShapeDimension() const final override + int v_GetShapeDimension() const final { return 1; } @@ -117,7 +115,6 @@ private: typedef std::shared_ptr<StdExpansion1D> StdExpansion1DSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDEXP1D_H diff --git a/library/StdRegions/StdExpansion2D.cpp b/library/StdRegions/StdExpansion2D.cpp index 1b1e465f2a..6c9bdafe9c 100644 --- a/library/StdRegions/StdExpansion2D.cpp +++ b/library/StdRegions/StdExpansion2D.cpp @@ -40,9 +40,7 @@ #undef max #endif -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdExpansion2D::StdExpansion2D() { @@ -499,5 +497,4 @@ void StdExpansion2D::v_GetTraceToElementMap(const int eid, } } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdExpansion2D.h b/library/StdRegions/StdExpansion2D.h index 0cf6d7886d..d2f32984dd 100644 --- a/library/StdRegions/StdExpansion2D.h +++ b/library/StdRegions/StdExpansion2D.h @@ -40,9 +40,7 @@ #include <StdRegions/StdExpansion.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdExpansion2D : virtual public StdExpansion @@ -53,7 +51,7 @@ public: const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb); STD_REGIONS_EXPORT StdExpansion2D(const StdExpansion2D &T); - STD_REGIONS_EXPORT virtual ~StdExpansion2D() override; + STD_REGIONS_EXPORT ~StdExpansion2D() override; // Generic operations in different element @@ -161,18 +159,18 @@ protected: * \param coords the coordinates of the single point * \return returns the value of the expansion at the single point */ - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coords, - const Array<OneD, const NekDouble> &physvals) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coords, + const Array<OneD, const NekDouble> &physvals) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, DNekMatSharedPtr> &I, - const Array<OneD, const NekDouble> &physvals) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, DNekMatSharedPtr> &I, + const Array<OneD, const NekDouble> &physvals) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFacKernel( const Array<OneD, const NekDouble> &base0, @@ -188,34 +186,34 @@ protected: Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1) = 0; - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp_MatFree( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp_MatFree( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp_MatFree( + STD_REGIONS_EXPORT void v_HelmholtzMatrixOp_MatFree( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int traceid, Array<OneD, unsigned int> &maparray) override; - STD_REGIONS_EXPORT virtual void v_GetElmtTraceToTraceMap( + STD_REGIONS_EXPORT void v_GetElmtTraceToTraceMap( const unsigned int eid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, Orientation edgeOrient, int P, int Q) override; - STD_REGIONS_EXPORT virtual void v_GetTraceToElementMap( + STD_REGIONS_EXPORT void v_GetTraceToElementMap( const int eid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, Orientation edgeOrient = eForwards, int P = -1, int Q = -1) override; - STD_REGIONS_EXPORT virtual void v_GenStdMatBwdDeriv( - const int dir, DNekMatSharedPtr &mat) override; + STD_REGIONS_EXPORT void v_GenStdMatBwdDeriv(const int dir, + DNekMatSharedPtr &mat) override; private: - virtual int v_GetShapeDimension() const override final + int v_GetShapeDimension() const final { return 2; } @@ -223,7 +221,6 @@ private: typedef std::shared_ptr<StdExpansion2D> StdExpansion2DSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDEXP2D_H diff --git a/library/StdRegions/StdExpansion3D.cpp b/library/StdRegions/StdExpansion3D.cpp index c46dfc4f1a..5467c712f4 100644 --- a/library/StdRegions/StdExpansion3D.cpp +++ b/library/StdRegions/StdExpansion3D.cpp @@ -42,9 +42,7 @@ #undef max #endif -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdExpansion3D::StdExpansion3D() { @@ -258,7 +256,7 @@ NekDouble StdExpansion3D::v_PhysEvaluate( Array<OneD, NekDouble> sumFactorization_r = Array<OneD, NekDouble>(Qz); // Lagrangian interpolation matrix - NekDouble *interpolatingNodes = 0; + NekDouble *interpolatingNodes = nullptr; // Interpolate first coordinate direction interpolatingNodes = &I[0]->GetPtr()[0]; @@ -618,5 +616,4 @@ LibUtilities::BasisKey EvaluateTriFaceBasisKey( // Keep things happy by returning a value. return LibUtilities::NullBasisKey; } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdExpansion3D.h b/library/StdRegions/StdExpansion3D.h index 76855c8880..28ee123e37 100644 --- a/library/StdRegions/StdExpansion3D.h +++ b/library/StdRegions/StdExpansion3D.h @@ -40,9 +40,7 @@ #include <StdRegions/StdExpansion.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdExpansion3D; @@ -58,7 +56,7 @@ public: const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc); STD_REGIONS_EXPORT StdExpansion3D(const StdExpansion3D &T); - STD_REGIONS_EXPORT virtual ~StdExpansion3D() override; + STD_REGIONS_EXPORT ~StdExpansion3D() override; // Differentiation @@ -171,18 +169,18 @@ protected: * \param coords the coordinates of the single point * \return returns the value of the expansion at the single point */ - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, const NekDouble> &coords, - const Array<OneD, const NekDouble> &physvals) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, const NekDouble> &coords, + const Array<OneD, const NekDouble> &physvals) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, DNekMatSharedPtr> &I, - const Array<OneD, const NekDouble> &physvals) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, DNekMatSharedPtr> &I, + const Array<OneD, const NekDouble> &physvals) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFacKernel( const Array<OneD, const NekDouble> &base0, @@ -200,18 +198,18 @@ protected: Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) = 0; - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp_MatFree( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp_MatFree( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp_MatFree( + STD_REGIONS_EXPORT void v_HelmholtzMatrixOp_MatFree( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + STD_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; STD_REGIONS_EXPORT virtual int v_GetNedges(void) const; STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const; @@ -275,16 +273,16 @@ protected: const int tid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, Orientation traceOrient = eForwards); - STD_REGIONS_EXPORT virtual void v_GetTraceToElementMap( + STD_REGIONS_EXPORT void v_GetTraceToElementMap( const int tid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, Orientation traceOrient, int P, int Q) override; - STD_REGIONS_EXPORT virtual void v_GenStdMatBwdDeriv( - const int dir, DNekMatSharedPtr &mat) override; + STD_REGIONS_EXPORT void v_GenStdMatBwdDeriv(const int dir, + DNekMatSharedPtr &mat) override; private: - virtual int v_GetShapeDimension() const override final + int v_GetShapeDimension() const final { return 3; } @@ -297,7 +295,6 @@ STD_REGIONS_EXPORT LibUtilities::BasisKey EvaluateTriFaceBasisKey( STD_REGIONS_EXPORT LibUtilities::BasisKey EvaluateQuadFaceBasisKey( const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes); -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDEXP3D_H diff --git a/library/StdRegions/StdHexExp.cpp b/library/StdRegions/StdHexExp.cpp index aa0ae2aabf..b5017572f2 100644 --- a/library/StdRegions/StdHexExp.cpp +++ b/library/StdRegions/StdHexExp.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdHexExp::StdHexExp() { @@ -2577,5 +2575,4 @@ void StdHexExp::v_GetSimplexEquiSpacedConnectivity(Array<OneD, int> &conn, plane += np * np; } } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdHexExp.h b/library/StdRegions/StdHexExp.h index ff0290773f..b2a0196b7b 100644 --- a/library/StdRegions/StdHexExp.h +++ b/library/StdRegions/StdHexExp.h @@ -39,9 +39,7 @@ #include <StdRegions/StdExpansion3D.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { /// Class representing a hexehedral element in reference space. class StdHexExp : virtual public StdExpansion3D @@ -53,7 +51,7 @@ public: const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc); STD_REGIONS_EXPORT StdHexExp(const StdHexExp &T); - STD_REGIONS_EXPORT virtual ~StdHexExp() override; + STD_REGIONS_EXPORT ~StdHexExp() override; protected: //---------------------------- @@ -63,14 +61,14 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; - STD_REGIONS_EXPORT virtual void v_PhysDeriv( + STD_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -129,71 +127,66 @@ protected: //--------------------------------------- // Evaluation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_LocCoordToLocCollapsed( + STD_REGIONS_EXPORT void v_LocCoordToLocCollapsed( const Array<OneD, const NekDouble> &xi, Array<OneD, NekDouble> &eta) override; - STD_REGIONS_EXPORT virtual void v_LocCollapsedToLocCoord( + STD_REGIONS_EXPORT void v_LocCollapsedToLocCoord( const Array<OneD, const NekDouble> &eta, Array<OneD, NekDouble> &xi) override; - STD_REGIONS_EXPORT virtual void v_FillMode( + STD_REGIONS_EXPORT void v_FillMode( const int mode, Array<OneD, NekDouble> &outarray) override; STD_REGIONS_EXPORT NekDouble v_PhysEvaluateBasis( - const Array<OneD, const NekDouble> &coords, int mode) final override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + const Array<OneD, const NekDouble> &coords, int mode) final; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; //--------------------------- // Helper functions //--------------------------- - STD_REGIONS_EXPORT virtual int v_GetNverts() const override; - STD_REGIONS_EXPORT virtual int v_GetNedges() const override; - STD_REGIONS_EXPORT virtual int v_GetNtraces() const override; - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const override; - STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceIntNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNumPoints( - const int i) const override; - - STD_REGIONS_EXPORT virtual LibUtilities::PointsKey v_GetTracePointsKey( + STD_REGIONS_EXPORT int v_GetNverts() const override; + STD_REGIONS_EXPORT int v_GetNedges() const override; + STD_REGIONS_EXPORT int v_GetNtraces() const override; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; + STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override; + + STD_REGIONS_EXPORT LibUtilities::PointsKey v_GetTracePointsKey( const int i, const int j) const override; - STD_REGIONS_EXPORT virtual int v_CalcNumberOfCoefficients( + STD_REGIONS_EXPORT int v_CalcNumberOfCoefficients( const std::vector<unsigned int> &nummodes, int &modes_offset) override; - STD_REGIONS_EXPORT virtual const LibUtilities::BasisKey v_GetTraceBasisKey( + STD_REGIONS_EXPORT const LibUtilities::BasisKey v_GetTraceBasisKey( const int i, const int k) const override; - STD_REGIONS_EXPORT virtual bool v_IsBoundaryInteriorExpansion() - const override; - STD_REGIONS_EXPORT virtual void v_GetCoords( + STD_REGIONS_EXPORT bool v_IsBoundaryInteriorExpansion() const override; + STD_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_x, Array<OneD, NekDouble> &coords_y, Array<OneD, NekDouble> &coords_z) override; - STD_REGIONS_EXPORT virtual void v_GetTraceNumModes( + STD_REGIONS_EXPORT void v_GetTraceNumModes( const int fid, int &numModes0, int &numModes1, Orientation faceOrient = eDir1FwdDir1_Dir2FwdDir2) override; - STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override; //-------------------------- // Mappings //-------------------------- - STD_REGIONS_EXPORT virtual int v_GetVertexMap( + STD_REGIONS_EXPORT int v_GetVertexMap( int localVertexId, bool useCoeffPacking = false) override; - STD_REGIONS_EXPORT virtual void v_GetInteriorMap( + STD_REGIONS_EXPORT void v_GetInteriorMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetBoundaryMap( + STD_REGIONS_EXPORT void v_GetBoundaryMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int fid, Array<OneD, unsigned int> &maparray) override; - STD_REGIONS_EXPORT virtual void v_GetElmtTraceToTraceMap( + STD_REGIONS_EXPORT void v_GetElmtTraceToTraceMap( const unsigned int fid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, Orientation faceOrient, int P, int Q) override; - STD_REGIONS_EXPORT virtual void v_GetEdgeInteriorToElementMap( + STD_REGIONS_EXPORT void v_GetEdgeInteriorToElementMap( const int tid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override; @@ -206,15 +199,15 @@ protected: //--------------------------------------- // Wrapper functions //--------------------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; //--------------------------------------- // Output interpolation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_GetSimplexEquiSpacedConnectivity( + STD_REGIONS_EXPORT void v_GetSimplexEquiSpacedConnectivity( Array<OneD, int> &conn, bool standard = true) override; //--------------------------------------- @@ -244,7 +237,7 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + STD_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override; STD_REGIONS_EXPORT void v_ExponentialFilter( @@ -254,7 +247,6 @@ protected: typedef std::shared_ptr<StdHexExp> StdHexExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif diff --git a/library/StdRegions/StdMatrixKey.cpp b/library/StdRegions/StdMatrixKey.cpp index 76a1cb7592..d2a7b94865 100644 --- a/library/StdRegions/StdMatrixKey.cpp +++ b/library/StdRegions/StdMatrixKey.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdMatrixKey::StdMatrixKey(const MatrixType matrixType, const LibUtilities::ShapeType shapeType, @@ -310,5 +308,4 @@ std::ostream &operator<<(std::ostream &os, const StdMatrixKey &rhs) return os; } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdMatrixKey.h b/library/StdRegions/StdMatrixKey.h index dfd75fbaeb..2e0dd4b054 100644 --- a/library/StdRegions/StdMatrixKey.h +++ b/library/StdRegions/StdMatrixKey.h @@ -40,9 +40,7 @@ #include <StdRegions/StdRegions.hpp> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdExpansion; @@ -202,7 +200,6 @@ STD_REGIONS_EXPORT std::ostream &operator<<(std::ostream &os, typedef std::shared_ptr<StdMatrixKey> StdMatrixKeySharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif diff --git a/library/StdRegions/StdNodalPrismExp.cpp b/library/StdRegions/StdNodalPrismExp.cpp index 5063016e30..15d069e811 100644 --- a/library/StdRegions/StdNodalPrismExp.cpp +++ b/library/StdRegions/StdNodalPrismExp.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> // for PointsManager, etc #include <StdRegions/StdNodalPrismExp.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdNodalPrismExp::StdNodalPrismExp() @@ -388,5 +386,4 @@ DNekMatSharedPtr StdNodalPrismExp::v_CreateStdMatrix(const StdMatrixKey &mkey) { return StdNodalPrismExp::v_GenMatrix(mkey); } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdNodalPrismExp.h b/library/StdRegions/StdNodalPrismExp.h index 188543537e..7251519265 100644 --- a/library/StdRegions/StdNodalPrismExp.h +++ b/library/StdRegions/StdNodalPrismExp.h @@ -38,9 +38,7 @@ #include <StdRegions/StdPrismExp.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdNodalPrismExp final : public StdPrismExp { @@ -51,7 +49,7 @@ public: const LibUtilities::BasisKey &Bc, const LibUtilities::PointsType Ntype); STD_REGIONS_EXPORT StdNodalPrismExp(const StdNodalPrismExp &T); - STD_REGIONS_EXPORT virtual ~StdNodalPrismExp() override; + STD_REGIONS_EXPORT ~StdNodalPrismExp() override; //------------------------------- // Nodal basis specific routines @@ -136,6 +134,5 @@ protected: }; typedef std::shared_ptr<StdNodalPrismExp> StdNodalPrismExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDNODALTETEXP_H diff --git a/library/StdRegions/StdNodalTetExp.cpp b/library/StdRegions/StdNodalTetExp.cpp index 4ee18599a0..2e157def3e 100644 --- a/library/StdRegions/StdNodalTetExp.cpp +++ b/library/StdRegions/StdNodalTetExp.cpp @@ -37,9 +37,7 @@ #include <LibUtilities/Foundations/ManagerAccess.h> // for PointsManager, etc #include <StdRegions/StdNodalTetExp.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdNodalTetExp::StdNodalTetExp() { @@ -392,5 +390,4 @@ DNekMatSharedPtr StdNodalTetExp::v_CreateStdMatrix(const StdMatrixKey &mkey) { return StdNodalTetExp::v_GenMatrix(mkey); } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdNodalTetExp.h b/library/StdRegions/StdNodalTetExp.h index 2bc39eaa3f..20eb0ebfd3 100644 --- a/library/StdRegions/StdNodalTetExp.h +++ b/library/StdRegions/StdNodalTetExp.h @@ -38,9 +38,7 @@ #include <StdRegions/StdTetExp.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdNodalTetExp : virtual public StdTetExp { @@ -136,6 +134,5 @@ protected: }; typedef std::shared_ptr<StdNodalTetExp> StdNodalTetExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDNODALTETEXP_H diff --git a/library/StdRegions/StdNodalTriExp.cpp b/library/StdRegions/StdNodalTriExp.cpp index 7f0b438032..483d1338f2 100644 --- a/library/StdRegions/StdNodalTriExp.cpp +++ b/library/StdRegions/StdNodalTriExp.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdNodalTriExp::StdNodalTriExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, @@ -447,5 +445,4 @@ void StdNodalTriExp::v_HelmholtzMatrixOp( // Private helper functions //--------------------------------------- -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdNodalTriExp.h b/library/StdRegions/StdNodalTriExp.h index 07e826ef80..e47f9c1b31 100644 --- a/library/StdRegions/StdNodalTriExp.h +++ b/library/StdRegions/StdNodalTriExp.h @@ -40,9 +40,7 @@ #include <StdRegions/StdRegionsDeclspec.h> #include <StdRegions/StdTriExp.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdNodalTriExp : virtual public StdTriExp { @@ -172,7 +170,6 @@ protected: }; typedef std::shared_ptr<StdNodalTriExp> StdNodalTriExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDNODALTRIEXP_H diff --git a/library/StdRegions/StdPointExp.cpp b/library/StdRegions/StdPointExp.cpp index c103ff6c63..df415567a9 100644 --- a/library/StdRegions/StdPointExp.cpp +++ b/library/StdRegions/StdPointExp.cpp @@ -38,9 +38,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdPointExp::StdPointExp() @@ -203,5 +201,4 @@ DNekMatSharedPtr StdPointExp::v_CreateStdMatrix(const StdMatrixKey &mkey) return v_GenMatrix(mkey); } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdPointExp.h b/library/StdRegions/StdPointExp.h index a90808d538..0b92c93c1d 100644 --- a/library/StdRegions/StdPointExp.h +++ b/library/StdRegions/StdPointExp.h @@ -40,9 +40,7 @@ #include <StdRegions/StdExpansion0D.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdPointExp : virtual public StdExpansion0D { @@ -50,97 +48,95 @@ public: STD_REGIONS_EXPORT StdPointExp(); STD_REGIONS_EXPORT StdPointExp(const LibUtilities::BasisKey &Ba); STD_REGIONS_EXPORT StdPointExp(const StdPointExp &T); - STD_REGIONS_EXPORT virtual ~StdPointExp() override; + STD_REGIONS_EXPORT ~StdPointExp() override; protected: //---------------------------- // Evaluations Methods //--------------------------- - STD_REGIONS_EXPORT virtual void v_GetCoords( + STD_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_0, Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2) override; //---------------------------- // Helper functions //--------------------------- - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const override; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; //----------------------------- // Transforms //----------------------------- - STD_REGIONS_EXPORT virtual void v_BwdTrans( + STD_REGIONS_EXPORT void v_BwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_FwdTrans( + STD_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFac( + STD_REGIONS_EXPORT void v_BwdTrans_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //---------------------------- // Inner product functions //---------------------------- - STD_REGIONS_EXPORT virtual void v_IProductWRTBase( + STD_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase( + STD_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &base, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, int coll_check) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------- // Evaluations Methods //--------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; private: - virtual int v_GetNverts() const override final + int v_GetNverts() const final { return 1; } - virtual int v_NumBndryCoeffs() const override final + int v_NumBndryCoeffs() const final { return 0; } - virtual int v_NumDGBndryCoeffs() const override final + int v_NumDGBndryCoeffs() const final { return 0; } - virtual int v_GetTraceNcoeffs(const int i) const override final + int v_GetTraceNcoeffs(const int i) const final { boost::ignore_unused(i); return 0; } - virtual int v_GetTraceIntNcoeffs(const int i) const override final + int v_GetTraceIntNcoeffs(const int i) const final { boost::ignore_unused(i); return 0; } - virtual int v_GetTraceNumPoints(const int i) const override final + int v_GetTraceNumPoints(const int i) const final { boost::ignore_unused(i); return 0; } - virtual int v_GetVertexMap(int localVertexId, - bool useCoeffPacking = false) override + int v_GetVertexMap(int localVertexId, bool useCoeffPacking = false) override { boost::ignore_unused(localVertexId, useCoeffPacking); ASSERTL2(localVertexId == 0, "Only single point in StdPointExp!"); @@ -150,7 +146,6 @@ private: // type defines for use of PointExp in a boost vector typedef std::shared_ptr<StdPointExp> StdPointExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDPOINTEXP_H diff --git a/library/StdRegions/StdPrismExp.cpp b/library/StdRegions/StdPrismExp.cpp index 6b5149ac8d..dba76bb6da 100644 --- a/library/StdRegions/StdPrismExp.cpp +++ b/library/StdRegions/StdPrismExp.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdPrismExp::StdPrismExp() @@ -1775,7 +1773,9 @@ void StdPrismExp::v_GetTraceInteriorToElementMap( // Triangular faces are processed in the above switch loop; for // remaining quad faces, set up orientation if necessary. if (fid == 1 || fid == 3) + { return; + } if (faceOrient == eDir1FwdDir1_Dir2BwdDir2 || faceOrient == eDir1BwdDir1_Dir2BwdDir2 || @@ -2207,5 +2207,4 @@ void StdPrismExp::v_ReduceOrderCoeffs( OrthoPrismExp->BwdTrans(coeff_tmp1, phys_tmp); StdPrismExp::FwdTrans(phys_tmp, outarray); } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdPrismExp.h b/library/StdRegions/StdPrismExp.h index c6c2f20bc4..7ec0e02aaa 100644 --- a/library/StdRegions/StdPrismExp.h +++ b/library/StdRegions/StdPrismExp.h @@ -39,9 +39,7 @@ #include <StdRegions/StdExpansion3D.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { /// Class representing a prismatic element in reference space. @@ -62,7 +60,7 @@ public: STD_REGIONS_EXPORT StdPrismExp(const StdPrismExp &T); - STD_REGIONS_EXPORT virtual ~StdPrismExp() override; + STD_REGIONS_EXPORT ~StdPrismExp() override; protected: //--------------------------------------- @@ -72,14 +70,14 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; - STD_REGIONS_EXPORT virtual void v_PhysDeriv( + STD_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -89,10 +87,10 @@ protected: STD_REGIONS_EXPORT void v_BwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFac( + STD_REGIONS_EXPORT void v_BwdTrans_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFacKernel( + STD_REGIONS_EXPORT void v_BwdTrans_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &base2, @@ -100,7 +98,7 @@ protected: Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) override; - STD_REGIONS_EXPORT virtual void v_FwdTrans( + STD_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -110,11 +108,11 @@ protected: STD_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFacKernel( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &base2, @@ -122,82 +120,77 @@ protected: Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_LocCoordToLocCollapsed( + STD_REGIONS_EXPORT void v_LocCoordToLocCollapsed( const Array<OneD, const NekDouble> &xi, Array<OneD, NekDouble> &eta) override; - STD_REGIONS_EXPORT virtual void v_LocCollapsedToLocCoord( + STD_REGIONS_EXPORT void v_LocCollapsedToLocCoord( const Array<OneD, const NekDouble> &eta, Array<OneD, NekDouble> &xi) override; - STD_REGIONS_EXPORT virtual void v_GetCoords( - Array<OneD, NekDouble> &xi_x, Array<OneD, NekDouble> &xi_y, - Array<OneD, NekDouble> &xi_z) override; - STD_REGIONS_EXPORT virtual void v_FillMode( + STD_REGIONS_EXPORT void v_GetCoords(Array<OneD, NekDouble> &xi_x, + Array<OneD, NekDouble> &xi_y, + Array<OneD, NekDouble> &xi_z) override; + STD_REGIONS_EXPORT void v_FillMode( const int mode, Array<OneD, NekDouble> &outarray) override; STD_REGIONS_EXPORT NekDouble v_PhysEvaluateBasis( - const Array<OneD, const NekDouble> &coords, int mode) final override; - STD_REGIONS_EXPORT virtual void v_GetTraceNumModes( + const Array<OneD, const NekDouble> &coords, int mode) final; + STD_REGIONS_EXPORT void v_GetTraceNumModes( const int fid, int &numModes0, int &numModes1, Orientation faceOrient = eDir1FwdDir1_Dir2FwdDir2) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluate( - const Array<OneD, NekDouble> &coord, - const Array<OneD, const NekDouble> &inarray, - std::array<NekDouble, 3> &firstOrderDerivs) override; + STD_REGIONS_EXPORT NekDouble + v_PhysEvaluate(const Array<OneD, NekDouble> &coord, + const Array<OneD, const NekDouble> &inarray, + std::array<NekDouble, 3> &firstOrderDerivs) override; //--------------------------------------- // Helper functions //--------------------------------------- - STD_REGIONS_EXPORT virtual int v_GetNverts() const override; - STD_REGIONS_EXPORT virtual int v_GetNedges() const override; - STD_REGIONS_EXPORT virtual int v_GetNtraces() const override; - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const override; - STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceIntNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNumPoints( - const int i) const override; - - STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const override; - - STD_REGIONS_EXPORT virtual const LibUtilities::BasisKey v_GetTraceBasisKey( + STD_REGIONS_EXPORT int v_GetNverts() const override; + STD_REGIONS_EXPORT int v_GetNedges() const override; + STD_REGIONS_EXPORT int v_GetNtraces() const override; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; + STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override; + + STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override; + + STD_REGIONS_EXPORT const LibUtilities::BasisKey v_GetTraceBasisKey( const int i, const int k) const override; - STD_REGIONS_EXPORT virtual LibUtilities::PointsKey v_GetTracePointsKey( + STD_REGIONS_EXPORT LibUtilities::PointsKey v_GetTracePointsKey( const int i, const int j) const override; - STD_REGIONS_EXPORT virtual int v_CalcNumberOfCoefficients( + STD_REGIONS_EXPORT int v_CalcNumberOfCoefficients( const std::vector<unsigned int> &nummodes, int &modes_offset) override; - STD_REGIONS_EXPORT virtual bool v_IsBoundaryInteriorExpansion() - const override; + STD_REGIONS_EXPORT bool v_IsBoundaryInteriorExpansion() const override; //--------------------------------------- // Mappings //--------------------------------------- - STD_REGIONS_EXPORT virtual int v_GetVertexMap( + STD_REGIONS_EXPORT int v_GetVertexMap( int localVertexId, bool useCoeffPacking = false) override; - STD_REGIONS_EXPORT virtual void v_GetInteriorMap( + STD_REGIONS_EXPORT void v_GetInteriorMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetBoundaryMap( + STD_REGIONS_EXPORT void v_GetBoundaryMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int fid, Array<OneD, unsigned int> &maparray) override; - STD_REGIONS_EXPORT virtual void v_GetElmtTraceToTraceMap( + STD_REGIONS_EXPORT void v_GetElmtTraceToTraceMap( const unsigned int fid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, Orientation faceOrient, int P, int Q) override; - STD_REGIONS_EXPORT virtual void v_GetEdgeInteriorToElementMap( + STD_REGIONS_EXPORT void v_GetEdgeInteriorToElementMap( const int tid, Array<OneD, unsigned int> &maparray, Array<OneD, int> &signarray, const Orientation traceOrient = eDir1FwdDir1_Dir2FwdDir2) override; @@ -210,10 +203,10 @@ protected: //--------------------------------------- // Wrapper functions //--------------------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; STD_REGIONS_EXPORT void v_MultiplyByStdQuadratureMetric( const Array<OneD, const NekDouble> &inarray, @@ -238,7 +231,6 @@ private: typedef std::shared_ptr<StdPrismExp> StdPrismExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDPRISMEXP_H diff --git a/library/StdRegions/StdPyrExp.cpp b/library/StdRegions/StdPyrExp.cpp index 6969c2492b..44a6ddb6c9 100644 --- a/library/StdRegions/StdPyrExp.cpp +++ b/library/StdRegions/StdPyrExp.cpp @@ -40,9 +40,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdPyrExp::StdPyrExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, @@ -2199,5 +2197,4 @@ void StdPyrExp::v_ReduceOrderCoeffs(int numMin, StdPyrExp::FwdTrans(phys_tmp, outarray); } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdPyrExp.h b/library/StdRegions/StdPyrExp.h index 744431dcc7..0d22de9a9d 100644 --- a/library/StdRegions/StdPyrExp.h +++ b/library/StdRegions/StdPyrExp.h @@ -40,9 +40,7 @@ #include <StdRegions/StdRegionsDeclspec.h> #include <tuple> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { typedef std::tuple<unsigned int, unsigned int, unsigned int, unsigned int> Mode; @@ -256,7 +254,6 @@ private: STD_REGIONS_EXPORT int GetMode(int I, int J, int K); }; typedef std::shared_ptr<StdPyrExp> StdPyrExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDPYREXP_H diff --git a/library/StdRegions/StdQuadExp.cpp b/library/StdRegions/StdQuadExp.cpp index 17c0ebf0ae..9eccd3d655 100644 --- a/library/StdRegions/StdQuadExp.cpp +++ b/library/StdRegions/StdQuadExp.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdQuadExp::StdQuadExp() @@ -1648,5 +1646,4 @@ void StdQuadExp::v_GetSimplexEquiSpacedConnectivity(Array<OneD, int> &conn, } } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdQuadExp.h b/library/StdRegions/StdQuadExp.h index 65c0d00f46..6eb18fd006 100644 --- a/library/StdRegions/StdQuadExp.h +++ b/library/StdRegions/StdQuadExp.h @@ -40,9 +40,7 @@ #include <StdRegions/StdRegions.hpp> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdExpansion1D; @@ -57,7 +55,7 @@ public: STD_REGIONS_EXPORT StdQuadExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb); STD_REGIONS_EXPORT StdQuadExp(const StdQuadExp &T); - STD_REGIONS_EXPORT virtual ~StdQuadExp() override; + STD_REGIONS_EXPORT ~StdQuadExp() override; protected: //------------------------------- @@ -73,14 +71,14 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - STD_REGIONS_EXPORT virtual void v_PhysDeriv( + STD_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -90,19 +88,19 @@ protected: STD_REGIONS_EXPORT void v_BwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_FwdTransBndConstrained( + STD_REGIONS_EXPORT void v_FwdTransBndConstrained( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFac( + STD_REGIONS_EXPORT void v_BwdTrans_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFacKernel( + STD_REGIONS_EXPORT void v_BwdTrans_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1) override; - STD_REGIONS_EXPORT virtual void v_FwdTrans( + STD_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -112,64 +110,59 @@ protected: STD_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFacKernel( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_LocCoordToLocCollapsed( + STD_REGIONS_EXPORT void v_LocCoordToLocCollapsed( const Array<OneD, const NekDouble> &xi, Array<OneD, NekDouble> &eta) override; - STD_REGIONS_EXPORT virtual void v_LocCollapsedToLocCoord( + STD_REGIONS_EXPORT void v_LocCollapsedToLocCoord( const Array<OneD, const NekDouble> &eta, Array<OneD, NekDouble> &xi) override; - STD_REGIONS_EXPORT virtual void v_FillMode( - const int mode, Array<OneD, NekDouble> &array) override; + STD_REGIONS_EXPORT void v_FillMode(const int mode, + Array<OneD, NekDouble> &array) override; //--------------------------- // Helper functions //--------------------------- - STD_REGIONS_EXPORT virtual int v_GetNverts() const final override; - STD_REGIONS_EXPORT virtual int v_GetNtraces() const final override; - STD_REGIONS_EXPORT virtual int v_GetTraceNcoeffs( - const int i) const final override; - STD_REGIONS_EXPORT virtual int v_GetTraceIntNcoeffs( - const int i) const final override; - STD_REGIONS_EXPORT virtual int v_GetTraceNumPoints( - const int i) const final override; - STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const final override; - STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const final override; - - STD_REGIONS_EXPORT virtual int v_CalcNumberOfCoefficients( + STD_REGIONS_EXPORT int v_GetNverts() const final; + STD_REGIONS_EXPORT int v_GetNtraces() const final; + STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const final; + STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const final; + STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const final; + STD_REGIONS_EXPORT int v_NumBndryCoeffs() const final; + STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const final; + + STD_REGIONS_EXPORT int v_CalcNumberOfCoefficients( const std::vector<unsigned int> &nummodes, int &modes_offset) override; - STD_REGIONS_EXPORT virtual const LibUtilities::BasisKey v_GetTraceBasisKey( - const int i, const int j) const final override; - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const final override; - STD_REGIONS_EXPORT virtual bool v_IsBoundaryInteriorExpansion() - const override; - STD_REGIONS_EXPORT virtual void v_GetCoords( + STD_REGIONS_EXPORT const LibUtilities::BasisKey v_GetTraceBasisKey( + const int i, const int j) const final; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const final; + STD_REGIONS_EXPORT bool v_IsBoundaryInteriorExpansion() const override; + STD_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_0, Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2) override; - STD_REGIONS_EXPORT virtual NekDouble v_PhysEvaluateBasis( + STD_REGIONS_EXPORT NekDouble v_PhysEvaluateBasis( const Array<OneD, const NekDouble> &coords, int mode) override; - STD_REGIONS_EXPORT inline virtual NekDouble v_PhysEvaluate( + STD_REGIONS_EXPORT inline NekDouble v_PhysEvaluate( const Array<OneD, NekDouble> &coord, const Array<OneD, const NekDouble> &inarray, std::array<NekDouble, 3> &firstOrderDerivs) override @@ -180,14 +173,14 @@ protected: //-------------------------- // Mappings //-------------------------- - STD_REGIONS_EXPORT virtual void v_GetBoundaryMap( + STD_REGIONS_EXPORT void v_GetBoundaryMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetInteriorMap( + STD_REGIONS_EXPORT void v_GetInteriorMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual int v_GetVertexMap( + STD_REGIONS_EXPORT int v_GetVertexMap( int localVertexId, bool useCoeffPacking = false) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int traceid, Array<OneD, unsigned int> &maparray) override; @@ -199,10 +192,10 @@ protected: //--------------------------------------- // Wrapper functions //--------------------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; //--------------------------------------- // Operator evaluation functions @@ -210,24 +203,24 @@ protected: STD_REGIONS_EXPORT void v_MassMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_WeakDerivMatrixOp( + STD_REGIONS_EXPORT void v_WeakDerivMatrixOp( const int i, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + STD_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + STD_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_ExponentialFilter( + STD_REGIONS_EXPORT void v_ExponentialFilter( Array<OneD, NekDouble> &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override; - STD_REGIONS_EXPORT virtual void v_ReduceOrderCoeffs( + STD_REGIONS_EXPORT void v_ReduceOrderCoeffs( int numMin, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; STD_REGIONS_EXPORT void v_MultiplyByStdQuadratureMetric( @@ -237,12 +230,11 @@ protected: //--------------------------------------- // Output interpolation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_GetSimplexEquiSpacedConnectivity( + STD_REGIONS_EXPORT void v_GetSimplexEquiSpacedConnectivity( Array<OneD, int> &conn, bool standard = true) override; }; typedef std::shared_ptr<StdQuadExp> StdQuadExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDQUADEXP_H diff --git a/library/StdRegions/StdRegions.hpp b/library/StdRegions/StdRegions.hpp index 624f6dc0b5..2984509249 100644 --- a/library/StdRegions/StdRegions.hpp +++ b/library/StdRegions/StdRegions.hpp @@ -40,13 +40,7 @@ #include <LibUtilities/BasicUtils/SharedArray.hpp> #include <map> -namespace Nektar -{ - -/** \brief The namespace associated with the the StdRegions library - * (\ref pageStdRegions "StdRegions introduction") - */ -namespace StdRegions +namespace Nektar::StdRegions { enum ElementType { @@ -489,7 +483,6 @@ const NekDouble kSVVDGFilter[9][11] = { {0, 0, 0, 0, 0, 0, 0.0023592, 0.23683, 0.17196, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 0.0026055, 0.28682, 0.22473, 1}}; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDREGIONS_H diff --git a/library/StdRegions/StdSegExp.cpp b/library/StdRegions/StdSegExp.cpp index a9242b315f..d906f43f09 100644 --- a/library/StdRegions/StdSegExp.cpp +++ b/library/StdRegions/StdSegExp.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { /** \brief defult constructor */ StdSegExp::StdSegExp() @@ -946,5 +944,4 @@ void StdSegExp::v_GetElmtTraceToTraceMap(const unsigned int eid, } } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdSegExp.h b/library/StdRegions/StdSegExp.h index 4ac29413d2..0051df2153 100644 --- a/library/StdRegions/StdSegExp.h +++ b/library/StdRegions/StdSegExp.h @@ -38,9 +38,7 @@ #include <StdRegions/StdExpansion1D.h> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { /// Class representing a segment element in reference space /// All interface of this class sits in StdExpansion class @@ -53,15 +51,15 @@ public: STD_REGIONS_EXPORT StdSegExp(const StdSegExp &T); - STD_REGIONS_EXPORT virtual ~StdSegExp() override; + STD_REGIONS_EXPORT ~StdSegExp() override; protected: //---------------------------- // Integration Methods //---------------------------- - STD_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + STD_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //----------------------------- // Differentiation Methods @@ -136,16 +134,16 @@ protected: //---------------------------- // Evaluations Methods //--------------------------- - STD_REGIONS_EXPORT virtual void v_LocCoordToLocCollapsed( + STD_REGIONS_EXPORT void v_LocCoordToLocCollapsed( const Array<OneD, const NekDouble> &xi, Array<OneD, NekDouble> &eta) override; - STD_REGIONS_EXPORT virtual void v_LocCollapsedToLocCoord( + STD_REGIONS_EXPORT void v_LocCollapsedToLocCoord( const Array<OneD, const NekDouble> &eta, Array<OneD, NekDouble> &xi) override; STD_REGIONS_EXPORT NekDouble v_PhysEvaluateBasis( - const Array<OneD, const NekDouble> &coords, int mode) final override; + const Array<OneD, const NekDouble> &coords, int mode) final; STD_REGIONS_EXPORT inline NekDouble v_PhysEvaluate( const Array<OneD, NekDouble> &coord, @@ -166,7 +164,7 @@ protected: secondOrderDerivs); } - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; @@ -174,21 +172,21 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + STD_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_ExponentialFilter( + STD_REGIONS_EXPORT void v_ExponentialFilter( Array<OneD, NekDouble> &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override; - STD_REGIONS_EXPORT virtual void v_MultiplyByStdQuadratureMetric( + STD_REGIONS_EXPORT void v_MultiplyByStdQuadratureMetric( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_FillMode( + STD_REGIONS_EXPORT void v_FillMode( const int mode, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetCoords( + STD_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_0, Array<OneD, NekDouble> &coords_1, Array<OneD, NekDouble> &coords_2) override; @@ -196,49 +194,44 @@ protected: // Public Mappings //--------------------------- - STD_REGIONS_EXPORT virtual void v_GetBoundaryMap( + STD_REGIONS_EXPORT void v_GetBoundaryMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetInteriorMap( + STD_REGIONS_EXPORT void v_GetInteriorMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual int v_GetVertexMap( + STD_REGIONS_EXPORT int v_GetVertexMap( int localVertexId, bool useCoeffPacking = false) override; //---------------------------- // Helper functions //--------------------------- - STD_REGIONS_EXPORT virtual int v_GetNverts() const final override; - STD_REGIONS_EXPORT virtual int v_GetNtraces() const final override; - STD_REGIONS_EXPORT virtual int v_GetTraceNcoeffs( - const int i) const final override; - STD_REGIONS_EXPORT virtual int v_GetTraceIntNcoeffs( - const int i) const final override; - STD_REGIONS_EXPORT virtual int v_GetTraceNumPoints( - const int i) const final override; - STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual bool v_IsBoundaryInteriorExpansion() - const override; - STD_REGIONS_EXPORT virtual int v_CalcNumberOfCoefficients( + STD_REGIONS_EXPORT int v_GetNverts() const final; + STD_REGIONS_EXPORT int v_GetNtraces() const final; + STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const final; + STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const final; + STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const final; + STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override; + STD_REGIONS_EXPORT bool v_IsBoundaryInteriorExpansion() const override; + STD_REGIONS_EXPORT int v_CalcNumberOfCoefficients( const std::vector<unsigned int> &nummodes, int &modes_offset) override; - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const override; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; //---------------------------- // Wrapper functions //--------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; //--------------------------------------- // Output interpolation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_GetSimplexEquiSpacedConnectivity( + STD_REGIONS_EXPORT void v_GetSimplexEquiSpacedConnectivity( Array<OneD, int> &conn, bool standard = true) override; // Operator evaluation functions @@ -248,7 +241,7 @@ protected: int numMin, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int traceid, Array<OneD, unsigned int> &maparray) override; @@ -266,7 +259,6 @@ private: }; typedef std::shared_ptr<StdSegExp> StdSegExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDSEGEXP_H diff --git a/library/StdRegions/StdTetExp.cpp b/library/StdRegions/StdTetExp.cpp index a8bb501353..0478c4570d 100644 --- a/library/StdRegions/StdTetExp.cpp +++ b/library/StdRegions/StdTetExp.cpp @@ -39,9 +39,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdTetExp::StdTetExp() { @@ -2316,5 +2314,4 @@ void StdTetExp::v_GetSimplexEquiSpacedConnectivity(Array<OneD, int> &conn, } } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdTetExp.h b/library/StdRegions/StdTetExp.h index 01cafdbe7a..87a1f4b8c9 100644 --- a/library/StdRegions/StdTetExp.h +++ b/library/StdRegions/StdTetExp.h @@ -40,9 +40,7 @@ #include <StdRegions/StdRegions.hpp> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdMatrixKey; @@ -59,7 +57,7 @@ public: const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys); STD_REGIONS_EXPORT StdTetExp(const StdTetExp &T); - STD_REGIONS_EXPORT virtual ~StdTetExp() override; + STD_REGIONS_EXPORT ~StdTetExp() override; LibUtilities::ShapeType DetShapeType() const { @@ -79,14 +77,14 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_dx, Array<OneD, NekDouble> &out_dy, Array<OneD, NekDouble> &out_dz) override; - STD_REGIONS_EXPORT virtual void v_PhysDeriv( + STD_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -96,10 +94,10 @@ protected: STD_REGIONS_EXPORT void v_BwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFac( + STD_REGIONS_EXPORT void v_BwdTrans_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFacKernel( + STD_REGIONS_EXPORT void v_BwdTrans_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &base2, @@ -107,7 +105,7 @@ protected: Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) override; - STD_REGIONS_EXPORT virtual void v_FwdTrans( + STD_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -117,11 +115,11 @@ protected: STD_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFacKernel( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &base2, @@ -129,30 +127,30 @@ protected: Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_LocCoordToLocCollapsed( + STD_REGIONS_EXPORT void v_LocCoordToLocCollapsed( const Array<OneD, const NekDouble> &xi, Array<OneD, NekDouble> &eta) override; - STD_REGIONS_EXPORT virtual void v_LocCollapsedToLocCoord( + STD_REGIONS_EXPORT void v_LocCollapsedToLocCoord( const Array<OneD, const NekDouble> &eta, Array<OneD, NekDouble> &xi) override; - STD_REGIONS_EXPORT virtual void v_GetCoords( + STD_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_x, Array<OneD, NekDouble> &coords_y, Array<OneD, NekDouble> &coords_z) override; - STD_REGIONS_EXPORT virtual void v_FillMode( + STD_REGIONS_EXPORT void v_FillMode( const int mode, Array<OneD, NekDouble> &outarray) override; STD_REGIONS_EXPORT NekDouble v_PhysEvaluateBasis( - const Array<OneD, const NekDouble> &coords, int mode) final override; + const Array<OneD, const NekDouble> &coords, int mode) final; STD_REGIONS_EXPORT NekDouble v_PhysEvaluate(const Array<OneD, NekDouble> &coord, @@ -166,39 +164,34 @@ protected: //--------------------------- // Helper functions //--------------------------- - STD_REGIONS_EXPORT virtual int v_GetNverts() const override; - STD_REGIONS_EXPORT virtual int v_GetNedges() const override; - STD_REGIONS_EXPORT virtual int v_GetNtraces() const override; - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const override; - STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceIntNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNumPoints( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const override; - STD_REGIONS_EXPORT virtual LibUtilities::PointsKey v_GetTracePointsKey( + STD_REGIONS_EXPORT int v_GetNverts() const override; + STD_REGIONS_EXPORT int v_GetNedges() const override; + STD_REGIONS_EXPORT int v_GetNtraces() const override; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const override; + STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override; + STD_REGIONS_EXPORT int v_GetEdgeNcoeffs(const int i) const override; + STD_REGIONS_EXPORT LibUtilities::PointsKey v_GetTracePointsKey( const int i, const int j) const override; - STD_REGIONS_EXPORT virtual int v_CalcNumberOfCoefficients( + STD_REGIONS_EXPORT int v_CalcNumberOfCoefficients( const std::vector<unsigned int> &nummodes, int &modes_offset) override; - STD_REGIONS_EXPORT virtual const LibUtilities::BasisKey v_GetTraceBasisKey( + STD_REGIONS_EXPORT const LibUtilities::BasisKey v_GetTraceBasisKey( const int i, const int k) const override; - STD_REGIONS_EXPORT virtual bool v_IsBoundaryInteriorExpansion() - const override; + STD_REGIONS_EXPORT bool v_IsBoundaryInteriorExpansion() const override; //-------------------------- // Mappings //-------------------------- - STD_REGIONS_EXPORT virtual int v_GetVertexMap( + STD_REGIONS_EXPORT int v_GetVertexMap( int localVertexId, bool useCoeffPacking = false) override; - STD_REGIONS_EXPORT virtual void v_GetInteriorMap( + STD_REGIONS_EXPORT void v_GetInteriorMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetBoundaryMap( + STD_REGIONS_EXPORT void v_GetBoundaryMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int fid, Array<OneD, unsigned int> &maparray) override; STD_REGIONS_EXPORT void v_GetElmtTraceToTraceMap( @@ -219,16 +212,16 @@ protected: //--------------------------------------- // Wrapper functions //--------------------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; STD_REGIONS_EXPORT void v_MultiplyByStdQuadratureMetric( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + STD_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override; //--------------------------------------- @@ -242,7 +235,7 @@ protected: // Output interpolation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_GetSimplexEquiSpacedConnectivity( + STD_REGIONS_EXPORT void v_GetSimplexEquiSpacedConnectivity( Array<OneD, int> &conn, bool standard = true) override; private: @@ -253,7 +246,6 @@ private: }; typedef std::shared_ptr<StdTetExp> StdTetExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDTETEXP_H diff --git a/library/StdRegions/StdTriExp.cpp b/library/StdRegions/StdTriExp.cpp index d205d927a2..f94a7971b0 100644 --- a/library/StdRegions/StdTriExp.cpp +++ b/library/StdRegions/StdTriExp.cpp @@ -41,9 +41,7 @@ using namespace std; -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { StdTriExp::StdTriExp() { @@ -1601,5 +1599,4 @@ void StdTriExp::v_GetSimplexEquiSpacedConnectivity(Array<OneD, int> &conn, row += np - i; } } -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions diff --git a/library/StdRegions/StdTriExp.h b/library/StdRegions/StdTriExp.h index 4404b0256b..832f45af8d 100644 --- a/library/StdRegions/StdTriExp.h +++ b/library/StdRegions/StdTriExp.h @@ -39,9 +39,7 @@ #include <StdRegions/StdRegions.hpp> #include <StdRegions/StdRegionsDeclspec.h> -namespace Nektar -{ -namespace StdRegions +namespace Nektar::StdRegions { class StdMatrixKey; @@ -52,14 +50,14 @@ public: STD_REGIONS_EXPORT StdTriExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb); STD_REGIONS_EXPORT StdTriExp(const StdTriExp &T); - STD_REGIONS_EXPORT virtual ~StdTriExp() override; + STD_REGIONS_EXPORT ~StdTriExp() override; protected: //------------------------------- // Integration Methods //------------------------------- - STD_REGIONS_EXPORT virtual NekDouble v_Integral( - const Array<OneD, const NekDouble> &inarray) override; + STD_REGIONS_EXPORT NekDouble + v_Integral(const Array<OneD, const NekDouble> &inarray) override; //---------------------------- // Differentiation Methods @@ -68,14 +66,14 @@ protected: const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - STD_REGIONS_EXPORT virtual void v_PhysDeriv( + STD_REGIONS_EXPORT void v_PhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &out_d0, Array<OneD, NekDouble> &out_d1, Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray) override; - STD_REGIONS_EXPORT virtual void v_StdPhysDeriv( + STD_REGIONS_EXPORT void v_StdPhysDeriv( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -85,19 +83,19 @@ protected: STD_REGIONS_EXPORT void v_BwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFac( + STD_REGIONS_EXPORT void v_BwdTrans_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_BwdTrans_SumFacKernel( + STD_REGIONS_EXPORT void v_BwdTrans_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1) override; - STD_REGIONS_EXPORT virtual void v_FwdTrans( + STD_REGIONS_EXPORT void v_FwdTrans( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_FwdTransBndConstrained( + STD_REGIONS_EXPORT void v_FwdTransBndConstrained( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; @@ -107,36 +105,36 @@ protected: STD_REGIONS_EXPORT void v_IProductWRTBase( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFac( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, bool multiplybyweights = true) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTBase_SumFacKernel( + STD_REGIONS_EXPORT void v_IProductWRTBase_SumFacKernel( const Array<OneD, const NekDouble> &base0, const Array<OneD, const NekDouble> &base1, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp, bool doCheckCollDir0, bool doCheckCollDir1) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_IProductWRTDerivBase_SumFac( + STD_REGIONS_EXPORT void v_IProductWRTDerivBase_SumFac( const int dir, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Evaluation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_LocCoordToLocCollapsed( + STD_REGIONS_EXPORT void v_LocCoordToLocCollapsed( const Array<OneD, const NekDouble> &xi, Array<OneD, NekDouble> &eta) override; - STD_REGIONS_EXPORT virtual void v_LocCollapsedToLocCoord( + STD_REGIONS_EXPORT void v_LocCollapsedToLocCoord( const Array<OneD, const NekDouble> &eta, Array<OneD, NekDouble> &xi) override; - STD_REGIONS_EXPORT virtual void v_FillMode( + STD_REGIONS_EXPORT void v_FillMode( const int mode, Array<OneD, NekDouble> &outarray) override; STD_REGIONS_EXPORT NekDouble v_PhysEvaluateBasis( - const Array<OneD, const NekDouble> &coords, int mode) final override; + const Array<OneD, const NekDouble> &coords, int mode) final; STD_REGIONS_EXPORT NekDouble v_PhysEvaluate(const Array<OneD, NekDouble> &coord, @@ -146,40 +144,35 @@ protected: //--------------------------- // Helper functions //--------------------------- - STD_REGIONS_EXPORT virtual int v_GetNverts() const final override; - STD_REGIONS_EXPORT virtual int v_GetNtraces() const final override; - STD_REGIONS_EXPORT virtual LibUtilities::ShapeType v_DetShapeType() - const final override; - STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceIntNcoeffs( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_GetTraceNumPoints( - const int i) const override; - STD_REGIONS_EXPORT virtual int v_CalcNumberOfCoefficients( + STD_REGIONS_EXPORT int v_GetNverts() const final; + STD_REGIONS_EXPORT int v_GetNtraces() const final; + STD_REGIONS_EXPORT LibUtilities::ShapeType v_DetShapeType() const final; + STD_REGIONS_EXPORT int v_NumBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_NumDGBndryCoeffs() const override; + STD_REGIONS_EXPORT int v_GetTraceNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceIntNcoeffs(const int i) const override; + STD_REGIONS_EXPORT int v_GetTraceNumPoints(const int i) const override; + STD_REGIONS_EXPORT int v_CalcNumberOfCoefficients( const std::vector<unsigned int> &nummodes, int &modes_offset) override; - STD_REGIONS_EXPORT virtual void v_GetCoords( + STD_REGIONS_EXPORT void v_GetCoords( Array<OneD, NekDouble> &coords_x, Array<OneD, NekDouble> &coords_y, Array<OneD, NekDouble> &coords_z) override; - STD_REGIONS_EXPORT virtual bool v_IsBoundaryInteriorExpansion() - const override; - STD_REGIONS_EXPORT virtual const LibUtilities::BasisKey v_GetTraceBasisKey( + STD_REGIONS_EXPORT bool v_IsBoundaryInteriorExpansion() const override; + STD_REGIONS_EXPORT const LibUtilities::BasisKey v_GetTraceBasisKey( const int i, const int j) const override; //-------------------------- // Mappings //-------------------------- - STD_REGIONS_EXPORT virtual int v_GetVertexMap( + STD_REGIONS_EXPORT int v_GetVertexMap( int localVertexId, bool useCoeffPacking = false) override; - STD_REGIONS_EXPORT virtual void v_GetInteriorMap( + STD_REGIONS_EXPORT void v_GetInteriorMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetBoundaryMap( + STD_REGIONS_EXPORT void v_GetBoundaryMap( Array<OneD, unsigned int> &outarray) override; - STD_REGIONS_EXPORT virtual void v_GetTraceCoeffMap( + STD_REGIONS_EXPORT void v_GetTraceCoeffMap( const unsigned int traceid, Array<OneD, unsigned int> &maparray) override; @@ -191,10 +184,10 @@ protected: //--------------------------------------- // Wrapper functions //--------------------------------------- - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_GenMatrix( - const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual DNekMatSharedPtr v_CreateStdMatrix( - const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_GenMatrix(const StdMatrixKey &mkey) override; + STD_REGIONS_EXPORT DNekMatSharedPtr + v_CreateStdMatrix(const StdMatrixKey &mkey) override; //--------------------------------------- // Operator evaluation functions @@ -202,34 +195,33 @@ protected: STD_REGIONS_EXPORT void v_MassMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_SVVLaplacianFilter( + STD_REGIONS_EXPORT void v_SVVLaplacianFilter( Array<OneD, NekDouble> &array, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_ReduceOrderCoeffs( + STD_REGIONS_EXPORT void v_ReduceOrderCoeffs( int numMin, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; - STD_REGIONS_EXPORT virtual void v_LaplacianMatrixOp( + STD_REGIONS_EXPORT void v_LaplacianMatrixOp( const int k1, const int k2, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_WeakDerivMatrixOp( + STD_REGIONS_EXPORT void v_WeakDerivMatrixOp( const int i, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_HelmholtzMatrixOp( + STD_REGIONS_EXPORT void v_HelmholtzMatrixOp( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray, const StdMatrixKey &mkey) override; - STD_REGIONS_EXPORT virtual void v_MultiplyByStdQuadratureMetric( + STD_REGIONS_EXPORT void v_MultiplyByStdQuadratureMetric( const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray) override; //--------------------------------------- // Output interpolation functions //--------------------------------------- - STD_REGIONS_EXPORT virtual void v_GetSimplexEquiSpacedConnectivity( + STD_REGIONS_EXPORT void v_GetSimplexEquiSpacedConnectivity( Array<OneD, int> &conn, bool standard = true) override; }; typedef std::shared_ptr<StdTriExp> StdTriExpSharedPtr; -} // namespace StdRegions -} // namespace Nektar +} // namespace Nektar::StdRegions #endif // STDTRIEXP_H diff --git a/library/UnitTests/BlockMatrixUnitTests.cpp b/library/UnitTests/BlockMatrixUnitTests.cpp index f6ae51feac..cc0bfe3484 100644 --- a/library/UnitTests/BlockMatrixUnitTests.cpp +++ b/library/UnitTests/BlockMatrixUnitTests.cpp @@ -38,9 +38,7 @@ #include <boost/test/unit_test.hpp> #include <iostream> -namespace Nektar -{ -namespace BlockMatrixUnitTests +namespace Nektar::BlockMatrixUnitTests { BOOST_AUTO_TEST_CASE(TestEqualSizedBlockConstruction) { @@ -500,5 +498,4 @@ BOOST_AUTO_TEST_CASE(TestEmptyRowElementMultiplication) BOOST_CHECK_EQUAL(result1, expected_result); } -} // namespace BlockMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::BlockMatrixUnitTests diff --git a/library/UnitTests/Collections/TestHexCollection.cpp b/library/UnitTests/Collections/TestHexCollection.cpp index a3fa9c7d38..f5890ff117 100644 --- a/library/UnitTests/Collections/TestHexCollection.cpp +++ b/library/UnitTests/Collections/TestHexCollection.cpp @@ -39,9 +39,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace HexCollectionTests +namespace Nektar::HexCollectionTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( unsigned int id, SpatialDomains::PointGeomSharedPtr v0, @@ -421,7 +419,9 @@ BOOST_AUTO_TEST_CASE(TestHexBwdTrans_IterPerExp_VariableP_MultiElmt) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -562,7 +562,9 @@ BOOST_AUTO_TEST_CASE(TestHexBwdTrans_SumFac_UniformP) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -633,7 +635,9 @@ BOOST_AUTO_TEST_CASE(TestHexBwdTrans_SumFac_UniformP_MultiElmt) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -2083,7 +2087,9 @@ BOOST_AUTO_TEST_CASE(TestHexIProductWRTBase_SumFac_VariableP_MultiElmt) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -2177,7 +2183,9 @@ BOOST_AUTO_TEST_CASE( std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -2271,7 +2279,9 @@ BOOST_AUTO_TEST_CASE( std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -4634,5 +4644,4 @@ BOOST_AUTO_TEST_CASE(TestHexHelmholtz_MatrixFree_UniformP_ConstVarDiff) BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon); } } -} // namespace HexCollectionTests -} // namespace Nektar +} // namespace Nektar::HexCollectionTests diff --git a/library/UnitTests/Collections/TestPrismCollection.cpp b/library/UnitTests/Collections/TestPrismCollection.cpp index d493dc5d57..d427ef12eb 100644 --- a/library/UnitTests/Collections/TestPrismCollection.cpp +++ b/library/UnitTests/Collections/TestPrismCollection.cpp @@ -39,9 +39,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace PrismCollectionTests +namespace Nektar::PrismCollectionTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( unsigned int id, SpatialDomains::PointGeomSharedPtr v0, @@ -3695,5 +3693,4 @@ BOOST_AUTO_TEST_CASE(TestPrismHelmholtz_MatrixFree_UniformP_ConstVarDiff) } } -} // namespace PrismCollectionTests -} // namespace Nektar +} // namespace Nektar::PrismCollectionTests diff --git a/library/UnitTests/Collections/TestPyrCollection.cpp b/library/UnitTests/Collections/TestPyrCollection.cpp index 8f6bca4f04..d5be2f67dc 100644 --- a/library/UnitTests/Collections/TestPyrCollection.cpp +++ b/library/UnitTests/Collections/TestPyrCollection.cpp @@ -41,9 +41,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace PyrCollectionTests +namespace Nektar::PyrCollectionTests { #define NELMTS 10 @@ -3397,5 +3395,4 @@ BOOST_AUTO_TEST_CASE(TestPyrHelmholtz_MatrixFree_UniformP_ConstVarDiff) BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon); } } -} // namespace PyrCollectionTests -} // namespace Nektar +} // namespace Nektar::PyrCollectionTests diff --git a/library/UnitTests/Collections/TestQuadCollection.cpp b/library/UnitTests/Collections/TestQuadCollection.cpp index 2eef3f05d9..7c61a52f1d 100644 --- a/library/UnitTests/Collections/TestQuadCollection.cpp +++ b/library/UnitTests/Collections/TestQuadCollection.cpp @@ -39,9 +39,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace QuadCollectionTests +namespace Nektar::QuadCollectionTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( unsigned int id, SpatialDomains::PointGeomSharedPtr v0, @@ -3288,5 +3286,4 @@ BOOST_AUTO_TEST_CASE(TestQuadHelmholtz_MatrixFree_UniformP_ConstVarDiff) BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon); } } -} // namespace QuadCollectionTests -} // namespace Nektar +} // namespace Nektar::QuadCollectionTests diff --git a/library/UnitTests/Collections/TestSegCollection.cpp b/library/UnitTests/Collections/TestSegCollection.cpp index fb77fa2173..8bb95e8dfc 100644 --- a/library/UnitTests/Collections/TestSegCollection.cpp +++ b/library/UnitTests/Collections/TestSegCollection.cpp @@ -39,9 +39,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace SegCollectionTests +namespace Nektar::SegCollectionTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( unsigned int id, SpatialDomains::PointGeomSharedPtr v0, @@ -1797,6 +1795,4 @@ BOOST_AUTO_TEST_CASE( BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon); } } -} // namespace SegCollectionTests - -} // namespace Nektar +} // namespace Nektar::SegCollectionTests diff --git a/library/UnitTests/Collections/TestTetCollection.cpp b/library/UnitTests/Collections/TestTetCollection.cpp index 84ef920284..7a70f4d2ef 100644 --- a/library/UnitTests/Collections/TestTetCollection.cpp +++ b/library/UnitTests/Collections/TestTetCollection.cpp @@ -39,9 +39,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace TetCollectionTests +namespace Nektar::TetCollectionTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( unsigned int id, SpatialDomains::PointGeomSharedPtr v0, @@ -207,7 +205,9 @@ BOOST_AUTO_TEST_CASE(TestTetBwdTrans_IterPerExp_VariableP_MultiElmt) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -669,7 +669,9 @@ BOOST_AUTO_TEST_CASE(TestTetBwdTrans_SumFac_MultiElmt) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -745,7 +747,9 @@ BOOST_AUTO_TEST_CASE(TestTetBwdTrans_SumFac_MultiElmt_VariableP) std::vector<StdRegions::StdExpansionSharedPtr> CollExp; for (int i = 0; i < nelmts; ++i) + { CollExp.push_back(Exp); + } LibUtilities::SessionReaderSharedPtr dummySession; Collections::CollectionOptimisation colOpt(dummySession, 3, @@ -3234,5 +3238,4 @@ BOOST_AUTO_TEST_CASE(TestTetmHelmholtz_MatrixFree_UniformP_ConstVarDiff) BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon); } } -} // namespace TetCollectionTests -} // namespace Nektar +} // namespace Nektar::TetCollectionTests diff --git a/library/UnitTests/Collections/TestTriCollection.cpp b/library/UnitTests/Collections/TestTriCollection.cpp index 0f0176d8ad..7d68e2c02b 100644 --- a/library/UnitTests/Collections/TestTriCollection.cpp +++ b/library/UnitTests/Collections/TestTriCollection.cpp @@ -41,9 +41,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace TriCollectionTests +namespace Nektar::TriCollectionTests { #define NELMTS 10 @@ -3535,5 +3533,4 @@ BOOST_AUTO_TEST_CASE(TestTriHelmholtz_MatrixFree_UniformP_ConstVarDiff) BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon); } } -} // namespace TriCollectionTests -} // namespace Nektar +} // namespace Nektar::TriCollectionTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestBandedMatrixStoragePolicy.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestBandedMatrixStoragePolicy.cpp index 41f3c08d23..a2005a7c5f 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestBandedMatrixStoragePolicy.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestBandedMatrixStoragePolicy.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace BandedMatrixStoragePolicyUnitTests +namespace Nektar::BandedMatrixStoragePolicyUnitTests { typedef BandedMatrixFuncs Policy; @@ -204,5 +202,4 @@ BOOST_AUTO_TEST_CASE(TestSetValue) m.SetValue(3, 3, 30); BOOST_CHECK_EQUAL(30, m(3, 3)); } -} // namespace BandedMatrixStoragePolicyUnitTests -} // namespace Nektar +} // namespace Nektar::BandedMatrixStoragePolicyUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestBlockMatrix.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestBlockMatrix.cpp index dc1f5acfb8..97306775c6 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestBlockMatrix.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestBlockMatrix.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace BlockMatrixUnitTests +namespace Nektar::BlockMatrixUnitTests { BOOST_AUTO_TEST_CASE(TestRowsAndColumnsPerBlockAccess) { @@ -838,5 +836,4 @@ BOOST_AUTO_TEST_CASE(TestBlockMatrixErrorFrom6_10) //#endif } -} // namespace BlockMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::BlockMatrixUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixOperations.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixOperations.cpp index 37cee2f0a0..d7ee21b5ea 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixOperations.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixOperations.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace DiagonalMatrixOperationsUnitTests +namespace Nektar::DiagonalMatrixOperationsUnitTests { BOOST_AUTO_TEST_CASE(TestDoubleDiagonalVectorMultiplication) { @@ -79,5 +77,4 @@ BOOST_AUTO_TEST_CASE(TestDoubleScaledDiagonalVectorMultiplication) BOOST_CHECK_EQUAL(expected_result, result); } -} // namespace DiagonalMatrixOperationsUnitTests -} // namespace Nektar +} // namespace Nektar::DiagonalMatrixOperationsUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixStoragePolicy.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixStoragePolicy.cpp index 37bc0934ad..9c960d3631 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixStoragePolicy.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestDiagonalMatrixStoragePolicy.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace DiagonalMatrixStoragePolicyUnitTests +namespace Nektar::DiagonalMatrixStoragePolicyUnitTests { typedef DiagonalMatrixFuncs Policy; @@ -81,5 +79,4 @@ BOOST_AUTO_TEST_CASE(TestAdvanceDiagonal) } } -} // namespace DiagonalMatrixStoragePolicyUnitTests -} // namespace Nektar +} // namespace Nektar::DiagonalMatrixStoragePolicyUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixOperations.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixOperations.cpp index 5d18e58e22..04b87ce7fb 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixOperations.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixOperations.cpp @@ -41,9 +41,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace FullMatrixOperationsUnitTests +namespace Nektar::FullMatrixOperationsUnitTests { template <typename DataType, typename MatrixType> int foo(NekMatrix<DataType, MatrixType> &d) @@ -249,5 +247,4 @@ BOOST_AUTO_TEST_CASE(TestThreeWrappedMatrixMultiplicationWithTranspose) BOOST_CHECK_EQUAL(result(0, 1), 625.0); BOOST_CHECK_EQUAL(result(1, 1), 926.0); } -} // namespace FullMatrixOperationsUnitTests -} // namespace Nektar +} // namespace Nektar::FullMatrixOperationsUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixStoragePolicy.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixStoragePolicy.cpp index fec0e61c2d..2c63a01857 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixStoragePolicy.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestFullMatrixStoragePolicy.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace FullMatrixStoragePolicyUnitTests +namespace Nektar::FullMatrixStoragePolicyUnitTests { typedef FullMatrixFuncs Policy; @@ -125,5 +123,4 @@ BOOST_AUTO_TEST_CASE(TestAdvanceFull) } } -} // namespace FullMatrixStoragePolicyUnitTests -} // namespace Nektar +} // namespace Nektar::FullMatrixStoragePolicyUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrix.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrix.cpp index 0d01d46b49..bb5c92e04b 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrix.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrix.cpp @@ -36,9 +36,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace LowerTriangularMatrixUnitTests +namespace Nektar::LowerTriangularMatrixUnitTests { typedef LowerTriangularMatrixFuncs Policy; @@ -80,5 +78,4 @@ BOOST_AUTO_TEST_CASE(Test3x3MatrixVectorMultiplyLower) BOOST_CHECK_EQUAL(expected_result, result); } } -} // namespace LowerTriangularMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::LowerTriangularMatrixUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrixStoragePolicy.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrixStoragePolicy.cpp index 0738e0fd08..bc35fd398a 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrixStoragePolicy.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestLowerTriangularMatrixStoragePolicy.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace LowerTriangularStoragePolicyUnitTests +namespace Nektar::LowerTriangularStoragePolicyUnitTests { typedef LowerTriangularMatrixFuncs Policy; @@ -115,5 +113,4 @@ BOOST_AUTO_TEST_CASE(TestAdvanceLowerTriangular) BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn); } } -} // namespace LowerTriangularStoragePolicyUnitTests -} // namespace Nektar +} // namespace Nektar::LowerTriangularStoragePolicyUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestNekMatrixMultiplication.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestNekMatrixMultiplication.cpp index f5e752a43a..38e7a732c7 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestNekMatrixMultiplication.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestNekMatrixMultiplication.cpp @@ -39,13 +39,7 @@ #include <functional> #include <iostream> -namespace Nektar -{ - -// Note - All tests should excercise both the blas and normal code. -// The easiest way to do this is to perform one test with integers and -// one with doubles. -namespace MatrixMultiplicationTests +namespace Nektar::MatrixMultiplicationTests { BOOST_AUTO_TEST_CASE(TestStandardFullTimesStandardFull) { @@ -215,5 +209,4 @@ BOOST_AUTO_TEST_CASE(TestScaledFullTimesVector) BOOST_CHECK_CLOSE(result[3], 1095.0, epsilon); } } -} // namespace MatrixMultiplicationTests -} // namespace Nektar +} // namespace Nektar::MatrixMultiplicationTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestNekVector.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestNekVector.cpp index efa913a250..16c11a8122 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestNekVector.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestNekVector.cpp @@ -38,9 +38,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace VariableSizedNekVectorUnitTests +namespace Nektar::VariableSizedNekVectorUnitTests { BOOST_AUTO_TEST_CASE(TestConstructorWithArrayAndUserSpecifiedSize) { @@ -111,5 +109,4 @@ BOOST_AUTO_TEST_CASE(TestVectorAddition) BOOST_CHECK_EQUAL(expected_result, result); } -} // namespace VariableSizedNekVectorUnitTests -} // namespace Nektar +} // namespace Nektar::VariableSizedNekVectorUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledBlockMatrixOperations.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledBlockMatrixOperations.cpp index 53618b0b61..dd3e28bc1c 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledBlockMatrixOperations.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledBlockMatrixOperations.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace ScaledBlockMatrixUnitTests +namespace Nektar::ScaledBlockMatrixUnitTests { BOOST_AUTO_TEST_CASE(TestMatrixVectorMultiplication) { @@ -170,5 +168,4 @@ BOOST_AUTO_TEST_CASE(TestMultiplicationScaledBlock_1) BOOST_CHECK_EQUAL(expected_result, result); BOOST_CHECK_EQUAL(expected_result, result1); } -} // namespace ScaledBlockMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::ScaledBlockMatrixUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledMatrix.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledMatrix.cpp index b0dcecb182..e1c6fa35a7 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledMatrix.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestScaledMatrix.cpp @@ -40,9 +40,7 @@ #include <UnitTests/LibUtilities/LinearAlgebra/TestCombinationRunner.h> -namespace Nektar -{ -namespace ScaledMatrixUnitTests +namespace Nektar::ScaledMatrixUnitTests { typedef NekMatrix<double> InnerMatrix; typedef NekMatrix<InnerMatrix, ScaledMatrixTag> SMat; @@ -473,5 +471,4 @@ BOOST_AUTO_TEST_CASE(TestScaledTMatrixVectorMultiply) BOOST_CHECK_EQUAL(expected_result, result2); } } -} // namespace ScaledMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::ScaledMatrixUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestSymmetricMatrixStoragePolicy.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestSymmetricMatrixStoragePolicy.cpp index c410f9c70c..0ff6e96a62 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestSymmetricMatrixStoragePolicy.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestSymmetricMatrixStoragePolicy.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace SymmetricMatrixStoragePolicyUnitTests +namespace Nektar::SymmetricMatrixStoragePolicyUnitTests { typedef SymmetricMatrixFuncs Policy; @@ -120,5 +118,4 @@ BOOST_AUTO_TEST_CASE(TestAdvanceSymmetric) BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn); } } -} // namespace SymmetricMatrixStoragePolicyUnitTests -} // namespace Nektar +} // namespace Nektar::SymmetricMatrixStoragePolicyUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestTriangularMatrixOperations.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestTriangularMatrixOperations.cpp index 9a69bcf82c..1e1dd29c11 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestTriangularMatrixOperations.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestTriangularMatrixOperations.cpp @@ -38,9 +38,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace TriangularMatrixVectorMultiplicationUnitTests +namespace Nektar::TriangularMatrixVectorMultiplicationUnitTests { BOOST_AUTO_TEST_CASE(TestUpperTriangularMatrixVectorMultiplication) { @@ -213,5 +211,4 @@ BOOST_AUTO_TEST_CASE(TestLowerTriangularTransposeSolve) BOOST_CHECK_EQUAL(expected_result, x); } -} // namespace TriangularMatrixVectorMultiplicationUnitTests -} // namespace Nektar +} // namespace Nektar::TriangularMatrixVectorMultiplicationUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrix.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrix.cpp index b4fb01460c..b88b7a5849 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrix.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrix.cpp @@ -37,9 +37,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace UpperTriangularMatrixUnitTests +namespace Nektar::UpperTriangularMatrixUnitTests { typedef UpperTriangularMatrixFuncs Policy; @@ -81,5 +79,4 @@ BOOST_AUTO_TEST_CASE(Test3x3MatrixVectorMultiplyUpper) BOOST_CHECK_EQUAL(expected_result, result); } } -} // namespace UpperTriangularMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::UpperTriangularMatrixUnitTests diff --git a/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrixStoragePolicy.cpp b/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrixStoragePolicy.cpp index c993645353..43e99e597a 100644 --- a/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrixStoragePolicy.cpp +++ b/library/UnitTests/LibUtilities/LinearAlgebra/TestUpperTriangularMatrixStoragePolicy.cpp @@ -41,9 +41,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace UpperTriangularUnitTests +namespace Nektar::UpperTriangularUnitTests { typedef UpperTriangularMatrixFuncs Policy; @@ -106,5 +104,4 @@ BOOST_AUTO_TEST_CASE(TestAdvanceUpperTriangular) BOOST_CHECK_EQUAL(std::numeric_limits<unsigned int>::max(), curColumn); } } -} // namespace UpperTriangularUnitTests -} // namespace Nektar +} // namespace Nektar::UpperTriangularUnitTests diff --git a/library/UnitTests/LibUtilities/TestCheckedCast.cpp b/library/UnitTests/LibUtilities/TestCheckedCast.cpp index 1215ea6928..a8bcecb9d1 100644 --- a/library/UnitTests/LibUtilities/TestCheckedCast.cpp +++ b/library/UnitTests/LibUtilities/TestCheckedCast.cpp @@ -39,11 +39,7 @@ #include <iostream> -namespace Nektar -{ -namespace LibUtilities -{ -namespace CheckCastUnitTest +namespace Nektar::LibUtilities::CheckCastUnitTest { BOOST_AUTO_TEST_CASE(TestDoubleToInt) @@ -86,6 +82,4 @@ BOOST_AUTO_TEST_CASE(TestDoubleToInt) } } -} // namespace CheckCastUnitTest -} // namespace LibUtilities -} // namespace Nektar \ No newline at end of file +} // namespace Nektar::LibUtilities::CheckCastUnitTest \ No newline at end of file diff --git a/library/UnitTests/LibUtilities/TestConsistentObjectAccess.cpp b/library/UnitTests/LibUtilities/TestConsistentObjectAccess.cpp index ce219d0b44..85340976de 100644 --- a/library/UnitTests/LibUtilities/TestConsistentObjectAccess.cpp +++ b/library/UnitTests/LibUtilities/TestConsistentObjectAccess.cpp @@ -38,9 +38,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace ConsistentObjectAccessUnitTests +namespace Nektar::ConsistentObjectAccessUnitTests { BOOST_AUTO_TEST_CASE(TestValueTypes) { @@ -85,7 +83,7 @@ BOOST_AUTO_TEST_CASE(TestPointerTypes) BOOST_CHECK_EQUAL(d1, ConsistentObjectAccess<double *>::const_pointer(d1)); BOOST_CHECK(ConsistentObjectAccess<double *>::ReferencesObject(d1)); BOOST_CHECK(!ConsistentObjectAccess<double *>::ReferencesObject( - static_cast<double *>(0))); + static_cast<double *>(nullptr))); BOOST_CHECK_EQUAL(*d2, ConsistentObjectAccess<const double *>::reference(d2)); @@ -100,20 +98,20 @@ BOOST_AUTO_TEST_CASE(TestPointerTypes) d2, ConsistentObjectAccess<const double *>::const_pointer(d2)); BOOST_CHECK(ConsistentObjectAccess<const double *>::ReferencesObject(d2)); BOOST_CHECK(!ConsistentObjectAccess<const double *>::ReferencesObject( - static_cast<const double *>(0))); + static_cast<const double *>(nullptr))); #if defined(NEKTAR_DEBUG) || defined(NEKTAR_FULLDEBUG) BOOST_CHECK_THROW(ConsistentObjectAccess<double *>::const_reference( - static_cast<double *>(0)), + static_cast<double *>(nullptr)), ErrorUtil::NekError); BOOST_CHECK_THROW(ConsistentObjectAccess<const double *>::const_reference( - static_cast<const double *>(0)), + static_cast<const double *>(nullptr)), + ErrorUtil::NekError); + BOOST_CHECK_THROW(ConsistentObjectAccess<double *>::reference( + static_cast<double *>(nullptr)), ErrorUtil::NekError); - BOOST_CHECK_THROW( - ConsistentObjectAccess<double *>::reference(static_cast<double *>(0)), - ErrorUtil::NekError); BOOST_CHECK_THROW(ConsistentObjectAccess<const double *>::reference( - static_cast<const double *>(0)), + static_cast<const double *>(nullptr)), ErrorUtil::NekError); #endif } @@ -194,5 +192,4 @@ BOOST_AUTO_TEST_CASE(TestSharedPointerTypes) #endif } -} // namespace ConsistentObjectAccessUnitTests -} // namespace Nektar +} // namespace Nektar::ConsistentObjectAccessUnitTests diff --git a/library/UnitTests/LibUtilities/TestInterpreter.cpp b/library/UnitTests/LibUtilities/TestInterpreter.cpp index 46896d8d76..c047367540 100644 --- a/library/UnitTests/LibUtilities/TestInterpreter.cpp +++ b/library/UnitTests/LibUtilities/TestInterpreter.cpp @@ -39,9 +39,7 @@ #include <iostream> -namespace Nektar -{ -namespace InterpreterUnitTests +namespace Nektar::InterpreterUnitTests { BOOST_AUTO_TEST_CASE(TestConstant) @@ -87,5 +85,4 @@ BOOST_AUTO_TEST_CASE(TestFmodOperator) BOOST_CHECK_CLOSE(out[0], 2.0, epsilon); } -} // namespace InterpreterUnitTests -} // namespace Nektar +} // namespace Nektar::InterpreterUnitTests diff --git a/library/UnitTests/LibUtilities/TestPolylib.cpp b/library/UnitTests/LibUtilities/TestPolylib.cpp index 5664632694..f65a3e1691 100644 --- a/library/UnitTests/LibUtilities/TestPolylib.cpp +++ b/library/UnitTests/LibUtilities/TestPolylib.cpp @@ -41,9 +41,7 @@ #include <tuple> #include <vector> -namespace Nektar -{ -namespace UnitTests +namespace Nektar::UnitTests { /// Lower range of number of quadrature points to use for unit tests. @@ -94,7 +92,7 @@ inline void TestIntegral( func(&z[0], &w[0], np, alpha, beta); for (int n = 2; n < 2 * np - 1 - o; ++n) { - Polylib::jacobfd(np, &z[0], &p[0], NULL, n, alpha, beta); + Polylib::jacobfd(np, &z[0], &p[0], nullptr, n, alpha, beta); double sum = ddot(np, &w[0], 1, &p[0], 1); BOOST_CHECK_SMALL(sum, EPS); } @@ -373,5 +371,4 @@ BOOST_AUTO_TEST_CASE(TestGammaFraction) } } -} // namespace UnitTests -} // namespace Nektar +} // namespace Nektar::UnitTests diff --git a/library/UnitTests/LibUtilities/TestRealComparison.cpp b/library/UnitTests/LibUtilities/TestRealComparison.cpp index d1bf299275..ce490d9b36 100644 --- a/library/UnitTests/LibUtilities/TestRealComparison.cpp +++ b/library/UnitTests/LibUtilities/TestRealComparison.cpp @@ -36,9 +36,7 @@ #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace RealComparisonUnitTests +namespace Nektar::RealComparisonUnitTests { BOOST_AUTO_TEST_CASE(TestRealComparisonSmall) { @@ -176,5 +174,4 @@ BOOST_AUTO_TEST_CASE(TestRealComparisonNoThrow) // BOOST_CHECK_THROW(LibUtilities::IsRealEqual(ad1, ad2, 0), // std::runtime_error); // } -} // namespace RealComparisonUnitTests -} // namespace Nektar +} // namespace Nektar::RealComparisonUnitTests diff --git a/library/UnitTests/LibUtilities/TestSharedArray.cpp b/library/UnitTests/LibUtilities/TestSharedArray.cpp index 29a27b6ab3..853a2802c7 100644 --- a/library/UnitTests/LibUtilities/TestSharedArray.cpp +++ b/library/UnitTests/LibUtilities/TestSharedArray.cpp @@ -38,9 +38,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace SharedArrayUnitTests +namespace Nektar::SharedArrayUnitTests { BOOST_AUTO_TEST_CASE(TestArrayConstructionFromConstantArray) { @@ -75,5 +73,4 @@ BOOST_AUTO_TEST_CASE(TestRowPointers) CheckAddresses(array_1[0], array_1.data()); CheckAddresses(array_1[1], array_1.data() + 7); } -} // namespace SharedArrayUnitTests -} // namespace Nektar +} // namespace Nektar::SharedArrayUnitTests diff --git a/library/UnitTests/LibUtilities/TestVmathSIMD.cpp b/library/UnitTests/LibUtilities/TestVmathSIMD.cpp index 0560387b90..7ffa1d9d27 100644 --- a/library/UnitTests/LibUtilities/TestVmathSIMD.cpp +++ b/library/UnitTests/LibUtilities/TestVmathSIMD.cpp @@ -39,9 +39,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace VmathSIMDUnitTests +namespace Nektar::VmathSIMDUnitTests { BOOST_AUTO_TEST_CASE(TestVadd) { @@ -344,5 +342,4 @@ BOOST_AUTO_TEST_CASE(TestGathrInt) } } -} // namespace VmathSIMDUnitTests -} // namespace Nektar +} // namespace Nektar::VmathSIMDUnitTests diff --git a/library/UnitTests/LocalRegions/TestGetCoords.cpp b/library/UnitTests/LocalRegions/TestGetCoords.cpp index a4a1970db6..6bf4407e30 100644 --- a/library/UnitTests/LocalRegions/TestGetCoords.cpp +++ b/library/UnitTests/LocalRegions/TestGetCoords.cpp @@ -37,9 +37,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace HexExpTests +namespace Nektar::HexExpTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( unsigned int id, SpatialDomains::PointGeomSharedPtr v0, @@ -208,5 +206,4 @@ BOOST_AUTO_TEST_CASE(TestScaledAndTranslatedHexExp) BOOST_CHECK_CLOSE(c0[4], .44126383098, epsilon); BOOST_CHECK_CLOSE(c0[5], .5, epsilon); } -} // namespace HexExpTests -} // namespace Nektar +} // namespace Nektar::HexExpTests diff --git a/library/UnitTests/LocalRegions/TestReOrientFacePhysMap.cpp b/library/UnitTests/LocalRegions/TestReOrientFacePhysMap.cpp index f5c23847b7..1f8e0ec154 100644 --- a/library/UnitTests/LocalRegions/TestReOrientFacePhysMap.cpp +++ b/library/UnitTests/LocalRegions/TestReOrientFacePhysMap.cpp @@ -38,9 +38,7 @@ #include <StdRegions/StdRegions.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace Expansion3DTests +namespace Nektar::Expansion3DTests { SpatialDomains::SegGeomSharedPtr CreateSegGeom( @@ -251,5 +249,4 @@ BOOST_AUTO_TEST_CASE(TestReOrientQuadFacePhysMap) BOOST_CHECK_EQUAL(idmap[8], 0); } -} // namespace Expansion3DTests -} // namespace Nektar +} // namespace Nektar::Expansion3DTests diff --git a/library/UnitTests/Memory/TestNekMemoryManager.cpp b/library/UnitTests/Memory/TestNekMemoryManager.cpp index 8747765154..9d1b5e1e3f 100644 --- a/library/UnitTests/Memory/TestNekMemoryManager.cpp +++ b/library/UnitTests/Memory/TestNekMemoryManager.cpp @@ -38,9 +38,7 @@ #include <LibUtilities/Memory/NekMemoryManager.hpp> -namespace Nektar -{ -namespace MemManagerUnitTests +namespace Nektar::MemManagerUnitTests { BOOST_AUTO_TEST_CASE(testParameterizedConstructors) { @@ -81,10 +79,10 @@ BOOST_AUTO_TEST_CASE(testParameterizedConstructors) MemoryManager<CountedObject<int>>::Deallocate(ob3); MemoryManager<CountedObject<int>>::Deallocate(ob4); - BOOST_CHECK(ob1 == NULL); - BOOST_CHECK(ob2 == NULL); - BOOST_CHECK(ob3 == NULL); - BOOST_CHECK(ob4 == NULL); + BOOST_CHECK(ob1 == nullptr); + BOOST_CHECK(ob2 == nullptr); + BOOST_CHECK(ob3 == nullptr); + BOOST_CHECK(ob4 == nullptr); BOOST_CHECK_EQUAL(CountedObject<int>::numberDefaultConstructed, 1u); BOOST_CHECK_EQUAL(CountedObject<int>::numberOf1ParameterConstructions, 1u); @@ -159,5 +157,4 @@ BOOST_AUTO_TEST_CASE(ReproduceMemoryErrors) std::shared_ptr<int> m1 = MemoryManager<int>::AllocateSharedPtr(); m1 = MemoryManager<int>::AllocateSharedPtr(); } -} // namespace MemManagerUnitTests -} // namespace Nektar +} // namespace Nektar::MemManagerUnitTests diff --git a/library/UnitTests/MultiRegions/TestVarcoeffHashing.cpp b/library/UnitTests/MultiRegions/TestVarcoeffHashing.cpp index 1fd408074b..bab88e39f1 100644 --- a/library/UnitTests/MultiRegions/TestVarcoeffHashing.cpp +++ b/library/UnitTests/MultiRegions/TestVarcoeffHashing.cpp @@ -38,9 +38,7 @@ #include <boost/filesystem/fstream.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace VarcoeffHashingTest +namespace Nektar::VarcoeffHashingTest { using namespace MultiRegions; @@ -328,5 +326,4 @@ BOOST_AUTO_TEST_CASE(TestUnsetGlobalLinSys) // Clear for next tests contfield->ClearGlobalLinSysManager(); } -} // namespace VarcoeffHashingTest -} // namespace Nektar +} // namespace Nektar::VarcoeffHashingTest diff --git a/library/UnitTests/SIMD/TestSimdLibDouble.cpp b/library/UnitTests/SIMD/TestSimdLibDouble.cpp index 10e9e213bf..04c868bf75 100644 --- a/library/UnitTests/SIMD/TestSimdLibDouble.cpp +++ b/library/UnitTests/SIMD/TestSimdLibDouble.cpp @@ -80,9 +80,7 @@ #undef USING_SCALAR #endif -namespace Nektar -{ -namespace SimdLibTests +namespace Nektar::SimdLibTests { using namespace tinysimd; using vec_t = simd<double>; @@ -882,5 +880,4 @@ BOOST_AUTO_TEST_CASE(SimdLibDouble_io) std::cout << avec << std::endl; } -} // namespace SimdLibTests -} // namespace Nektar +} // namespace Nektar::SimdLibTests diff --git a/library/UnitTests/SIMD/TestSimdLibSingle.cpp b/library/UnitTests/SIMD/TestSimdLibSingle.cpp index 76925628c1..69a5c55b1d 100644 --- a/library/UnitTests/SIMD/TestSimdLibSingle.cpp +++ b/library/UnitTests/SIMD/TestSimdLibSingle.cpp @@ -79,9 +79,7 @@ #undef USING_SCALAR #endif -namespace Nektar -{ -namespace SimdLibTests +namespace Nektar::SimdLibTests { using namespace tinysimd; using vec_t = simd<float>; @@ -807,5 +805,4 @@ BOOST_AUTO_TEST_CASE(SimdLibFloat_io) std::cout << avec << std::endl; } -} // namespace SimdLibTests -} // namespace Nektar +} // namespace Nektar::SimdLibTests diff --git a/library/UnitTests/ScaledMatrixUnitTests.cpp b/library/UnitTests/ScaledMatrixUnitTests.cpp index 4f9f27aa96..c51d4ff82e 100644 --- a/library/UnitTests/ScaledMatrixUnitTests.cpp +++ b/library/UnitTests/ScaledMatrixUnitTests.cpp @@ -37,9 +37,7 @@ #include <boost/test/unit_test.hpp> #include <iostream> -namespace Nektar -{ -namespace ScaledMatrixUnitTests +namespace Nektar::ScaledMatrixUnitTests { BOOST_AUTO_TEST_CASE(TestConstruction) { @@ -147,5 +145,4 @@ BOOST_AUTO_TEST_CASE(TestGetStorageType) BOOST_CHECK_EQUAL(m2->GetStorageType(), eFULL); BOOST_CHECK_EQUAL(m3->GetStorageType(), eFULL); } -} // namespace ScaledMatrixUnitTests -} // namespace Nektar +} // namespace Nektar::ScaledMatrixUnitTests diff --git a/library/UnitTests/SpatialDomains/TestMovement.cpp b/library/UnitTests/SpatialDomains/TestMovement.cpp index 49e05a403e..c9a4ced1ab 100644 --- a/library/UnitTests/SpatialDomains/TestMovement.cpp +++ b/library/UnitTests/SpatialDomains/TestMovement.cpp @@ -40,9 +40,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace MovementTests +namespace Nektar::MovementTests { LibUtilities::SessionReaderSharedPtr CreateSession() @@ -329,5 +327,4 @@ BOOST_AUTO_TEST_CASE(TestWriteMovement) delete nektar; } -} // namespace MovementTests -} // namespace Nektar +} // namespace Nektar::MovementTests diff --git a/library/UnitTests/testLinearSystem.cpp b/library/UnitTests/testLinearSystem.cpp index f7bbb29b44..6ce25be0c1 100644 --- a/library/UnitTests/testLinearSystem.cpp +++ b/library/UnitTests/testLinearSystem.cpp @@ -36,9 +36,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace LinearSystemUnitTests +namespace Nektar::LinearSystemUnitTests { BOOST_AUTO_TEST_CASE(TestLinearSystemSolveWithReturnValue) { @@ -319,5 +317,4 @@ BOOST_AUTO_TEST_CASE(TestSymmetricMatrix) BOOST_CHECK_CLOSE(xt[1], 4.0, epsilon); BOOST_CHECK_CLOSE(xt[2], -5.0, epsilon); } -} // namespace LinearSystemUnitTests -} // namespace Nektar +} // namespace Nektar::LinearSystemUnitTests diff --git a/library/UnitTests/testNekLinAlgAlgorithms.cpp b/library/UnitTests/testNekLinAlgAlgorithms.cpp index 30a991d4c5..547f7cde79 100644 --- a/library/UnitTests/testNekLinAlgAlgorithms.cpp +++ b/library/UnitTests/testNekLinAlgAlgorithms.cpp @@ -40,9 +40,7 @@ #include <LibUtilities/LinearAlgebra/NekVector.hpp> #include <vector> -namespace Nektar -{ -namespace NekLinAlgTests +namespace Nektar::NekLinAlgTests { BOOST_AUTO_TEST_CASE(TestGramSchmidtOrthogonalizationBookExample) { @@ -66,5 +64,4 @@ BOOST_AUTO_TEST_CASE(TestGramSchmidtOrthogonalizationBookExample) BOOST_CHECK_CLOSE(q[1][1], .85890, epsilon); BOOST_CHECK_CLOSE(q[1][2], -.22890, epsilon); } -} // namespace NekLinAlgTests -} // namespace Nektar +} // namespace Nektar::NekLinAlgTests diff --git a/library/UnitTests/testNekPoint.cpp b/library/UnitTests/testNekPoint.cpp index 6fd881f260..9935c2f8aa 100644 --- a/library/UnitTests/testNekPoint.cpp +++ b/library/UnitTests/testNekPoint.cpp @@ -37,9 +37,7 @@ #include <boost/test/tools/floating_point_comparison.hpp> #include <boost/test/unit_test.hpp> -namespace Nektar -{ -namespace UnitTests +namespace Nektar::UnitTests { class PointTestClass { @@ -133,5 +131,4 @@ BOOST_AUTO_TEST_CASE(testNekPointConstruction) } } -} // namespace UnitTests -} // namespace Nektar +} // namespace Nektar::UnitTests diff --git a/library/UnitTests/testNekSharedArray.cpp b/library/UnitTests/testNekSharedArray.cpp index 514053b3be..5845ef34b5 100644 --- a/library/UnitTests/testNekSharedArray.cpp +++ b/library/UnitTests/testNekSharedArray.cpp @@ -44,9 +44,7 @@ #include <boost/test/unit_test.hpp> #include <iostream> -namespace Nektar -{ -namespace SharedArrayUnitTests +namespace Nektar::SharedArrayUnitTests { class ParameterTestClass @@ -783,5 +781,4 @@ BOOST_AUTO_TEST_CASE(Test2DEqualOperator) } } -} // namespace SharedArrayUnitTests -} // namespace Nektar +} // namespace Nektar::SharedArrayUnitTests diff --git a/library/UnitTests/testNekVector.cpp b/library/UnitTests/testNekVector.cpp index 934a3ab888..7fca4d2164 100644 --- a/library/UnitTests/testNekVector.cpp +++ b/library/UnitTests/testNekVector.cpp @@ -43,9 +43,7 @@ using std::cout; using std::endl; -namespace Nektar -{ -namespace UnitTests +namespace Nektar::UnitTests { using namespace Nektar; @@ -403,5 +401,4 @@ BOOST_AUTO_TEST_CASE(TestVectorConstructorsWithSizeArguments) } } -} // namespace UnitTests -} // namespace Nektar +} // namespace Nektar::UnitTests diff --git a/library/UnitTests/util.cpp b/library/UnitTests/util.cpp index 4c3182b70d..663262245c 100644 --- a/library/UnitTests/util.cpp +++ b/library/UnitTests/util.cpp @@ -36,9 +36,7 @@ #include <UnitTests/util.h> #include <fstream> -namespace Nektar -{ -namespace UnitTests +namespace Nektar::UnitTests { void RedirectCerrIfNeeded() { @@ -48,5 +46,4 @@ void RedirectCerrIfNeeded() ErrorUtil::SetErrorStream(out); } } -} // namespace UnitTests -} // namespace Nektar +} // namespace Nektar::UnitTests diff --git a/library/UnitTests/util.h b/library/UnitTests/util.h index 0e43def08b..9f2d8e8639 100644 --- a/library/UnitTests/util.h +++ b/library/UnitTests/util.h @@ -35,12 +35,9 @@ #ifndef NEKTAR_UNIT_TESTS_UTIL_H #define NEKTAR_UNIT_TESTS_UTIL_H -namespace Nektar -{ -namespace UnitTests +namespace Nektar::UnitTests { void RedirectCerrIfNeeded(); -} -} // namespace Nektar +} // namespace Nektar::UnitTests #endif // NEKTAR_UNIT_TESTS_UTIL_H diff --git a/solvers/ADRSolver/EquationSystems/EigenValuesAdvection.h b/solvers/ADRSolver/EquationSystems/EigenValuesAdvection.h index 7b27fc66f8..8e18bf9d30 100644 --- a/solvers/ADRSolver/EquationSystems/EigenValuesAdvection.h +++ b/solvers/ADRSolver/EquationSystems/EigenValuesAdvection.h @@ -62,7 +62,7 @@ public: /// Name of class static std::string className; - virtual ~EigenValuesAdvection(); + ~EigenValuesAdvection() override; protected: SolverUtils::RiemannSolverSharedPtr m_riemannSolver; @@ -76,9 +76,9 @@ protected: /// Get the normal velocity Array<OneD, NekDouble> &GetNormalVelocity(); - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoInitialise(bool dumpInitialConditions = false) override; - virtual void v_DoSolve() override; + void v_InitObject(bool DeclareFields = true) override; + void v_DoInitialise(bool dumpInitialConditions = false) override; + void v_DoSolve() override; // DG Advection routines void GetFluxVector(const Array<OneD, Array<OneD, NekDouble>> &physfield, diff --git a/solvers/ADRSolver/EquationSystems/Helmholtz.h b/solvers/ADRSolver/EquationSystems/Helmholtz.h index ce9cac60a4..10fc12439f 100644 --- a/solvers/ADRSolver/EquationSystems/Helmholtz.h +++ b/solvers/ADRSolver/EquationSystems/Helmholtz.h @@ -59,17 +59,17 @@ public: static std::string className1; static std::string className2; - virtual ~Helmholtz(); + ~Helmholtz() override; protected: Helmholtz(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_InitObject(bool DeclareFields = true) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: - virtual Array<OneD, bool> v_GetSystemSingularChecks() override; + Array<OneD, bool> v_GetSystemSingularChecks() override; }; } // namespace Nektar diff --git a/solvers/ADRSolver/EquationSystems/Laplace.h b/solvers/ADRSolver/EquationSystems/Laplace.h index b3145c7692..984325b604 100644 --- a/solvers/ADRSolver/EquationSystems/Laplace.h +++ b/solvers/ADRSolver/EquationSystems/Laplace.h @@ -67,14 +67,14 @@ protected: Laplace(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual ~Laplace(); + ~Laplace() override; - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_DoSolve() override; + void v_InitObject(bool DeclareFields = true) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_DoSolve() override; private: - virtual Array<OneD, bool> v_GetSystemSingularChecks() override; + Array<OneD, bool> v_GetSystemSingularChecks() override; }; } // namespace Nektar diff --git a/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp b/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp index fab32091fd..f8cf9eb93d 100644 --- a/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp +++ b/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp @@ -204,7 +204,7 @@ MMFAdvection::~MMFAdvection() void MMFAdvection::v_DoSolve() { - ASSERTL0(m_intScheme != 0, "No time integration scheme."); + ASSERTL0(m_intScheme != nullptr, "No time integration scheme."); int i, nchk = 1; int nvariables = 0; diff --git a/solvers/ADRSolver/EquationSystems/MMFAdvection.h b/solvers/ADRSolver/EquationSystems/MMFAdvection.h index b50f51c7ec..20a8ef7a18 100644 --- a/solvers/ADRSolver/EquationSystems/MMFAdvection.h +++ b/solvers/ADRSolver/EquationSystems/MMFAdvection.h @@ -80,7 +80,7 @@ public: TestType m_TestType; /// Destructor - virtual ~MMFAdvection(); + ~MMFAdvection() override; protected: SolverUtils::RiemannSolverSharedPtr m_riemannSolver; @@ -151,20 +151,20 @@ protected: void Test3Dproblem(const NekDouble time, Array<OneD, NekDouble> &outfield); /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoSolve() override; + void v_DoSolve() override; /// Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_SetInitialConditions(const NekDouble initialtime, - bool dumpInitialConditions, - const int domain) override; + void v_SetInitialConditions(const NekDouble initialtime, + bool dumpInitialConditions, + const int domain) override; - virtual void v_EvaluateExactSolution(unsigned int field, - Array<OneD, NekDouble> &outfield, - const NekDouble time) override; + void v_EvaluateExactSolution(unsigned int field, + Array<OneD, NekDouble> &outfield, + const NekDouble time) override; private: }; diff --git a/solvers/ADRSolver/EquationSystems/Poisson.h b/solvers/ADRSolver/EquationSystems/Poisson.h index ff0f02acbd..05d9944769 100644 --- a/solvers/ADRSolver/EquationSystems/Poisson.h +++ b/solvers/ADRSolver/EquationSystems/Poisson.h @@ -58,18 +58,18 @@ public: static std::string className1; static std::string className2; - virtual ~Poisson(); + ~Poisson() override; protected: Poisson(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: - virtual Array<OneD, bool> v_GetSystemSingularChecks() override; + Array<OneD, bool> v_GetSystemSingularChecks() override; }; } // namespace Nektar diff --git a/solvers/ADRSolver/EquationSystems/Projection.h b/solvers/ADRSolver/EquationSystems/Projection.h index d76c077a81..c552b699ca 100644 --- a/solvers/ADRSolver/EquationSystems/Projection.h +++ b/solvers/ADRSolver/EquationSystems/Projection.h @@ -61,15 +61,15 @@ public: /// Name of class static std::string className; - virtual ~Projection(); + ~Projection() override; protected: Projection(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_DoSolve() override; + void v_InitObject(bool DeclareFields = true) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_DoSolve() override; private: }; diff --git a/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusion.h b/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusion.h index 1525ffb864..ff7dc7bc31 100644 --- a/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusion.h +++ b/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusion.h @@ -60,7 +60,7 @@ public: /// Name of class static std::string className; - virtual ~SteadyAdvectionDiffusion(); + ~SteadyAdvectionDiffusion() override; protected: NekDouble m_lambda; @@ -70,10 +70,10 @@ protected: const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_DoInitialise(bool dumpInitialConditions = false) override; - virtual void v_DoSolve() override; + void v_InitObject(bool DeclareFields = true) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_DoInitialise(bool dumpInitialConditions = false) override; + void v_DoSolve() override; }; } // namespace Nektar diff --git a/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusionReaction.h b/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusionReaction.h index 8fe124c1ae..7cccb37bde 100644 --- a/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusionReaction.h +++ b/solvers/ADRSolver/EquationSystems/SteadyAdvectionDiffusionReaction.h @@ -58,16 +58,16 @@ public: /// Name of class static std::string className; - virtual ~SteadyAdvectionDiffusionReaction(); + ~SteadyAdvectionDiffusionReaction() override; protected: SteadyAdvectionDiffusionReaction( const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; }; } // namespace Nektar diff --git a/solvers/ADRSolver/EquationSystems/UnsteadyAdvection.h b/solvers/ADRSolver/EquationSystems/UnsteadyAdvection.h index 2754046297..1e0ac3a42b 100644 --- a/solvers/ADRSolver/EquationSystems/UnsteadyAdvection.h +++ b/solvers/ADRSolver/EquationSystems/UnsteadyAdvection.h @@ -61,7 +61,7 @@ public: static std::string className; /// Destructor - virtual ~UnsteadyAdvection(); + ~UnsteadyAdvection() override; protected: bool m_useGJPStabilisation; @@ -107,10 +107,10 @@ protected: Array<OneD, NekDouble> &GetNormalVelocity(); /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; /// Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: NekDouble m_waveFreq; diff --git a/solvers/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.h b/solvers/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.h index 9b0f9a6d15..ebfa13a5ce 100644 --- a/solvers/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.h +++ b/solvers/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.h @@ -63,7 +63,7 @@ public: static std::string className; /// Destructor - virtual ~UnsteadyAdvectionDiffusion(); + ~UnsteadyAdvectionDiffusion() override; protected: bool m_subSteppingScheme; @@ -126,13 +126,13 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &velfield); /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; /// Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; /// PreIntegration step for substepping. - virtual bool v_PreIntegrate(int step) override; + bool v_PreIntegrate(int step) override; // SubsStepping methods -> Probably could be set up in separate class void SubStepAdvance(int nstep, NekDouble time); diff --git a/solvers/ADRSolver/EquationSystems/UnsteadyDiffusion.h b/solvers/ADRSolver/EquationSystems/UnsteadyDiffusion.h index 214ab9a8b1..3ddf513fb2 100644 --- a/solvers/ADRSolver/EquationSystems/UnsteadyDiffusion.h +++ b/solvers/ADRSolver/EquationSystems/UnsteadyDiffusion.h @@ -62,7 +62,7 @@ public: static std::string className; /// Destructor - virtual ~UnsteadyDiffusion(); + ~UnsteadyDiffusion() override; protected: bool m_useSpecVanVisc; @@ -72,12 +72,12 @@ protected: SolverUtils::DiffusionSharedPtr m_diffusion; SolverUtils::RiemannSolverSharedPtr m_riemannSolver; - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; UnsteadyDiffusion(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; void GetFluxVector( const Array<OneD, Array<OneD, NekDouble>> &inarray, diff --git a/solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.h b/solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.h index 290cfe0e90..9bb1dc1f95 100644 --- a/solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.h +++ b/solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.h @@ -62,7 +62,7 @@ public: static std::string className; /// Destructor - virtual ~UnsteadyInviscidBurger(); + ~UnsteadyInviscidBurger() override; protected: SolverUtils::RiemannSolverSharedPtr m_riemannSolver; @@ -93,7 +93,7 @@ protected: Array<OneD, NekDouble> &GetNormalVelocity(); /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; private: }; diff --git a/solvers/ADRSolver/EquationSystems/UnsteadyReactionDiffusion.h b/solvers/ADRSolver/EquationSystems/UnsteadyReactionDiffusion.h index 15903f002a..63286b3f58 100644 --- a/solvers/ADRSolver/EquationSystems/UnsteadyReactionDiffusion.h +++ b/solvers/ADRSolver/EquationSystems/UnsteadyReactionDiffusion.h @@ -63,14 +63,14 @@ public: static std::string className; /// Destructor - virtual ~UnsteadyReactionDiffusion(); + ~UnsteadyReactionDiffusion() override; protected: UnsteadyReactionDiffusion( const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, diff --git a/solvers/ADRSolver/EquationSystems/UnsteadyViscousBurgers.h b/solvers/ADRSolver/EquationSystems/UnsteadyViscousBurgers.h index 50d1834e67..a09f900dfa 100644 --- a/solvers/ADRSolver/EquationSystems/UnsteadyViscousBurgers.h +++ b/solvers/ADRSolver/EquationSystems/UnsteadyViscousBurgers.h @@ -65,7 +65,7 @@ public: static std::string className; /// Destructor - virtual ~UnsteadyViscousBurgers(); + ~UnsteadyViscousBurgers() override; protected: bool m_useSpecVanVisc; // Use Spectral Vanishing Viscosity @@ -125,10 +125,10 @@ protected: Array<OneD, Array<OneD, NekDouble>> &inarray); /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; /// Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: NekDouble m_waveFreq; diff --git a/solvers/AcousticSolver/EquationSystems/APE.h b/solvers/AcousticSolver/EquationSystems/APE.h index d2eeb989da..688761d440 100644 --- a/solvers/AcousticSolver/EquationSystems/APE.h +++ b/solvers/AcousticSolver/EquationSystems/APE.h @@ -62,20 +62,20 @@ public: static std::string className; /// Destructor - virtual ~APE(); + ~APE() override; protected: /// Initialises UnsteadySystem class members. APE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_GetFluxVector( + void v_GetFluxVector( const Array<OneD, Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux) override; - virtual void v_RiemannInvariantBC( + void v_RiemannInvariantBC( int bcRegion, int cnt, Array<OneD, Array<OneD, NekDouble>> &Fwd, Array<OneD, Array<OneD, NekDouble>> &BfFwd, Array<OneD, Array<OneD, NekDouble>> &physarray) override; diff --git a/solvers/AcousticSolver/EquationSystems/AcousticSystem.h b/solvers/AcousticSolver/EquationSystems/AcousticSystem.h index 1bc1836de8..834b5649de 100644 --- a/solvers/AcousticSolver/EquationSystems/AcousticSystem.h +++ b/solvers/AcousticSolver/EquationSystems/AcousticSystem.h @@ -63,7 +63,7 @@ public: friend class MemoryManager<AcousticSystem>; /// Destructor - virtual ~AcousticSystem(); + ~AcousticSystem() override; protected: /// indices of the fields @@ -83,7 +83,7 @@ protected: AcousticSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -109,16 +109,15 @@ protected: Array<OneD, Array<OneD, NekDouble>> &BfFwd, Array<OneD, Array<OneD, NekDouble>> &physarray) = 0; - virtual bool v_PreIntegrate(int step) override; + bool v_PreIntegrate(int step) override; - virtual void v_Output() override; + void v_Output() override; - virtual Array<OneD, NekDouble> v_GetMaxStdVelocity( + Array<OneD, NekDouble> v_GetMaxStdVelocity( const NekDouble SpeedSoundFactor) override; - virtual void v_ExtraFldOutput( - std::vector<Array<OneD, NekDouble>> &fieldcoeffs, - std::vector<std::string> &variables) override; + void v_ExtraFldOutput(std::vector<Array<OneD, NekDouble>> &fieldcoeffs, + std::vector<std::string> &variables) override; const Array<OneD, const Array<OneD, NekDouble>> &GetNormals(); diff --git a/solvers/AcousticSolver/EquationSystems/LEE.h b/solvers/AcousticSolver/EquationSystems/LEE.h index ba450be259..a8ca9775d8 100644 --- a/solvers/AcousticSolver/EquationSystems/LEE.h +++ b/solvers/AcousticSolver/EquationSystems/LEE.h @@ -62,24 +62,23 @@ public: static std::string className; /// Destructor - virtual ~LEE(); + ~LEE() override; protected: /// Initialises UnsteadySystem class members. LEE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_AddLinTerm( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray) override; + void v_AddLinTerm(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray) override; - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_GetFluxVector( + void v_GetFluxVector( const Array<OneD, Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux) override; - virtual void v_RiemannInvariantBC( + void v_RiemannInvariantBC( int bcRegion, int cnt, Array<OneD, Array<OneD, NekDouble>> &Fwd, Array<OneD, Array<OneD, NekDouble>> &BfFwd, Array<OneD, Array<OneD, NekDouble>> &physarray) override; diff --git a/solvers/AcousticSolver/RiemannSolvers/APELaxFriedrichsSolver.h b/solvers/AcousticSolver/RiemannSolvers/APELaxFriedrichsSolver.h index fab8c2f693..7153f78d22 100644 --- a/solvers/AcousticSolver/RiemannSolvers/APELaxFriedrichsSolver.h +++ b/solvers/AcousticSolver/RiemannSolvers/APELaxFriedrichsSolver.h @@ -59,15 +59,14 @@ protected: APELaxFriedrichsSolver( const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble uL, - NekDouble vL, NekDouble wL, NekDouble pR, - NekDouble rhoR, NekDouble uR, NekDouble vR, - NekDouble wR, NekDouble c0sqL, NekDouble rho0L, - NekDouble u0L, NekDouble v0L, NekDouble w0L, - NekDouble c0sqR, NekDouble rho0R, NekDouble u0R, - NekDouble v0R, NekDouble w0R, NekDouble &pF, - NekDouble &rhoF, NekDouble &uF, NekDouble &vF, - NekDouble &wF) override; + void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble uL, NekDouble vL, + NekDouble wL, NekDouble pR, NekDouble rhoR, NekDouble uR, + NekDouble vR, NekDouble wR, NekDouble c0sqL, + NekDouble rho0L, NekDouble u0L, NekDouble v0L, + NekDouble w0L, NekDouble c0sqR, NekDouble rho0R, + NekDouble u0R, NekDouble v0R, NekDouble w0R, + NekDouble &pF, NekDouble &rhoF, NekDouble &uF, + NekDouble &vF, NekDouble &wF) override; }; } // namespace Nektar diff --git a/solvers/AcousticSolver/RiemannSolvers/APEUpwindSolver.h b/solvers/AcousticSolver/RiemannSolvers/APEUpwindSolver.h index 438075d640..8240610182 100644 --- a/solvers/AcousticSolver/RiemannSolvers/APEUpwindSolver.h +++ b/solvers/AcousticSolver/RiemannSolvers/APEUpwindSolver.h @@ -58,15 +58,14 @@ public: protected: APEUpwindSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble uL, - NekDouble vL, NekDouble wL, NekDouble pR, - NekDouble rhoR, NekDouble uR, NekDouble vR, - NekDouble wR, NekDouble c0sqL, NekDouble rho0L, - NekDouble u0L, NekDouble v0L, NekDouble w0L, - NekDouble c0sqR, NekDouble rho0R, NekDouble u0R, - NekDouble v0R, NekDouble w0R, NekDouble &pF, - NekDouble &rhoF, NekDouble &uF, NekDouble &vF, - NekDouble &wF) override; + void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble uL, NekDouble vL, + NekDouble wL, NekDouble pR, NekDouble rhoR, NekDouble uR, + NekDouble vR, NekDouble wR, NekDouble c0sqL, + NekDouble rho0L, NekDouble u0L, NekDouble v0L, + NekDouble w0L, NekDouble c0sqR, NekDouble rho0R, + NekDouble u0R, NekDouble v0R, NekDouble w0R, + NekDouble &pF, NekDouble &rhoF, NekDouble &uF, + NekDouble &vF, NekDouble &wF) override; }; } // namespace Nektar diff --git a/solvers/AcousticSolver/RiemannSolvers/AcousticSolver.h b/solvers/AcousticSolver/RiemannSolvers/AcousticSolver.h index 4b55155b6a..909a260eda 100644 --- a/solvers/AcousticSolver/RiemannSolvers/AcousticSolver.h +++ b/solvers/AcousticSolver/RiemannSolvers/AcousticSolver.h @@ -49,10 +49,10 @@ class AcousticSolver : public RiemannSolver protected: AcousticSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override; + void v_Solve(const int nDim, + const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) override; virtual void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble uL, NekDouble vL, NekDouble wL, NekDouble pR, diff --git a/solvers/AcousticSolver/RiemannSolvers/LEELaxFriedrichsSolver.h b/solvers/AcousticSolver/RiemannSolvers/LEELaxFriedrichsSolver.h index bea50bed37..5b13e490bb 100644 --- a/solvers/AcousticSolver/RiemannSolvers/LEELaxFriedrichsSolver.h +++ b/solvers/AcousticSolver/RiemannSolvers/LEELaxFriedrichsSolver.h @@ -59,15 +59,15 @@ protected: LEELaxFriedrichsSolver( const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble rhouL, - NekDouble rhovL, NekDouble rhowL, NekDouble pR, - NekDouble rhoR, NekDouble rhouR, NekDouble rhovR, - NekDouble rhowR, NekDouble c0sqL, NekDouble rho0L, - NekDouble u0L, NekDouble v0L, NekDouble w0L, - NekDouble c0sqR, NekDouble rho0R, NekDouble u0R, - NekDouble v0R, NekDouble w0R, NekDouble &pF, - NekDouble &rhoF, NekDouble &rhouF, - NekDouble &rhovF, NekDouble &rhowF) override; + void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble rhouL, + NekDouble rhovL, NekDouble rhowL, NekDouble pR, + NekDouble rhoR, NekDouble rhouR, NekDouble rhovR, + NekDouble rhowR, NekDouble c0sqL, NekDouble rho0L, + NekDouble u0L, NekDouble v0L, NekDouble w0L, + NekDouble c0sqR, NekDouble rho0R, NekDouble u0R, + NekDouble v0R, NekDouble w0R, NekDouble &pF, + NekDouble &rhoF, NekDouble &rhouF, NekDouble &rhovF, + NekDouble &rhowF) override; }; } // namespace Nektar diff --git a/solvers/AcousticSolver/RiemannSolvers/LEESolver.h b/solvers/AcousticSolver/RiemannSolvers/LEESolver.h index e127fc488b..2cc4a52bd7 100644 --- a/solvers/AcousticSolver/RiemannSolvers/LEESolver.h +++ b/solvers/AcousticSolver/RiemannSolvers/LEESolver.h @@ -50,10 +50,10 @@ class LEESolver : public AcousticSolver protected: LEESolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override; + void v_Solve(const int nDim, + const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) override; }; } // namespace Nektar diff --git a/solvers/AcousticSolver/RiemannSolvers/LEEUpwindSolver.h b/solvers/AcousticSolver/RiemannSolvers/LEEUpwindSolver.h index a36f3f89c6..6cb4967601 100644 --- a/solvers/AcousticSolver/RiemannSolvers/LEEUpwindSolver.h +++ b/solvers/AcousticSolver/RiemannSolvers/LEEUpwindSolver.h @@ -58,15 +58,15 @@ public: protected: LEEUpwindSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble rhouL, - NekDouble rhovL, NekDouble rhowL, NekDouble pR, - NekDouble rhoR, NekDouble rhouR, NekDouble rhovR, - NekDouble rhowR, NekDouble c0sqL, NekDouble rho0L, - NekDouble u0L, NekDouble v0L, NekDouble w0L, - NekDouble c0sqR, NekDouble rho0R, NekDouble u0R, - NekDouble v0R, NekDouble w0R, NekDouble &pF, - NekDouble &rhoF, NekDouble &rhouF, - NekDouble &rhovF, NekDouble &rhowF) override; + void v_PointSolve(NekDouble pL, NekDouble rhoL, NekDouble rhouL, + NekDouble rhovL, NekDouble rhowL, NekDouble pR, + NekDouble rhoR, NekDouble rhouR, NekDouble rhovR, + NekDouble rhowR, NekDouble c0sqL, NekDouble rho0L, + NekDouble u0L, NekDouble v0L, NekDouble w0L, + NekDouble c0sqR, NekDouble rho0R, NekDouble u0R, + NekDouble v0R, NekDouble w0R, NekDouble &pF, + NekDouble &rhoF, NekDouble &rhouF, NekDouble &rhovF, + NekDouble &rhowF) override; }; } // namespace Nektar diff --git a/solvers/CardiacEPSolver/CellModels/AlievPanfilov.h b/solvers/CardiacEPSolver/CellModels/AlievPanfilov.h index 37f92137c1..d863ceaf20 100644 --- a/solvers/CardiacEPSolver/CellModels/AlievPanfilov.h +++ b/solvers/CardiacEPSolver/CellModels/AlievPanfilov.h @@ -58,19 +58,18 @@ public: CellModelAlievPanfilov(const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField); - virtual ~CellModelAlievPanfilov() + ~CellModelAlievPanfilov() override { } protected: - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; private: /// Trigger parameter a. diff --git a/solvers/CardiacEPSolver/CellModels/CourtemancheRamirezNattel98.h b/solvers/CardiacEPSolver/CellModels/CourtemancheRamirezNattel98.h index 169091bb96..43d504b3d3 100644 --- a/solvers/CardiacEPSolver/CellModels/CourtemancheRamirezNattel98.h +++ b/solvers/CardiacEPSolver/CellModels/CourtemancheRamirezNattel98.h @@ -61,21 +61,20 @@ public: const MultiRegions::ExpListSharedPtr &pField); /// Destructor - virtual ~CourtemancheRamirezNattel98(); + ~CourtemancheRamirezNattel98() override; protected: /// Computes the reaction terms $f(u,v)$ and $g(u,v)$. - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; - virtual std::string v_GetCellVarName(size_t idx) override; + std::string v_GetCellVarName(size_t idx) override; private: NekDouble C_m; diff --git a/solvers/CardiacEPSolver/CellModels/FentonKarma.cpp b/solvers/CardiacEPSolver/CellModels/FentonKarma.cpp index 07cd9dee34..5bc78b9014 100644 --- a/solvers/CardiacEPSolver/CellModels/FentonKarma.cpp +++ b/solvers/CardiacEPSolver/CellModels/FentonKarma.cpp @@ -667,7 +667,7 @@ void FentonKarma::v_Update( const NekDouble *u = &inarray[0][0]; const NekDouble *v = &inarray[1][0]; const NekDouble *w = &inarray[2][0]; - const NekDouble *y = isCF3 ? &inarray[3][0] : 0; + const NekDouble *y = isCF3 ? &inarray[3][0] : nullptr; NekDouble *u_new = &outarray[0][0]; NekDouble *v_new = &outarray[1][0]; NekDouble *w_new = &outarray[2][0]; diff --git a/solvers/CardiacEPSolver/CellModels/FentonKarma.h b/solvers/CardiacEPSolver/CellModels/FentonKarma.h index e00ecfcad5..4ce8ae54b1 100644 --- a/solvers/CardiacEPSolver/CellModels/FentonKarma.h +++ b/solvers/CardiacEPSolver/CellModels/FentonKarma.h @@ -58,21 +58,20 @@ public: const MultiRegions::ExpListSharedPtr &pField); /// Destructor - virtual ~FentonKarma(); + ~FentonKarma() override; protected: /// Computes the reaction terms $f(u,v)$ and $g(u,v)$. - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; - virtual std::string v_GetCellVarName(size_t idx) override; + std::string v_GetCellVarName(size_t idx) override; private: NekDouble C_m; diff --git a/solvers/CardiacEPSolver/CellModels/FitzhughNagumo.h b/solvers/CardiacEPSolver/CellModels/FitzhughNagumo.h index 792672893d..0d86c32b57 100644 --- a/solvers/CardiacEPSolver/CellModels/FitzhughNagumo.h +++ b/solvers/CardiacEPSolver/CellModels/FitzhughNagumo.h @@ -59,19 +59,18 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const MultiRegions::ExpListSharedPtr &pField); - virtual ~CellModelFitzHughNagumo() + ~CellModelFitzHughNagumo() override { } protected: - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; private: NekDouble m_beta; diff --git a/solvers/CardiacEPSolver/CellModels/Fox02.h b/solvers/CardiacEPSolver/CellModels/Fox02.h index ed0a9e31cc..f28bb60b11 100644 --- a/solvers/CardiacEPSolver/CellModels/Fox02.h +++ b/solvers/CardiacEPSolver/CellModels/Fox02.h @@ -58,20 +58,19 @@ public: const MultiRegions::ExpListSharedPtr &pField); /// Destructor - virtual ~Fox02() + ~Fox02() override { } protected: /// Computes the reaction terms $f(u,v)$ and $g(u,v)$. - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; private: // diff --git a/solvers/CardiacEPSolver/CellModels/LuoRudy91.h b/solvers/CardiacEPSolver/CellModels/LuoRudy91.h index d3450d2974..061834afa7 100644 --- a/solvers/CardiacEPSolver/CellModels/LuoRudy91.h +++ b/solvers/CardiacEPSolver/CellModels/LuoRudy91.h @@ -58,22 +58,21 @@ public: const MultiRegions::ExpListSharedPtr &pField); /// Destructor - virtual ~LuoRudy91() + ~LuoRudy91() override { } protected: /// Computes the reaction terms $f(u,v)$ and $g(u,v)$. - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; /// Set initial conditions for the cell model - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; }; } // namespace Nektar diff --git a/solvers/CardiacEPSolver/CellModels/TenTusscher06.h b/solvers/CardiacEPSolver/CellModels/TenTusscher06.h index c2e84f3424..fa6c85d4e5 100644 --- a/solvers/CardiacEPSolver/CellModels/TenTusscher06.h +++ b/solvers/CardiacEPSolver/CellModels/TenTusscher06.h @@ -60,20 +60,19 @@ public: const MultiRegions::ExpListSharedPtr &pField); /// Desctructor - virtual ~TenTusscher06() + ~TenTusscher06() override { } protected: - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; NekDouble g_to; NekDouble g_Ks; diff --git a/solvers/CardiacEPSolver/CellModels/Winslow99.h b/solvers/CardiacEPSolver/CellModels/Winslow99.h index c8ffbb4622..a1c18206bf 100644 --- a/solvers/CardiacEPSolver/CellModels/Winslow99.h +++ b/solvers/CardiacEPSolver/CellModels/Winslow99.h @@ -59,22 +59,21 @@ public: const MultiRegions::ExpListSharedPtr &pField); /// Destructor - virtual ~Winslow99() + ~Winslow99() override { } protected: /// Computes the reaction terms $f(u,v)$ and $g(u,v)$. - virtual void v_Update( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; /// Set initial conditions for cell model - virtual void v_SetInitialConditions() override; + void v_SetInitialConditions() override; }; } // namespace Nektar diff --git a/solvers/CardiacEPSolver/EquationSystems/Bidomain.h b/solvers/CardiacEPSolver/EquationSystems/Bidomain.h index 90a833f814..b236954f4c 100644 --- a/solvers/CardiacEPSolver/EquationSystems/Bidomain.h +++ b/solvers/CardiacEPSolver/EquationSystems/Bidomain.h @@ -64,14 +64,14 @@ public: static std::string className; /// Desctructor - virtual ~Bidomain(); + ~Bidomain() override; protected: /// Constructor Bidomain(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; /// Solve for the diffusion term. void DoImplicitSolve( @@ -85,12 +85,12 @@ protected: const NekDouble time); /// Sets a custom initial condition. - virtual void v_SetInitialConditions(NekDouble initialtime, - bool dumpInitialConditions, - const int domain) override; + void v_SetInitialConditions(NekDouble initialtime, + bool dumpInitialConditions, + const int domain) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; private: /// Cell model. diff --git a/solvers/CardiacEPSolver/EquationSystems/BidomainRoth.h b/solvers/CardiacEPSolver/EquationSystems/BidomainRoth.h index a6a77c8a1d..a4d59fd268 100644 --- a/solvers/CardiacEPSolver/EquationSystems/BidomainRoth.h +++ b/solvers/CardiacEPSolver/EquationSystems/BidomainRoth.h @@ -63,14 +63,14 @@ public: static std::string className; /// Desctructor - virtual ~BidomainRoth(); + ~BidomainRoth() override; protected: /// Constructor BidomainRoth(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; /// Solve for the diffusion term. void DoImplicitSolve( @@ -84,12 +84,12 @@ protected: const NekDouble time); /// Sets a custom initial condition. - virtual void v_SetInitialConditions(NekDouble initialtime, - bool dumpInitialConditions, - const int domain) override; + void v_SetInitialConditions(NekDouble initialtime, + bool dumpInitialConditions, + const int domain) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; private: /// Cell model. diff --git a/solvers/CardiacEPSolver/EquationSystems/Monodomain.h b/solvers/CardiacEPSolver/EquationSystems/Monodomain.h index cb2292d559..f4e6bce21c 100644 --- a/solvers/CardiacEPSolver/EquationSystems/Monodomain.h +++ b/solvers/CardiacEPSolver/EquationSystems/Monodomain.h @@ -65,14 +65,14 @@ public: static std::string className; /// Desctructor - virtual ~Monodomain(); + ~Monodomain() override; protected: /// Constructor Monodomain(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; /// Solve for the diffusion term. void DoImplicitSolve( @@ -86,12 +86,12 @@ protected: const NekDouble time); /// Sets a custom initial condition. - virtual void v_SetInitialConditions(NekDouble initialtime, - bool dumpInitialConditions, - const int domain) override; + void v_SetInitialConditions(NekDouble initialtime, + bool dumpInitialConditions, + const int domain) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SummaryList &s) override; + void v_GenerateSummary(SummaryList &s) override; private: /// Cell model. diff --git a/solvers/CardiacEPSolver/Filters/FilterBenchmark.h b/solvers/CardiacEPSolver/Filters/FilterBenchmark.h index 61f2645804..41461c4abe 100644 --- a/solvers/CardiacEPSolver/Filters/FilterBenchmark.h +++ b/solvers/CardiacEPSolver/Filters/FilterBenchmark.h @@ -67,23 +67,23 @@ public: const ParamMap &pParams); /// Destructor for the benchmark filter. - virtual ~FilterBenchmark(); + ~FilterBenchmark() override; protected: /// Initialises the benchmark filter and allocates storage. - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Update recorded times. - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Finalises the benchmark filter and write out recorded data. - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Identifies that the benchmark filter is time dependent. - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: /// Storage for activation and repolarisation times. diff --git a/solvers/CardiacEPSolver/Filters/FilterCellHistoryPoints.h b/solvers/CardiacEPSolver/Filters/FilterCellHistoryPoints.h index f7d9f83054..2d9036f77f 100644 --- a/solvers/CardiacEPSolver/Filters/FilterCellHistoryPoints.h +++ b/solvers/CardiacEPSolver/Filters/FilterCellHistoryPoints.h @@ -65,7 +65,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const ParamMap &pParams); - ~FilterCellHistoryPoints(); + ~FilterCellHistoryPoints() override; void SetCellModel(CellModelSharedPtr &pCellModel) { @@ -73,7 +73,7 @@ public: } protected: - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; virtual void v_WriteData(const int &rank, diff --git a/solvers/CardiacEPSolver/Filters/FilterCheckpointCellModel.h b/solvers/CardiacEPSolver/Filters/FilterCheckpointCellModel.h index bfe1d62bb3..cfadc3edea 100644 --- a/solvers/CardiacEPSolver/Filters/FilterCheckpointCellModel.h +++ b/solvers/CardiacEPSolver/Filters/FilterCheckpointCellModel.h @@ -65,7 +65,7 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const ParamMap &pParams); - ~FilterCheckpointCellModel(); + ~FilterCheckpointCellModel() override; void SetCellModel(CellModelSharedPtr &pCellModel) { @@ -73,16 +73,16 @@ public: } protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: size_t m_index; diff --git a/solvers/CardiacEPSolver/Filters/FilterElectrogram.h b/solvers/CardiacEPSolver/Filters/FilterElectrogram.h index b1fcc5f6bb..ac27d3c735 100644 --- a/solvers/CardiacEPSolver/Filters/FilterElectrogram.h +++ b/solvers/CardiacEPSolver/Filters/FilterElectrogram.h @@ -68,23 +68,23 @@ public: const ParamMap &pParams); /// Electrogram filter destructor - virtual ~FilterElectrogram(); + ~FilterElectrogram() override; protected: /// Initialises the electrogram filter and open output file. - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Compute extracellular potential at egm points at current time. - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Finalise the electrogram filter and close output file. - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; /// Filter is time-dependent and should be called at each time-step. - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: /// Gradient of the radius from each electrogram point in x-direction diff --git a/solvers/CardiacEPSolver/Filters/FilterHilbertFFTPhase.h b/solvers/CardiacEPSolver/Filters/FilterHilbertFFTPhase.h index 9c8f81fe60..3678a0fe83 100644 --- a/solvers/CardiacEPSolver/Filters/FilterHilbertFFTPhase.h +++ b/solvers/CardiacEPSolver/Filters/FilterHilbertFFTPhase.h @@ -66,19 +66,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const ParamMap &pParams); - ~FilterHilbertFFTPhase(); + ~FilterHilbertFFTPhase() override; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual void v_Update( + const NekDouble &time) override; + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual void v_Finalise( + const NekDouble &time) override; + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual bool v_IsTimeDependent(); + const NekDouble &time) override; + bool v_IsTimeDependent() override; private: // Counters diff --git a/solvers/CardiacEPSolver/Filters/FilterOffsetPhase.h b/solvers/CardiacEPSolver/Filters/FilterOffsetPhase.h index 22c90a0d86..4b0a3b2d65 100644 --- a/solvers/CardiacEPSolver/Filters/FilterOffsetPhase.h +++ b/solvers/CardiacEPSolver/Filters/FilterOffsetPhase.h @@ -68,19 +68,19 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const ParamMap &pParams); - ~FilterOffsetPhase(); + ~FilterOffsetPhase() override; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual void v_Update( + const NekDouble &time) override; + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual void v_Finalise( + const NekDouble &time) override; + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, - const NekDouble &time); - virtual bool v_IsTimeDependent(); + const NekDouble &time) override; + bool v_IsTimeDependent() override; private: unsigned int m_index; diff --git a/solvers/CardiacEPSolver/Stimuli/ProtocolS1.h b/solvers/CardiacEPSolver/Stimuli/ProtocolS1.h index 21c6324c2d..cb45ed42f4 100644 --- a/solvers/CardiacEPSolver/Stimuli/ProtocolS1.h +++ b/solvers/CardiacEPSolver/Stimuli/ProtocolS1.h @@ -59,7 +59,7 @@ public: friend class MemoryManager<ProtocolS1>; - virtual ~ProtocolS1() + ~ProtocolS1() override { } @@ -72,9 +72,9 @@ protected: NekDouble m_num_s1; NekDouble m_s1cyclelength; - virtual NekDouble v_GetAmplitude(const NekDouble time) override; + NekDouble v_GetAmplitude(const NekDouble time) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; virtual void v_SetInitialConditions(); diff --git a/solvers/CardiacEPSolver/Stimuli/ProtocolS1S2.h b/solvers/CardiacEPSolver/Stimuli/ProtocolS1S2.h index 2a2bfe3bf0..a8663eb6e1 100644 --- a/solvers/CardiacEPSolver/Stimuli/ProtocolS1S2.h +++ b/solvers/CardiacEPSolver/Stimuli/ProtocolS1S2.h @@ -58,7 +58,7 @@ public: friend class MemoryManager<ProtocolS1S2>; - virtual ~ProtocolS1S2() + ~ProtocolS1S2() override { } @@ -73,9 +73,9 @@ protected: NekDouble m_s2cyclelength; NekDouble m_s2start; - virtual NekDouble v_GetAmplitude(const NekDouble time) override; + NekDouble v_GetAmplitude(const NekDouble time) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; virtual void v_SetInitialConditions(); diff --git a/solvers/CardiacEPSolver/Stimuli/ProtocolSingle.h b/solvers/CardiacEPSolver/Stimuli/ProtocolSingle.h index 46e4cd0d55..7ee45b2992 100644 --- a/solvers/CardiacEPSolver/Stimuli/ProtocolSingle.h +++ b/solvers/CardiacEPSolver/Stimuli/ProtocolSingle.h @@ -59,7 +59,7 @@ public: friend class MemoryManager<ProtocolSingle>; - virtual ~ProtocolSingle() + ~ProtocolSingle() override { } @@ -70,9 +70,9 @@ protected: NekDouble m_start; NekDouble m_dur; - virtual NekDouble v_GetAmplitude(const NekDouble time) override; + NekDouble v_GetAmplitude(const NekDouble time) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; virtual void v_SetInitialConditions(); diff --git a/solvers/CardiacEPSolver/Stimuli/StimulusCircle.h b/solvers/CardiacEPSolver/Stimuli/StimulusCircle.h index 6bad2d51c0..6abcddb48e 100644 --- a/solvers/CardiacEPSolver/Stimuli/StimulusCircle.h +++ b/solvers/CardiacEPSolver/Stimuli/StimulusCircle.h @@ -66,7 +66,7 @@ public: friend class MemoryManager<StimulusCirc>; - virtual ~StimulusCirc() + ~StimulusCirc() override { } @@ -83,10 +83,10 @@ protected: NekDouble v_amp; NekDouble m_chiCapMembrane; - virtual void v_Update(Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: StimulusCirc(const LibUtilities::SessionReaderSharedPtr &pSession, diff --git a/solvers/CardiacEPSolver/Stimuli/StimulusPoint.h b/solvers/CardiacEPSolver/Stimuli/StimulusPoint.h index b51da4b290..e12841b8f9 100644 --- a/solvers/CardiacEPSolver/Stimuli/StimulusPoint.h +++ b/solvers/CardiacEPSolver/Stimuli/StimulusPoint.h @@ -63,7 +63,7 @@ public: friend class MemoryManager<StimulusPoint>; - virtual ~StimulusPoint() + ~StimulusPoint() override { } @@ -73,10 +73,10 @@ public: protected: NekDouble m_strength; - virtual void v_Update(Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: StimulusPoint(const LibUtilities::SessionReaderSharedPtr &pSession, diff --git a/solvers/CardiacEPSolver/Stimuli/StimulusRect.h b/solvers/CardiacEPSolver/Stimuli/StimulusRect.h index e746251f30..927e50173e 100644 --- a/solvers/CardiacEPSolver/Stimuli/StimulusRect.h +++ b/solvers/CardiacEPSolver/Stimuli/StimulusRect.h @@ -63,7 +63,7 @@ public: friend class MemoryManager<StimulusRect>; - virtual ~StimulusRect() + ~StimulusRect() override { } @@ -81,10 +81,10 @@ protected: NekDouble m_strength; NekDouble m_chiCapMembrane; - virtual void v_Update(Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble time) override; + void v_Update(Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble time) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; private: StimulusRect(const LibUtilities::SessionReaderSharedPtr &pSession, diff --git a/solvers/CompressibleFlowSolver/ArtificialDiffusion/NonSmoothShockCapture.h b/solvers/CompressibleFlowSolver/ArtificialDiffusion/NonSmoothShockCapture.h index 77c4ec2047..79ccad6ef3 100644 --- a/solvers/CompressibleFlowSolver/ArtificialDiffusion/NonSmoothShockCapture.h +++ b/solvers/CompressibleFlowSolver/ArtificialDiffusion/NonSmoothShockCapture.h @@ -65,7 +65,7 @@ public: static std::string className; protected: - virtual void v_GetArtificialViscosity( + void v_GetArtificialViscosity( const Array<OneD, Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &mu) override; @@ -75,7 +75,7 @@ private: const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const int spacedim); - virtual ~NonSmoothShockCapture(void){}; + ~NonSmoothShockCapture(void) override{}; /// Parameters int m_offset; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/ExtrapOrder0BC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/ExtrapOrder0BC.h index d2aa4d2b8f..6b1fea4b94 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/ExtrapOrder0BC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/ExtrapOrder0BC.h @@ -66,9 +66,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: ExtrapOrder0BC(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -76,7 +76,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~ExtrapOrder0BC(void){}; + ~ExtrapOrder0BC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/IsentropicVortexBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/IsentropicVortexBC.h index 9b5ce78025..55fd78ee80 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/IsentropicVortexBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/IsentropicVortexBC.h @@ -65,9 +65,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: IsentropicVortexBC( @@ -82,7 +82,7 @@ private: Array<OneD, Array<OneD, NekDouble>> &u, NekDouble time, const int o = 0); - virtual ~IsentropicVortexBC(void){}; + ~IsentropicVortexBC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureInflowFileBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureInflowFileBC.h index ad167a1f0e..92b9a846e2 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureInflowFileBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureInflowFileBC.h @@ -68,9 +68,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: PressureInflowFileBC( @@ -79,7 +79,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~PressureInflowFileBC(void){}; + ~PressureInflowFileBC(void) override{}; // Field storage for PressureInflowFileBC Array<OneD, Array<OneD, NekDouble>> m_fieldStorage; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureMachTemperatureBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureMachTemperatureBC.h index d398d33982..8442304ee6 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureMachTemperatureBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureMachTemperatureBC.h @@ -70,9 +70,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: PressureMachTemperatureBC( @@ -81,7 +81,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~PressureMachTemperatureBC(void){}; + ~PressureMachTemperatureBC(void) override{}; // Storage for boundary conditions in conserved variables format Array<OneD, Array<OneD, NekDouble>> m_bcStorage; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowBC.h index 30132891aa..58f1b93404 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowBC.h @@ -66,9 +66,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: PressureOutflowBC( @@ -77,7 +77,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~PressureOutflowBC(void){}; + ~PressureOutflowBC(void) override{}; // Field storage for PressureOutflow Array<OneD, NekDouble> m_pressureStorage; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowNonReflectiveBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowNonReflectiveBC.h index 4ef3d079b9..86d4fd6928 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowNonReflectiveBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/PressureOutflowNonReflectiveBC.h @@ -67,9 +67,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: PressureOutflowNonReflectiveBC( @@ -78,7 +78,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~PressureOutflowNonReflectiveBC(void){}; + ~PressureOutflowNonReflectiveBC(void) override{}; // Field storage for PressureOutflow Array<OneD, NekDouble> m_pressureStorage; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/RiemannInvariantBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/RiemannInvariantBC.h index 9b51f97021..e7f682a24c 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/RiemannInvariantBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/RiemannInvariantBC.h @@ -66,9 +66,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; /// Reference normal velocity Array<OneD, NekDouble> m_VnInf; @@ -80,7 +80,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~RiemannInvariantBC(void){}; + ~RiemannInvariantBC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/RinglebFlowBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/RinglebFlowBC.h index e92f79a1ed..04553686ba 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/RinglebFlowBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/RinglebFlowBC.h @@ -64,9 +64,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: RinglebFlowBC(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -74,7 +74,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~RinglebFlowBC(void){}; + ~RinglebFlowBC(void) override{}; int m_expdim; bool m_homo1D; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/StagnationInflowBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/StagnationInflowBC.h index 7eb1f8f645..089bcf95d6 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/StagnationInflowBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/StagnationInflowBC.h @@ -66,9 +66,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: StagnationInflowBC( @@ -77,7 +77,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~StagnationInflowBC(void){}; + ~StagnationInflowBC(void) override{}; // Field storage for StagnationInflowBC Array<OneD, Array<OneD, NekDouble>> m_fieldStorage; diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/SymmetryBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/SymmetryBC.h index 8473be93bd..6067076ce7 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/SymmetryBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/SymmetryBC.h @@ -64,9 +64,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: SymmetryBC(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -74,7 +74,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~SymmetryBC(void){}; + ~SymmetryBC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/TimeDependentBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/TimeDependentBC.h index 45e75d3246..06d9d86d31 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/TimeDependentBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/TimeDependentBC.h @@ -65,9 +65,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: TimeDependentBC(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -75,7 +75,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~TimeDependentBC(void){}; + ~TimeDependentBC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/WallBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/WallBC.h index 987ea516da..033b935a57 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/WallBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/WallBC.h @@ -64,9 +64,9 @@ public: static std::string className; protected: - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: WallBC(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -74,7 +74,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~WallBC(void){}; + ~WallBC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/BoundaryConditions/WallViscousBC.h b/solvers/CompressibleFlowSolver/BoundaryConditions/WallViscousBC.h index b9bf252c7e..91aa8c7c63 100644 --- a/solvers/CompressibleFlowSolver/BoundaryConditions/WallViscousBC.h +++ b/solvers/CompressibleFlowSolver/BoundaryConditions/WallViscousBC.h @@ -69,9 +69,9 @@ protected: // space for the specified region. Array<OneD, Array<OneD, NekDouble>> m_bndPhys; - virtual void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, - Array<OneD, Array<OneD, NekDouble>> &physarray, - const NekDouble &time) override; + void v_Apply(Array<OneD, Array<OneD, NekDouble>> &Fwd, + Array<OneD, Array<OneD, NekDouble>> &physarray, + const NekDouble &time) override; private: WallViscousBC(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -79,7 +79,7 @@ private: const Array<OneD, Array<OneD, NekDouble>> &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt); - virtual ~WallViscousBC(void){}; + ~WallViscousBC(void) override{}; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/Diffusion/DiffusionLDGNS.h b/solvers/CompressibleFlowSolver/Diffusion/DiffusionLDGNS.h index 5dc5814234..4094767be2 100644 --- a/solvers/CompressibleFlowSolver/Diffusion/DiffusionLDGNS.h +++ b/solvers/CompressibleFlowSolver/Diffusion/DiffusionLDGNS.h @@ -81,19 +81,18 @@ protected: std::size_t m_spaceDim; std::size_t m_diffDim; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Diffuse( - const std::size_t nConvective, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; + void v_Diffuse(const std::size_t nConvective, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseCoeffs( + void v_DiffuseCoeffs( const std::size_t nConvective, const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, @@ -101,21 +100,21 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseCalcDerivative( + void v_DiffuseCalcDerivative( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DiffuseVolumeFlux( + void v_DiffuseVolumeFlux( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, TensorOfArray3D<NekDouble> &VolumeFlux, Array<OneD, int> &nonZeroIndex) override; - virtual void v_DiffuseTraceFlux( + void v_DiffuseTraceFlux( const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, const Array<OneD, Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfields, @@ -125,13 +124,12 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pBwd, Array<OneD, int> &nonZeroIndex) override; - virtual void v_SetHomoDerivs( - Array<OneD, Array<OneD, NekDouble>> &deriv) override + void v_SetHomoDerivs(Array<OneD, Array<OneD, NekDouble>> &deriv) override { m_homoDerivs = deriv; } - virtual TensorOfArray3D<NekDouble> &v_GetFluxTensor() override + TensorOfArray3D<NekDouble> &v_GetFluxTensor() override { return m_viscTensor; } diff --git a/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystem.h b/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystem.h index 4dd3d4f3f9..4508835560 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystem.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystem.h @@ -64,7 +64,7 @@ class CompressibleFlowSystem : public SolverUtils::AdvectionSystem, public: friend class MemoryManager<CompressibleFlowSystem>; - virtual ~CompressibleFlowSystem(); + ~CompressibleFlowSystem() override; /// Function to calculate the stability limit for DG/CG. NekDouble GetStabilityLimit(int n); @@ -110,22 +110,22 @@ protected: CompressibleFlowSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_GetPressure( + void v_GetPressure( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &pressure) override; - virtual void v_GetDensity( + void v_GetDensity( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &density) override; - virtual bool v_HasConstantDensity() override + bool v_HasConstantDensity() override { return false; } - virtual void v_GetVelocity( + void v_GetVelocity( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, NekDouble>> &velocity) override; @@ -167,19 +167,19 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, NekDouble> &tstep); - virtual NekDouble v_GetTimeStep( + NekDouble v_GetTimeStep( const Array<OneD, const Array<OneD, NekDouble>> &inarray) override; /// Print a summary of time stepping parameters. - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_SetInitialConditions(NekDouble initialtime = 0.0, - bool dumpInitialConditions = true, - const int domain = 0) override; + void v_SetInitialConditions(NekDouble initialtime = 0.0, + bool dumpInitialConditions = true, + const int domain = 0) override; - virtual void v_EvaluateExactSolution(unsigned int field, - Array<OneD, NekDouble> &outfield, - const NekDouble time = 0.0) override; + void v_EvaluateExactSolution(unsigned int field, + Array<OneD, NekDouble> &outfield, + const NekDouble time = 0.0) override; NekDouble GetGamma() { return m_gamma; @@ -195,16 +195,15 @@ protected: return m_traceNormals; } - virtual MultiRegions::ExpListSharedPtr v_GetPressure() override + MultiRegions::ExpListSharedPtr v_GetPressure() override { ASSERTL0(false, "This function is not valid for this class"); MultiRegions::ExpListSharedPtr null; return null; } - virtual void v_ExtraFldOutput( - std::vector<Array<OneD, NekDouble>> &fieldcoeffs, - std::vector<std::string> &variables) override; + void v_ExtraFldOutput(std::vector<Array<OneD, NekDouble>> &fieldcoeffs, + std::vector<std::string> &variables) override; virtual void v_DoDiffusion( const Array<OneD, Array<OneD, NekDouble>> &inarray, @@ -212,11 +211,10 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) = 0; - virtual Array<OneD, NekDouble> v_GetMaxStdVelocity( + Array<OneD, NekDouble> v_GetMaxStdVelocity( const NekDouble SpeedSoundFactor) override; - virtual void v_SteadyStateResidual(int step, - Array<OneD, NekDouble> &L2) override; + void v_SteadyStateResidual(int step, Array<OneD, NekDouble> &L2) override; // Virtual function that returns true if derived class supports a given // shock capturing method diff --git a/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystemImplicit.h b/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystemImplicit.h index b0ecc48010..5db1ea3193 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystemImplicit.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystemImplicit.h @@ -51,16 +51,16 @@ public: CFSImplicit(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual ~CFSImplicit(); + ~CFSImplicit() override; - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoSolve() override; + void v_DoSolve() override; - virtual void v_PrintStatusInformation(const int step, - const NekDouble cpuTime) override; + void v_PrintStatusInformation(const int step, + const NekDouble cpuTime) override; - virtual void v_PrintSummaryStatistics(const NekDouble intTime) override; + void v_PrintSummaryStatistics(const NekDouble intTime) override; void InitialiseNonlinSysSolver(); @@ -395,7 +395,7 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, DNekMatSharedPtr>> &ElmtJac); - virtual bool v_UpdateTimeStepCheck() override; + bool v_UpdateTimeStepCheck() override; }; } // namespace Nektar #endif diff --git a/solvers/CompressibleFlowSolver/EquationSystems/EulerCFE.h b/solvers/CompressibleFlowSolver/EquationSystems/EulerCFE.h index 11a70365c6..b27fd05655 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/EulerCFE.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/EulerCFE.h @@ -59,21 +59,20 @@ public: /// Name of class. static std::string className; - virtual ~EulerCFE(); + ~EulerCFE() override; protected: EulerCFE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoDiffusion( - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override final; + void v_DoDiffusion(const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) final; - virtual bool v_SupportsShockCaptType(const std::string type) const override; + bool v_SupportsShockCaptType(const std::string type) const override; }; } // namespace Nektar #endif diff --git a/solvers/CompressibleFlowSolver/EquationSystems/EulerImplicitCFE.h b/solvers/CompressibleFlowSolver/EquationSystems/EulerImplicitCFE.h index 62e9f7c689..78f27be15e 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/EulerImplicitCFE.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/EulerImplicitCFE.h @@ -61,27 +61,25 @@ public: /// Name of class. static std::string className; - virtual ~EulerImplicitCFE(); + ~EulerImplicitCFE() override; protected: EulerImplicitCFE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoDiffusion( - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override final + void v_DoDiffusion(const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) final { boost::ignore_unused(inarray, outarray, pFwd, pBwd); NEKERROR(ErrorUtil::efatal, "v_DoDiffusion is not implemented for implicit solvers"); } - virtual bool v_SupportsShockCaptType( - const std::string type) const override final; + bool v_SupportsShockCaptType(const std::string type) const final; }; } // namespace Nektar #endif diff --git a/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFE.h b/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFE.h index bf6ffb25ad..089f7bb097 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFE.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFE.h @@ -64,7 +64,7 @@ public: // Name of class static std::string className; - virtual ~NavierStokesCFE(); + ~NavierStokesCFE() override; protected: std::string m_ViscosityType; @@ -122,9 +122,9 @@ protected: void InitObject_Explicit(); - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; - virtual void v_DoDiffusion( + void v_DoDiffusion( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const Array<OneD, Array<OneD, NekDouble>> &pFwd, @@ -166,9 +166,8 @@ protected: Array<OneD, NekDouble> &div, Array<OneD, NekDouble> &curlSquare); - virtual void v_ExtraFldOutput( - std::vector<Array<OneD, NekDouble>> &fieldcoeffs, - std::vector<std::string> &variables) override; + void v_ExtraFldOutput(std::vector<Array<OneD, NekDouble>> &fieldcoeffs, + std::vector<std::string> &variables) override; template <class T, typename = typename std::enable_if< std::is_floating_point<T>::value || @@ -561,7 +560,7 @@ protected: } } - virtual bool v_SupportsShockCaptType(const std::string type) const override; + bool v_SupportsShockCaptType(const std::string type) const override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFEAxisym.h b/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFEAxisym.h index 6c51098f35..d82273c510 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFEAxisym.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesCFEAxisym.h @@ -64,7 +64,7 @@ public: // Name of class static std::string className; - virtual ~NavierStokesCFEAxisym(); + ~NavierStokesCFEAxisym() override; protected: Array<OneD, Array<OneD, NekDouble>> m_viscousForcing; @@ -72,20 +72,20 @@ protected: NavierStokesCFEAxisym(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoDiffusion( + void v_DoDiffusion( const Array<OneD, Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const Array<OneD, Array<OneD, NekDouble>> &pFwd, const Array<OneD, Array<OneD, NekDouble>> &pBwd) override; - virtual void v_GetViscousFluxVector( + void v_GetViscousFluxVector( const Array<OneD, const Array<OneD, NekDouble>> &physfield, TensorOfArray3D<NekDouble> &derivatives, TensorOfArray3D<NekDouble> &viscousTensor) override; - virtual void v_GetViscousFluxVectorDeAlias( + void v_GetViscousFluxVectorDeAlias( const Array<OneD, const Array<OneD, NekDouble>> &physfield, TensorOfArray3D<NekDouble> &derivatives, TensorOfArray3D<NekDouble> &viscousTensor) override diff --git a/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesImplicitCFE.h b/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesImplicitCFE.h index e27dd10efc..85da628b36 100644 --- a/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesImplicitCFE.h +++ b/solvers/CompressibleFlowSolver/EquationSystems/NavierStokesImplicitCFE.h @@ -67,7 +67,7 @@ public: // Name of class static std::string className; - virtual ~NavierStokesImplicitCFE(); + ~NavierStokesImplicitCFE() override; typedef std::function<void( const Array<OneD, NekDouble> &, const NekDouble &, @@ -81,26 +81,25 @@ protected: const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoDiffusionCoeff( + void v_DoDiffusionCoeff( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const Array<OneD, const Array<OneD, NekDouble>> &pFwd, const Array<OneD, const Array<OneD, NekDouble>> &pBwd) override; - virtual void v_DoDiffusion( - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const Array<OneD, Array<OneD, NekDouble>> &pFwd, - const Array<OneD, Array<OneD, NekDouble>> &pBwd) override final + void v_DoDiffusion(const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const Array<OneD, Array<OneD, NekDouble>> &pFwd, + const Array<OneD, Array<OneD, NekDouble>> &pBwd) final { boost::ignore_unused(inarray, outarray, pFwd, pBwd); NEKERROR(ErrorUtil::efatal, "v_DoDiffusion is not implemented for implicit solvers"); } - virtual void v_MinusDiffusionFluxJacPoint( + void v_MinusDiffusionFluxJacPoint( const int nConvectiveFields, const int nElmtPnt, const Array<OneD, const Array<OneD, NekDouble>> &locVars, const TensorOfArray3D<NekDouble> &locDerv, @@ -109,14 +108,14 @@ protected: const Array<OneD, NekDouble> &normals, DNekMatSharedPtr &wspMat, Array<OneD, Array<OneD, NekDouble>> &PntJacArray) override; - virtual void v_GetFluxDerivJacDirctn( + void v_GetFluxDerivJacDirctn( const MultiRegions::ExpListSharedPtr &explist, const Array<OneD, const Array<OneD, NekDouble>> &normals, const int nDervDir, const Array<OneD, const Array<OneD, NekDouble>> &inarray, TensorOfArray5D<NekDouble> &ElmtJacArray, const int nFluxDir) override; - virtual void v_GetFluxDerivJacDirctnElmt( + void v_GetFluxDerivJacDirctnElmt( const int nConvectiveFields, const int nElmtPnt, const int nDervDir, const Array<OneD, const Array<OneD, NekDouble>> &locVars, const Array<OneD, NekDouble> &locmu, @@ -124,7 +123,7 @@ protected: DNekMatSharedPtr &wspMat, Array<OneD, Array<OneD, NekDouble>> &PntJacArray) override; - virtual void v_GetFluxDerivJacDirctn( + void v_GetFluxDerivJacDirctn( const MultiRegions::ExpListSharedPtr &explist, const Array<OneD, const Array<OneD, NekDouble>> &normals, const int nDervDir, @@ -137,13 +136,13 @@ protected: const NekDouble mu, const NekDouble DmuDT, const Array<OneD, NekDouble> &normals, DNekMatSharedPtr &fluxJac); - virtual void v_CalcPhysDeriv( + void v_CalcPhysDeriv( const Array<OneD, const Array<OneD, NekDouble>> &inarray, TensorOfArray3D<NekDouble> &qfield) override; - virtual void v_CalcMuDmuDT( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, NekDouble> &mu, Array<OneD, NekDouble> &DmuDT) override; + void v_CalcMuDmuDT(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, NekDouble> &mu, + Array<OneD, NekDouble> &DmuDT) override; /** * @brief return part of viscous Jacobian: @@ -237,8 +236,7 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &qfield, DNekMatSharedPtr &OutputMatrix); - virtual bool v_SupportsShockCaptType( - const std::string type) const override final; + bool v_SupportsShockCaptType(const std::string type) const final; }; } // namespace Nektar #endif diff --git a/solvers/CompressibleFlowSolver/Forcing/ForcingAxiSymmetric.h b/solvers/CompressibleFlowSolver/Forcing/ForcingAxiSymmetric.h index d11f1af550..d16d4c87ba 100644 --- a/solvers/CompressibleFlowSolver/Forcing/ForcingAxiSymmetric.h +++ b/solvers/CompressibleFlowSolver/Forcing/ForcingAxiSymmetric.h @@ -64,16 +64,15 @@ public: static std::string className; protected: - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - virtual void v_Apply( - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble &time) override; + void v_Apply(const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time) override; private: ForcingAxiSymmetric( diff --git a/solvers/CompressibleFlowSolver/Forcing/ForcingQuasi1D.h b/solvers/CompressibleFlowSolver/Forcing/ForcingQuasi1D.h index 446c1ca33f..1dec5db79c 100644 --- a/solvers/CompressibleFlowSolver/Forcing/ForcingQuasi1D.h +++ b/solvers/CompressibleFlowSolver/Forcing/ForcingQuasi1D.h @@ -64,16 +64,15 @@ public: static std::string className; protected: - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - virtual void v_Apply( - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble &time) override; + void v_Apply(const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time) override; private: ForcingQuasi1D(const LibUtilities::SessionReaderSharedPtr &pSession, diff --git a/solvers/CompressibleFlowSolver/Misc/IdealGasEoS.h b/solvers/CompressibleFlowSolver/Misc/IdealGasEoS.h index 69121e4788..433f5d5fa5 100644 --- a/solvers/CompressibleFlowSolver/Misc/IdealGasEoS.h +++ b/solvers/CompressibleFlowSolver/Misc/IdealGasEoS.h @@ -62,40 +62,30 @@ public: static std::string className; protected: - virtual NekDouble v_GetTemperature(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetTemperature(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetTemperature(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetPressure(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetPressure(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetPressure(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetSoundSpeed(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetSoundSpeed(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetEntropy(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p) final; - virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p) final; private: IdealGasEoS(const LibUtilities::SessionReaderSharedPtr &pSession); - ~IdealGasEoS(void){}; + ~IdealGasEoS(void) override{}; // type agnostic kernels template <class T, typename = typename std::enable_if< diff --git a/solvers/CompressibleFlowSolver/Misc/PengRobinsonEoS.h b/solvers/CompressibleFlowSolver/Misc/PengRobinsonEoS.h index e24a35f38c..c991bbca4c 100644 --- a/solvers/CompressibleFlowSolver/Misc/PengRobinsonEoS.h +++ b/solvers/CompressibleFlowSolver/Misc/PengRobinsonEoS.h @@ -73,37 +73,28 @@ protected: NekDouble m_omega; NekDouble m_fw; - virtual NekDouble v_GetTemperature(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetTemperature(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetTemperature(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetPressure(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetPressure(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetPressure(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetEntropy(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p) final; - virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p) final; private: PengRobinsonEoS(const LibUtilities::SessionReaderSharedPtr &pSession); - ~PengRobinsonEoS(void){}; + ~PengRobinsonEoS(void) override{}; // Alpha term of Peng-Robinson EoS template <class T, typename = typename std::enable_if< diff --git a/solvers/CompressibleFlowSolver/Misc/RedlichKwongEoS.h b/solvers/CompressibleFlowSolver/Misc/RedlichKwongEoS.h index 2c2b295652..7f520764a0 100644 --- a/solvers/CompressibleFlowSolver/Misc/RedlichKwongEoS.h +++ b/solvers/CompressibleFlowSolver/Misc/RedlichKwongEoS.h @@ -73,37 +73,28 @@ protected: NekDouble m_Tc; NekDouble m_Pc; - virtual NekDouble v_GetTemperature(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetTemperature(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetTemperature(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetPressure(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetPressure(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetPressure(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetEntropy(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p) final; - virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p) final; private: RedlichKwongEoS(const LibUtilities::SessionReaderSharedPtr &pSession); - ~RedlichKwongEoS(void){}; + ~RedlichKwongEoS(void) override{}; // Alpha term of Redlich-Kwong EoS ( 1.0/sqrt(Tr)) template <class T, typename = typename std::enable_if< diff --git a/solvers/CompressibleFlowSolver/Misc/VanDerWaalsEoS.h b/solvers/CompressibleFlowSolver/Misc/VanDerWaalsEoS.h index 36d67337b0..906b7a916f 100644 --- a/solvers/CompressibleFlowSolver/Misc/VanDerWaalsEoS.h +++ b/solvers/CompressibleFlowSolver/Misc/VanDerWaalsEoS.h @@ -67,37 +67,28 @@ protected: NekDouble m_a; NekDouble m_b; - virtual NekDouble v_GetTemperature(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetTemperature(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetTemperature(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetPressure(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e) final; - virtual vec_t v_GetPressure(const vec_t &rho, - const vec_t &e) override final; + vec_t v_GetPressure(const vec_t &rho, const vec_t &e) final; - virtual NekDouble v_GetEntropy(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, - const NekDouble &e) override final; + NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e) final; - virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p) final; - virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, - const NekDouble &p) override final; + NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p) final; private: VanDerWaalsEoS(const LibUtilities::SessionReaderSharedPtr &pSession); - ~VanDerWaalsEoS(void){}; + ~VanDerWaalsEoS(void) override{}; template <class T, typename = typename std::enable_if< std::is_floating_point<T>::value || diff --git a/solvers/CompressibleFlowSolver/Preconditioner/PreconCfsBRJ.h b/solvers/CompressibleFlowSolver/Preconditioner/PreconCfsBRJ.h index 0e34874cbb..345c815777 100644 --- a/solvers/CompressibleFlowSolver/Preconditioner/PreconCfsBRJ.h +++ b/solvers/CompressibleFlowSolver/Preconditioner/PreconCfsBRJ.h @@ -68,7 +68,7 @@ public: PreconCfsBRJ(const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vComm); - ~PreconCfsBRJ(){}; + ~PreconCfsBRJ() override{}; protected: int m_PreconItsStep; @@ -91,20 +91,20 @@ protected: PrecType m_PreconMatStorage; - virtual void v_InitObject() override; + void v_InitObject() override; - virtual void v_DoPreconCfs( + void v_DoPreconCfs( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const Array<OneD, NekDouble> &pInput, Array<OneD, NekDouble> &pOutput, const bool &flag) override; - virtual void v_BuildPreconCfs( + void v_BuildPreconCfs( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const Array<OneD, const Array<OneD, NekDouble>> &intmp, const NekDouble time, const NekDouble lambda) override; - virtual bool v_UpdatePreconMatCheck(const Array<OneD, const NekDouble> &res, - const NekDouble dtLambda) override; + bool v_UpdatePreconMatCheck(const Array<OneD, const NekDouble> &res, + const NekDouble dtLambda) override; private: void DoNullPrecon(const Array<OneD, NekDouble> &pInput, diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM0Solver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM0Solver.h index 1d360e2756..a1d4d7408c 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM0Solver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM0Solver.h @@ -53,12 +53,10 @@ public: protected: AUSM0Solver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, - double rhowL, double EL, double rhoR, - double rhouR, double rhovR, double rhowR, - double ER, double &rhof, double &rhouf, - double &rhovf, double &rhowf, - double &Ef) override; + void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, + double EL, double rhoR, double rhouR, double rhovR, + double rhowR, double ER, double &rhof, double &rhouf, + double &rhovf, double &rhowf, double &Ef) override; double M1Function(int A, double M); double M2Function(int A, double M); diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM1Solver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM1Solver.h index 5cc39310ae..499cc35aa3 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM1Solver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM1Solver.h @@ -53,12 +53,10 @@ public: protected: AUSM1Solver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, - double rhowL, double EL, double rhoR, - double rhouR, double rhovR, double rhowR, - double ER, double &rhof, double &rhouf, - double &rhovf, double &rhowf, - double &Ef) override; + void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, + double EL, double rhoR, double rhouR, double rhovR, + double rhowR, double ER, double &rhof, double &rhouf, + double &rhovf, double &rhowf, double &Ef) override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM2Solver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM2Solver.h index ee8f0e437f..a96d04a6af 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM2Solver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM2Solver.h @@ -53,12 +53,10 @@ public: protected: AUSM2Solver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, - double rhowL, double EL, double rhoR, - double rhouR, double rhovR, double rhowR, - double ER, double &rhof, double &rhouf, - double &rhovf, double &rhowf, - double &Ef) override; + void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, + double EL, double rhoR, double rhouR, double rhovR, + double rhowR, double ER, double &rhof, double &rhouf, + double &rhovf, double &rhowf, double &Ef) override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM3Solver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM3Solver.h index 410453e670..bccd42e56f 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM3Solver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/AUSM3Solver.h @@ -53,12 +53,10 @@ public: protected: AUSM3Solver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, - double rhowL, double EL, double rhoR, - double rhouR, double rhovR, double rhowR, - double ER, double &rhof, double &rhouf, - double &rhovf, double &rhowf, - double &Ef) override; + void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, + double EL, double rhoR, double rhouR, double rhovR, + double rhowR, double ER, double &rhof, double &rhouf, + double &rhovf, double &rhowf, double &Ef) override; NekDouble m_Mco; }; diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/AverageSolver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/AverageSolver.h index 2c8e1e7a83..67ce48ac63 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/AverageSolver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/AverageSolver.h @@ -53,10 +53,9 @@ public: protected: AverageSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_ArraySolve( - const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override final; + void v_ArraySolve(const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) final; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/CompressibleSolver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/CompressibleSolver.h index 643653150b..ae94fc4641 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/CompressibleSolver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/CompressibleSolver.h @@ -59,10 +59,9 @@ protected: using ND = NekDouble; - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, ND>> &Fwd, - const Array<OneD, const Array<OneD, ND>> &Bwd, - Array<OneD, Array<OneD, ND>> &flux) override; + void v_Solve(const int nDim, const Array<OneD, const Array<OneD, ND>> &Fwd, + const Array<OneD, const Array<OneD, ND>> &Bwd, + Array<OneD, Array<OneD, ND>> &flux) override; virtual void v_ArraySolve(const Array<OneD, const Array<OneD, ND>> &Fwd, const Array<OneD, const Array<OneD, ND>> &Bwd, diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/ExactSolverToro.h b/solvers/CompressibleFlowSolver/RiemannSolvers/ExactSolverToro.h index 3cfa48823a..9dbfab4fa5 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/ExactSolverToro.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/ExactSolverToro.h @@ -53,12 +53,12 @@ public: protected: ExactSolverToro(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble rhoL, NekDouble rhouL, NekDouble rhovL, - NekDouble rhowL, NekDouble EL, NekDouble rhoR, - NekDouble rhouR, NekDouble rhovR, NekDouble rhowR, - NekDouble ER, NekDouble &rhof, NekDouble &rhouf, - NekDouble &rhovf, NekDouble &rhowf, - NekDouble &Ef) override; + void v_PointSolve(NekDouble rhoL, NekDouble rhouL, NekDouble rhovL, + NekDouble rhowL, NekDouble EL, NekDouble rhoR, + NekDouble rhouR, NekDouble rhovR, NekDouble rhowR, + NekDouble ER, NekDouble &rhof, NekDouble &rhouf, + NekDouble &rhovf, NekDouble &rhowf, + NekDouble &Ef) override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/HLLCSolver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/HLLCSolver.h index a559a4e043..fc9f9c62a7 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/HLLCSolver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/HLLCSolver.h @@ -53,12 +53,12 @@ public: protected: HLLCSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble rhoL, NekDouble rhouL, NekDouble rhovL, - NekDouble rhowL, NekDouble EL, NekDouble rhoR, - NekDouble rhouR, NekDouble rhovR, NekDouble rhowR, - NekDouble ER, NekDouble &rhof, NekDouble &rhouf, - NekDouble &rhovf, NekDouble &rhowf, - NekDouble &Ef) override; + void v_PointSolve(NekDouble rhoL, NekDouble rhouL, NekDouble rhovL, + NekDouble rhowL, NekDouble EL, NekDouble rhoR, + NekDouble rhouR, NekDouble rhovR, NekDouble rhowR, + NekDouble ER, NekDouble &rhof, NekDouble &rhouf, + NekDouble &rhovf, NekDouble &rhowf, + NekDouble &Ef) override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/HLLSolver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/HLLSolver.h index e39d466998..d4abb4b154 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/HLLSolver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/HLLSolver.h @@ -53,11 +53,10 @@ public: protected: HLLSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, - double rhowL, double EL, double rhoR, - double rhouR, double rhovR, double rhowR, - double ER, double &rhof, double &rhouf, - double &rhovf, double &rhowf, double &Ef); + void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, + double EL, double rhoR, double rhouR, double rhovR, + double rhowR, double ER, double &rhof, double &rhouf, + double &rhovf, double &rhowf, double &Ef) override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/LaxFriedrichsSolver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/LaxFriedrichsSolver.h index 61b3ed44ab..41aaccb159 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/LaxFriedrichsSolver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/LaxFriedrichsSolver.h @@ -53,12 +53,10 @@ public: protected: LaxFriedrichsSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, - double rhowL, double EL, double rhoR, - double rhouR, double rhovR, double rhowR, - double ER, double &rhof, double &rhouf, - double &rhovf, double &rhowf, - double &Ef) override; + void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, + double EL, double rhoR, double rhouR, double rhovR, + double rhowR, double ER, double &rhof, double &rhouf, + double &rhovf, double &rhowf, double &Ef) override; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolver.h b/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolver.h index eac5250c83..073949aa41 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolver.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolver.h @@ -58,15 +58,13 @@ protected: using ND = NekDouble; - virtual void v_PointSolve(ND rhoL, ND rhouL, ND rhovL, ND rhowL, ND EL, - ND rhoR, ND rhouR, ND rhovR, ND rhowR, ND ER, - ND &rhof, ND &rhouf, ND &rhovf, ND &rhowf, - ND &Ef) override final; - - virtual void v_ArraySolve( - const Array<OneD, const Array<OneD, ND>> &Fwd, - const Array<OneD, const Array<OneD, ND>> &Bwd, - Array<OneD, Array<OneD, ND>> &flux) override final; + void v_PointSolve(ND rhoL, ND rhouL, ND rhovL, ND rhowL, ND EL, ND rhoR, + ND rhouR, ND rhovR, ND rhowR, ND ER, ND &rhof, ND &rhouf, + ND &rhovf, ND &rhowf, ND &Ef) final; + + void v_ArraySolve(const Array<OneD, const Array<OneD, ND>> &Fwd, + const Array<OneD, const Array<OneD, ND>> &Bwd, + Array<OneD, Array<OneD, ND>> &flux) final; }; template <class T, typename = typename std::enable_if< diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolverSIMD.h b/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolverSIMD.h index 4324315ebe..3d3d9230fa 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolverSIMD.h +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/RoeSolverSIMD.h @@ -59,10 +59,9 @@ protected: using ND = NekDouble; - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, ND>> &Fwd, - const Array<OneD, const Array<OneD, ND>> &Bwd, - Array<OneD, Array<OneD, ND>> &flux) override final; + void v_Solve(const int nDim, const Array<OneD, const Array<OneD, ND>> &Fwd, + const Array<OneD, const Array<OneD, ND>> &Bwd, + Array<OneD, Array<OneD, ND>> &flux) final; }; } // namespace Nektar diff --git a/solvers/CompressibleFlowSolver/RiemannSolvers/UnitTests/TestRiemann.cpp b/solvers/CompressibleFlowSolver/RiemannSolvers/UnitTests/TestRiemann.cpp index 82ae79dab8..1117fa3b8e 100644 --- a/solvers/CompressibleFlowSolver/RiemannSolvers/UnitTests/TestRiemann.cpp +++ b/solvers/CompressibleFlowSolver/RiemannSolvers/UnitTests/TestRiemann.cpp @@ -39,9 +39,7 @@ #include "../RoeSolver.h" #include "../RoeSolverSIMD.h" -namespace Nektar -{ -namespace RiemannTests +namespace Nektar::RiemannTests { BOOST_AUTO_TEST_CASE(RoeAlongXconstSolution) { @@ -444,5 +442,4 @@ BOOST_AUTO_TEST_CASE(RoeAlongXdensityJump) } } -} // namespace RiemannTests -} // namespace Nektar +} // namespace Nektar::RiemannTests diff --git a/solvers/DiffusionSolver/EquationSystems/MMFDiffusion.h b/solvers/DiffusionSolver/EquationSystems/MMFDiffusion.h index e0d8a7db56..9c572c9a28 100644 --- a/solvers/DiffusionSolver/EquationSystems/MMFDiffusion.h +++ b/solvers/DiffusionSolver/EquationSystems/MMFDiffusion.h @@ -98,7 +98,7 @@ public: TestType m_TestType; /// Desctructor - virtual ~MMFDiffusion(); + ~MMFDiffusion() override; protected: /// Constructor @@ -107,7 +107,7 @@ protected: InitWaveType m_InitWaveType; - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; /// Solve for the diffusion term. void DoImplicitSolve( @@ -132,16 +132,16 @@ protected: Array<OneD, NekDouble> PlanePhiWave(); /// Sets a custom initial condition. - virtual void v_SetInitialConditions(NekDouble initialtime = 0.0, - bool dumpInitialConditions = true, - const int domain = 0) override; + void v_SetInitialConditions(NekDouble initialtime = 0.0, + bool dumpInitialConditions = true, + const int domain = 0) override; /// Prints a summary of the model parameters. - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_EvaluateExactSolution(unsigned int field, - Array<OneD, NekDouble> &outfield, - const NekDouble time) override; + void v_EvaluateExactSolution(unsigned int field, + Array<OneD, NekDouble> &outfield, + const NekDouble time) override; NekDouble m_InitPtx, m_InitPty, m_InitPtz; diff --git a/solvers/DummySolver/EquationSystems/Dummy.h b/solvers/DummySolver/EquationSystems/Dummy.h index 52d43eee23..6513d97669 100644 --- a/solvers/DummySolver/EquationSystems/Dummy.h +++ b/solvers/DummySolver/EquationSystems/Dummy.h @@ -64,7 +64,7 @@ public: static std::string className; /// Destructor - virtual ~Dummy(); + ~Dummy() override; protected: SolverUtils::CouplingSharedPtr m_coupling; @@ -74,7 +74,7 @@ protected: Dummy(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -84,13 +84,13 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time); - virtual bool v_PreIntegrate(int step) override; + bool v_PreIntegrate(int step) override; - virtual bool v_PostIntegrate(int step) override; + bool v_PostIntegrate(int step) override; - virtual void v_Output() override; + void v_Output() override; - virtual bool v_RequireFwdTrans() override + bool v_RequireFwdTrans() override { return false; } diff --git a/solvers/ImageWarpingSolver/EquationSystems/ImageWarpingSystem.h b/solvers/ImageWarpingSolver/EquationSystems/ImageWarpingSystem.h index 1b4fccafbb..64553802c3 100644 --- a/solvers/ImageWarpingSolver/EquationSystems/ImageWarpingSystem.h +++ b/solvers/ImageWarpingSolver/EquationSystems/ImageWarpingSystem.h @@ -61,7 +61,7 @@ public: /// Name of class static std::string className; - virtual ~ImageWarpingSystem(); + ~ImageWarpingSystem() override; protected: SolverUtils::RiemannSolverSharedPtr m_riemannSolver; @@ -83,14 +83,14 @@ protected: /// Get the normal velocity Array<OneD, NekDouble> &GetNormalVelocity(); - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; // DG Advection routines void GetFluxVector(const Array<OneD, Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux); // Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; }; } // namespace Nektar diff --git a/solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.h b/solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.h index 4965437b76..b900a1a8b6 100644 --- a/solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.h +++ b/solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.h @@ -58,18 +58,18 @@ public: protected: AdjointAdvection(); - virtual ~AdjointAdvection(); + ~AdjointAdvection() override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; }; } // namespace Nektar diff --git a/solvers/IncNavierStokesSolver/AdvectionTerms/AlternateSkewAdvection.h b/solvers/IncNavierStokesSolver/AdvectionTerms/AlternateSkewAdvection.h index 34b6019acc..19b9e4f8d3 100644 --- a/solvers/IncNavierStokesSolver/AdvectionTerms/AlternateSkewAdvection.h +++ b/solvers/IncNavierStokesSolver/AdvectionTerms/AlternateSkewAdvection.h @@ -58,22 +58,22 @@ public: protected: AlternateSkewAdvection(); - virtual ~AlternateSkewAdvection(); + ~AlternateSkewAdvection() override; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; private: int m_advectioncalls; diff --git a/solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.h b/solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.h index 1f82d352aa..d5f616da4f 100644 --- a/solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.h +++ b/solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.h @@ -106,24 +106,24 @@ protected: LinearisedAdvection(); - virtual ~LinearisedAdvection(); + ~LinearisedAdvection() override; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; - - virtual void v_SetBaseFlow( + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; + + void v_SetBaseFlow( const Array<OneD, Array<OneD, NekDouble>> &inarray, const Array<OneD, MultiRegions::ExpListSharedPtr> &fields) override; diff --git a/solvers/IncNavierStokesSolver/AdvectionTerms/NavierStokesAdvection.h b/solvers/IncNavierStokesSolver/AdvectionTerms/NavierStokesAdvection.h index a231c7de72..98eac49d13 100644 --- a/solvers/IncNavierStokesSolver/AdvectionTerms/NavierStokesAdvection.h +++ b/solvers/IncNavierStokesSolver/AdvectionTerms/NavierStokesAdvection.h @@ -64,22 +64,22 @@ public: protected: NavierStokesAdvection(); - virtual ~NavierStokesAdvection(); + ~NavierStokesAdvection() override; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; static std::string navierStokesAdvectionTypeLookupIds[]; diff --git a/solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.h b/solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.h index ee09759c7a..e1b9d32fdd 100644 --- a/solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.h +++ b/solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.h @@ -57,22 +57,22 @@ public: protected: NoAdvection(); - virtual ~NoAdvection(); + ~NoAdvection() override; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; }; } // namespace Nektar diff --git a/solvers/IncNavierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.h b/solvers/IncNavierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.h index f4b8e1d937..252cb0ba46 100644 --- a/solvers/IncNavierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.h +++ b/solvers/IncNavierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.h @@ -60,22 +60,22 @@ public: protected: SkewSymmetricAdvection(); - virtual ~SkewSymmetricAdvection(); + ~SkewSymmetricAdvection() override; - virtual void v_InitObject( + void v_InitObject( LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields) override; - virtual void v_Advect( - const int nConvectiveFields, - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &advVel, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble &time, - const Array<OneD, Array<OneD, NekDouble>> &pFwd = - NullNekDoubleArrayOfArray, - const Array<OneD, Array<OneD, NekDouble>> &pBwd = - NullNekDoubleArrayOfArray) override; + void v_Advect(const int nConvectiveFields, + const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &advVel, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time, + const Array<OneD, Array<OneD, NekDouble>> &pFwd = + NullNekDoubleArrayOfArray, + const Array<OneD, Array<OneD, NekDouble>> &pBwd = + NullNekDoubleArrayOfArray) override; private: bool m_homogen_dealiasing; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/CoupledLinearNS.h b/solvers/IncNavierStokesSolver/EquationSystems/CoupledLinearNS.h index 0d18bff786..7e7348277f 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/CoupledLinearNS.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/CoupledLinearNS.h @@ -165,7 +165,7 @@ protected: CoupledLinearNS(const LibUtilities::SessionReaderSharedPtr &pSesssion, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; static std::string solverTypeLookupId; @@ -202,21 +202,21 @@ private: CoupledLocalToGlobalC0ContMapSharedPtr &locToGloMap, const NekDouble lambda_imag = NekConstants::kNekUnsetDouble); - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_DoInitialise(bool dumpInitialConditions = true) override; + void v_DoInitialise(bool dumpInitialConditions = true) override; - virtual void v_DoSolve(void) override; + void v_DoSolve(void) override; - virtual bool v_NegatedOp(void) override; + bool v_NegatedOp(void) override; - virtual void v_TransCoeffToPhys(void) override; + void v_TransCoeffToPhys(void) override; - virtual void v_TransPhysToCoeff(void) override; + void v_TransPhysToCoeff(void) override; - virtual void v_Output(void) override; + void v_Output(void) override; - virtual int v_GetForceDimension(void) override; + int v_GetForceDimension(void) override; }; } // namespace Nektar diff --git a/solvers/IncNavierStokesSolver/EquationSystems/ImplicitExtrapolate.h b/solvers/IncNavierStokesSolver/EquationSystems/ImplicitExtrapolate.h index 1a11f6ec78..c987e77397 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/ImplicitExtrapolate.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/ImplicitExtrapolate.h @@ -77,10 +77,10 @@ public: const Array<OneD, int> pVel, const SolverUtils::AdvectionSharedPtr advObject); - virtual ~ImplicitExtrapolate(); + ~ImplicitExtrapolate() override; protected: - virtual void v_EvaluatePressureBCs( + void v_EvaluatePressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &fields, const Array<OneD, const Array<OneD, NekDouble>> &N, NekDouble kinvis) override; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/IncNavierStokes.h b/solvers/IncNavierStokesSolver/EquationSystems/IncNavierStokes.h index 16a9892305..093685006b 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/IncNavierStokes.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/IncNavierStokes.h @@ -148,9 +148,9 @@ class IncNavierStokes : public SolverUtils::AdvectionSystem, { public: // Destructor - virtual ~IncNavierStokes(); + ~IncNavierStokes() override; - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; int GetNConvectiveFields(void) { @@ -159,34 +159,33 @@ public: void AddForcing(const SolverUtils::ForcingSharedPtr &pForce); - virtual void v_GetPressure( + void v_GetPressure( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &pressure) override; - virtual void v_GetDensity( + void v_GetDensity( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &density) override; - virtual bool v_HasConstantDensity() override + bool v_HasConstantDensity() override { return true; } - virtual void v_GetVelocity( + void v_GetVelocity( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, NekDouble>> &velocity) override; - virtual void v_SetMovingFrameVelocities( + void v_SetMovingFrameVelocities( const Array<OneD, NekDouble> &vFrameVels) override; - virtual void v_GetMovingFrameVelocities( + void v_GetMovingFrameVelocities( Array<OneD, NekDouble> &vFrameVels) override; - virtual void v_SetMovingFrameAngles( + void v_SetMovingFrameAngles( const Array<OneD, NekDouble> &vFrameTheta) override; - virtual void v_GetMovingFrameAngles( - Array<OneD, NekDouble> &vFrameTheta) override; - virtual void v_SetMovingFrameProjectionMat( + void v_GetMovingFrameAngles(Array<OneD, NekDouble> &vFrameTheta) override; + void v_SetMovingFrameProjectionMat( const bnu::matrix<NekDouble> &vProjMat) override; - virtual void v_GetMovingFrameProjectionMat( + void v_GetMovingFrameProjectionMat( bnu::matrix<NekDouble> &vProjMat) override; bool DefinedForcing(const std::string &sForce); @@ -277,27 +276,27 @@ protected: /// Womersley parameters if required std::map<int, std::map<int, WomersleyParamsSharedPtr>> m_womersleyParams; - virtual MultiRegions::ExpListSharedPtr v_GetPressure() override + MultiRegions::ExpListSharedPtr v_GetPressure() override { return m_pressure; } - virtual void v_TransCoeffToPhys(void) override + void v_TransCoeffToPhys(void) override { ASSERTL0(false, "This method is not defined in this class"); } - virtual void v_TransPhysToCoeff(void) override + void v_TransPhysToCoeff(void) override { ASSERTL0(false, "This method is not defined in this class"); } virtual int v_GetForceDimension() = 0; - virtual Array<OneD, NekDouble> v_GetMaxStdVelocity( + Array<OneD, NekDouble> v_GetMaxStdVelocity( const NekDouble SpeedSoundFactor) override; - virtual bool v_PreIntegrate(int step) override; + bool v_PreIntegrate(int step) override; private: }; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/MappingExtrapolate.h b/solvers/IncNavierStokesSolver/EquationSystems/MappingExtrapolate.h index 9411901883..e7e1c302e8 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/MappingExtrapolate.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/MappingExtrapolate.h @@ -67,11 +67,12 @@ public: /// Name of class static std::string className; - virtual void v_CorrectPressureBCs(const Array<OneD, NekDouble> &pressure); + void v_CorrectPressureBCs(const Array<OneD, NekDouble> &pressure) override; - virtual void v_CalcNeumannPressureBCs( + void v_CalcNeumannPressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &fields, - const Array<OneD, const Array<OneD, NekDouble>> &N, NekDouble kinvis); + const Array<OneD, const Array<OneD, NekDouble>> &N, + NekDouble kinvis) override; MappingExtrapolate(const LibUtilities::SessionReaderSharedPtr pSession, Array<OneD, MultiRegions::ExpListSharedPtr> pFields, @@ -79,7 +80,7 @@ public: const Array<OneD, int> pVel, const SolverUtils::AdvectionSharedPtr advObject); - virtual ~MappingExtrapolate(); + ~MappingExtrapolate() override; protected: // Mapping object diff --git a/solvers/IncNavierStokesSolver/EquationSystems/SmoothedProfileMethod.h b/solvers/IncNavierStokesSolver/EquationSystems/SmoothedProfileMethod.h index 31df0842bc..9972a73afc 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/SmoothedProfileMethod.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/SmoothedProfileMethod.h @@ -64,11 +64,11 @@ public: const SpatialDomains::MeshGraphSharedPtr &pGraph); // Destructor - virtual ~SmoothedProfileMethod(); + ~SmoothedProfileMethod() override; - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; protected: /// Correction pressure field for SPM @@ -98,7 +98,7 @@ protected: static std::string solverTypeLookupId; // Interface for 'v_SolveUnsteadyStokesSystem' - virtual void v_SolveUnsteadyStokesSystem( + void v_SolveUnsteadyStokesSystem( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, NekDouble time, NekDouble a_iixDt) override; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/StandardExtrapolate.h b/solvers/IncNavierStokesSolver/EquationSystems/StandardExtrapolate.h index 811fc588d8..10e39b3533 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/StandardExtrapolate.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/StandardExtrapolate.h @@ -79,32 +79,30 @@ public: const Array<OneD, int> pVel, const SolverUtils::AdvectionSharedPtr advObject); - virtual ~StandardExtrapolate(); + ~StandardExtrapolate() override; protected: - virtual void v_EvaluatePressureBCs( + void v_EvaluatePressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &fields, const Array<OneD, const Array<OneD, NekDouble>> &N, NekDouble kinvis) override; - virtual void v_SubSteppingTimeIntegration( + void v_SubSteppingTimeIntegration( const LibUtilities::TimeIntegrationSchemeSharedPtr &IntegrationScheme) override; - virtual void v_SubStepSaveFields(int nstep) override; + void v_SubStepSaveFields(int nstep) override; - virtual void v_SubStepSetPressureBCs( + void v_SubStepSetPressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &inarray, NekDouble Aii_DT, NekDouble kinvis) override; - virtual void v_SubStepAdvance(int nstep, NekDouble time) override; + void v_SubStepAdvance(int nstep, NekDouble time) override; - virtual void v_MountHOPBCs( - int HBCdata, NekDouble kinvis, Array<OneD, NekDouble> &Q, - Array<OneD, const NekDouble> &Advection) override; + void v_MountHOPBCs(int HBCdata, NekDouble kinvis, Array<OneD, NekDouble> &Q, + Array<OneD, const NekDouble> &Advection) override; - virtual void v_AccelerationBDF( - Array<OneD, Array<OneD, NekDouble>> &array) override; + void v_AccelerationBDF(Array<OneD, Array<OneD, NekDouble>> &array) override; static NekDouble DuDt_Coeffs[3][4]; }; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolate.h b/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolate.h index 22bebe5b94..50c1ee9a69 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolate.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolate.h @@ -79,31 +79,30 @@ public: const Array<OneD, int> pVel, const SolverUtils::AdvectionSharedPtr advObject); - virtual ~SubSteppingExtrapolate(); + ~SubSteppingExtrapolate() override; protected: - virtual void v_EvaluatePressureBCs( + void v_EvaluatePressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &fields, const Array<OneD, const Array<OneD, NekDouble>> &N, NekDouble kinvis) override; - virtual void v_SubSteppingTimeIntegration( + void v_SubSteppingTimeIntegration( const LibUtilities::TimeIntegrationSchemeSharedPtr &IntegrationScheme) override; - virtual void v_SubStepSaveFields(int nstep) override; + void v_SubStepSaveFields(int nstep) override; - virtual void v_SubStepSetPressureBCs( + void v_SubStepSetPressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &inarray, NekDouble Aii_Dt, NekDouble kinvis) override; - virtual void v_SubStepAdvance(int nstep, NekDouble time) override; + void v_SubStepAdvance(int nstep, NekDouble time) override; - virtual void v_MountHOPBCs( - int HBCdata, NekDouble kinvis, Array<OneD, NekDouble> &Q, - Array<OneD, const NekDouble> &Advection) override; + void v_MountHOPBCs(int HBCdata, NekDouble kinvis, Array<OneD, NekDouble> &Q, + Array<OneD, const NekDouble> &Advection) override; - virtual std::string v_GetSubStepName(void) override; + std::string v_GetSubStepName(void) override; void SubStepAdvection( const Array<OneD, const Array<OneD, NekDouble>> &inarray, diff --git a/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolateWeakPressure.h b/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolateWeakPressure.h index ae92d471b4..c1cd961707 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolateWeakPressure.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/SubSteppingExtrapolateWeakPressure.h @@ -76,16 +76,15 @@ public: MultiRegions::ExpListSharedPtr pPressure, const Array<OneD, int> pVel, const SolverUtils::AdvectionSharedPtr advObject); - virtual ~SubSteppingExtrapolateWeakPressure(); + ~SubSteppingExtrapolateWeakPressure() override; protected: - virtual void v_SubStepSetPressureBCs( + void v_SubStepSetPressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &inarray, NekDouble Aii_Dt, NekDouble kinvis) override; - virtual void v_AddNormVelOnOBC( - const int nbcoeffs, const int nreg, - Array<OneD, Array<OneD, NekDouble>> &u) override; + void v_AddNormVelOnOBC(const int nbcoeffs, const int nreg, + Array<OneD, Array<OneD, NekDouble>> &u) override; }; } // namespace Nektar #endif diff --git a/solvers/IncNavierStokesSolver/EquationSystems/VCSMapping.h b/solvers/IncNavierStokesSolver/EquationSystems/VCSMapping.h index f92953a5c0..302180ef00 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/VCSMapping.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/VCSMapping.h @@ -66,9 +66,9 @@ public: const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray); - virtual ~VCSMapping(); + ~VCSMapping() override; - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; protected: // Mapping object @@ -94,28 +94,27 @@ protected: Array<OneD, Array<OneD, NekDouble>> m_gradP; // Virtual functions - virtual void v_DoInitialise(bool dumpInitialConditions = true) override; + void v_DoInitialise(bool dumpInitialConditions = true) override; - virtual void v_SetUpPressureForcing( + void v_SetUpPressureForcing( const Array<OneD, const Array<OneD, NekDouble>> &fields, Array<OneD, Array<OneD, NekDouble>> &Forcing, const NekDouble aii_Dt) override; - virtual void v_SetUpViscousForcing( + void v_SetUpViscousForcing( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &Forcing, const NekDouble aii_Dt) override; - virtual void v_SolvePressure( - const Array<OneD, NekDouble> &Forcing) override; + void v_SolvePressure(const Array<OneD, NekDouble> &Forcing) override; - virtual void v_SolveViscous( + void v_SolveViscous( const Array<OneD, const Array<OneD, NekDouble>> &Forcing, const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble aii_Dt) override; - virtual void v_EvaluateAdvection_SetPressureBCs( + void v_EvaluateAdvection_SetPressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time) override; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionScheme.h b/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionScheme.h index facc7456f9..863be1a1d8 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionScheme.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionScheme.h @@ -62,9 +62,9 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual ~VelocityCorrectionScheme(); + ~VelocityCorrectionScheme() override; - virtual void v_InitObject(bool DeclareField = true) override; + void v_InitObject(bool DeclareField = true) override; void SetUpPressureForcing( const Array<OneD, const Array<OneD, NekDouble>> &fields, @@ -170,19 +170,19 @@ protected: const Array<OneD, Array<OneD, NekDouble>> &inarray); // Virtual functions - virtual bool v_PostIntegrate(int step) override; + bool v_PostIntegrate(int step) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_TransCoeffToPhys(void) override; + void v_TransCoeffToPhys(void) override; - virtual void v_TransPhysToCoeff(void) override; + void v_TransPhysToCoeff(void) override; - virtual void v_DoInitialise(bool dumpInitialConditions = true) override; + void v_DoInitialise(bool dumpInitialConditions = true) override; - virtual Array<OneD, bool> v_GetSystemSingularChecks() override; + Array<OneD, bool> v_GetSystemSingularChecks() override; - virtual int v_GetForceDimension() override; + int v_GetForceDimension() override; virtual void v_SetUpPressureForcing( const Array<OneD, const Array<OneD, NekDouble>> &fields, @@ -208,7 +208,7 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time); - virtual bool v_RequireFwdTrans() override + bool v_RequireFwdTrans() override { return false; } diff --git a/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeImplicit.h b/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeImplicit.h index 76bf118954..50fb354f13 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeImplicit.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeImplicit.h @@ -60,7 +60,7 @@ public: VCSImplicit(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual ~VCSImplicit(); + ~VCSImplicit() override; protected: /// 2D Array for Advection Velocities [dir][dof] @@ -76,35 +76,34 @@ protected: std::string m_convectiveType; // Virtual functions - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_SetUpPressureForcing( + void v_SetUpPressureForcing( const Array<OneD, const Array<OneD, NekDouble>> &fields, Array<OneD, Array<OneD, NekDouble>> &Forcing, const NekDouble aii_Dt) override; - virtual void v_SetUpViscousForcing( + void v_SetUpViscousForcing( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &Forcing, const NekDouble aii_Dt) override; - virtual void v_SolvePressure( - const Array<OneD, NekDouble> &Forcing) override; + void v_SolvePressure(const Array<OneD, NekDouble> &Forcing) override; - virtual void v_SolveViscous( + void v_SolveViscous( const Array<OneD, const Array<OneD, NekDouble>> &Forcing, const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble aii_Dt) override; - virtual void v_DoInitialise(bool dumpInitialConditions) override; + void v_DoInitialise(bool dumpInitialConditions) override; - virtual std::string v_GetExtrapolateStr(void) override + std::string v_GetExtrapolateStr(void) override { return "Implicit"; // Use ImplicitExtrapolate.cpp } - virtual void v_EvaluateAdvection_SetPressureBCs( + void v_EvaluateAdvection_SetPressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time) override; diff --git a/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeWeakPressure.h b/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeWeakPressure.h index da93d8a2c2..1443cca772 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeWeakPressure.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionSchemeWeakPressure.h @@ -60,26 +60,25 @@ public: VCSWeakPressure(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual ~VCSWeakPressure(); + ~VCSWeakPressure() override; protected: // Virtual functions - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_SetUpPressureForcing( + void v_SetUpPressureForcing( const Array<OneD, const Array<OneD, NekDouble>> &fields, Array<OneD, Array<OneD, NekDouble>> &Forcing, const NekDouble aii_Dt) override; - virtual void v_SolvePressure( - const Array<OneD, NekDouble> &Forcing) override; + void v_SolvePressure(const Array<OneD, NekDouble> &Forcing) override; - virtual std::string v_GetExtrapolateStr(void) override + std::string v_GetExtrapolateStr(void) override { return "WeakPressure"; } - virtual std::string v_GetSubSteppingExtrapolateStr( + std::string v_GetSubSteppingExtrapolateStr( const std::string &instr) override { if (boost::iequals(instr, "SubStepping")) diff --git a/solvers/IncNavierStokesSolver/EquationSystems/WeakPressureExtrapolate.h b/solvers/IncNavierStokesSolver/EquationSystems/WeakPressureExtrapolate.h index f601c14bff..c06f7bcabd 100644 --- a/solvers/IncNavierStokesSolver/EquationSystems/WeakPressureExtrapolate.h +++ b/solvers/IncNavierStokesSolver/EquationSystems/WeakPressureExtrapolate.h @@ -80,21 +80,19 @@ public: const Array<OneD, int> pVel, const SolverUtils::AdvectionSharedPtr advObject); - virtual ~WeakPressureExtrapolate(); + ~WeakPressureExtrapolate() override; protected: - virtual void v_EvaluatePressureBCs( + void v_EvaluatePressureBCs( const Array<OneD, const Array<OneD, NekDouble>> &fields, const Array<OneD, const Array<OneD, NekDouble>> &N, NekDouble kinvis) override; - virtual void v_MountHOPBCs( - int HBCdata, NekDouble kinvis, Array<OneD, NekDouble> &Q, - Array<OneD, const NekDouble> &Advection) override; + void v_MountHOPBCs(int HBCdata, NekDouble kinvis, Array<OneD, NekDouble> &Q, + Array<OneD, const NekDouble> &Advection) override; - virtual void v_AddNormVelOnOBC( - const int nbcoeffs, const int nreg, - Array<OneD, Array<OneD, NekDouble>> &u) override; + void v_AddNormVelOnOBC(const int nbcoeffs, const int nreg, + Array<OneD, Array<OneD, NekDouble>> &u) override; static std::string solverTypeLookupId; }; diff --git a/solvers/IncNavierStokesSolver/Filters/FilterAeroForcesSPM.h b/solvers/IncNavierStokesSolver/Filters/FilterAeroForcesSPM.h index 69722ab225..73be251fa0 100644 --- a/solvers/IncNavierStokesSolver/Filters/FilterAeroForcesSPM.h +++ b/solvers/IncNavierStokesSolver/Filters/FilterAeroForcesSPM.h @@ -63,7 +63,7 @@ public: const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const std::map<std::string, std::string> &pParams); - virtual ~FilterAeroForcesSPM(); + ~FilterAeroForcesSPM() override; // Calculates the forces and fills the array 'm_Forces' up void CalculateForces(const Array<OneD, Array<OneD, NekDouble>> &pIntVel, @@ -85,19 +85,19 @@ protected: /// Array storing the last value of the aerodynamic forces Array<OneD, NekDouble> m_Forces; - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: }; diff --git a/solvers/IncNavierStokesSolver/Filters/FilterMovingBody.h b/solvers/IncNavierStokesSolver/Filters/FilterMovingBody.h index d573667998..956bfb14b3 100644 --- a/solvers/IncNavierStokesSolver/Filters/FilterMovingBody.h +++ b/solvers/IncNavierStokesSolver/Filters/FilterMovingBody.h @@ -70,13 +70,13 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const ParamMap &pParams); - ~FilterMovingBody(); + ~FilterMovingBody() override; - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_Update( + void v_Update( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override { @@ -93,11 +93,11 @@ public: const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, Array<OneD, NekDouble> &MotionVars, const NekDouble &time); - virtual void v_Finalise( + void v_Finalise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual bool v_IsTimeDependent() override; + bool v_IsTimeDependent() override; private: /// ID's of boundary regions where we want the forces diff --git a/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.cpp b/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.cpp index af50a3d2e2..af3a423562 100644 --- a/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.cpp +++ b/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.cpp @@ -34,9 +34,7 @@ #include <IncNavierStokesSolver/Filters/FilterReynoldsStresses.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { std::string FilterReynoldsStresses::className = GetFilterFactory().RegisterCreatorFunction("ReynoldsStresses", @@ -319,5 +317,4 @@ NekDouble FilterReynoldsStresses::v_GetScale() } } -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils diff --git a/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.h b/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.h index af8e004ad5..393c568afc 100644 --- a/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.h +++ b/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.h @@ -37,9 +37,7 @@ #include <SolverUtils/Filters/FilterFieldConvert.h> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FilterReynoldsStresses : public FilterFieldConvert { @@ -66,24 +64,24 @@ public: const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr<SolverUtils::EquationSystem> &pEquation, const std::map<std::string, std::string> &pParams); - SOLVER_UTILS_EXPORT ~FilterReynoldsStresses(); + SOLVER_UTILS_EXPORT ~FilterReynoldsStresses() override; protected: - virtual void v_Initialise( + void v_Initialise( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual void v_FillVariablesName( + void v_FillVariablesName( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields) override; - virtual void v_ProcessSample( + void v_ProcessSample( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, std::vector<Array<OneD, NekDouble>> &fieldcoeffs, const NekDouble &time) override; - virtual void v_PrepareOutput( + void v_PrepareOutput( const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields, const NekDouble &time) override; - virtual NekDouble v_GetScale() override; - virtual std::string v_GetFileSuffix() override + NekDouble v_GetScale() override; + std::string v_GetFileSuffix() override { return "_stress"; } @@ -93,7 +91,6 @@ protected: NekDouble m_alpha; bool m_movAvg; }; -} // namespace SolverUtils -} // namespace Nektar +} // namespace Nektar::SolverUtils #endif /* NEKTAR_SOLVERUTILS_FILTERS_FILTERREYNOLDSSTRESES_H */ diff --git a/solvers/IncNavierStokesSolver/Forcing/ForcingMovingBody.h b/solvers/IncNavierStokesSolver/Forcing/ForcingMovingBody.h index af94f61547..4ad40e63e8 100644 --- a/solvers/IncNavierStokesSolver/Forcing/ForcingMovingBody.h +++ b/solvers/IncNavierStokesSolver/Forcing/ForcingMovingBody.h @@ -72,16 +72,15 @@ protected: // Mapping object GlobalMapping::MappingSharedPtr m_mapping; - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - virtual void v_Apply( - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble &time) override; + void v_Apply(const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time) override; private: ForcingMovingBody( diff --git a/solvers/IncNavierStokesSolver/Forcing/ForcingStabilityCoupledLNS.h b/solvers/IncNavierStokesSolver/Forcing/ForcingStabilityCoupledLNS.h index 04094c6f3b..91327b52a7 100644 --- a/solvers/IncNavierStokesSolver/Forcing/ForcingStabilityCoupledLNS.h +++ b/solvers/IncNavierStokesSolver/Forcing/ForcingStabilityCoupledLNS.h @@ -66,16 +66,15 @@ public: static std::string className; protected: - virtual void v_InitObject( + void v_InitObject( const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override; - virtual void v_Apply( - const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, - const Array<OneD, Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &outarray, - const NekDouble &time) override; + void v_Apply(const Array<OneD, MultiRegions::ExpListSharedPtr> &fields, + const Array<OneD, Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &outarray, + const NekDouble &time) override; private: ForcingStabilityCoupledLNS( diff --git a/solvers/IncNavierStokesSolver/Utilities/FldAddFalknerSkanBL.cpp b/solvers/IncNavierStokesSolver/Utilities/FldAddFalknerSkanBL.cpp index f72212b97e..012285f635 100644 --- a/solvers/IncNavierStokesSolver/Utilities/FldAddFalknerSkanBL.cpp +++ b/solvers/IncNavierStokesSolver/Utilities/FldAddFalknerSkanBL.cpp @@ -443,14 +443,18 @@ int main(int argc, char *argv[]) Exp[1] = Exp2D_vk; if (stability_solver == "velocity_correction_scheme") + { Exp[2] = Exp2D_pk; + } //! Expansion coefficient extraction (necessary to write the .fld file) Exp[0]->FwdTrans(Exp2D_uk->GetPhys(), Exp[0]->UpdateCoeffs()); Exp[1]->FwdTrans(Exp2D_vk->GetPhys(), Exp[1]->UpdateCoeffs()); if (stability_solver == "velocity_correction_scheme") + { Exp[2]->FwdTrans(Exp2D_pk->GetPhys(), Exp[2]->UpdateCoeffs()); + } //! -------------------------------------------------------------------------------------------- //! Generation .FLD file with one field only (at the moment) @@ -460,10 +464,14 @@ int main(int argc, char *argv[]) //! Definition of the number of the fields if (stability_solver == "coupled_scheme") + { nFields = 2; + } if (stability_solver == "velocity_correction_scheme") + { nFields = 3; + } //! Definition of the Field std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef = diff --git a/solvers/LinearElasticSolver/EquationSystems/IterativeElasticSystem.h b/solvers/LinearElasticSolver/EquationSystems/IterativeElasticSystem.h index 54e54d33fe..6524b72ce4 100644 --- a/solvers/LinearElasticSolver/EquationSystems/IterativeElasticSystem.h +++ b/solvers/LinearElasticSolver/EquationSystems/IterativeElasticSystem.h @@ -81,9 +81,9 @@ protected: IterativeElasticSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_DoSolve() override; + void v_InitObject(bool DeclareFields = true) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_DoSolve() override; void WriteGeometry(const int i); }; diff --git a/solvers/LinearElasticSolver/EquationSystems/LinearElasticSystem.h b/solvers/LinearElasticSolver/EquationSystems/LinearElasticSystem.h index 8159a63ae1..989fc258df 100644 --- a/solvers/LinearElasticSolver/EquationSystems/LinearElasticSystem.h +++ b/solvers/LinearElasticSolver/EquationSystems/LinearElasticSystem.h @@ -106,12 +106,11 @@ protected: /// Storage for the thermal stress terms. Array<OneD, Array<OneD, Array<OneD, NekDouble>>> m_stress; - virtual void v_InitObject(bool DeclareFields = true) override; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_DoSolve() override; - virtual void v_ExtraFldOutput( - std::vector<Array<OneD, NekDouble>> &fieldcoeffs, - std::vector<std::string> &variables) override; + void v_InitObject(bool DeclareFields = true) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_DoSolve() override; + void v_ExtraFldOutput(std::vector<Array<OneD, NekDouble>> &fieldcoeffs, + std::vector<std::string> &variables) override; }; } // namespace Nektar diff --git a/solvers/MMFSolver/EquationSystems/MMFMaxwell.cpp b/solvers/MMFSolver/EquationSystems/MMFMaxwell.cpp index 5657dafd71..a71ae955d0 100644 --- a/solvers/MMFSolver/EquationSystems/MMFMaxwell.cpp +++ b/solvers/MMFSolver/EquationSystems/MMFMaxwell.cpp @@ -448,7 +448,7 @@ MMFMaxwell::~MMFMaxwell() void MMFMaxwell::v_DoSolve() { - ASSERTL0(m_intScheme != 0, "No time integration scheme."); + ASSERTL0(m_intScheme != nullptr, "No time integration scheme."); int i, nchk = 1; int nq = GetTotPoints(); diff --git a/solvers/MMFSolver/EquationSystems/MMFMaxwell.h b/solvers/MMFSolver/EquationSystems/MMFMaxwell.h index 42ecb8a438..879ec0b884 100644 --- a/solvers/MMFSolver/EquationSystems/MMFMaxwell.h +++ b/solvers/MMFSolver/EquationSystems/MMFMaxwell.h @@ -93,12 +93,12 @@ public: static std::string className; /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoSolve() override; + void v_DoSolve() override; /// Destructor - virtual ~MMFMaxwell(); + ~MMFMaxwell() override; protected: int m_ElemtGroup0; @@ -239,15 +239,15 @@ protected: Array<OneD, NekDouble> ComputeRadCloak(const int Nlayer = 5); /// Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_SetInitialConditions(const NekDouble initialtime, - bool dumpInitialConditions, - const int domain) override; + void v_SetInitialConditions(const NekDouble initialtime, + bool dumpInitialConditions, + const int domain) override; - virtual void v_EvaluateExactSolution(unsigned int field, - Array<OneD, NekDouble> &outfield, - const NekDouble time) override; + void v_EvaluateExactSolution(unsigned int field, + Array<OneD, NekDouble> &outfield, + const NekDouble time) override; void print_MMF(Array<OneD, Array<OneD, NekDouble>> &inarray); private: diff --git a/solvers/PulseWaveSolver/EquationSystems/AInflow.h b/solvers/PulseWaveSolver/EquationSystems/AInflow.h index 46f2712718..7725f54f94 100644 --- a/solvers/PulseWaveSolver/EquationSystems/AInflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/AInflow.h @@ -68,15 +68,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~AInflow(); + ~AInflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; }; } // namespace Nektar diff --git a/solvers/PulseWaveSolver/EquationSystems/BetaPressureArea.h b/solvers/PulseWaveSolver/EquationSystems/BetaPressureArea.h index fb256f5c12..699bde581c 100644 --- a/solvers/PulseWaveSolver/EquationSystems/BetaPressureArea.h +++ b/solvers/PulseWaveSolver/EquationSystems/BetaPressureArea.h @@ -63,48 +63,43 @@ public: BetaPressureArea(Array<OneD, MultiRegions::ExpListSharedPtr> pVessel, const LibUtilities::SessionReaderSharedPtr pSession); - virtual ~BetaPressureArea(); + ~BetaPressureArea() override; protected: - virtual void v_GetPressure(NekDouble &P, const NekDouble &beta, - const NekDouble &A, const NekDouble &A0, - const NekDouble &dAUdx, - const NekDouble &gamma = 0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetW1(NekDouble &W1, const NekDouble &u, - const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; + void v_GetPressure(NekDouble &P, const NekDouble &beta, const NekDouble &A, + const NekDouble &A0, const NekDouble &dAUdx, + const NekDouble &gamma = 0, + const NekDouble &alpha = 0.5) override; + + void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, + const NekDouble &A0, const NekDouble &alpha = 0.5) override; + + void v_GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; - virtual void v_GetW2(NekDouble &W2, const NekDouble &u, - const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, + void v_GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; + + void v_GetAFromChars(NekDouble &A, const NekDouble &W1, const NekDouble &W2, + const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha = 0.5) override; - virtual void v_GetAFromChars(NekDouble &A, const NekDouble &W1, - const NekDouble &W2, const NekDouble &beta, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetUFromChars(NekDouble &u, const NekDouble &W1, - const NekDouble &W2) override; - - virtual void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, - const NekDouble &A, const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetJacobianInverse(NekMatrix<NekDouble> &invJ, - const Array<OneD, NekDouble> &Au, - const Array<OneD, NekDouble> &uu, - const Array<OneD, NekDouble> &beta, - const Array<OneD, NekDouble> &A0, - const Array<OneD, NekDouble> &alpha, - const std::string &type) override; + void v_GetUFromChars(NekDouble &u, const NekDouble &W1, + const NekDouble &W2) override; + + void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; + + void v_GetJacobianInverse(NekMatrix<NekDouble> &invJ, + const Array<OneD, NekDouble> &Au, + const Array<OneD, NekDouble> &uu, + const Array<OneD, NekDouble> &beta, + const Array<OneD, NekDouble> &A0, + const Array<OneD, NekDouble> &alpha, + const std::string &type) override; private: }; diff --git a/solvers/PulseWaveSolver/EquationSystems/EmpiricalPressureArea.h b/solvers/PulseWaveSolver/EquationSystems/EmpiricalPressureArea.h index 758484c6d3..fc7c336376 100644 --- a/solvers/PulseWaveSolver/EquationSystems/EmpiricalPressureArea.h +++ b/solvers/PulseWaveSolver/EquationSystems/EmpiricalPressureArea.h @@ -67,48 +67,43 @@ public: EmpiricalPressureArea(Array<OneD, MultiRegions::ExpListSharedPtr> pVessel, const LibUtilities::SessionReaderSharedPtr pSession); - virtual ~EmpiricalPressureArea(); + ~EmpiricalPressureArea() override; protected: - virtual void v_GetPressure(NekDouble &P, const NekDouble &beta, - const NekDouble &A, const NekDouble &A0, - const NekDouble &dAUdx, - const NekDouble &gamma = 0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetW1(NekDouble &W1, const NekDouble &u, - const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; + void v_GetPressure(NekDouble &P, const NekDouble &beta, const NekDouble &A, + const NekDouble &A0, const NekDouble &dAUdx, + const NekDouble &gamma = 0, + const NekDouble &alpha = 0.5) override; + + void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, + const NekDouble &A0, const NekDouble &alpha = 0.5) override; + + void v_GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; - virtual void v_GetW2(NekDouble &W2, const NekDouble &u, - const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, + void v_GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; + + void v_GetAFromChars(NekDouble &A, const NekDouble &W1, const NekDouble &W2, + const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha = 0.5) override; - virtual void v_GetAFromChars(NekDouble &A, const NekDouble &W1, - const NekDouble &W2, const NekDouble &beta, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetUFromChars(NekDouble &u, const NekDouble &W1, - const NekDouble &W2) override; - - virtual void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, - const NekDouble &A, const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetJacobianInverse(NekMatrix<NekDouble> &invJ, - const Array<OneD, NekDouble> &Au, - const Array<OneD, NekDouble> &uu, - const Array<OneD, NekDouble> &beta, - const Array<OneD, NekDouble> &A0, - const Array<OneD, NekDouble> &alpha, - const std::string &type) override; + void v_GetUFromChars(NekDouble &u, const NekDouble &W1, + const NekDouble &W2) override; + + void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; + + void v_GetJacobianInverse(NekMatrix<NekDouble> &invJ, + const Array<OneD, NekDouble> &Au, + const Array<OneD, NekDouble> &uu, + const Array<OneD, NekDouble> &beta, + const Array<OneD, NekDouble> &A0, + const Array<OneD, NekDouble> &alpha, + const std::string &type) override; void GetKappa(NekDouble &kappa, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha = 0.5); diff --git a/solvers/PulseWaveSolver/EquationSystems/PowerPressureArea.h b/solvers/PulseWaveSolver/EquationSystems/PowerPressureArea.h index e8f41c51ec..c087645e82 100644 --- a/solvers/PulseWaveSolver/EquationSystems/PowerPressureArea.h +++ b/solvers/PulseWaveSolver/EquationSystems/PowerPressureArea.h @@ -67,48 +67,43 @@ public: PowerPressureArea(Array<OneD, MultiRegions::ExpListSharedPtr> pVessel, const LibUtilities::SessionReaderSharedPtr pSession); - virtual ~PowerPressureArea(); + ~PowerPressureArea() override; protected: - virtual void v_GetPressure(NekDouble &P, const NekDouble &beta, - const NekDouble &A, const NekDouble &A0, - const NekDouble &dAUdx, - const NekDouble &gamma = 0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetW1(NekDouble &W1, const NekDouble &u, - const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; + void v_GetPressure(NekDouble &P, const NekDouble &beta, const NekDouble &A, + const NekDouble &A0, const NekDouble &dAUdx, + const NekDouble &gamma = 0, + const NekDouble &alpha = 0.5) override; + + void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, + const NekDouble &A0, const NekDouble &alpha = 0.5) override; + + void v_GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; - virtual void v_GetW2(NekDouble &W2, const NekDouble &u, - const NekDouble &beta, const NekDouble &A, - const NekDouble &A0, + void v_GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; + + void v_GetAFromChars(NekDouble &A, const NekDouble &W1, const NekDouble &W2, + const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha = 0.5) override; - virtual void v_GetAFromChars(NekDouble &A, const NekDouble &W1, - const NekDouble &W2, const NekDouble &beta, - const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetUFromChars(NekDouble &u, const NekDouble &W1, - const NekDouble &W2) override; - - virtual void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, - const NekDouble &A, const NekDouble &A0, - const NekDouble &alpha = 0.5) override; - - virtual void v_GetJacobianInverse(NekMatrix<NekDouble> &invJ, - const Array<OneD, NekDouble> &Au, - const Array<OneD, NekDouble> &uu, - const Array<OneD, NekDouble> &beta, - const Array<OneD, NekDouble> &A0, - const Array<OneD, NekDouble> &alpha, - const std::string &type) override; + void v_GetUFromChars(NekDouble &u, const NekDouble &W1, + const NekDouble &W2) override; + + void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, + const NekDouble &A, const NekDouble &A0, + const NekDouble &alpha = 0.5) override; + + void v_GetJacobianInverse(NekMatrix<NekDouble> &invJ, + const Array<OneD, NekDouble> &Au, + const Array<OneD, NekDouble> &uu, + const Array<OneD, NekDouble> &beta, + const Array<OneD, NekDouble> &A0, + const Array<OneD, NekDouble> &alpha, + const std::string &type) override; void GetC0(NekDouble &c0, const NekDouble &beta, const NekDouble &A0); diff --git a/solvers/PulseWaveSolver/EquationSystems/PulseWavePropagation.h b/solvers/PulseWaveSolver/EquationSystems/PulseWavePropagation.h index bfa10f62b6..d88fd23728 100644 --- a/solvers/PulseWaveSolver/EquationSystems/PulseWavePropagation.h +++ b/solvers/PulseWaveSolver/EquationSystems/PulseWavePropagation.h @@ -67,7 +67,7 @@ public: /// Name of class static std::string className; - virtual ~PulseWavePropagation(); + ~PulseWavePropagation() override; // Functions for Riemann solver Array<OneD, NekDouble> &GetA0(); @@ -93,7 +93,7 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time); - virtual void v_InitObject(bool DeclareField = false) override; + void v_InitObject(bool DeclareField = false) override; /// DG Pulse Wave Propagation routines: void GetFluxVector(const Array<OneD, Array<OneD, NekDouble>> &physfield, @@ -104,7 +104,7 @@ protected: Array<OneD, PulseWaveBoundarySharedPtr> m_Boundary; - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; }; } // namespace Nektar diff --git a/solvers/PulseWaveSolver/EquationSystems/PulseWaveSystem.h b/solvers/PulseWaveSolver/EquationSystems/PulseWaveSystem.h index a6c89f9c2e..0d3774ec67 100644 --- a/solvers/PulseWaveSolver/EquationSystems/PulseWaveSystem.h +++ b/solvers/PulseWaveSolver/EquationSystems/PulseWaveSystem.h @@ -78,7 +78,7 @@ class PulseWaveSystem : public UnsteadySystem { public: /// Destructor - virtual ~PulseWaveSystem(); + ~PulseWaveSystem() override; int GetNdomains() { @@ -135,13 +135,13 @@ protected: PulseWaveSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareField = false) override; + void v_InitObject(bool DeclareField = false) override; /// Sets up initial conditions. - virtual void v_DoInitialise(bool dumpInitialConditions = false) override; + void v_DoInitialise(bool dumpInitialConditions = false) override; /// Solves an unsteady problem. - virtual void v_DoSolve() override; + void v_DoSolve() override; /// Links the subdomains void LinkSubdomains( @@ -168,21 +168,21 @@ protected: Array<OneD, NekDouble> &alpha); // Ouptut field information - virtual void v_Output(void) override; + void v_Output(void) override; // Checkpoint field output void CheckPoint_Output(const int n); /// Compute the L2 error between fields and a given exact solution. - virtual NekDouble v_L2Error( + NekDouble v_L2Error( unsigned int field, const Array<OneD, NekDouble> &exactsoln = NullNekDouble1DArray, bool Normalised = false) override; /// Compute the L_inf error between fields and a given exact solution. - virtual NekDouble v_LinfError(unsigned int field, - const Array<OneD, NekDouble> &exactsoln = - NullNekDouble1DArray) override; + NekDouble v_LinfError(unsigned int field, + const Array<OneD, NekDouble> &exactsoln = + NullNekDouble1DArray) override; /// Write input fields to the given filename. void WriteVessels(const std::string &outname); diff --git a/solvers/PulseWaveSolver/EquationSystems/QInflow.h b/solvers/PulseWaveSolver/EquationSystems/QInflow.h index f4e61f6d61..54ef32feb6 100644 --- a/solvers/PulseWaveSolver/EquationSystems/QInflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/QInflow.h @@ -69,15 +69,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~QInflow(); + ~QInflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; private: void Q_RiemannSolver(NekDouble Q, NekDouble A_r, NekDouble u_r, diff --git a/solvers/PulseWaveSolver/EquationSystems/RCROutflow.h b/solvers/PulseWaveSolver/EquationSystems/RCROutflow.h index 02cd14bacb..46f3593ae5 100644 --- a/solvers/PulseWaveSolver/EquationSystems/RCROutflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/RCROutflow.h @@ -69,15 +69,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~RCROutflow(); + ~RCROutflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; void R_RiemannSolver(NekDouble R, NekDouble A_l, NekDouble u_l, NekDouble A_0, NekDouble beta, NekDouble alpha, diff --git a/solvers/PulseWaveSolver/EquationSystems/ROutflow.h b/solvers/PulseWaveSolver/EquationSystems/ROutflow.h index 74790691cc..16f88b8134 100644 --- a/solvers/PulseWaveSolver/EquationSystems/ROutflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/ROutflow.h @@ -69,15 +69,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~ROutflow(); + ~ROutflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; void R_RiemannSolver(NekDouble R, NekDouble A_l, NekDouble u_l, NekDouble A_0, NekDouble beta, NekDouble alpha, diff --git a/solvers/PulseWaveSolver/EquationSystems/TerminalOutflow.h b/solvers/PulseWaveSolver/EquationSystems/TerminalOutflow.h index 83dbc7481e..561a0d83b3 100644 --- a/solvers/PulseWaveSolver/EquationSystems/TerminalOutflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/TerminalOutflow.h @@ -69,15 +69,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~TerminalOutflow(); + ~TerminalOutflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; private: }; diff --git a/solvers/PulseWaveSolver/EquationSystems/TimeDependentInflow.h b/solvers/PulseWaveSolver/EquationSystems/TimeDependentInflow.h index 1447c96e28..61279dbab4 100644 --- a/solvers/PulseWaveSolver/EquationSystems/TimeDependentInflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/TimeDependentInflow.h @@ -69,15 +69,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~TimeDependentInflow(); + ~TimeDependentInflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; private: }; diff --git a/solvers/PulseWaveSolver/EquationSystems/UInflow.h b/solvers/PulseWaveSolver/EquationSystems/UInflow.h index 58c978eed8..704befb0b7 100644 --- a/solvers/PulseWaveSolver/EquationSystems/UInflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/UInflow.h @@ -68,15 +68,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~UInflow(); + ~UInflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; }; } // namespace Nektar diff --git a/solvers/PulseWaveSolver/EquationSystems/UndefinedInOutflow.h b/solvers/PulseWaveSolver/EquationSystems/UndefinedInOutflow.h index 4dbc7b6cba..f85785e00f 100644 --- a/solvers/PulseWaveSolver/EquationSystems/UndefinedInOutflow.h +++ b/solvers/PulseWaveSolver/EquationSystems/UndefinedInOutflow.h @@ -69,15 +69,15 @@ public: const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea); - virtual ~UndefinedInOutflow(); + ~UndefinedInOutflow() override; protected: - virtual void v_DoBoundary( - const Array<OneD, const Array<OneD, NekDouble>> &inarray, - Array<OneD, Array<OneD, NekDouble>> &A_0, - Array<OneD, Array<OneD, NekDouble>> &beta, - Array<OneD, Array<OneD, NekDouble>> &alpha, const NekDouble time, - int omega, int offset, int n) override; + void v_DoBoundary(const Array<OneD, const Array<OneD, NekDouble>> &inarray, + Array<OneD, Array<OneD, NekDouble>> &A_0, + Array<OneD, Array<OneD, NekDouble>> &beta, + Array<OneD, Array<OneD, NekDouble>> &alpha, + const NekDouble time, int omega, int offset, + int n) override; private: }; diff --git a/solvers/PulseWaveSolver/RiemannSolvers/UpwindPulseSolver.h b/solvers/PulseWaveSolver/RiemannSolvers/UpwindPulseSolver.h index 63b86493e8..4e84db6fe4 100644 --- a/solvers/PulseWaveSolver/RiemannSolvers/UpwindPulseSolver.h +++ b/solvers/PulseWaveSolver/RiemannSolvers/UpwindPulseSolver.h @@ -63,10 +63,10 @@ protected: Array<OneD, MultiRegions::ExpListSharedPtr> m_vessels; PulseWavePressureAreaSharedPtr m_pressureArea; - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override; + void v_Solve(const int nDim, + const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) override; void RiemannSolverUpwind(NekDouble AL, NekDouble uL, NekDouble AR, NekDouble uR, NekDouble &Aflux, NekDouble &uflux, diff --git a/solvers/ReviewSolution/EquationSystems/FileSolution.cpp b/solvers/ReviewSolution/EquationSystems/FileSolution.cpp index 40433bf439..f57ae42dba 100644 --- a/solvers/ReviewSolution/EquationSystems/FileSolution.cpp +++ b/solvers/ReviewSolution/EquationSystems/FileSolution.cpp @@ -57,9 +57,7 @@ #include <tinyxml.h> using namespace std; -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { /** * Constructor. Creates ... @@ -790,5 +788,4 @@ NekDouble FileFieldInterpolator::GetStartTime() { return m_timeStart; } -} // namespace SolverUtils } // namespace Nektar diff --git a/solvers/ReviewSolution/EquationSystems/FileSolution.h b/solvers/ReviewSolution/EquationSystems/FileSolution.h index 4f6cbb2716..e189bb10d0 100644 --- a/solvers/ReviewSolution/EquationSystems/FileSolution.h +++ b/solvers/ReviewSolution/EquationSystems/FileSolution.h @@ -45,9 +45,7 @@ #include <SolverUtils/UnsteadySystem.h> #include <complex> -namespace Nektar -{ -namespace SolverUtils +namespace Nektar::SolverUtils { class FileFieldInterpolator; typedef std::shared_ptr<FileFieldInterpolator> FileFieldInterpolatorSharedPtr; @@ -127,14 +125,14 @@ public: static std::string className; /// Destructor - virtual ~FileSolution(); + ~FileSolution() override; protected: virtual void v_GetVelocity( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, NekDouble>> &velocity) override; - virtual void v_GetPressure( + void v_GetPressure( const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &pressure) override; @@ -144,7 +142,7 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, NekDouble> &density) override; - virtual bool v_HasConstantDensity() override; + bool v_HasConstantDensity() override; /// Session reader FileSolution(const LibUtilities::SessionReaderSharedPtr &pSession, @@ -182,7 +180,6 @@ private: Array<OneD, Array<OneD, NekDouble>> m_coord; std::map<std::string, LibUtilities::EquationSharedPtr> m_solutionFunction; }; -} // namespace SolverUtils } // namespace Nektar #endif // NEKTAR_SOLVERS_INCNAVIERSTOKES_H diff --git a/solvers/ShallowWaterSolver/EquationSystems/LinearSWE.h b/solvers/ShallowWaterSolver/EquationSystems/LinearSWE.h index 5a9f06e930..d94b2695cb 100644 --- a/solvers/ShallowWaterSolver/EquationSystems/LinearSWE.h +++ b/solvers/ShallowWaterSolver/EquationSystems/LinearSWE.h @@ -63,13 +63,13 @@ public: /// Name of class static std::string className; - virtual ~LinearSWE(); + ~LinearSWE() override; protected: LinearSWE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; /// Still water depth traces Array<OneD, NekDouble> m_dFwd; @@ -87,11 +87,11 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux); - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_PrimitiveToConservative() override; + void v_PrimitiveToConservative() override; - virtual void v_ConservativeToPrimitive() override; + void v_ConservativeToPrimitive() override; const Array<OneD, NekDouble> &GetDepthFwd() { diff --git a/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.cpp b/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.cpp index b37e357281..2d79be30a3 100644 --- a/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.cpp +++ b/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.cpp @@ -248,7 +248,7 @@ MMFSWE::~MMFSWE() void MMFSWE::v_DoSolve() { - ASSERTL0(m_intScheme != 0, "No time integration scheme."); + ASSERTL0(m_intScheme != nullptr, "No time integration scheme."); int i, nchk = 1; int nvariables = 0; @@ -904,21 +904,33 @@ void MMFSWE::Computehhuhvflux(NekDouble hL, NekDouble uL, NekDouble vL, // Compute SL if (hstar > hL) + { SL = uL - cL * sqrt(0.5 * ((hstar * hstar + hstar * hL) / (hL * hL))); + } else + { SL = uL - cL; + } // Compute SR if (hstar > hR) + { SR = uR + cR * sqrt(0.5 * ((hstar * hstar + hstar * hR) / (hR * hR))); + } else + { SR = uR + cR; + } if (fabs(hR * (uR - SR) - hL * (uL - SL)) <= 1.0e-15) + { Sstar = 0.0; + } else + { Sstar = (SL * hR * (uR - SR) - SR * hL * (uL - SL)) / (hR * (uR - SR) - hL * (uL - SL)); + } if (SL >= 0) { @@ -1117,9 +1129,13 @@ void MMFSWE::RusanovFlux(const int index, NekDouble hL, NekDouble uL, NekDouble S; if (SL > SR) + { S = SL; + } else + { S = SR; + } // uRF = uR component in moving frames e^{Fwd} // vRF = vR component in moving frames e^{Fwd} diff --git a/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.h b/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.h index c2deae0540..cf2a8136fd 100644 --- a/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.h +++ b/solvers/ShallowWaterSolver/EquationSystems/MMFSWE.h @@ -79,7 +79,7 @@ public: TestType m_TestType; /// Destructor - virtual ~MMFSWE(); + ~MMFSWE() override; protected: /// Still water depth @@ -247,29 +247,29 @@ protected: Array<OneD, Array<OneD, NekDouble>> &physarray); /// Initialise the object - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; - virtual void v_DoSolve() override; + void v_DoSolve() override; - virtual void v_DoInitialise(bool dumpInitialConditions = false) override; + void v_DoInitialise(bool dumpInitialConditions = false) override; /// Print Summary - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_SetInitialConditions(const NekDouble initialtime = 0.0, - bool dumpInitialConditions = true, - const int domain = 0) override; + void v_SetInitialConditions(const NekDouble initialtime = 0.0, + bool dumpInitialConditions = true, + const int domain = 0) override; - virtual void v_EvaluateExactSolution(unsigned int field, - Array<OneD, NekDouble> &outfield, - const NekDouble time) override; + void v_EvaluateExactSolution(unsigned int field, + Array<OneD, NekDouble> &outfield, + const NekDouble time) override; - virtual NekDouble v_L2Error(unsigned int field, - const Array<OneD, NekDouble> &exactsoln, - bool Normalised) override; + NekDouble v_L2Error(unsigned int field, + const Array<OneD, NekDouble> &exactsoln, + bool Normalised) override; - virtual NekDouble v_LinfError( - unsigned int field, const Array<OneD, NekDouble> &exactsoln) override; + NekDouble v_LinfError(unsigned int field, + const Array<OneD, NekDouble> &exactsoln) override; private: int m_RossbyDisturbance; diff --git a/solvers/ShallowWaterSolver/EquationSystems/NonlinearPeregrine.h b/solvers/ShallowWaterSolver/EquationSystems/NonlinearPeregrine.h index f395470388..733107d917 100644 --- a/solvers/ShallowWaterSolver/EquationSystems/NonlinearPeregrine.h +++ b/solvers/ShallowWaterSolver/EquationSystems/NonlinearPeregrine.h @@ -74,7 +74,7 @@ public: /// Name of class static std::string className; - virtual ~NonlinearPeregrine(); + ~NonlinearPeregrine() override; ///< problem type selector ProblemType m_problemType; @@ -85,7 +85,7 @@ protected: NonlinearPeregrine(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; /// Still water depth traces Array<OneD, NekDouble> m_dFwd; @@ -103,15 +103,15 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux); - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_PrimitiveToConservative() override; + void v_PrimitiveToConservative() override; - virtual void v_ConservativeToPrimitive() override; + void v_ConservativeToPrimitive() override; - virtual void v_SetInitialConditions(NekDouble initialtime = 0.0, - bool dumpInitialConditions = true, - const int domain = 0) override; + void v_SetInitialConditions(NekDouble initialtime = 0.0, + bool dumpInitialConditions = true, + const int domain = 0) override; const Array<OneD, NekDouble> &GetDepthFwd() { diff --git a/solvers/ShallowWaterSolver/EquationSystems/NonlinearSWE.h b/solvers/ShallowWaterSolver/EquationSystems/NonlinearSWE.h index c28f8cca32..a478baa0df 100644 --- a/solvers/ShallowWaterSolver/EquationSystems/NonlinearSWE.h +++ b/solvers/ShallowWaterSolver/EquationSystems/NonlinearSWE.h @@ -63,13 +63,13 @@ public: /// Name of class static std::string className; - virtual ~NonlinearSWE(); + ~NonlinearSWE() override; protected: NonlinearSWE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; void DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble>> &inarray, Array<OneD, Array<OneD, NekDouble>> &outarray, @@ -83,11 +83,11 @@ protected: const Array<OneD, const Array<OneD, NekDouble>> &physfield, Array<OneD, Array<OneD, Array<OneD, NekDouble>>> &flux); - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; - virtual void v_PrimitiveToConservative() override; + void v_PrimitiveToConservative() override; - virtual void v_ConservativeToPrimitive() override; + void v_ConservativeToPrimitive() override; private: void NumericalFlux1D(Array<OneD, Array<OneD, NekDouble>> &physfield, diff --git a/solvers/ShallowWaterSolver/EquationSystems/ShallowWaterSystem.h b/solvers/ShallowWaterSolver/EquationSystems/ShallowWaterSystem.h index 613c699446..91689111f8 100644 --- a/solvers/ShallowWaterSolver/EquationSystems/ShallowWaterSystem.h +++ b/solvers/ShallowWaterSolver/EquationSystems/ShallowWaterSystem.h @@ -62,7 +62,7 @@ public: static std::string className; /// Destructor - virtual ~ShallowWaterSystem(); + ~ShallowWaterSystem() override; protected: SolverUtils::RiemannSolverSharedPtr m_riemannSolver; @@ -88,10 +88,10 @@ protected: ShallowWaterSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph); - virtual void v_InitObject(bool DeclareFields = true) override; + void v_InitObject(bool DeclareFields = true) override; /// Print a summary of time stepping parameters. - virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override; + void v_GenerateSummary(SolverUtils::SummaryList &s) override; void PrimitiveToConservative() { diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/AverageSolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/AverageSolver.h index dbc0cd8f6f..dace3395b4 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/AverageSolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/AverageSolver.h @@ -55,10 +55,9 @@ public: protected: AverageSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, - NekDouble hR, NekDouble huR, NekDouble hvR, - NekDouble &hf, NekDouble &huf, - NekDouble &hvf) override; + void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, NekDouble hR, + NekDouble huR, NekDouble hvR, NekDouble &hf, + NekDouble &huf, NekDouble &hvf) override; }; } // namespace Nektar diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.cpp b/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.cpp index 5a124b0f2d..7aa21ee6ae 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.cpp +++ b/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.cpp @@ -83,21 +83,33 @@ void HLLCSolver::v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, // Compute SL if (hstar > hL) + { SL = uL - cL * sqrt(0.5 * ((hstar * hstar + hstar * hL) / (hL * hL))); + } else + { SL = uL - cL; + } // Compute SR if (hstar > hR) + { SR = uR + cR * sqrt(0.5 * ((hstar * hstar + hstar * hR) / (hR * hR))); + } else + { SR = uR + cR; + } if (fabs(hR * (uR - SR) - hL * (uL - SL)) <= 1.0e-10) + { Sstar = ustar; + } else + { Sstar = (SL * hR * (uR - SR) - SR * hL * (uL - SL)) / (hR * (uR - SR) - hL * (uL - SL)); + } if (SL >= 0) { diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.h index 69409f1321..d2f3f1f549 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/HLLCSolver.h @@ -53,10 +53,9 @@ public: protected: HLLCSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, - NekDouble hR, NekDouble huR, NekDouble hvR, - NekDouble &hf, NekDouble &huf, - NekDouble &hvf) override; + void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, NekDouble hR, + NekDouble huR, NekDouble hvR, NekDouble &hf, + NekDouble &huf, NekDouble &hvf) override; }; } // namespace Nektar diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.cpp b/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.cpp index efafbba881..0d36d68c39 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.cpp +++ b/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.cpp @@ -83,16 +83,24 @@ void HLLSolver::v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, // Compute SL NekDouble SL; if (hstar > hL) + { SL = uL - cL * sqrt(0.5 * ((hstar * hstar + hstar * hL) / (hL * hL))); + } else + { SL = uL - cL; + } // Compute SR NekDouble SR; if (hstar > hR) + { SR = uR + cR * sqrt(0.5 * ((hstar * hstar + hstar * hR) / (hR * hR))); + } else + { SR = uR + cR; + } if (SL >= 0) { diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.h index e97c992147..f241f9d91e 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/HLLSolver.h @@ -53,10 +53,9 @@ public: protected: HLLSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, - NekDouble hR, NekDouble huR, NekDouble hvR, - NekDouble &hf, NekDouble &huf, - NekDouble &hvf) override; + void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, NekDouble hR, + NekDouble huR, NekDouble hvR, NekDouble &hf, + NekDouble &huf, NekDouble &hvf) override; }; } // namespace Nektar diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/LaxFriedrichsSolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/LaxFriedrichsSolver.h index 97df279771..308346646f 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/LaxFriedrichsSolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/LaxFriedrichsSolver.h @@ -53,10 +53,9 @@ public: protected: LaxFriedrichsSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, - NekDouble hR, NekDouble huR, NekDouble hvR, - NekDouble &hf, NekDouble &huf, - NekDouble &hvf) override; + void v_PointSolve(NekDouble hL, NekDouble huL, NekDouble hvL, NekDouble hR, + NekDouble huR, NekDouble hvR, NekDouble &hf, + NekDouble &huf, NekDouble &hvf) override; }; } // namespace Nektar diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/LinearAverageSolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/LinearAverageSolver.h index d5ba6bd56d..206ce5bb85 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/LinearAverageSolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/LinearAverageSolver.h @@ -54,10 +54,9 @@ public: protected: LinearAverageSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble etaL, NekDouble uL, NekDouble vL, - NekDouble dL, NekDouble etaR, NekDouble uR, - NekDouble vR, NekDouble dR, NekDouble &etaf, - NekDouble &uf, NekDouble &vf) override; + void v_PointSolve(NekDouble etaL, NekDouble uL, NekDouble vL, NekDouble dL, + NekDouble etaR, NekDouble uR, NekDouble vR, NekDouble dR, + NekDouble &etaf, NekDouble &uf, NekDouble &vf) override; }; } // namespace Nektar diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/LinearHLLSolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/LinearHLLSolver.h index d9b1b29bb8..8eb9803dbb 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/LinearHLLSolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/LinearHLLSolver.h @@ -53,10 +53,9 @@ public: protected: LinearHLLSolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_PointSolve(NekDouble etaL, NekDouble uL, NekDouble vL, - NekDouble dL, NekDouble etaR, NekDouble uR, - NekDouble vR, NekDouble dR, NekDouble &etaf, - NekDouble &uf, NekDouble &vf) override; + void v_PointSolve(NekDouble etaL, NekDouble uL, NekDouble vL, NekDouble dL, + NekDouble etaR, NekDouble uR, NekDouble vR, NekDouble dR, + NekDouble &etaf, NekDouble &uf, NekDouble &vf) override; }; } // namespace Nektar diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/LinearSWESolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/LinearSWESolver.h index 835360f752..ab268b76ce 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/LinearSWESolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/LinearSWESolver.h @@ -48,10 +48,10 @@ protected: LinearSWESolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override; + void v_Solve(const int nDim, + const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) override; virtual void v_ArraySolve( const Array<OneD, const Array<OneD, NekDouble>> &Fwd, diff --git a/solvers/ShallowWaterSolver/RiemannSolvers/NonlinearSWESolver.h b/solvers/ShallowWaterSolver/RiemannSolvers/NonlinearSWESolver.h index 7eb60ae2d9..0b3a6640e6 100644 --- a/solvers/ShallowWaterSolver/RiemannSolvers/NonlinearSWESolver.h +++ b/solvers/ShallowWaterSolver/RiemannSolvers/NonlinearSWESolver.h @@ -50,10 +50,10 @@ protected: NonlinearSWESolver(const LibUtilities::SessionReaderSharedPtr &pSession); - virtual void v_Solve(const int nDim, - const Array<OneD, const Array<OneD, NekDouble>> &Fwd, - const Array<OneD, const Array<OneD, NekDouble>> &Bwd, - Array<OneD, Array<OneD, NekDouble>> &flux) override; + void v_Solve(const int nDim, + const Array<OneD, const Array<OneD, NekDouble>> &Fwd, + const Array<OneD, const Array<OneD, NekDouble>> &Bwd, + Array<OneD, Array<OneD, NekDouble>> &flux) override; virtual void v_ArraySolve( const Array<OneD, const Array<OneD, NekDouble>> &Fwd, diff --git a/solvers/VortexWaveInteraction/VortexWaveInteractionSolver.cpp b/solvers/VortexWaveInteraction/VortexWaveInteractionSolver.cpp index 2360375208..f6387131dc 100644 --- a/solvers/VortexWaveInteraction/VortexWaveInteractionSolver.cpp +++ b/solvers/VortexWaveInteraction/VortexWaveInteractionSolver.cpp @@ -37,11 +37,6 @@ using namespace std; using namespace Nektar; -#if defined(_MSC_VER) -#include <windows.h> -#undef MoveFile -#endif - void DoFixedForcingIteration(VortexWaveInteraction &vwi); void Mvdir(string dir, NekDouble dir_ending); diff --git a/solvers/VortexWaveInteraction/utilities/MeshMove.cpp b/solvers/VortexWaveInteraction/utilities/MeshMove.cpp index cd74cbe4d1..910c6569bb 100644 --- a/solvers/VortexWaveInteraction/utilities/MeshMove.cpp +++ b/solvers/VortexWaveInteraction/utilities/MeshMove.cpp @@ -3948,11 +3948,11 @@ void Replacevertices(string filename, Array<OneD, NekDouble> newx, ASSERTL0(loadOkaynew, errstr.c_str()); TiXmlHandle docHandlenew(&docnew); - TiXmlElement *meshnew = NULL; - TiXmlElement *masternew = NULL; - TiXmlElement *condnew = NULL; - TiXmlElement *Parsnew = NULL; - TiXmlElement *parnew = NULL; + TiXmlElement *meshnew = nullptr; + TiXmlElement *masternew = nullptr; + TiXmlElement *condnew = nullptr; + TiXmlElement *Parsnew = nullptr; + TiXmlElement *parnew = nullptr; // Master tag within which all data is contained. @@ -3979,13 +3979,19 @@ void Replacevertices(string filename, Array<OneD, NekDouble> newx, int end = line.find_first_of("="); // Check for no parameter name if (beg == end) + { throw 1; + } // Check for no parameter value if (end != line.find_last_of("=")) + { throw 1; + } // Check for no equals sign if (end == std::string::npos) + { throw 1; + } lhs = line.substr(line.find_first_not_of(" "), end - beg); lhs = lhs.substr(0, lhs.find_last_not_of(" ") + 1); diff --git a/tests/MetricEigenvalue.cpp b/tests/MetricEigenvalue.cpp index ce9b6ea7f3..4ed506078b 100644 --- a/tests/MetricEigenvalue.cpp +++ b/tests/MetricEigenvalue.cpp @@ -51,13 +51,13 @@ MetricEigenvalue::MetricEigenvalue(TiXmlElement *metric, bool generate) m_unordered = true; // Regex for FP numbers of forms: 120, -23, 4.345, 2.4563e-01, -nan - std::string fp = "-?\\d+\\.?\\d*(?:e[+-]\\d+)?|-?nan"; + std::string fp = R"(-?\d+\.?\d*(?:e[+-]\d+)?|-?nan)"; // Set up the regular expression. This matches lines beginning with EV: // followed by an eigenvalue index and then at least 2 floating-point // values comprising real and imaginary components of complex evals. // Comparison is made only on the captured eigenvalue components. - m_regex = "^EV:\\s+\\d+\\s+(" + fp + ")\\s+(" + fp + ").*"; + m_regex = R"(^EV:\s+\d+\s+()" + fp + ")\\s+(" + fp + ").*"; // Find the number of iterations to match against. TiXmlElement *value = metric->FirstChildElement("value"); diff --git a/tests/MetricEigenvalue.h b/tests/MetricEigenvalue.h index f81825fdb9..2c9b3792bd 100644 --- a/tests/MetricEigenvalue.h +++ b/tests/MetricEigenvalue.h @@ -56,7 +56,7 @@ protected: std::string m_varTolerance; - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricExecutionTime.cpp b/tests/MetricExecutionTime.cpp index 86980aa739..cb857c2e3c 100644 --- a/tests/MetricExecutionTime.cpp +++ b/tests/MetricExecutionTime.cpp @@ -82,7 +82,7 @@ MetricExecutionTime::MetricExecutionTime(TiXmlElement *metric, bool generate) else { // Set the regex to a default value. - m_regex = "^.*Total Computation Time\\s*=\\s*(\\d+\\.?\\d*).*"; + m_regex = R"(^.*Total Computation Time\s*=\s*(\d+\.?\d*).*)"; } // Inform the Tester this metric supports averaging data from multiple runs. diff --git a/tests/MetricExecutionTime.h b/tests/MetricExecutionTime.h index f81125b332..acfd636df8 100644 --- a/tests/MetricExecutionTime.h +++ b/tests/MetricExecutionTime.h @@ -70,7 +70,7 @@ struct MetricExecutionTimeFieldValue class MetricExecutionTime : public Metric { public: - virtual ~MetricExecutionTime() + ~MetricExecutionTime() override { } @@ -91,8 +91,8 @@ protected: MetricExecutionTime(TiXmlElement *metric, bool generate); - virtual bool v_Test(std::istream &pStdout, std::istream &pStderr); - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + bool v_Test(std::istream &pStdout, std::istream &pStderr) override; + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricFile.h b/tests/MetricFile.h index fa3d7dee21..4eb0174ec4 100644 --- a/tests/MetricFile.h +++ b/tests/MetricFile.h @@ -43,7 +43,7 @@ namespace Nektar class MetricFile : public Metric { public: - virtual ~MetricFile() + ~MetricFile() override { } @@ -59,8 +59,8 @@ protected: std::string CalculateHash(std::string filename); - virtual bool v_Test(std::istream &pStdout, std::istream &pStderr); - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + bool v_Test(std::istream &pStdout, std::istream &pStderr) override; + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; /// Stores filenames to perform hash on. std::map<std::string, std::string> m_filehash; diff --git a/tests/MetricFileExists.h b/tests/MetricFileExists.h index 8d35f02915..13af3ee036 100644 --- a/tests/MetricFileExists.h +++ b/tests/MetricFileExists.h @@ -43,7 +43,7 @@ namespace Nektar class MetricFileExists : public Metric { public: - virtual ~MetricFileExists() + ~MetricFileExists() override { } @@ -59,8 +59,8 @@ protected: MetricFileExists(TiXmlElement *metric, bool generate); - virtual bool v_Test(std::istream &pStdout, std::istream &pStderr); - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + bool v_Test(std::istream &pStdout, std::istream &pStderr) override; + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricL2.h b/tests/MetricL2.h index 7c44145f5a..9585983879 100644 --- a/tests/MetricL2.h +++ b/tests/MetricL2.h @@ -56,7 +56,7 @@ protected: std::map<std::string, std::string> m_varTolerance; - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricLInf.h b/tests/MetricLInf.h index 3da9214f33..9a13ebcef9 100644 --- a/tests/MetricLInf.h +++ b/tests/MetricLInf.h @@ -55,7 +55,7 @@ protected: std::map<std::string, std::string> m_varTolerance; - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricNoWarning.h b/tests/MetricNoWarning.h index 834a5070fc..7f38266713 100644 --- a/tests/MetricNoWarning.h +++ b/tests/MetricNoWarning.h @@ -44,7 +44,7 @@ namespace Nektar class MetricNoWarning : public Metric { public: - virtual ~MetricNoWarning(){}; + ~MetricNoWarning() override{}; static MetricSharedPtr create(TiXmlElement *metric, bool generate) { @@ -63,8 +63,8 @@ protected: // Constructor MetricNoWarning(TiXmlElement *metric, bool generate); - virtual bool v_Test(std::istream &pStdout, std::istream &pStderr); - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + bool v_Test(std::istream &pStdout, std::istream &pStderr) override; + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricPrecon.h b/tests/MetricPrecon.h index 628d317dcc..92242b5dea 100644 --- a/tests/MetricPrecon.h +++ b/tests/MetricPrecon.h @@ -56,7 +56,7 @@ protected: std::string m_varTolerance; - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricPyUnitTest.h b/tests/MetricPyUnitTest.h index 1e6edcd175..5ee36776c5 100644 --- a/tests/MetricPyUnitTest.h +++ b/tests/MetricPyUnitTest.h @@ -53,7 +53,7 @@ public: protected: MetricPyUnitTest(TiXmlElement *metric, bool generate); - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar diff --git a/tests/MetricRegex.h b/tests/MetricRegex.h index fcee19a439..6bfc65a648 100644 --- a/tests/MetricRegex.h +++ b/tests/MetricRegex.h @@ -65,7 +65,7 @@ struct MetricRegexFieldValue class MetricRegex : public Metric { public: - virtual ~MetricRegex() + ~MetricRegex() override { } @@ -88,8 +88,8 @@ protected: MetricRegex(TiXmlElement *metric, bool generate); - virtual bool v_Test(std::istream &pStdout, std::istream &pStderr); - virtual void v_Generate(std::istream &pStdout, std::istream &pStderr); + bool v_Test(std::istream &pStdout, std::istream &pStderr) override; + void v_Generate(std::istream &pStdout, std::istream &pStderr) override; }; } // namespace Nektar -- GitLab