diff --git a/src/basics/basics/container/CbVectorPool.h b/src/basics/basics/container/CbVectorPool.h index 329e889e62b757cab80001c4a85886c0bb7597ab..a025016672bd7999de7fc4060804b52620da4ced 100644 --- a/src/basics/basics/container/CbVectorPool.h +++ b/src/basics/basics/container/CbVectorPool.h @@ -406,6 +406,8 @@ public: friend class CbVectorPool< value_type >; + CbVectorAllocatorPool( const CbVectorAllocatorPool& ) = delete; + const CbVectorAllocatorPool& operator=( const CbVectorAllocatorPool& ) = delete; public: /*==========================================================*/ CbVectorAllocatorPool(const typename CbVectorPool< value_type >::CbVectorKey& key, CbVectorPool<value_type>* const& ptrVectorPool) @@ -458,9 +460,6 @@ private: typename CbVectorPool< value_type >::Pool::size_type startIndexInPool; CbVectorPool< value_type >* ptrVectorPool; - - CbVectorAllocatorPool( const CbVectorAllocatorPool& ) = delete; //no copy allowed - const CbVectorAllocatorPool& operator=( const CbVectorAllocatorPool& ) = delete;//no copy allowed }; diff --git a/src/basics/basics/memory/MbSmartPtr.h b/src/basics/basics/memory/MbSmartPtr.h index 0757fb91c2aa2a3c54da74058acf82011ca7f389..5a17e45b9a65caa7afd32a41cc9d1afde244a9e4 100644 --- a/src/basics/basics/memory/MbSmartPtr.h +++ b/src/basics/basics/memory/MbSmartPtr.h @@ -9,9 +9,7 @@ #include <basics/memory/MbSmartPtrBase.h> -#ifdef CAB_RCF - #include <3rdParty/rcf/RcfSerializationIncludes.h> -#endif +#pragma clang system_header //===================================================== // Globale Funktion, um das Loeschen des referenzierten diff --git a/src/basics/basics/parallel/PbMpi.h b/src/basics/basics/parallel/PbMpi.h index 25f9d48224fe0bc3b8c5d223f18f517a56414fe9..93a64f4bee6dad77d59193845e430b84443f40ec 100644 --- a/src/basics/basics/parallel/PbMpi.h +++ b/src/basics/basics/parallel/PbMpi.h @@ -14,6 +14,9 @@ # error VF_MPI has to be defined #endif +// As we doing a lot of const-cast here we define PbMpi.h to system_header to mute clang-tidy +#pragma clang system_header + //#undef SEEK_SET //#undef SEEK_CUR //#undef SEEK_END diff --git a/src/basics/basics/transmitter/TbTransmitter.h b/src/basics/basics/transmitter/TbTransmitter.h index ba00490445bc16ed7c61bd858ca47cc4969e8977..61874360faa73689d435068baafdf9ece8f9ac44 100644 --- a/src/basics/basics/transmitter/TbTransmitter.h +++ b/src/basics/basics/transmitter/TbTransmitter.h @@ -34,7 +34,7 @@ public: public: TbTransmitter() = default; - virtual ~TbTransmitter() { /*std::cout<<typeid(*this).name()<<" dtor"<<std::endl;*/ } + virtual ~TbTransmitter() = default; virtual bool isLocalTransmitter() const = 0; virtual bool isRemoteTransmitter() const = 0; diff --git a/src/basics/basics/transmitter/TbTransmitterMpiPool.h b/src/basics/basics/transmitter/TbTransmitterMpiPool.h index a32325f7f137f53193209fb66aee6f01648158c5..aa5a9c16704e8491052abb63520a686bd8336a45 100644 --- a/src/basics/basics/transmitter/TbTransmitterMpiPool.h +++ b/src/basics/basics/transmitter/TbTransmitterMpiPool.h @@ -41,7 +41,7 @@ template<typename T> class TbCbVectorMpiPool : public CbVectorPool<T> { public: - typedef SPtr< TbCbVectorMpiPool< T > > MpiPoolPtr; + using MpiPoolPtr = SPtr< TbCbVectorMpiPool< T > >; ////////////////////////////////////////////////////////////////////////// using MpiPoolPtrMap = std::map<std::string, MpiPoolPtr>; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp index 3f29498a12d85ea460b71fe4ad85fe84ad9512ea..5d864a190eadba32e6ff89946bc73f0d6c953a13 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp @@ -763,7 +763,7 @@ void MPIIOMigrationBECoProcessor::blocksExchange(int tagN, int ind1, int ind2, i SPtr<Block3D> tempBlock; int tempRank; - for(size_t ind = indexB - indexB; ind < indexE - indexB; ind++) + for(size_t ind = indexB - indexB; ind < indexE - indexB; ind++) // FIXME: both sides of operator are equivalent { tempBlock = grid->getBlock(indexB + int(ind)); if(!tempBlock) throw UbException(UB_EXARGS,"MPIIOMigrationBECoProcessor::blocksExchange -- null block pointer!!!" ); @@ -1245,7 +1245,7 @@ void MPIIOMigrationBECoProcessor::readBoundaryConds(int step) SPtr<Block3D> tempBlock; int tempRank; - for (int ind = indexB - indexB; ind < indexE - indexB; ind++) + for (int ind = indexB - indexB; ind < indexE - indexB; ind++) // FIXME: both sides of operator are equivalent { tempBlock = grid->getBlock(indexB + ind); tempRank = tempBlock->getRank(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp index 909ea021045ee149fef0619853b2d75945f32be2..75801803c79bb41093ba9092c2b87026335b9837 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp @@ -299,7 +299,7 @@ void QCriterionCoProcessor::getNeighborVelocities(int offx, int offy, int offz, /////////////////////////////////////// ////compute distribution at neighboring nodes from neighboring blocks - if (checkInterpolation==false || neighNodeIsBC) + if (!checkInterpolation || neighNodeIsBC) { SPtr<ILBMKernel> kernelW = blockNeighW->getKernel(); SPtr<BCArray3D> bcArrayW = kernelW->getBCProcessor()->getBCArray(); @@ -362,7 +362,7 @@ void QCriterionCoProcessor::getNeighborVelocities(int offx, int offy, int offz, computeVelocity(fW,vW,compressible); } - if (checkInterpolation==true) + if (checkInterpolation) { //in plus-direction data is available in current block because of ghost layers LBMReal fE[27]; diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp index 1f6dc3f2da45c58cb685fb5d64f04ba40fe6cc80..9bdf07ccee2b55bdbbd66507735f6137c601728d 100644 --- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp +++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp @@ -41,13 +41,13 @@ D3Q27TriFaceMeshInteractor::D3Q27TriFaceMeshInteractor(SPtr<Grid3D> /*grid*/, s } ////////////////////////////////////////////////////////////////////////// D3Q27TriFaceMeshInteractor::D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, int type) -: D3Q27Interactor(triFaceMesh, grid, bcAdapter, type), forceshift(0.0), velocityshift(0.0), forceshiftpolicy(false), velocityshiftpolicy(false), useHalfSpace(true), regardPIOTest(true) +: D3Q27Interactor(triFaceMesh, grid, bcAdapter, type) { this->stressMode = STRESSNORMAL; } ////////////////////////////////////////////////////////////////////////// D3Q27TriFaceMeshInteractor::D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, int type, Interactor3D::Accuracy a) - : D3Q27Interactor(triFaceMesh, grid, bcAdapter, type, a), forceshift(0.0), velocityshift(0.0), forceshiftpolicy(false), velocityshiftpolicy(false), useHalfSpace(true), regardPIOTest(true) + : D3Q27Interactor(triFaceMesh, grid, bcAdapter, type, a) { this->stressMode = STRESSNORMAL; } @@ -57,7 +57,7 @@ D3Q27TriFaceMeshInteractor::~D3Q27TriFaceMeshInteractor() ////////////////////////////////////////////////////////////////////////// void D3Q27TriFaceMeshInteractor::initInteractor(const double& timeStep) { - Interactor3D::initInteractor(timeStep); + Interactor3D::initInteractor(timeStep); // FIXME: refers to a member overridden in subclass setQs(timeStep); } ////////////////////////////////////////////////////////////////////////// @@ -1497,7 +1497,7 @@ UbTupleDouble3 D3Q27TriFaceMeshInteractor::getForces() // forceX2 += attribut.getFY()*area; // forceX3 += attribut.getFZ()*area; //} - return UbTupleDouble3(forceX1,forceX2,forceX3); + return {forceX1,forceX2,forceX3}; } ////////////////////////////////////////////////////////////////////////// UbTupleDouble3 D3Q27TriFaceMeshInteractor::getForcesTriangle() @@ -1635,7 +1635,7 @@ UbTupleDouble3 D3Q27TriFaceMeshInteractor::getForcesTriangle() //// forceX2 += Fy1; //// forceX3 += Fz1; ////} - return UbTupleDouble3(forceX1,forceX2,forceX3); + return {forceX1,forceX2,forceX3}; } ////////////////////////////////////////////////////////////////////////// void D3Q27TriFaceMeshInteractor::calculateForces() diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp index a35eb6fe7ffc7fac884c6bba851fec9035e8dcb4..caa21b43d1d790eb9ef354d087e77a585a509de5 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp @@ -2,7 +2,7 @@ #include "D3Q27System.h" #include "InterpolationProcessor.h" #include "D3Q27EsoTwist3DSplittedVector.h" -#include <math.h> +#include <cmath> #include "DataSet3D.h" #include "LBMKernel.h" #include "Block3D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp index 88f67d8a94789df2444e4eda5d17a10e55c128e9..04e9fe233bd42da3cfc7e156f080f57b9be505c1 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp @@ -3,21 +3,13 @@ using namespace UbMath; -CompressibleOffsetInterpolationProcessor::CompressibleOffsetInterpolationProcessor() - -{ - //forcingC = 0; //9.99685e-7; - //forcingF = 0; //forcingC*0.5; -} ////////////////////////////////////////////////////////////////////////// CompressibleOffsetInterpolationProcessor::CompressibleOffsetInterpolationProcessor(LBMReal omegaC, LBMReal omegaF) : omegaC(omegaC), omegaF(omegaF) { } -////////////////////////////////////////////////////////////////////////// -CompressibleOffsetInterpolationProcessor::~CompressibleOffsetInterpolationProcessor() -= default; + ////////////////////////////////////////////////////////////////////////// InterpolationProcessorPtr CompressibleOffsetInterpolationProcessor::clone() { diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h index d855e545cdc8a4ad3c09a8e2bf60ee9dc3116b09..b81277683d0feaf97ed2f9c45cc108a99b9d8a3c 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h @@ -14,9 +14,10 @@ class CompressibleOffsetInterpolationProcessor; class CompressibleOffsetInterpolationProcessor : public InterpolationProcessor { public: - CompressibleOffsetInterpolationProcessor(); + CompressibleOffsetInterpolationProcessor() = default; CompressibleOffsetInterpolationProcessor(LBMReal omegaC, LBMReal omegaF); - ~CompressibleOffsetInterpolationProcessor() override; + ~CompressibleOffsetInterpolationProcessor() override = default; + InterpolationProcessorPtr clone() override; void setOmegas(LBMReal omegaC, LBMReal omegaF) override; void interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF) override; diff --git a/src/cpu/VirtualFluidsCore/LBM/ICell.h b/src/cpu/VirtualFluidsCore/LBM/ICell.h index 76922d58dabccb141ae148df047e404ad821dc86..897a4134fa7df689d2a01e3713dccfbdd474e364 100644 --- a/src/cpu/VirtualFluidsCore/LBM/ICell.h +++ b/src/cpu/VirtualFluidsCore/LBM/ICell.h @@ -18,7 +18,7 @@ struct ICell3D std::vector<LBMReal> BSE; }; -ICell3D::ICell3D(int size) +inline ICell3D::ICell3D(int size) { TSW.resize(size); TNW.resize(size); diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp index 4e6c88fe141556bfcd607828de1e75249b82acc8..ec4b9bbd4f177a3d0fdbd0c3f1d4c3d7775fface 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp @@ -3,7 +3,7 @@ #include "InterpolationProcessor.h" #include "D3Q27EsoTwist3DSplittedVector.h" #include "DataSet3D.h" -#include <math.h> +#include <cmath> #include "Block3D.h" #define PROOF_CORRECTNESS diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp index 7a6ff973cf15dc0cb204c8f9e3a457c2a1436a53..089b505a5f5d357e378c1e556caeffc3e51bc411 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp @@ -1,7 +1,7 @@ #include "IncompressibleCumulantWithSpongeLayerLBMKernel.h" #include "D3Q27System.h" #include "D3Q27EsoTwist3DSplittedVector.h" -#include <math.h> +#include <cmath> #include "DataSet3D.h" #include "BCArray3D.h" #include "Block3D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp index 74b0402bd341466dac24a37ef0f70e3e2e022620..979476eb4208d39f1e925c4d87d7257b3df77680 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp @@ -3,21 +3,13 @@ -IncompressibleOffsetInterpolationProcessor::IncompressibleOffsetInterpolationProcessor() - -{ - //forcingC = 0; //9.99685e-7; - //forcingF = 0; //forcingC*0.5; -} ////////////////////////////////////////////////////////////////////////// IncompressibleOffsetInterpolationProcessor::IncompressibleOffsetInterpolationProcessor(LBMReal omegaC, LBMReal omegaF) : omegaC(omegaC), omegaF(omegaF) { } -////////////////////////////////////////////////////////////////////////// -IncompressibleOffsetInterpolationProcessor::~IncompressibleOffsetInterpolationProcessor() -= default; + ////////////////////////////////////////////////////////////////////////// InterpolationProcessorPtr IncompressibleOffsetInterpolationProcessor::clone() { diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.h b/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.h index db1479adeee2febb0290c661d95149d9740abf76..6b024d419308e284eae4f334290b23dcd5b48218 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.h +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.h @@ -15,9 +15,9 @@ using D3Q27IncompressibleOffsetInterpolationProcessorPtr = SPtr<IncompressibleOf class IncompressibleOffsetInterpolationProcessor : public InterpolationProcessor { public: - IncompressibleOffsetInterpolationProcessor(); + IncompressibleOffsetInterpolationProcessor() = default; IncompressibleOffsetInterpolationProcessor(LBMReal omegaC, LBMReal omegaF); - ~IncompressibleOffsetInterpolationProcessor() override; + ~IncompressibleOffsetInterpolationProcessor() override = default; InterpolationProcessorPtr clone() override; void setOmegas(LBMReal omegaC, LBMReal omegaF) override; void interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF) override; diff --git a/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.cpp index 8cf695fc7dd173824d63e5fad2f35d73b31bfa7a..60893e2b2ca546358bf86b99d4933cb7338ce484 100644 --- a/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/InterpolationProcessor.cpp @@ -83,7 +83,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 0; } //GoEast - else if(inRange(x1+2,x2,x3) && !iCellHasSolid(bcArray, x1+1,x2,x3)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2,x3) && !iCellHasSolid(bcArray, x1+1,x2,x3)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2,x3); xoff = -1; @@ -99,7 +99,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 0; } //GoNorth - else if(inRange(x1,x2+2,x3) && !iCellHasSolid(bcArray, x1,x2+1,x3)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1,x2+2,x3) && !iCellHasSolid(bcArray, x1,x2+1,x3)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1,x2+1,x3); xoff = 0; @@ -115,7 +115,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 1; } //GoTop - else if(inRange(x1,x2,x3+2) && !iCellHasSolid(bcArray, x1,x2,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1,x2,x3+2) && !iCellHasSolid(bcArray, x1,x2,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1,x2,x3+1); xoff = 0; @@ -123,7 +123,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoNW - else if(inRange(x1-1,x2+2,x3) && !iCellHasSolid(bcArray, x1-1,x2+1,x3)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1-1,x2+2,x3) && !iCellHasSolid(bcArray, x1-1,x2+1,x3)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1-1,x2+1,x3); xoff = 1; @@ -131,7 +131,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 0; } //GoNE - else if(inRange(x1+2,x2+2,x3) && !iCellHasSolid(bcArray, x1+1,x2+1,x3)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2+2,x3) && !iCellHasSolid(bcArray, x1+1,x2+1,x3)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2+1,x3); xoff = -1; @@ -139,7 +139,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 0; } //GoSW - else if(inRange(x1-1,x2-1,x3) && !iCellHasSolid(bcArray, x1-1,x2-1,x3)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1-1,x2-1,x3) && !iCellHasSolid(bcArray, x1-1,x2-1,x3)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1-1,x2-1,x3); xoff = 1; @@ -147,7 +147,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 0; } //GoSE - else if(inRange(x1+2,x2-1,x3) && !iCellHasSolid(bcArray, x1+1,x2-1,x3)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2-1,x3) && !iCellHasSolid(bcArray, x1+1,x2-1,x3)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2-1,x3); xoff = -1; @@ -163,7 +163,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 1; } //GoBE - else if(inRange(x1+2,x2,x3-1) && !iCellHasSolid(bcArray, x1+1,x2,x3-1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2,x3-1) && !iCellHasSolid(bcArray, x1+1,x2,x3-1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2,x3-1); xoff = -1; @@ -179,7 +179,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 1; } //GoBN - else if(inRange(x1,x2+2,x3-1) && !iCellHasSolid(bcArray, x1,x2+1,x3-1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1,x2+2,x3-1) && !iCellHasSolid(bcArray, x1,x2+1,x3-1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1,x2+1,x3-1); xoff = 0; @@ -195,7 +195,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoTE - else if(inRange(x1+2,x2,x3+2) && !iCellHasSolid(bcArray, x1+1,x2,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2,x3+2) && !iCellHasSolid(bcArray, x1+1,x2,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2,x3+1); xoff = -1; @@ -211,7 +211,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoTN - else if(inRange(x1,x2+2,x3+2) && !iCellHasSolid(bcArray, x1,x2+1,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1,x2+2,x3+2) && !iCellHasSolid(bcArray, x1,x2+1,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1,x2+1,x3+1); xoff = 0; @@ -219,7 +219,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoTNW - else if(inRange(x1-1,x2+2,x3+2) && !iCellHasSolid(bcArray, x1-1,x2+1,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1-1,x2+2,x3+2) && !iCellHasSolid(bcArray, x1-1,x2+1,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1-1,x2+1,x3+1); xoff = 1; @@ -227,7 +227,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoTNE - else if(inRange(x1+2,x2+2,x3+2) && !iCellHasSolid(bcArray, x1+1,x2+1,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2+2,x3+2) && !iCellHasSolid(bcArray, x1+1,x2+1,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2+1,x3+1); xoff = -1; @@ -235,7 +235,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoTSE - else if(inRange(x1+2,x2-1,x3+2) && !iCellHasSolid(bcArray, x1+1,x2-1,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2-1,x3+2) && !iCellHasSolid(bcArray, x1+1,x2-1,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2-1,x3+1); xoff = -1; @@ -243,7 +243,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoTSW - else if(inRange(x1-1,x2-1,x3+2) && !iCellHasSolid(bcArray, x1-1,x2-1,x3+1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1-1,x2-1,x3+2) && !iCellHasSolid(bcArray, x1-1,x2-1,x3+1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1-1,x2-1,x3+1); xoff = 1; @@ -251,7 +251,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = -1; } //GoBNW - else if(inRange(x1-1,x2+2,x3-1) && !iCellHasSolid(bcArray, x1-1,x2+1,x3-1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1-1,x2+2,x3-1) && !iCellHasSolid(bcArray, x1-1,x2+1,x3-1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1-1,x2+1,x3-1); xoff = 1; @@ -259,7 +259,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 1; } //GoBNE - else if(inRange(x1+2,x2+2,x3-1) && !iCellHasSolid(bcArray, x1+1,x2+1,x3-1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2+2,x3-1) && !iCellHasSolid(bcArray, x1+1,x2+1,x3-1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2+1,x3-1); xoff = -1; @@ -267,7 +267,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 1; } //GoBSE - else if(inRange(x1+2,x2-1,x3-1) && !iCellHasSolid(bcArray, x1+1,x2-1,x3-1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1+2,x2-1,x3-1) && !iCellHasSolid(bcArray, x1+1,x2-1,x3-1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1+1,x2-1,x3-1); xoff = -1; @@ -275,7 +275,7 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP zoff = 1; } //GoBSW - else if(inRange(x1-1,x2-1,x3-1) && !iCellHasSolid(bcArray, x1-1,x2-1,x3-1)) // ist übernächster Knoten auch im Gebiet (Grundknoten bei 0,0,0 + else if(inRange(x1-1,x2-1,x3-1) && !iCellHasSolid(bcArray, x1-1,x2-1,x3-1)) // ist �bern�chster Knoten auch im Gebiet (Grundknoten bei 0,0,0 { readICell(f,icell,x1-1,x2-1,x3-1); xoff = 1; @@ -290,9 +290,9 @@ bool InterpolationProcessor::findNeighborICell(const SPtr<BCArray3D> bcArray, SP // " by using in: "+(std::string)typeid(*this).name()+ // " or maybe you have a solid on the block boundary"; //UB_THROW(UbException(UB_EXARGS, err)); - return 0; + return false; } - return 1; + return true; } ////////////////////////////////////////////////////////////////////////// int InterpolationProcessor::iCellHowManySolids( const SPtr<BCArray3D> bcArray, int x1, int x2, int x3 ) diff --git a/src/cpu/VirtualFluidsCore/Parallel/SimpleGeometricPartitioner.h b/src/cpu/VirtualFluidsCore/Parallel/SimpleGeometricPartitioner.h index 9573e778c04efe6c1ead3f888dc9247d141ba76e..b7b62c1ddfe438f3bc0a23d140880a80f7cee2dd 100644 --- a/src/cpu/VirtualFluidsCore/Parallel/SimpleGeometricPartitioner.h +++ b/src/cpu/VirtualFluidsCore/Parallel/SimpleGeometricPartitioner.h @@ -25,7 +25,7 @@ public: int p = numberOfProcess; if (p == 1) - return UbTupleInt3(1, 1, 1); + return {1, 1, 1}; double a = pow(p*pow(x,3.0)/xyz,1.0/3.0); double b = pow(p*pow(y,3.0)/xyz,1.0/3.0); diff --git a/src/cpu/VirtualFluidsCore/Utilities/CheckpointConverter.cpp b/src/cpu/VirtualFluidsCore/Utilities/CheckpointConverter.cpp index 2c1d31e0ea2e44726e1724d418e15d824f0dc916..fe58829b18d462d63dfd52b48ec0fe3046e2a019 100644 --- a/src/cpu/VirtualFluidsCore/Utilities/CheckpointConverter.cpp +++ b/src/cpu/VirtualFluidsCore/Utilities/CheckpointConverter.cpp @@ -6,7 +6,7 @@ #include "Grid3D.h" #include "Communicator.h" #include "CoordinateTransformation3D.h" -#include <stdio.h> +#include <cstdio> #define BLOCK_SIZE 1024 diff --git a/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp index 84258830b8da1c54624bf65c515f177aec788106..23f3260e9e4efbcbf516bbd58cbb03fa12d5ab5b 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp @@ -1,7 +1,7 @@ #if defined VF_METIS && defined VF_MPI #include "MetisPartitioningGridVisitor.h" -#include <math.h> +#include <cmath> #include "Block3D.h" #include "Grid3D.h" #include "Communicator.h" diff --git a/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectBlockVisitor.cpp index 3b72cfd4d47fd22d3fa3badb7b246a4c6cb1f29c..cb503f368d67d53c58073a2d8e1c53751c2b3a52 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectBlockVisitor.cpp @@ -11,7 +11,7 @@ RefineCrossAndInsideGbObjectBlockVisitor::RefineCrossAndInsideGbObjectBlockVisit } ////////////////////////////////////////////////////////////////////////// RefineCrossAndInsideGbObjectBlockVisitor::RefineCrossAndInsideGbObjectBlockVisitor(SPtr<GbObject3D> geoObject, int refineLevel) - : Block3DVisitor(0,refineLevel-1), geoObject(geoObject), notActive(true) + : Block3DVisitor(0,refineLevel-1), geoObject(geoObject) { }