diff --git a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H index f79a80b827059b37130b626ef9281a5c04b6779c..401917f555b19396e6259841347391f95916a030 100644 --- a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H +++ b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H @@ -7,7 +7,7 @@ IOobject phiBHeader ); -surfaceScalarField* phiBPtr = NULL; +surfaceScalarField* phiBPtr = nullptr; if (phiBHeader.headerOk()) { diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C index a3217a073bfdd4a8056b4dac0d9d7d840969aed4..c713498ef6a2b1a8453290c5e799960e2e678ad9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,8 +45,8 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo : psiThermo(mesh, word::null), twoPhaseMixture(mesh, *this), - thermo1_(NULL), - thermo2_(NULL) + thermo1_(nullptr), + thermo2_(nullptr) { { volScalarField T1(IOobject::groupName("T", phase1Name()), T_); diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C index 2d3a7b61638c6d1fcf980c1972679c7cb59c022d..c97a5a1382f02cacf7f45266b4cb0f9657557c20 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ Foam::phaseModel::phaseModel name_(phaseName), p_(p), T_(T), - thermo_(NULL), + thermo_(nullptr), dgdt_ ( IOobject @@ -81,7 +81,7 @@ Foam::phaseModel::phaseModel Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const { NotImplemented; - return autoPtr<phaseModel>(NULL); + return autoPtr<phaseModel>(nullptr); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 7929a9d1ad0162b5118371ee2cb5e80bc5b1a706..4392e62ac9b3cf18dfa54621576278a0a6d11c78 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C @@ -203,7 +203,7 @@ Foam::phaseModel::~phaseModel() Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const { NotImplemented; - return autoPtr<phaseModel>(NULL); + return autoPtr<phaseModel>(nullptr); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index af4905abc986e444adcd7250543ca8d31df554f3..8e2d78cbec800fe8997331f972d69a04cd9cf997 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -123,7 +123,7 @@ ++dmIter, ++dcIter ) { - const phaseModel *phase2Ptr = NULL; + const phaseModel *phase2Ptr = nullptr; if (&phase == &dmIter()->phase1()) { diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C index ae68ff1682d030144081c7e8152b8d2f49df32dc..5fc59061a4f8d4c3d1fc61e4ee8356581bb76c78 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,7 +68,7 @@ Foam::phase::phase Foam::autoPtr<Foam::phase> Foam::phase::clone() const { NotImplemented; - return autoPtr<phase>(NULL); + return autoPtr<phase>(nullptr); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 07b41eb77109d58fc0fc99c4a2cac2d4b940e65f..9fee19e77fdead51e7f5cb59f943cc2c924422c4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::dmdt const Foam::phaseModel& phase ) const { - return tmp<volScalarField>(NULL); + return tmp<volScalarField>(nullptr); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 4563f191b9103a418306c40ef3c115b18e40e2ef..6e5aac34dd9ff45f56ca6f815cd73009a6270bee 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -175,7 +175,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh(), dimensionedVector("0", dimAcceleration, Zero) ), - divU_(NULL), + divU_(nullptr), turbulence_ ( phaseCompressibleTurbulenceModel::New diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index 8d73c1286ced1dbc274a1127593b025cacf3f748..9fa7c0f5898a66d6bb97ab857444b1bea4297ea6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,7 +77,7 @@ Foam::phaseModel::phaseModel Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const { NotImplemented; - return autoPtr<phaseModel>(NULL); + return autoPtr<phaseModel>(nullptr); } @@ -168,7 +168,7 @@ bool Foam::phaseModel::compressible() const const Foam::tmp<Foam::volScalarField>& Foam::phaseModel::divU() const { NotImplemented; - static tmp<Foam::volScalarField> divU_(NULL); + static tmp<Foam::volScalarField> divU_(nullptr); return divU_; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C index 3ab4a91ec5b2533ad258904f8aab0733ce2e16a3..01f36c881c0cb2f1642554b06a739b9d5060d06c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C @@ -102,7 +102,7 @@ void Foam::phaseSystem::generatePairsAndSubModels : blendingMethods_["default"] ); - autoPtr<modelType> noModel(NULL); + autoPtr<modelType> noModel(nullptr); forAllConstIter(typename modelTypeTable, tempModels, iter) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H index b9f0f15af2b838c12bb9094a87961fc2138b3444..5e135c16152439099c206e30e015056f486d1d14 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ public: autoPtr<IATEsource> clone() const { NotImplemented; - return autoPtr<IATEsource>(NULL); + return autoPtr<IATEsource>(nullptr); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H index fc2456871e94fdc269bcab8fa4c40a31c4cf2e38..c7655b9c342ce081f7d95bba98281e1122896a3b 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,7 +114,7 @@ public: autoPtr<IATEsource> clone() const { NotImplemented; - return autoPtr<IATEsource>(NULL); + return autoPtr<IATEsource>(nullptr); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H index ffaada38796177f30004d80db17f6d45e1410e59..fd97d416f90cc84dce2f47d4159d531987a75be4 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H @@ -16,7 +16,7 @@ volVectorField D ); -autoPtr<volScalarField> Tptr(NULL); +autoPtr<volScalarField> Tptr(nullptr); if (thermalStress) { diff --git a/applications/test/HashingSpeed/Test-HashingSpeed.C b/applications/test/HashingSpeed/Test-HashingSpeed.C index 5937ad741e4dfd30ee416c77209b1234aef2fc82..2d759ab99f5d95a7ab847e5b3a0c1df0ed530b78 100644 --- a/applications/test/HashingSpeed/Test-HashingSpeed.C +++ b/applications/test/HashingSpeed/Test-HashingSpeed.C @@ -943,7 +943,7 @@ uint32_t SuperFastHash (const char * data, int len) { uint32_t hash = 0; - if (len <= 0 || data == NULL) return 0; + if (len <= 0 || data == nullptr) return 0; unsigned rem = len & 3; len >>= 2; @@ -1060,14 +1060,14 @@ struct tagtest { { 0.0, "hashLookup3\t", hashLookup3 }, { 0.0, "hashLookup3Orig\t", hashLookup3Orig }, { 0.0, "SuperFastHash\t", SuperFastHash }, - { 0.0, NULL, NULL } + { 0.0, nullptr, nullptr } }; int main () { int i, j; GenerateCRC32Table (); - for (j=0; tests[j].name != NULL; j++) { + for (j=0; tests[j].name != nullptr; j++) { for (i=0; i < 3; i++) { double res = test (tests[j].hash); if (tests[j].res == 0.0 || tests[j].res > res) tests[j].res = res; diff --git a/applications/test/regex/Test-regex.C b/applications/test/regex/Test-regex.C index 35fa73a2cc80defc6f115bbecd6945c7726d4ebe..6f506f76594bfa2bdda8dcc6437238e2d4c336de 100644 --- a/applications/test/regex/Test-regex.C +++ b/applications/test/regex/Test-regex.C @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) string me("Mark"); // Handling of null strings - if (regExp(NULL).match(me)) + if (regExp(nullptr).match(me)) { Info<< "fail - matched: " << me << endl; } diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index d8eb8af676c56eda4ba533a551ff8f825b21f092..7f8cb092bb503f8c8bf39eb736c9b6134d29b097 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -648,7 +648,7 @@ int main(int argc, char *argv[]) ); // corrector for mesh motion - twoDPointCorrector* correct2DPtr = NULL; + twoDPointCorrector* correct2DPtr = nullptr; if (motionObj.headerOk()) { diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index 176cb966b8c6c77bcd8f6dc868c7fe39e4aece6f..b09742c313425ff03d6eaae74e1b29e62cc60711 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.C @@ -414,9 +414,9 @@ int main(int argc, char *argv[]) // Surface - autoPtr<triSurface> surf(NULL); + autoPtr<triSurface> surf(nullptr); // Search engine on surface. - autoPtr<triSurfaceSearch> querySurf(NULL); + autoPtr<triSurfaceSearch> querySurf(nullptr); if (useSurface) { diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C index d45222b50d7668bb4c582eab3f865bd470ee6fd8..854dea352b4815de2d34155b5642dadc54c4a061 100644 --- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C +++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C @@ -186,7 +186,7 @@ void ReadVertices // any chunk. Normally this would be in a for loop. CCMIOSize nVertices; - CCMIOEntitySize(&err, vertices, &nVertices, NULL); + CCMIOEntitySize(&err, vertices, &nVertices, nullptr); List<int> mapData(nVertices, 0); List<float> verts(3*nVertices, 0); @@ -205,9 +205,9 @@ void ReadVertices CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize); //CCMIOSize size; - //CCMIOEntityDescription(&err, vertices, &size, NULL); + //CCMIOEntityDescription(&err, vertices, &size, nullptr); //char *desc = new char[size + 1]; - //CCMIOEntityDescription(&err, vertices, NULL, desc); + //CCMIOEntityDescription(&err, vertices, nullptr, desc); //Pout<< "label: '" << desc << "'" << endl; //delete [] desc; @@ -243,7 +243,7 @@ void ReadProblem int i = 0; while ( - CCMIONextEntity(NULL, problem, kCCMIOCellType, &i, &next) + CCMIONextEntity(nullptr, problem, kCCMIOCellType, &i, &next) == kCCMIONoErr ) { @@ -255,10 +255,10 @@ void ReadProblem // an array to get the name because we do not know how long the // string is yet. Many parameters to CCMIO functions that // return - // data can be NULL if that data is not needed.) + // data can be nullptr if that data is not needed.) if ( - CCMIOReadOptstr(NULL, next, "MaterialType", &size, NULL) + CCMIOReadOptstr(nullptr, next, "MaterialType", &size, nullptr) == kCCMIONoErr ) { @@ -280,7 +280,7 @@ void ReadProblem int k = 0; while ( - CCMIONextEntity(NULL, problem, kCCMIOBoundaryRegion, &k, &boundary) + CCMIONextEntity(nullptr, problem, kCCMIOBoundaryRegion, &k, &boundary) == kCCMIONoErr ) { @@ -292,7 +292,7 @@ void ReadProblem int prostarI = -1; if ( - CCMIOReadOpti(NULL, boundary, "ProstarRegionNumber", &prostarI) + CCMIOReadOpti(nullptr, boundary, "ProstarRegionNumber", &prostarI) == kCCMIONoErr ) { @@ -318,12 +318,18 @@ void ReadProblem int size; if ( - CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, NULL) - == kCCMIONoErr + CCMIOReadOptstr + ( + nullptr, + boundary, + "BoundaryType", + &size, + nullptr + ) == kCCMIONoErr ) { char* s = new char[size + 1]; - CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, s); + CCMIOReadOptstr(nullptr, boundary, "BoundaryType", &size, s); s[size] = '\0'; foamPatchTypes[foamPatchi] = string::validate<word>(string(s)); delete [] s; @@ -340,12 +346,18 @@ void ReadProblem if ( - CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, NULL) - == kCCMIONoErr + CCMIOReadOptstr + ( + nullptr, + boundary, + "BoundaryName", + &size, + nullptr + ) == kCCMIONoErr ) { char* name = new char[size + 1]; - CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, name); + CCMIOReadOptstr(nullptr, boundary, "BoundaryName", &size, name); name[size] = '\0'; foamPatchNames[foamPatchi] = string::validate<word>(string(name)); @@ -353,12 +365,12 @@ void ReadProblem } else if ( - CCMIOReadOptstr(NULL, boundary, "Label", &size, NULL) + CCMIOReadOptstr(nullptr, boundary, "Label", &size, nullptr) == kCCMIONoErr ) { char* name = new char[size + 1]; - CCMIOReadOptstr(NULL, boundary, "Label", &size, name); + CCMIOReadOptstr(nullptr, boundary, "Label", &size, name); name[size] = '\0'; foamPatchNames[foamPatchi] = string::validate<word>(string(name)); @@ -407,7 +419,7 @@ void ReadCells CCMIOID id; CCMIOGetEntity(&err, topology, kCCMIOCells, 0, &id); CCMIOSize nCells; - CCMIOEntitySize(&err, id, &nCells, NULL); + CCMIOEntitySize(&err, id, &nCells, nullptr); std::vector<int> mapData(nCells); std::vector<int> cellType(nCells); @@ -431,7 +443,7 @@ void ReadCells CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id); CCMIOSize nInternalFaces; - CCMIOEntitySize(&err, id, &nInternalFaces, NULL); + CCMIOEntitySize(&err, id, &nInternalFaces, nullptr); Pout<< "nInternalFaces:" << nInternalFaces << endl; // Determine patch sizes before reading internal faces @@ -439,12 +451,12 @@ void ReadCells int index = 0; while ( - CCMIONextEntity(NULL, topology, kCCMIOBoundaryFaces, &index, &id) + CCMIONextEntity(nullptr, topology, kCCMIOBoundaryFaces, &index, &id) == kCCMIONoErr ) { CCMIOSize size; - CCMIOEntitySize(&err, id, &size, NULL); + CCMIOEntitySize(&err, id, &size, nullptr); Pout<< "Read kCCMIOBoundaryFaces entry with " << size << " faces." << endl; @@ -463,10 +475,10 @@ void ReadCells mapData.resize(nInternalFaces); CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id); CCMIOSize size; - CCMIOReadFaces(&err, id, kCCMIOInternalFaces, NULL, &size, NULL, + CCMIOReadFaces(&err, id, kCCMIOInternalFaces, nullptr, &size, nullptr, kCCMIOStart, kCCMIOEnd); std::vector<int> faces(size); - CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, NULL, &faces[0], + CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, nullptr, &faces[0], kCCMIOStart, kCCMIOEnd); std::vector<int> faceCells(2*nInternalFaces); CCMIOReadFaceCells(&err, id, kCCMIOInternalFaces, &faceCells[0], @@ -503,22 +515,38 @@ void ReadCells label regionI = 0; while ( - CCMIONextEntity(NULL, topology, kCCMIOBoundaryFaces, &index, &id) + CCMIONextEntity(nullptr, topology, kCCMIOBoundaryFaces, &index, &id) == kCCMIONoErr ) { CCMIOSize nFaces; - CCMIOEntitySize(&err, id, &nFaces, NULL); + CCMIOEntitySize(&err, id, &nFaces, nullptr); mapData.resize(nFaces); faceCells.resize(nFaces); - CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, NULL, &size, NULL, + CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, nullptr, &size, nullptr, kCCMIOStart, kCCMIOEnd); faces.resize(size); - CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, &mapID, NULL, &faces[0], - kCCMIOStart, kCCMIOEnd); - CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0], - kCCMIOStart, kCCMIOEnd); + CCMIOReadFaces + ( + &err, + id, + kCCMIOBoundaryFaces, + &mapID, + nullptr, + &faces[0], + kCCMIOStart, + kCCMIOEnd + ); + CCMIOReadFaceCells + ( + &err, + id, + kCCMIOBoundaryFaces, + &faceCells[0], + kCCMIOStart, + kCCMIOEnd + ); CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd); CheckError(err, "Error reading boundary faces"); @@ -526,7 +554,7 @@ void ReadCells int prostarI; if ( - CCMIOReadOpti(NULL, id, "ProstarRegionNumber", &prostarI) + CCMIOReadOpti(nullptr, id, "ProstarRegionNumber", &prostarI) == kCCMIONoErr ) { @@ -639,12 +667,12 @@ int main(int argc, char *argv[]) } // Open the file. Because we did not initialize 'err' we need to pass - // in NULL (which always means kCCMIONoErr) and then assign the return - // value to 'err'.). + // in nullptr (which always means kCCMIONoErr) and then assign the + // return value to 'err'.). CCMIOID root; CCMIOError err = CCMIOOpenFile ( - NULL, + nullptr, ccmFile.c_str(), kCCMIORead, &root @@ -659,9 +687,9 @@ int main(int argc, char *argv[]) CheckError(err, "Error opening state"); unsigned int size; - CCMIOEntityDescription(&err, state, &size, NULL); + CCMIOEntityDescription(&err, state, &size, nullptr); char *desc = new char[size + 1]; - CCMIOEntityDescription(&err, state, NULL, desc); + CCMIOEntityDescription(&err, state, nullptr, desc); Pout<< "Reading state '" << kDefaultState << "' (" << desc << ")" << endl; delete [] desc; @@ -678,7 +706,7 @@ int main(int argc, char *argv[]) processor, &vertices, &topology, - NULL, + nullptr, &solution ); @@ -692,8 +720,8 @@ int main(int argc, char *argv[]) processor, &vertices, &topology, - NULL, - NULL + nullptr, + nullptr ); if (err != kCCMIONoErr) { diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C index 013481821b5615b114b7eaf30c66a735ad5b0938..457b555ad1ebc32b33c5a5789fbd2c3c67486660 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C @@ -47,7 +47,7 @@ cellShape extrudedQuadCellShape faceList& frontAndBackFaces ) { - static const cellModel* hexModelPtr_ = NULL; + static const cellModel* hexModelPtr_ = nullptr; if (!hexModelPtr_) { diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C index e781a66f1f53bb331f4add204c09bca8204b60aa..a2e0acf8ce04d3f772e8e5c63d0e0663e6bcde00 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C @@ -48,7 +48,7 @@ cellShape extrudedTriangleCellShape faceList& frontAndBackFaces ) { - static const cellModel* prismModelPtr_ = NULL; + static const cellModel* prismModelPtr_ = nullptr; if (!prismModelPtr_) { diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV b/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV index 64a2dff2964a3bcbdef9bbce83920ae59d36ac9e..d62033b9cecc267c674ff6b3afeafe3c80361360 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV @@ -258,84 +258,84 @@ YIELD STRESS 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: PRESSURE PASCAL -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- CONVECTIVE FILM COEFFICIENT 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: CONVECTION COEFFICIENT J/M^2/K/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- THERMAL CAPACITY PER UNIT AREA 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: THERMAL CAPACITY PER UNIT AREA J/M^2/K -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- SURFACE HEAT FLUX RATE 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: HEAT FLUX PER UNIT AREA J/M^2/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- VISCOSITY 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: VISCOSITY KG/M/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- COEFFICIENT OF FRICTION 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- AREA FACTOR 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- EMISSIVITY 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- ABSORPTIVITY 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- HEAT FLUX RATE 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: HEAT FLUX PER UNIT LENGTH J/M/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- INTERACTION TERM FOR TSAI-WU 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- SWELLING COEFFICIENT 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- DEFAULT MATERIAL PROPERT(IES): MODULUS OF ELASTICITY VERSION : 1 diff --git a/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C b/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C index 188d1d35a12f48248a726a2f81301fdc0b8bef45..5b62de154a38b66f74c1bf35a930681bf1845a13 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C +++ b/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C @@ -185,7 +185,7 @@ Foam::sammMesh::sammMesh cellPolys_(0), nInternalFaces_(0), polyBoundaryPatchStartIndices_(0), - pointCellsPtr_(NULL), + pointCellsPtr_(nullptr), isShapeMesh_(true) { // Fill in the lookup tables diff --git a/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C b/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C index 7f48b0518c33a4b5db0fd4db18f1ed9df7b3176c..898c0c8f1d316896a0252ccf65bfdbad64bb3cd8 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -255,7 +255,7 @@ Foam::starMesh::starMesh cellPolys_(0), nInternalFaces_(0), polyBoundaryPatchStartIndices_(0), - pointCellsPtr_(NULL), + pointCellsPtr_(nullptr), couples_(0), isShapeMesh_(true) { diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index a1f8fecf135e998578582f7dbc3319459fc8ab4d..29969e66c8ae0d3ed1c8047fc8f35297958b7995 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1177,7 +1177,11 @@ void setCouplingInfo { const polyBoundaryMesh& patches = mesh.boundaryMesh(); - List<polyPatch*> newPatches(patches.size(), static_cast<polyPatch*>(NULL)); + List<polyPatch*> newPatches + ( + patches.size(), + static_cast<polyPatch*>(nullptr) + ); forAll(zoneToPatch, zoneI) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index d764f08b5e4e1cc3cb096464c6549218499aa20b..d94dc425aa5131034d9b79366eadef6ba15bb5a9 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -866,7 +866,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh "backgroundMeshDecomposition" ) ) - : NULL + : nullptr ), cellShapeControl_ ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 50553ec4c60c9ff808960cc4c6465543afb04f7a..5a3f86f6ac92ae3eb7a781e86fba763c8818ee54 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1810,7 +1810,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches } // Error if startCell is null - if (startCell == NULL) + if (startCell == nullptr) { Pout<< "Start cell is null!" << endl; } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H index e114d71021db3634a38e74cfb439f370bcac2059..3b7335d620549650189d3d04561fb27686f17c3b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,7 +101,7 @@ public: virtual autoPtr<searchableSurfaceFeatures> clone() const { NotImplemented; - return autoPtr<searchableSurfaceFeatures>(NULL); + return autoPtr<searchableSurfaceFeatures>(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H index 20cb82808f48b66a8e721b2382e7a37c3a954302..41eb0b631544045df70e13b2354f360165d801a0 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,7 +109,7 @@ public: autoPtr<faceSelection> clone() const { NotImplemented; - return autoPtr<faceSelection>(NULL); + return autoPtr<faceSelection>(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H index 08a3abee31f6453a71654c6194acc0f653a47249..10b7f377ed2feb89085bda2f212ff3cb94dd6492 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,7 +86,7 @@ public: autoPtr<faceSelection> clone() const { NotImplemented; - return autoPtr<faceSelection>(NULL); + return autoPtr<faceSelection>(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H index d5c04ae1ea300e7e1469ffb45337321a74f62769..30262ef8a980362e94960047877c3bbb839f8cc0 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ public: autoPtr<faceSelection> clone() const { NotImplemented; - return autoPtr<faceSelection>(NULL); + return autoPtr<faceSelection>(nullptr); } diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C index cfe65a5589b1b6885679199e7acb41653711f649..afbf8f557e8028651eef7dbf2438423c0db08222 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C @@ -43,7 +43,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) IOobject::NO_WRITE ) ), - mirrorMeshPtr_(NULL) + mirrorMeshPtr_(nullptr) { plane mirrorPlane(mirrorMeshDict_); diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 0feb0c3b7203542635caa779332a1a18ad245600..cda9ec12922af163bfebd9fc7018f97afa8191af 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -871,7 +871,7 @@ int main(int argc, char *argv[]) // Main command read & execute loop // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - autoPtr<IFstream> fileStreamPtr(NULL); + autoPtr<IFstream> fileStreamPtr(nullptr); if (batch) { diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index cb7b4b5e868233bd22c1831cf4010de61e5be81b..bc94782641e5dd91485a0b44d2b3df7ebc173f59 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -680,7 +680,7 @@ int main(int argc, char *argv[]) new List<SLList<indexedParticle*>*> ( mesh.nCells(), - static_cast<SLList<indexedParticle*>*>(NULL) + static_cast<SLList<indexedParticle*>*>(nullptr) ) ); @@ -947,7 +947,7 @@ int main(int argc, char *argv[]) if (times.size() == 1) { // Clear cached decomposer - fieldDecomposerList.set(proci, NULL); + fieldDecomposerList.set(proci, nullptr); } } @@ -978,7 +978,7 @@ int main(int argc, char *argv[]) if (times.size() == 1) { - dimFieldDecomposerList.set(proci, NULL); + dimFieldDecomposerList.set(proci, nullptr); } } @@ -1029,8 +1029,8 @@ int main(int argc, char *argv[]) if (times.size() == 1) { - pointProcAddressingList.set(proci, NULL); - pointFieldDecomposerList.set(proci, NULL); + pointProcAddressingList.set(proci, nullptr); + pointFieldDecomposerList.set(proci, nullptr); } } @@ -1133,11 +1133,11 @@ int main(int argc, char *argv[]) // times, otherwise it is just extra storage. if (times.size() == 1) { - boundaryProcAddressingList.set(proci, NULL); - cellProcAddressingList.set(proci, NULL); - faceProcAddressingList.set(proci, NULL); - procMeshList.set(proci, NULL); - processorDbList.set(proci, NULL); + boundaryProcAddressingList.set(proci, nullptr); + cellProcAddressingList.set(proci, nullptr); + faceProcAddressingList.set(proci, nullptr); + procMeshList.set(proci, nullptr); + processorDbList.set(proci, nullptr); } } } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index d54d25b3819fe4178e7d8aa540610084aa18e801..3cad0f554e36c8de01c1f15548cb574f5299e6e9 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -88,7 +88,7 @@ Foam::domainDecomposition::domainDecomposition(const IOobject& io) false ) ) - : NULL + : nullptr ), nProcs_ ( diff --git a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C index 92b9a4c4e45e661e8ac9682fbc5def06c4f1fa29..77fcd6211a77494534064a358b45785178098b69 100644 --- a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C +++ b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -89,7 +89,7 @@ Foam::pointFieldDecomposer::pointFieldDecomposer patchFieldDecomposerPtrs_ ( procMesh_.boundary().size(), - static_cast<patchFieldDecomposer*>(NULL) + static_cast<patchFieldDecomposer*>(nullptr) ) { forAll(boundaryAddressing_, patchi) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index fb3a22b74c7326cf672d06f2a8c74a0d80c197d7..6a97d2be57537bb86a2add72a73f3976adf8c926 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -227,7 +227,7 @@ autoPtr<mapPolyMesh> mergeSharedPoints if (returnReduce(pointToMaster.size(), sumOp<label>()) == 0) { - return autoPtr<mapPolyMesh>(NULL); + return autoPtr<mapPolyMesh>(nullptr); } polyTopoChange meshMod(mesh); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index eaf5a99afefed8bce0e59b7d4602a054f259af14..2070b0a6219dd9c4ee49c9326e3c2da1a8b9c5bf 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C @@ -216,7 +216,7 @@ void writePatchField word timeFile = prepend + itoa(timeIndex); - ensightStream* ensightFilePtr = NULL; + ensightStream* ensightFilePtr = nullptr; if (Pstream::master()) { if (timeIndex == 0) @@ -330,7 +330,7 @@ void ensightField const labelList& hexes = meshCellSets.hexes; const labelList& polys = meshCellSets.polys; - ensightStream* ensightFilePtr = NULL; + ensightStream* ensightFilePtr = nullptr; if (Pstream::master()) { // set the filename of the ensight file @@ -548,7 +548,7 @@ void ensightPointField const wordHashSet& faceZoneNames = eMesh.faceZoneNames(); - ensightStream* ensightFilePtr = NULL; + ensightStream* ensightFilePtr = nullptr; if (Pstream::master()) { // set the filename of the ensight file diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 198c1d319c10e2f64f40aaa8b4d1428f91bd14f2..4d08207dd04990e712dc228e70ed54828f87f6b6 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -1041,7 +1041,7 @@ void Foam::ensightMesh::write // set the filename of the ensight file fileName ensightGeometryFileName = timeFile + "mesh"; - ensightStream* ensightGeometryFilePtr = NULL; + ensightStream* ensightGeometryFilePtr = nullptr; if (Pstream::master()) { if (binary_) diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index c3357c0d0dbfa9a043864f5d3d12bc7cb3a3746f..3063f9ddb36b76af340ae28c2001682c02d49486 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -196,7 +196,7 @@ int main(int argc, char *argv[]) const word prepend = args.globalCaseName() + '.'; - OFstream *ensightCaseFilePtr = NULL; + OFstream *ensightCaseFilePtr = nullptr; if (Pstream::master()) { fileName caseFileName = prepend + "case"; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index 4d88ebf1e188349c3466cdde60228a70dc1fb269..3fd0a4f72336db059f9103ebf469c975d30c0948 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -381,7 +381,7 @@ int main(int argc, char *argv[]) // check that the positions field is present for this time IOobject* positionPtr = cloudObjs.lookup(word("positions")); - if (positionPtr != NULL) + if (positionPtr != nullptr) { ensightParticlePositions ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C index abf25471b44058f40ad6d99e983ae2146683fa5c..c6760b298a276f43fc07e12c956cffb41daa684a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C @@ -111,8 +111,8 @@ Pout<< "zoneName:" << zoneName - INTEGER4 *PassiveVarArray = NULL; - INTEGER4 *VarShareArray = NULL; + INTEGER4 *PassiveVarArray = nullptr; + INTEGER4 *VarShareArray = nullptr; INTEGER4 ShrConn = 0; INTEGER4 NumBConns = 0; /* No Boundary Connections */ @@ -191,8 +191,8 @@ Pout<< "zoneName:" << zoneName << endl; - INTEGER4 *PassiveVarArray = NULL; - INTEGER4 *VarShareArray = NULL; + INTEGER4 *PassiveVarArray = nullptr; + INTEGER4 *VarShareArray = nullptr; INTEGER4 ShrConn = 0; INTEGER4 NumBConns = 0; /* No Boundary Connections */ @@ -273,8 +273,8 @@ Pout<< "zoneName:" << zoneName << endl; - INTEGER4 *PassiveVarArray = NULL; - INTEGER4 *VarShareArray = NULL; + INTEGER4 *PassiveVarArray = nullptr; + INTEGER4 *VarShareArray = nullptr; INTEGER4 ShrConn = 0; @@ -373,9 +373,9 @@ void Foam::tecplotWriter::writeConnectivity(const fvMesh& mesh) const FaceNodes.begin(), /* The face nodes array */ FaceLeftElems.begin(), /* The left elements array */ FaceRightElems.begin(), /* The right elements array */ - NULL, /* No boundary connection counts */ - NULL, /* No boundary connection elements */ - NULL /* No boundary connection zones */ + nullptr, /* No boundary connection counts */ + nullptr, /* No boundary connection elements */ + nullptr /* No boundary connection zones */ ) ) { @@ -487,9 +487,9 @@ void Foam::tecplotWriter::writeConnectivity FaceNodes.begin(), /* The face nodes array */ FaceLeftElems.begin(), /* The left elements array */ FaceRightElems.begin(), /* The right elements array */ - NULL, /* No boundary connection counts */ - NULL, /* No boundary connection elements */ - NULL /* No boundary connection zones */ + nullptr, /* No boundary connection counts */ + nullptr, /* No boundary connection elements */ + nullptr /* No boundary connection zones */ ) ) { diff --git a/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C b/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C index 2b186d88bad3ed8bf8be72c3ed36ca491054ac61..47b45d11e723de6473eafa50209b1156aec93591 100644 --- a/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C +++ b/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,14 +206,14 @@ int main(int argc, char *argv[]) sFields[i]->correctBoundaryConditions(); sFields[i]->write(); delete sFields[i]; - sFields[i] = NULL; + sFields[i] = nullptr; } else if (vFields[i]) { vFields[i]->correctBoundaryConditions(); vFields[i]->write(); delete vFields[i]; - vFields[i] = NULL; + vFields[i] = nullptr; } } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx index 27c3f63fe5516c5ae2a579f91d0417563b6c6786..163b63785420640695260f8a287ab4808a3dc285 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,10 +58,10 @@ vtkPV3FoamReader::vtkPV3FoamReader() SetNumberOfInputPorts(0); - FileName = NULL; - foamData_ = NULL; + FileName = nullptr; + foamData_ = nullptr; - output0_ = NULL; + output0_ = nullptr; #ifdef VTKPV3FOAM_DUALPORT // Add second output for the Lagrangian @@ -217,7 +217,7 @@ int vtkPV3FoamReader::RequestInformation // delete foamData and flag it as fatal error delete foamData_; - foamData_ = NULL; + foamData_ = nullptr; return 0; } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index 4c212e0aa767f50a385a624b289f716f80110019..2e51511133333ff826dedc4a6c8dd8ab3058f785 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -86,7 +86,7 @@ void Foam::vtkPV3Foam::reduceMemory() if (!reader_->GetCacheMesh()) { delete meshPtr_; - meshPtr_ = NULL; + meshPtr_ = nullptr; } } @@ -226,8 +226,8 @@ Foam::vtkPV3Foam::vtkPV3Foam ) : reader_(reader), - dbPtr_(NULL), - meshPtr_(NULL), + dbPtr_(nullptr), + meshPtr_(nullptr), meshRegion_(polyMesh::defaultRegion), meshDir_(polyMesh::meshSubDir), timeIndex_(-1), @@ -347,7 +347,7 @@ void Foam::vtkPV3Foam::updateInfo() if (debug) { Info<< "<beg> Foam::vtkPV3Foam::updateInfo" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex=" + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] timeIndex=" << timeIndex_ << endl; } @@ -426,7 +426,7 @@ void Foam::vtkPV3Foam::updateFoamMesh() if (!reader_->GetCacheMesh()) { delete meshPtr_; - meshPtr_ = NULL; + meshPtr_ = nullptr; } // Check to see if the OpenFOAM mesh has been created @@ -551,7 +551,7 @@ void Foam::vtkPV3Foam::CleanUp() double* Foam::vtkPV3Foam::findTimes(int& nTimeSteps) { int nTimes = 0; - double* tsteps = NULL; + double* tsteps = nullptr; if (dbPtr_.valid()) { diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C index bbb7072b22f24690bfe262350b22852c791b2cf0..5ffcffbeb10e197f01d9ff02557fa06e7f4b6ac7 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -190,7 +190,7 @@ void Foam::vtkPV3Foam::convertMeshPatches << patchName << endl; } - vtkPolyData* vtkmesh = NULL; + vtkPolyData* vtkmesh = nullptr; if (patchIds.size() == 1) { vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C index d90a5162ded8fce2b99a72f8cfd48407bfaf00f7..9b112a21bbb319a7683cba64d3a5a79755fd7c93 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh const word& cloudName ) { - vtkPolyData* vtkmesh = NULL; + vtkPolyData* vtkmesh = nullptr; if (debug) { diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C index 52401be615ef3d7c6db0d6c3e2cfa8627532f0f4..1386bc84853213b8fcf852f9c9a8555e81713868 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C @@ -228,7 +228,7 @@ void Foam::vtkPV3Foam::updateInfoPatches if (debug) { Info<< "<beg> Foam::vtkPV3Foam::updateInfoPatches" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } @@ -476,7 +476,7 @@ void Foam::vtkPV3Foam::updateInfoZones if (debug) { Info<< "<beg> Foam::vtkPV3Foam::updateInfoZones" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } wordList namesLst; diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H index 02cf345d4acb774f5b4f47582d711dc02b21b935..dd2c98c7240437b6bd166774d24f182c04b3fd5d 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H @@ -41,7 +41,7 @@ void Foam::vtkPV3Foam::updateInfoFields { Info<< "<beg> Foam::vtkPV3Foam::updateInfoFields <" << meshType::Mesh::typeName - << "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" + << "> [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx index 9384b8a3ff9ca7950dca4a581e1ea1992b39b8bf..707e055c636dfd11de476381c858a914bbf18ce8 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,8 +56,8 @@ vtkPV3blockMeshReader::vtkPV3blockMeshReader() SetNumberOfInputPorts(0); - FileName = NULL; - foamData_ = NULL; + FileName = nullptr; + foamData_ = nullptr; ShowPointNumbers = 1; UpdateGUI = 0; @@ -165,7 +165,7 @@ int vtkPV3blockMeshReader::RequestInformation // // // delete foamData and flag it as fatal error // delete foamData_; -// foamData_ = NULL; +// foamData_ = nullptr; // return 0; // } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C index 2401acc1cde5bc3ce0b8680dda43833a62336263..f79068826b5a48c1d5f66d4e0938abca5a5738e1 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C @@ -66,7 +66,7 @@ void Foam::vtkPV3blockMesh::updateInfoBlocks if (debug) { Info<< "<beg> Foam::vtkPV3blockMesh::updateInfoBlocks" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } arrayRangeBlocks_.reset( arraySelection->GetNumberOfArrays() ); @@ -109,7 +109,7 @@ void Foam::vtkPV3blockMesh::updateInfoEdges if (debug) { Info<< "<beg> Foam::vtkPV3blockMesh::updateInfoEdges" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } arrayRangeEdges_.reset( arraySelection->GetNumberOfArrays() ); @@ -150,8 +150,8 @@ Foam::vtkPV3blockMesh::vtkPV3blockMesh ) : reader_(reader), - dbPtr_(NULL), - meshPtr_(NULL), + dbPtr_(nullptr), + meshPtr_(nullptr), meshRegion_(polyMesh::defaultRegion), meshDir_(polyMesh::meshSubDir), arrayRangeBlocks_("block"), @@ -269,7 +269,7 @@ void Foam::vtkPV3blockMesh::updateInfo() if (debug) { Info<< "<beg> Foam::vtkPV3blockMesh::updateInfo" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] " << endl; } resetCounters(); diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx index 03984210658f9a620b6c08701e92e57756521549..6b539c5a680b47190e6b5150f7cd5a3dbccf205e 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx @@ -58,10 +58,10 @@ vtkPVFoamReader::vtkPVFoamReader() SetNumberOfInputPorts(0); - FileName = NULL; - foamData_ = NULL; + FileName = nullptr; + foamData_ = nullptr; - output0_ = NULL; + output0_ = nullptr; #ifdef VTKPVFOAM_DUALPORT // Add second output for the Lagrangian @@ -217,7 +217,7 @@ int vtkPVFoamReader::RequestInformation // delete foamData and flag it as fatal error delete foamData_; - foamData_ = NULL; + foamData_ = nullptr; return 0; } diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C index a23095e67e2bdbfdab0960fb434beb3a56136460..ccf64179249342c710a0d34e1c8d40e44a33a9ce 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C @@ -86,7 +86,7 @@ void Foam::vtkPVFoam::reduceMemory() if (!reader_->GetCacheMesh()) { delete meshPtr_; - meshPtr_ = NULL; + meshPtr_ = nullptr; } } @@ -226,8 +226,8 @@ Foam::vtkPVFoam::vtkPVFoam ) : reader_(reader), - dbPtr_(NULL), - meshPtr_(NULL), + dbPtr_(nullptr), + meshPtr_(nullptr), meshRegion_(polyMesh::defaultRegion), meshDir_(polyMesh::meshSubDir), timeIndex_(-1), @@ -347,7 +347,7 @@ void Foam::vtkPVFoam::updateInfo() if (debug) { Info<< "<beg> Foam::vtkPVFoam::updateInfo" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex=" + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] timeIndex=" << timeIndex_ << endl; } @@ -426,7 +426,7 @@ void Foam::vtkPVFoam::updateFoamMesh() if (!reader_->GetCacheMesh()) { delete meshPtr_; - meshPtr_ = NULL; + meshPtr_ = nullptr; } // Check to see if the OpenFOAM mesh has been created @@ -551,7 +551,7 @@ void Foam::vtkPVFoam::CleanUp() double* Foam::vtkPVFoam::findTimes(int& nTimeSteps) { int nTimes = 0; - double* tsteps = NULL; + double* tsteps = nullptr; if (dbPtr_.valid()) { diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C index 8d1c9a7949fb3fce766f937c751c3b839731ada9..d4aef5aa672f7049ee8dfea7fed53b8e296f0185 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C @@ -188,7 +188,7 @@ void Foam::vtkPVFoam::convertMeshPatches << patchName << endl; } - vtkPolyData* vtkmesh = NULL; + vtkPolyData* vtkmesh = nullptr; if (patchIds.size() == 1) { vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]); diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C index 6ec01765309983aa489711970f301699e0b6b387..fafbd0a28c5eac25a9e21e2473013a16fc0da92c 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C @@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPVFoam::lagrangianVTKMesh const word& cloudName ) { - vtkPolyData* vtkmesh = NULL; + vtkPolyData* vtkmesh = nullptr; if (debug) { diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C index 9bf34f6bc31fa55c9001b97f5158b58d13e8ae88..5ff623b347b94a45d94e2f9e4073ab1fb01c8e5c 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C @@ -228,7 +228,7 @@ void Foam::vtkPVFoam::updateInfoPatches if (debug) { Info<< "<beg> Foam::vtkPVFoam::updateInfoPatches" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } @@ -476,7 +476,7 @@ void Foam::vtkPVFoam::updateInfoZones if (debug) { Info<< "<beg> Foam::vtkPVFoam::updateInfoZones" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } wordList namesLst; diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H index 3fe08f1b102dfba46a32a7cb8d10ffdb6199f57d..3a29ca5da1ab7e1f8ef55b7308b3da6328ff6758 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H @@ -41,7 +41,7 @@ void Foam::vtkPVFoam::updateInfoFields { Info<< "<beg> Foam::vtkPVFoam::updateInfoFields <" << meshType::Mesh::typeName - << "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" + << "> [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx index b6e3769c7623a8998522317eb7c9ce90791952ad..ce5b4a309afd6def23f532ff42b36be0391db6c9 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx @@ -56,8 +56,8 @@ vtkPVblockMeshReader::vtkPVblockMeshReader() SetNumberOfInputPorts(0); - FileName = NULL; - foamData_ = NULL; + FileName = nullptr; + foamData_ = nullptr; ShowPointNumbers = 1; UpdateGUI = 0; @@ -165,7 +165,7 @@ int vtkPVblockMeshReader::RequestInformation // // // delete foamData and flag it as fatal error // delete foamData_; -// foamData_ = NULL; +// foamData_ = nullptr; // return 0; // } diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C index 4b3608cece5a776485d0d20c39077ebaf3940ab0..b855990c68876046492eb293f15e08af23db6218 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C @@ -66,7 +66,7 @@ void Foam::vtkPVblockMesh::updateInfoBlocks if (debug) { Info<< "<beg> Foam::vtkPVblockMesh::updateInfoBlocks" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } arrayRangeBlocks_.reset( arraySelection->GetNumberOfArrays() ); @@ -109,7 +109,7 @@ void Foam::vtkPVblockMesh::updateInfoEdges if (debug) { Info<< "<beg> Foam::vtkPVblockMesh::updateInfoEdges" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl; } arrayRangeEdges_.reset( arraySelection->GetNumberOfArrays() ); @@ -150,8 +150,8 @@ Foam::vtkPVblockMesh::vtkPVblockMesh ) : reader_(reader), - dbPtr_(NULL), - meshPtr_(NULL), + dbPtr_(nullptr), + meshPtr_(nullptr), meshRegion_(polyMesh::defaultRegion), meshDir_(polyMesh::meshSubDir), arrayRangeBlocks_("block"), @@ -269,7 +269,7 @@ void Foam::vtkPVblockMesh::updateInfo() if (debug) { Info<< "<beg> Foam::vtkPVblockMesh::updateInfo" - << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl; + << " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] " << endl; } resetCounters(); diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C index 30cfd665904899c2bb3399681a7f26a7acf7e489..0a47125fd408ccdc51451c9d30e974a3e0cb2f21 100644 --- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C @@ -32,7 +32,7 @@ bool Foam::fieldOk(const IOobjectList& cloudObjs, const word& name) { IOobjectList objects(cloudObjs.lookupClass(IOField<Type>::typeName)); - return (objects.lookup(name) != NULL); + return (objects.lookup(name) != nullptr); } @@ -46,7 +46,7 @@ Foam::tmp<Foam::Field<Type>> Foam::readParticleField IOobjectList objects(cloudObjs.lookupClass(IOField<Type>::typeName)); const IOobject* obj = objects.lookup(name); - if (obj != NULL) + if (obj != nullptr) { IOField<Type> newField(*obj); return tmp<Field<Type>>(new Field<Type>(newField.xfer())); @@ -73,7 +73,7 @@ void Foam::readFields forAll(fieldNames, j) { const IOobject* obj = objects.lookup(fieldNames[j]); - if (obj != NULL) + if (obj != nullptr) { Info<< " reading field " << fieldNames[j] << endl; IOField<Type> newField(*obj); @@ -158,7 +158,7 @@ void Foam::processFields forAll(userFieldNames, i) { IOobject* obj = objects.lookup(userFieldNames[i]); - if (obj != NULL) + if (obj != nullptr) { fieldNames.append(obj->name()); } diff --git a/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H b/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H index a269ef7448bfdcd9a61b6b055fd7c58937e4e312..85ec143ca9aa8dbda8648034699178a6a3d99e68 100644 --- a/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H +++ b/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H @@ -34,7 +34,7 @@ const scalar xMin = p->minValue(); const scalar xMax = p->maxValue(); - autoPtr<OFstream> filePtr(NULL); + autoPtr<OFstream> filePtr(nullptr); if (writeData) { fileName fName = pdfPath/(p->type() + ".data"); diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C index f57a7d07b7cc54f1e476dd0412423829b265fc00..56331d718d7d99e2ed0183cccc88bbf62051c4d1 100644 --- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C +++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C @@ -49,7 +49,7 @@ void processField IOobjectList fieldObjbjects(objects.lookupClass(fieldType::typeName)); - if (fieldObjbjects.lookup(fieldName) != NULL) + if (fieldObjbjects.lookup(fieldName) != nullptr) { fieldType vtf(*fieldObjbjects.lookup(fieldName), mesh); const typename fieldType::Boundary& bf = diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C index a81446d8b88cbfaafe316945556041d57d485895..de17c452066251c87be32f4c196432c5fbe85eb7 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C @@ -133,7 +133,7 @@ void rewriteBoundary if (patchDict.found("neighbourPatch")) { - patches.set(patchi, oldPatches.set(patchi, NULL)); + patches.set(patchi, oldPatches.set(patchi, nullptr)); oldToNew[patchi] = newPatchi++; // Check if patches come from automatic conversion @@ -181,7 +181,7 @@ void rewriteBoundary const dictionary patchDict(patches[patchi].dict()); // Change entry on this side - patches.set(patchi, oldPatches.set(patchi, NULL)); + patches.set(patchi, oldPatches.set(patchi, nullptr)); oldToNew[patchi] = newPatchi++; dictionary& thisPatchDict = patches[patchi].dict(); thisPatchDict.add("neighbourPatch", nbrName); @@ -226,7 +226,7 @@ void rewriteBoundary } else { - patches.set(patchi, oldPatches.set(patchi, NULL)); + patches.set(patchi, oldPatches.set(patchi, nullptr)); oldToNew[patchi] = newPatchi++; } } diff --git a/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h b/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h index 225496ef2fca1b4ab8b603a34ed42a71db74bb27..b7394b1cc3142f48ab68b9dd8a8c20525d01bd51 100644 --- a/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h +++ b/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h @@ -34,7 +34,7 @@ template<class Type> List<Type>::List(int s){ num=0; array_size = 0; - element = NULL; + element = nullptr; if(s) { allocate(s); } diff --git a/applications/utilities/surface/surfaceCoarsen/bunnylod/progmesh.C b/applications/utilities/surface/surfaceCoarsen/bunnylod/progmesh.C index 64005c1648b9f8f3588c41a88fb657b718612f1d..4925650491e2882e3557d40225111f03f464c772 100644 --- a/applications/utilities/surface/surfaceCoarsen/bunnylod/progmesh.C +++ b/applications/utilities/surface/surfaceCoarsen/bunnylod/progmesh.C @@ -198,12 +198,12 @@ void ComputeEdgeCostAtVertex(Vertex *v) { // cost (in member variable objdist). if(v->neighbor.num==0) { // v doesn't have neighbors so it costs nothing to collapse - v->collapse=NULL; + v->collapse=nullptr; v->objdist=-0.01f; return; } v->objdist = 1000000; - v->collapse=NULL; + v->collapse=nullptr; // search all neighboring edges for "least cost" edge for(int i=0;i<v->neighbor.num;i++) { float dist; diff --git a/applications/utilities/surface/surfaceCoarsen/bunnylod/winmain.C b/applications/utilities/surface/surfaceCoarsen/bunnylod/winmain.C index 721460cbf685f5cb01bef9e1326a4841bcf21b42..fd19db0a0453c9d3ced9c7d2e96d10a7fc2d658b 100644 --- a/applications/utilities/surface/surfaceCoarsen/bunnylod/winmain.C +++ b/applications/utilities/surface/surfaceCoarsen/bunnylod/winmain.C @@ -271,35 +271,35 @@ HWND CreateOpenGLWindow(char* title) /* only register the window class once - use hInstance as a flag. */ if (!hInstance) { - hInstance = GetModuleHandle(NULL); + hInstance = GetModuleHandle(nullptr); wc.style = CS_OWNDC; wc.lpfnWndProc = (WNDPROC)WindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; + wc.hIcon = LoadIcon(nullptr, IDI_WINLOGO); + wc.hCursor = LoadCursor(nullptr, IDC_ARROW); + wc.hbrBackground = nullptr; + wc.lpszMenuName = nullptr; wc.lpszClassName = "OpenGL"; if (!RegisterClass(&wc)) { - MessageBox(NULL, "RegisterClass() failed: " + MessageBox(nullptr, "RegisterClass() failed: " "Cannot register window class.", "Error", MB_OK); - return NULL; + return nullptr; } } hWnd = CreateWindow("OpenGL", title, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, - 0,0,Width,Height, NULL, NULL, hInstance, NULL); + 0,0,Width,Height, nullptr, nullptr, hInstance, nullptr); - if (hWnd == NULL) { - MessageBox(NULL, + if (hWnd == nullptr) { + MessageBox(nullptr, "CreateWindow() failed: Cannot create a window.", "Error", MB_OK); - return NULL; + return nullptr; } hDC = GetDC(hWnd); @@ -318,14 +318,14 @@ HWND CreateOpenGLWindow(char* title) pf = ChoosePixelFormat(hDC, &pfd); if (pf == 0) { - MessageBox(NULL, "ChoosePixelFormat() failed: " + MessageBox(nullptr, "ChoosePixelFormat() failed: " "Cannot find a suitable pixel format.", "Error", MB_OK); return 0; } if (SetPixelFormat(hDC, pf, &pfd) == FALSE) { - MessageBox(NULL, "SetPixelFormat() failed: " + MessageBox(nullptr, "SetPixelFormat() failed: " "Cannot set format specified.", "Error", MB_OK); return 0; } @@ -414,7 +414,7 @@ int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst, CalcFPSDeltaT(); hWnd = CreateOpenGLWindow("bunnylod by Stan Melax"); - if (hWnd == NULL) exit(1); + if (hWnd == nullptr) exit(1); hDC = GetDC(hWnd); hRC = wglCreateContext(hDC); @@ -444,7 +444,7 @@ int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst, } quit: - wglMakeCurrent(NULL, NULL); + wglMakeCurrent(nullptr, nullptr); ReleaseDC(hDC, hWnd); wglDeleteContext(hRC); DestroyWindow(hWnd); diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index aa76bd2778455cb865abc1c6a4c279b6b0832eeb..da4bf887c9ba66b2d9916a48f946f4bb795be43c 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -95,7 +95,7 @@ pid_t Foam::pgid() bool Foam::env(const word& envName) { - return ::getenv(envName.c_str()) != NULL; + return ::getenv(envName.c_str()) != nullptr; } @@ -171,7 +171,7 @@ Foam::string Foam::userName() { struct passwd* pw = ::getpwuid(::getuid()); - if (pw != NULL) + if (pw != nullptr) { return pw->pw_name; } @@ -192,7 +192,7 @@ Foam::fileName Foam::home() { char* env = ::getenv("HOME"); - if (env != NULL) + if (env != nullptr) { return fileName(env); } @@ -200,7 +200,7 @@ Foam::fileName Foam::home() { struct passwd* pw = ::getpwuid(getuid()); - if (pw != NULL) + if (pw != nullptr) { return pw->pw_dir; } @@ -224,7 +224,7 @@ Foam::fileName Foam::home(const string& userName) { char* env = ::getenv("HOME"); - if (env != NULL) + if (env != nullptr) { return fileName(env); } @@ -232,7 +232,7 @@ Foam::fileName Foam::home(const string& userName) pw = ::getpwuid(::getuid()); } - if (pw != NULL) + if (pw != nullptr) { return pw->pw_dir; } @@ -551,7 +551,7 @@ Foam::fileNameList Foam::readDir label nEntries = 0; // Attempt to open directory and set the structure pointer - if ((source = ::opendir(directory.c_str())) == NULL) + if ((source = ::opendir(directory.c_str())) == nullptr) { dirEntries.setSize(0); @@ -564,7 +564,7 @@ Foam::fileNameList Foam::readDir else { // Read and parse all the entries in the directory - while ((list = ::readdir(source)) != NULL) + while ((list = ::readdir(source)) != nullptr) { fileName fName(list->d_name); @@ -849,7 +849,7 @@ bool Foam::rmDir(const fileName& directory) struct dirent *list; // Attempt to open directory and set the structure pointer - if ((source = ::opendir(directory.c_str())) == NULL) + if ((source = ::opendir(directory.c_str())) == nullptr) { WarningInFunction << "cannot open directory " << directory << endl; @@ -859,7 +859,7 @@ bool Foam::rmDir(const fileName& directory) else { // Read and parse all the entries in the directory - while ((list = ::readdir(source)) != NULL) + while ((list = ::readdir(source)) != nullptr) { fileName fName(list->d_name); @@ -945,7 +945,7 @@ bool Foam::ping struct sockaddr_in destAddr; // will hold the destination addr u_int addr; - if ((hostPtr = ::gethostbyname(destName.c_str())) == NULL) + if ((hostPtr = ::gethostbyname(destName.c_str())) == nullptr) { FatalErrorInFunction << "gethostbyname error " << h_errno << " for host " << destName diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C index 045ed5be4978d1fb7146c5219ea1965d95ad2c3e..d3f010f0939ea645402d4248b6b3f51ba520d282 100644 --- a/src/OSspecific/POSIX/fileMonitor.C +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -313,8 +313,8 @@ void Foam::fileMonitor::checkFiles() const ( watcher_->inotifyFd_+1, // num filedescriptors in fdSet &fdSet, // fdSet with only inotifyFd - NULL, // No writefds - NULL, // No errorfds + nullptr, // No writefds + nullptr, // No errorfds &zeroTimeout // eNo timeout ); diff --git a/src/OSspecific/POSIX/printStack.C b/src/OSspecific/POSIX/printStack.C index b3561ef5f51d337aab5203df422e9e95e6daa306..660f82daebcdb19b70696f8eaef25faa9eb1d3e3 100644 --- a/src/OSspecific/POSIX/printStack.C +++ b/src/OSspecific/POSIX/printStack.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ string pOpen(const string &cmd, label line=0) if (cmdPipe) { - char *buf = NULL; + char *buf = nullptr; // Read line number of lines for (label cnt = 0; cnt <= line; cnt++) @@ -69,7 +69,7 @@ string pOpen(const string &cmd, label line=0) } } - if (buf != NULL) + if (buf != nullptr) { free(buf); } @@ -163,7 +163,7 @@ word demangleSymbol(const char* sn) char* cxx_sname = abi::__cxa_demangle ( sn, - NULL, + nullptr, 0, &st ); @@ -227,13 +227,13 @@ void Foam::error::printStack(Ostream& os) int st = dladdr(callstack[i], info); os << '#' << label(i) << " "; - if (st != 0 && info->dli_fname != NULL && info->dli_fname[0] != '\0') + if (st != 0 && info->dli_fname != nullptr && info->dli_fname[0] != '\0') { fname = absolutePath(info->dli_fname); os << ( - (info->dli_sname != NULL) + (info->dli_sname != nullptr) ? demangleSymbol(info->dli_sname) : "?" ); diff --git a/src/OSspecific/POSIX/regExp.C b/src/OSspecific/POSIX/regExp.C index a7177dc048ad26bff45db8d529de19212b1542aa..f2b6c7ecf6a8af6e53605b32a0f3226b5a661f94 100644 --- a/src/OSspecific/POSIX/regExp.C +++ b/src/OSspecific/POSIX/regExp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,7 +117,7 @@ void Foam::regExp::set(const char* pattern, const bool ignoreCase) const { clear(); - // Avoid NULL pointer and zero-length patterns + // Avoid nullptr pointer and zero-length patterns if (pattern && *pattern) { int cflags = REG_EXTENDED; diff --git a/src/OSspecific/POSIX/signals/sigFpe.C b/src/OSspecific/POSIX/signals/sigFpe.C index 0e3ab8acd637149fcd775c36b8d87ab97f844da1..848510361df98bbf3069502f897c13b057378069 100644 --- a/src/OSspecific/POSIX/signals/sigFpe.C +++ b/src/OSspecific/POSIX/signals/sigFpe.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,7 +90,7 @@ void* Foam::sigFpe::mallocNan(size_t size) void Foam::sigFpe::sigHandler(int) { // Reset old handling - if (sigaction(SIGFPE, &oldAction_, NULL) < 0) + if (sigaction(SIGFPE, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGFPE trapping" @@ -112,7 +112,7 @@ void Foam::sigFpe::sigHandler(int) Foam::sigFpe::sigFpe() { - oldAction_.sa_handler = NULL; + oldAction_.sa_handler = nullptr; } @@ -124,7 +124,11 @@ Foam::sigFpe::~sigFpe() { #ifdef LINUX_GNUC // Reset signal - if (oldAction_.sa_handler && sigaction(SIGFPE, &oldAction_, NULL) < 0) + if + ( + oldAction_.sa_handler + && sigaction(SIGFPE, &oldAction_, nullptr) < 0 + ) { FatalErrorInFunction << "Cannot reset SIGFPE trapping" @@ -199,7 +203,7 @@ void Foam::sigFpe::set(const bool verbose) | _EN_OVERFL, 0, _ABORT_ON_ERROR, - NULL + nullptr ); #endif diff --git a/src/OSspecific/POSIX/signals/sigInt.C b/src/OSspecific/POSIX/signals/sigInt.C index fee8d60887d3b4fe059b8f24b72165bb7fb375da..4feb986a103152c515afd6038900f25b9c5a6f4c 100644 --- a/src/OSspecific/POSIX/signals/sigInt.C +++ b/src/OSspecific/POSIX/signals/sigInt.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ struct sigaction Foam::sigInt::oldAction_; void Foam::sigInt::sigHandler(int) { // Reset old handling - if (sigaction(SIGINT, &oldAction_, NULL) < 0) + if (sigaction(SIGINT, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGINT trapping" @@ -57,7 +57,7 @@ void Foam::sigInt::sigHandler(int) Foam::sigInt::sigInt() { - oldAction_.sa_handler = NULL; + oldAction_.sa_handler = nullptr; } @@ -66,7 +66,7 @@ Foam::sigInt::sigInt() Foam::sigInt::~sigInt() { // Reset old handling - if (sigaction(SIGINT, &oldAction_, NULL) < 0) + if (sigaction(SIGINT, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGINT trapping" diff --git a/src/OSspecific/POSIX/signals/sigQuit.C b/src/OSspecific/POSIX/signals/sigQuit.C index f6ba64a82774434ea3b9b8a6c46d17e2265ebdca..c079639dbd8181dec993cff7779e3661f731dc2c 100644 --- a/src/OSspecific/POSIX/signals/sigQuit.C +++ b/src/OSspecific/POSIX/signals/sigQuit.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ struct sigaction Foam::sigQuit::oldAction_; void Foam::sigQuit::sigHandler(int) { // Reset old handling - if (sigaction(SIGQUIT, &oldAction_, NULL) < 0) + if (sigaction(SIGQUIT, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGQUIT trapping" @@ -59,7 +59,7 @@ void Foam::sigQuit::sigHandler(int) Foam::sigQuit::sigQuit() { - oldAction_.sa_handler = NULL; + oldAction_.sa_handler = nullptr; } @@ -68,7 +68,7 @@ Foam::sigQuit::sigQuit() Foam::sigQuit::~sigQuit() { // Reset old handling - if (oldAction_.sa_handler && sigaction(SIGQUIT, &oldAction_, NULL) < 0) + if (oldAction_.sa_handler && sigaction(SIGQUIT, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGQUIT trapping" diff --git a/src/OSspecific/POSIX/signals/sigSegv.C b/src/OSspecific/POSIX/signals/sigSegv.C index 3c0fc0fef5d6fc16d12d72ef384ceb74c97e737f..513af5de27963930b96d0926fd4c9c08efa4351b 100644 --- a/src/OSspecific/POSIX/signals/sigSegv.C +++ b/src/OSspecific/POSIX/signals/sigSegv.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ struct sigaction Foam::sigSegv::oldAction_; void Foam::sigSegv::sigHandler(int) { // Reset old handling - if (sigaction(SIGSEGV, &oldAction_, NULL) < 0) + if (sigaction(SIGSEGV, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGSEGV trapping" @@ -59,7 +59,7 @@ void Foam::sigSegv::sigHandler(int) Foam::sigSegv::sigSegv() { - oldAction_.sa_handler = NULL; + oldAction_.sa_handler = nullptr; } @@ -68,7 +68,7 @@ Foam::sigSegv::sigSegv() Foam::sigSegv::~sigSegv() { // Reset old handling - if (sigaction(SIGSEGV, &oldAction_, NULL) < 0) + if (sigaction(SIGSEGV, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset SIGSEGV trapping" diff --git a/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C b/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C index a601a24052bb3907de72115a97f49c28a8cb86ef..97749284aba2ad7fc1efd4ed38bbadba58f81a34 100644 --- a/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C +++ b/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C @@ -67,7 +67,7 @@ addstopAtWriteNowSignalToOpt addstopAtWriteNowSignalToOpt_ } -static Foam::Time const* runTimePtr_ = NULL; +static Foam::Time const* runTimePtr_ = nullptr; struct sigaction Foam::sigStopAtWriteNow::oldAction_; @@ -78,7 +78,7 @@ struct sigaction Foam::sigStopAtWriteNow::oldAction_; void Foam::sigStopAtWriteNow::sigHandler(int) { // Reset old handling - if (sigaction(signal_, &oldAction_, NULL) < 0) + if (sigaction(signal_, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset " << signal_ << " trapping" @@ -123,7 +123,7 @@ Foam::sigStopAtWriteNow::~sigStopAtWriteNow() // Reset old handling if (signal_ > 0) { - if (sigaction(signal_, &oldAction_, NULL) < 0) + if (sigaction(signal_, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset " << signal_ << " trapping" diff --git a/src/OSspecific/POSIX/signals/sigWriteNow.C b/src/OSspecific/POSIX/signals/sigWriteNow.C index 2439b3feeddcc060233d20cf2e685b577f3a270f..9af0e28406d2f2889dfd161d87ee01d9804a1f6f 100644 --- a/src/OSspecific/POSIX/signals/sigWriteNow.C +++ b/src/OSspecific/POSIX/signals/sigWriteNow.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ addwriteNowSignalToOpt addwriteNowSignalToOpt_("writeNowSignal"); } -static Foam::Time* runTimePtr_ = NULL; +static Foam::Time* runTimePtr_ = nullptr; struct sigaction Foam::sigWriteNow::oldAction_; @@ -106,7 +106,7 @@ Foam::sigWriteNow::~sigWriteNow() // Reset old handling if (signal_ > 0) { - if (sigaction(signal_, &oldAction_, NULL) < 0) + if (sigaction(signal_, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "Cannot reset " << signal_ << " trapping" diff --git a/src/OSspecific/POSIX/timer.C b/src/OSspecific/POSIX/timer.C index d9c1bac05e6829e16b648b38198fe676c2fff3f5..864566dc2998655587302ad066db78f3e327f0c8 100644 --- a/src/OSspecific/POSIX/timer.C +++ b/src/OSspecific/POSIX/timer.C @@ -118,7 +118,7 @@ Foam::timer::~timer() oldTimeOut_ = 0; // Restore signal handler - if (sigaction(SIGALRM, &oldAction_, NULL) < 0) + if (sigaction(SIGALRM, &oldAction_, nullptr) < 0) { FatalErrorInFunction << "sigaction(SIGALRM) error" diff --git a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C index 2d6149dd0b5d12d4d186f0b90af3ade8af519758..d54b7fb3900499d2b47a6a6d48cce1038ec1a8cb 100644 --- a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C +++ b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C @@ -109,7 +109,7 @@ const T* Foam::DictionaryBase<IDLListType, T>::lookupPtr } else { - return NULL; + return nullptr; } } @@ -125,7 +125,7 @@ T* Foam::DictionaryBase<IDLListType, T>::lookupPtr(const word& keyword) } else { - return NULL; + return nullptr; } } @@ -220,7 +220,7 @@ T* Foam::DictionaryBase<IDLListType, T>::remove(const word& keyword) } else { - return NULL; + return nullptr; } } diff --git a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H index 8ba13836efaf865770684e1b056a459378f09928..f4d864d82c746d51807a8ed2f82e7027f8940890 100644 --- a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H +++ b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H @@ -113,10 +113,10 @@ public: //- Search DictionaryBase for given keyword bool found(const word&) const; - //- Find and return an entry if present, otherwise return NULL + //- Find and return an entry if present, otherwise return nullptr const T* lookupPtr(const word&) const; - //- Find and return an entry if present, otherwise return NULL + //- Find and return an entry if present, otherwise return nullptr T* lookupPtr(const word&); //- Find and return entry @@ -141,7 +141,7 @@ public: void append(const word&, T*); //- Remove and return entry specified by keyword. - // Return NULL if the keyword was not found. + // Return nullptr if the keyword was not found. T* remove(const word&); //- Clear the dictionary diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C index 9755dc56c1cf0cb6b94c6df419b5a23302fb8197..f665e7ca71bca11954ec3eaeaf8bc9026bd3ebb4 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C @@ -37,7 +37,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(const label size) HashTableCore(), nElmts_(0), tableSize_(HashTableCore::canonicalSize(size)), - table_(NULL) + table_(nullptr) { if (tableSize_) { @@ -57,7 +57,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht) HashTableCore(), nElmts_(0), tableSize_(ht.tableSize_), - table_(NULL) + table_(nullptr) { if (tableSize_) { @@ -84,7 +84,7 @@ Foam::HashTable<T, Key, Hash>::HashTable HashTableCore(), nElmts_(0), tableSize_(0), - table_(NULL) + table_(nullptr) { transfer(ht()); } @@ -304,7 +304,7 @@ bool Foam::HashTable<T, Key, Hash>::set template<class T, class Key, class Hash> bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase() { - // Note: entryPtr_ is NULL for end(), so this catches that too + // Note: entryPtr_ is nullptr for end(), so this catches that too if (entryPtr_) { // Search element before entryPtr_ @@ -337,7 +337,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase() hashTable_->table_[hashIndex_] = entryPtr_->next_; delete entryPtr_; - // Assign any non-NULL pointer value so it doesn't look + // Assign any non-nullptr pointer value so it doesn't look // like end()/cend() entryPtr_ = reinterpret_cast<hashedEntry*>(this); @@ -519,7 +519,7 @@ void Foam::HashTable<T, Key, Hash>::transfer(HashTable<T, Key, Hash>& ht) ht.tableSize_ = 0; table_ = ht.table_; - ht.table_ = NULL; + ht.table_ = nullptr; nElmts_ = ht.nElmts_; ht.nElmts_ = 0; diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H index 83c8a394c46a70ba2dac26615ab973ffd0e1fa94..230349758521ab4bc94a7031a0e7f720678b9be3 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H @@ -181,7 +181,7 @@ inline Foam::HashTable<T, Key, Hash>::iteratorBase::iteratorBase { if (hashTable_->nElmts_) { - // find first non-NULL table entry + // find first non-nullptr table entry while ( !(entryPtr_ = hashTable_->table_[hashIndex_]) @@ -235,7 +235,7 @@ Foam::HashTable<T, Key, Hash>::iteratorBase::increment() } // else // { - // // if we reach here (entryPtr_ is NULL) it is already at the end() + // // if we reach here (entryPtr_ is nullptr) it is already at the end() // // we should probably stop // } diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C index f56429ce5e20378a669618fd779b8adfe17b1dba..280fc8a623bc9f57d3ca8d46f4152f766d931295 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(Istream& is, const label size) HashTableCore(), nElmts_(0), tableSize_(HashTableCore::canonicalSize(size)), - table_(NULL) + table_(nullptr) { if (tableSize_) { diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index 0e7fc75aa801de0748f307ded66b61701b1aeb00..3208c250a964832ba77fbd535328533c98bc7f6b 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -197,7 +197,7 @@ public: // Private Member Functions - //- Construct for a given SLListBase with NULL element and link. + //- Construct for a given SLListBase with nullptr element and link. // Only used to create endIter inline iterator(DLListBase&); diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H index c13482d30a29532b3ad04e9c1e6297d16e4ae9b8..91c0bc9ddbd2c713c8a54b651b64740c0ff3095a 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -190,7 +190,7 @@ inline Foam::DLListBase::iterator::iterator(DLListBase& s, link* elmt) inline Foam::DLListBase::iterator::iterator(DLListBase& s) : curList_(s), - curElmt_(NULL), + curElmt_(nullptr), curLink_() {} diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H index 57717c797d09005352bfaff3fd622fed173d93a2..add64244557da03a460dcc4e2614a6151ea11809 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,7 +179,7 @@ public: // Private Member Functions - //- Construct for a given SLListBase with NULL element and link. + //- Construct for a given SLListBase with nullptr element and link. // Only used to create endIter inline iterator(SLListBase&); diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBaseI.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBaseI.H index 21a2fa020cd2d4c721a068f1307ff2f051f756a0..fc9b9f007c05336e157a6b2b8388a85414b69a6d 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBaseI.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBaseI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -166,7 +166,7 @@ inline Foam::SLListBase::iterator::iterator(SLListBase& s, link* elmt) inline Foam::SLListBase::iterator::iterator(SLListBase& s) : curList_(s), - curElmt_(NULL), + curElmt_(nullptr), curLink_() {} diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index 8a5637845fcc8cdf9ad4189a7bcc39caa5aec1e6..c86017245b31dfe889fb484e93d4932bfdfaf75d 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -55,7 +55,7 @@ template<class T> template<class InputIterator> Foam::List<T>::List(InputIterator first, InputIterator last, const label s) : - UList<T>(NULL, s) + UList<T>(nullptr, s) { if (this->size_) { @@ -75,7 +75,7 @@ Foam::List<T>::List(InputIterator first, InputIterator last, const label s) template<class T> Foam::List<T>::List(const label s) : - UList<T>(NULL, s) + UList<T>(nullptr, s) { if (this->size_ < 0) { @@ -94,7 +94,7 @@ Foam::List<T>::List(const label s) template<class T> Foam::List<T>::List(const label s, const T& a) : - UList<T>(NULL, s) + UList<T>(nullptr, s) { if (this->size_ < 0) { @@ -118,7 +118,7 @@ Foam::List<T>::List(const label s, const T& a) template<class T> Foam::List<T>::List(const label s, const zero) : - UList<T>(NULL, s) + UList<T>(nullptr, s) { if (this->size_ < 0) { @@ -142,7 +142,7 @@ Foam::List<T>::List(const label s, const zero) template<class T> Foam::List<T>::List(const List<T>& a) : - UList<T>(NULL, a.size_) + UList<T>(nullptr, a.size_) { if (this->size_) { @@ -170,7 +170,7 @@ template<class T> template<class T2> Foam::List<T>::List(const List<T2>& a) : - UList<T>(NULL, a.size()) + UList<T>(nullptr, a.size()) { if (this->size_) { @@ -195,7 +195,7 @@ Foam::List<T>::List(const Xfer<List<T>>& lst) template<class T> Foam::List<T>::List(List<T>& a, bool reuse) : - UList<T>(NULL, a.size_) + UList<T>(nullptr, a.size_) { if (reuse) { @@ -228,7 +228,7 @@ Foam::List<T>::List(List<T>& a, bool reuse) template<class T> Foam::List<T>::List(const UList<T>& a, const labelUList& map) : - UList<T>(NULL, map.size()) + UList<T>(nullptr, map.size()) { if (this->size_) { @@ -256,7 +256,7 @@ template<class T> template<unsigned Size> Foam::List<T>::List(const FixedList<T, Size>& lst) : - UList<T>(NULL, Size) + UList<T>(nullptr, Size) { CopyList(lst); } @@ -265,7 +265,7 @@ Foam::List<T>::List(const FixedList<T, Size>& lst) template<class T> Foam::List<T>::List(const PtrList<T>& lst) : - UList<T>(NULL, lst.size()) + UList<T>(nullptr, lst.size()) { CopyList(lst); } @@ -281,7 +281,7 @@ Foam::List<T>::List(const SLList<T>& lst) template<class T> Foam::List<T>::List(const UIndirectList<T>& lst) : - UList<T>(NULL, lst.size()) + UList<T>(nullptr, lst.size()) { CopyList(lst); } @@ -290,7 +290,7 @@ Foam::List<T>::List(const UIndirectList<T>& lst) template<class T> Foam::List<T>::List(const BiIndirectList<T>& lst) : - UList<T>(NULL, lst.size()) + UList<T>(nullptr, lst.size()) { CopyList(lst); } diff --git a/src/OpenFOAM/containers/Lists/List/ListIO.C b/src/OpenFOAM/containers/Lists/List/ListIO.C index 1ac3ecc9193d81fe18b1fa1df8e2dffb1c28c191..d43fda22d7ea7e4fe2bd67823564801acdd78b3c 100644 --- a/src/OpenFOAM/containers/Lists/List/ListIO.C +++ b/src/OpenFOAM/containers/Lists/List/ListIO.C @@ -34,7 +34,7 @@ License template<class T> Foam::List<T>::List(Istream& is) : - UList<T>(NULL, 0) + UList<T>(nullptr, 0) { operator>>(is, *this); } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C index 52ce53cb40be68253b30e39046aa45d200f94a42..c0183f501e92164a54e165b6c5da8e0afbb46009 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C @@ -164,7 +164,7 @@ void Foam::PtrList<T>::setSize(const label newSize) label i; for (i=oldSize; i<newSize; i++) { - this->ptrs_[i] = NULL; + this->ptrs_[i] = nullptr; } } } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H index 623aca4f45c814ef7512b9b12f99d2ac214a89b6..9d7e7fd5cf6fd64b1e1d9288e8e542c7c1dd5586 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H @@ -123,7 +123,7 @@ public: // Edit //- Reset size of PtrList. If extending the PtrList, new entries are - // set to NULL. If truncating the PtrList, removed entries are + // set to nullptr. If truncating the PtrList, removed entries are // deleted void setSize(const label); @@ -149,7 +149,7 @@ public: //- Is element set inline bool set(const label) const; - //- Set element to given T* and return old element (can be NULL) + //- Set element to given T* and return old element (can be nullptr) inline autoPtr<T> set(const label, T*); //- Set element to given autoPtr<T> and return old element diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H index cfe7e2653414fb0fd1609dc825ced4013871831f..821c00de35b89db6ec33b96f596cb764530c7820 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H @@ -64,7 +64,7 @@ inline void Foam::PtrList<T>::append template<class T> inline bool Foam::PtrList<T>::set(const label i) const { - return this->ptrs_[i] != NULL; + return this->ptrs_[i] != nullptr; } diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C index c95d480825004de481b910292304a506d21702b1..47b7f9339f1f5f5d6bf1c24a7f59980f3a389998 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C @@ -74,10 +74,10 @@ void Foam::UPtrList<T>::setSize(const label newSize) { ptrs_.setSize(newSize); - // set new elements to NULL + // set new elements to nullptr for (label i=oldSize; i<newSize; i++) { - ptrs_[i] = NULL; + ptrs_[i] = nullptr; } } } diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H index 9c92a8f347b1d41ade49f5240897c95e37e492bc..4ed912500b6ce438cd9315f13646c7c5638a46c3 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H @@ -200,7 +200,7 @@ public: //- Is element set inline bool set(const label) const; - //- Set element. Return old element (can be NULL). + //- Set element. Return old element (can be nullptr). // No checks on new element inline T* set(const label, T*); diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H index 06002c2ae4701f9096e549d1cb2d192b6be71232..191ae39da7397d6085d737ccbddf8dae994cb95b 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H @@ -77,7 +77,7 @@ inline void Foam::UPtrList<T>::resize(const label newSize) template<class T> inline bool Foam::UPtrList<T>::set(const label i) const { - return ptrs_[i] != NULL; + return ptrs_[i] != nullptr; } diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index e3013bc02dbd6f8c219751eae2752a405780dde9..8c8f30ac0e29766b3d4abc723bf24da7be74bee7 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -387,12 +387,12 @@ Foam::Istream* Foam::IOobject::objectStream(const fileName& fName) else { delete isPtr; - return NULL; + return nullptr; } } else { - return NULL; + return nullptr; } } diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index 15235b947e8ed9f3207583734ea8c7a34c5a2d07..cef37bfd5271100e2e1976f18a32dbafaaa9df4c 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -160,11 +160,11 @@ protected: // Protected Member Functions //- Construct and return an IFstream for the object. - // The results is NULL if the stream construction failed + // The results is nullptr if the stream construction failed Istream* objectStream(); //- Construct and return an IFstream for the object given the - // exact file. The results is NULL if the stream construction failed + // exact file. The results is nullptr if the stream construction failed Istream* objectStream(const fileName&); //- Set the object state to bad diff --git a/src/OpenFOAM/db/IOobjectList/IOobjectList.C b/src/OpenFOAM/db/IOobjectList/IOobjectList.C index a3e1ece14d0e1ff9328c91a8d90aead7e848c1b3..08d52c17fe575f2adf1cf5f9dce98b54a85209ac 100644 --- a/src/OpenFOAM/db/IOobjectList/IOobjectList.C +++ b/src/OpenFOAM/db/IOobjectList/IOobjectList.C @@ -145,7 +145,7 @@ Foam::IOobject* Foam::IOobjectList::lookup(const word& name) const InfoInFunction << "Could not find " << name << endl; } - return NULL; + return nullptr; } } diff --git a/src/OpenFOAM/db/IOobjectList/IOobjectList.H b/src/OpenFOAM/db/IOobjectList/IOobjectList.H index e5a3c20cb3ca2404bc83e7e0cc61f604150ad0cd..5a0177d197d5c2e2bcb1ab15c08c9b6bbff9b0e6 100644 --- a/src/OpenFOAM/db/IOobjectList/IOobjectList.H +++ b/src/OpenFOAM/db/IOobjectList/IOobjectList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,7 +92,7 @@ public: //- Remove an IOobject from the list bool remove(IOobject&); - //- Lookup a given name and return IOobject ptr if found else NULL + //- Lookup a given name and return IOobject ptr if found else nullptr IOobject* lookup(const word& name) const; //- Return the list for all IOobects whose name matches name diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C index 57a90a196d0689e653eaebc2e679d5877604d8d6..b558fbd3219bfc72bab997843d93001db46f7ae0 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C @@ -39,7 +39,7 @@ namespace Foam Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname) : - ifPtr_(NULL), + ifPtr_(nullptr), compression_(IOstream::UNCOMPRESSED) { if (pathname.empty()) diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C index 1dd2c0531cdb762475e67ae1370fe2237c4124a5..6e4ca2d057938fd0d35ed441ded80251746c2214 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C @@ -43,7 +43,7 @@ Foam::OFstreamAllocator::OFstreamAllocator IOstream::compressionType compression ) : - ofPtr_(NULL) + ofPtr_(nullptr) { if (pathname.empty()) { diff --git a/src/OpenFOAM/db/IOstreams/token/token.H b/src/OpenFOAM/db/IOstreams/token/token.H index 7229e58b8628c6805b2a9ff8c188ed557a1e610d..4d97fb7f395fdf800a5f9e9fe40296e773d0b307 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.H +++ b/src/OpenFOAM/db/IOstreams/token/token.H @@ -94,7 +94,7 @@ public: //- Standard punctuation tokens enum punctuationToken { - NULL_TOKEN = '\0', + nullptr_TOKEN = '\0', SPACE = ' ', TAB = '\t', NL = '\n', diff --git a/src/OpenFOAM/db/IOstreams/token/tokenI.H b/src/OpenFOAM/db/IOstreams/token/tokenI.H index 2f0383c9b25fd686e5a5c176a93f850ddd6c59b1..0ffc613d3d0b10b5686f30de776e42244cd81d87 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenI.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenI.H @@ -206,7 +206,7 @@ inline Foam::token::punctuationToken Foam::token::pToken() const else { parseError("punctuation character"); - return NULL_TOKEN; + return nullptr_TOKEN; } } diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 9717d2095811ffa727b6a5e99f94b76c9f7e4430..6512ce1e2b79a8088eccaa1f7d16a7200b9b1f5c 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -372,7 +372,7 @@ const Foam::entry* Foam::dictionary::lookupEntryPtr } else { - return NULL; + return nullptr; } } @@ -416,7 +416,7 @@ Foam::entry* Foam::dictionary::lookupEntryPtr } else { - return NULL; + return nullptr; } } @@ -433,7 +433,7 @@ const Foam::entry& Foam::dictionary::lookupEntry { const entry* entryPtr = lookupEntryPtr(keyword, recursive, patternMatch); - if (entryPtr == NULL) + if (entryPtr == nullptr) { FatalIOErrorInFunction ( @@ -567,7 +567,7 @@ const Foam::entry* Foam::dictionary::lookupScopedEntryPtr } else { - return NULL; + return nullptr; } } } @@ -583,7 +583,7 @@ bool Foam::dictionary::substituteScopedKeyword(const word& keyword) const entry* ePtr = lookupScopedEntryPtr(varName, true, true); // If defined insert its entries into this dictionary - if (ePtr != NULL) + if (ePtr != nullptr) { const dictionary& addDict = ePtr->dict(); @@ -625,7 +625,7 @@ const Foam::dictionary* Foam::dictionary::subDictPtr(const word& keyword) const } else { - return NULL; + return nullptr; } } @@ -634,7 +634,7 @@ const Foam::dictionary& Foam::dictionary::subDict(const word& keyword) const { const entry* entryPtr = lookupEntryPtr(keyword, false, true); - if (entryPtr == NULL) + if (entryPtr == nullptr) { FatalIOErrorInFunction ( @@ -651,7 +651,7 @@ Foam::dictionary& Foam::dictionary::subDict(const word& keyword) { entry* entryPtr = lookupEntryPtr(keyword, false, true); - if (entryPtr == NULL) + if (entryPtr == nullptr) { FatalIOErrorInFunction ( @@ -672,7 +672,7 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict { const entry* entryPtr = lookupEntryPtr(keyword, false, true); - if (entryPtr == NULL) + if (entryPtr == nullptr) { if (mustRead) { diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 90ae1917fbfaea5e867e09b2aab959712f9a99ba..14ed0db635c796742c623aafa1e8d5ea8967ad1f 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -283,7 +283,7 @@ public: ) const; //- Find and return an entry data stream pointer if present - // otherwise return NULL. + // otherwise return nullptr. // If recursive, search parent dictionaries. // If patternMatch, use regular expressions const entry* lookupEntryPtr @@ -294,7 +294,7 @@ public: ) const; //- Find and return an entry data stream pointer for manipulation - // if present otherwise return NULL. + // if present otherwise return nullptr. // If recursive, search parent dictionaries. // If patternMatch, use regular expressions. entry* lookupEntryPtr @@ -364,7 +364,7 @@ public: ) const; //- Find and return an entry data stream pointer if present - // otherwise return NULL. Allows scoping using '.' + // otherwise return nullptr. Allows scoping using '.' const entry* lookupScopedEntryPtr ( const word&, @@ -376,7 +376,7 @@ public: bool isDict(const word&) const; //- Find and return a sub-dictionary pointer if present - // otherwise return NULL. + // otherwise return nullptr. const dictionary* subDictPtr(const word&) const; //- Find and return a sub-dictionary diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index f27d326d8c6fb1ce4089d31a1bbdb7525d3d3ea9..586cb8ef4655fd63bb0c1573f8f1ac1f30e4d41a 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -137,7 +137,7 @@ bool Foam::dictionary::substituteKeyword(const word& keyword) const entry* ePtr = lookupEntryPtr(varName, true, true); // if defined insert its entries into this dictionary - if (ePtr != NULL) + if (ePtr != nullptr) { const dictionary& addDict = ePtr->dict(); diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index 6e7d257688d455a481278e0d1a7924dbd116b5ec..48b539588be249c97711670afaeb89b79f544078 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -262,7 +262,7 @@ Foam::autoPtr<Foam::entry> Foam::entry::New(Istream& is) // Get the next keyword and if invalid return false if (!getKeyword(keyword, is)) { - return autoPtr<entry>(NULL); + return autoPtr<entry>(nullptr); } else // Keyword starts entry ... { diff --git a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C index f0e90284fb8ae2f478ef226a75841b972b7b3d22..cc119532fdee8731b5752adca050bbabc2adce65 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,7 +95,7 @@ Foam::functionEntries::codeStream::getFunction const fileName libPath = dynCode.libPath(); // see if library is loaded - void* lib = NULL; + void* lib = nullptr; if (isA<IOdictionary>(parentDict.topDict())) { lib = libs(parentDict).findLibrary(libPath); diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C index 83a4658108af4bcdfe660bb8950d7f89f7907be9..f99d39bc3ceefeefad58eb7531c177de0c9a9e2f 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C +++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C @@ -142,7 +142,7 @@ bool Foam::dlLibraryTable::close bool ok = dlClose(libPtrs_[index]); - libPtrs_[index] = NULL; + libPtrs_[index] = nullptr; libNames_[index] = fileName::null; if (!ok) @@ -179,7 +179,7 @@ void* Foam::dlLibraryTable::findLibrary(const fileName& functionLibName) { return libPtrs_[index]; } - return NULL; + return nullptr; } diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index cfe7e3a5444b88e86ebef21e5d958058d6e8e3b5..40a626c30fc07abce97c9e45948e7d96df06b571 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -180,7 +180,7 @@ public: autoPtr<functionObject> clone() const { NotImplemented; - return autoPtr<functionObject>(NULL); + return autoPtr<functionObject>(nullptr); } diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 105e2f6aea4cc6a0daa245c3aa357ab3c12c2580..7bd1882942b2909aa6111c05ca2eba27e034a963 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -606,7 +606,7 @@ bool Foam::functionObjectList::read() { // Delete the disabled functionObject delete objPtr; - objPtr = NULL; + objPtr = nullptr; continue; } } diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 83a3060d35dc6bcae0b6ad8026785ec00b7aa326..672ff38f9706b7faea942239ba9cecc3aecbd160 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -88,7 +88,7 @@ class functionObjectList //- Remove and return the function object pointer by name, // and returns the old index via the parameter. - // Returns a NULL pointer (and index -1) if it didn't exist + // Returns a nullptr pointer (and index -1) if it didn't exist functionObject* remove(const word&, label& oldIndex); //- Search the specified directory for functionObject diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index b2447447d14f6c4eae498f3b78f430059a0ab5ce..fbd5f64eeff43a58fd9183b86e7dbccce7e784e0 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -128,7 +128,7 @@ Foam::regIOobject::regIOobject(const IOobject& io, const bool isTime) ? 0 : db().getEvent() ), - isPtr_(NULL) + isPtr_(nullptr) { // Register with objectRegistry if requested if (registerObject()) @@ -145,7 +145,7 @@ Foam::regIOobject::regIOobject(const regIOobject& rio) ownedByRegistry_(false), watchIndex_(rio.watchIndex_), eventNo_(db().getEvent()), - isPtr_(NULL) + isPtr_(nullptr) { // Do not register copy with objectRegistry } @@ -158,7 +158,7 @@ Foam::regIOobject::regIOobject(const regIOobject& rio, bool registerCopy) ownedByRegistry_(false), watchIndex_(-1), eventNo_(db().getEvent()), - isPtr_(NULL) + isPtr_(nullptr) { if (registerCopy && rio.registered_) { @@ -180,7 +180,7 @@ Foam::regIOobject::regIOobject ownedByRegistry_(false), watchIndex_(-1), eventNo_(db().getEvent()), - isPtr_(NULL) + isPtr_(nullptr) { if (registerCopy) { @@ -200,7 +200,7 @@ Foam::regIOobject::regIOobject ownedByRegistry_(false), watchIndex_(-1), eventNo_(db().getEvent()), - isPtr_(NULL) + isPtr_(nullptr) { if (registerObject()) { @@ -224,7 +224,7 @@ Foam::regIOobject::~regIOobject() if (isPtr_) { delete isPtr_; - isPtr_ = NULL; + isPtr_ = nullptr; } // Check out of objectRegistry if not owned by the registry @@ -425,7 +425,7 @@ void Foam::regIOobject::operator=(const IOobject& io) if (isPtr_) { delete isPtr_; - isPtr_ = NULL; + isPtr_ = nullptr; } // Check out of objectRegistry diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index 0ea3228226b9040cff7a036fd9aebcff9cfbf76f..c699bb301f78e652582797cf96b2aa36e991c1d9 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -156,7 +156,7 @@ void Foam::regIOobject::close() if (isPtr_) { delete isPtr_; - isPtr_ = NULL; + isPtr_ = nullptr; } } diff --git a/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H index 6386c460fb86a195f01ea64451b0cdbf54f097c6..ac8d362eeb0b6b8032ac23f71639b36f0a0d3f19 100644 --- a/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H +++ b/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H @@ -253,7 +253,7 @@ Description if (baseType::argNames##ConstructorTablePtr_) \ { \ delete baseType::argNames##ConstructorTablePtr_; \ - baseType::argNames##ConstructorTablePtr_ = NULL; \ + baseType::argNames##ConstructorTablePtr_ = nullptr; \ } \ } @@ -263,7 +263,7 @@ Description \ /* Define the constructor function table */ \ baseType::argNames##ConstructorTable* \ - baseType::argNames##ConstructorTablePtr_ = NULL + baseType::argNames##ConstructorTablePtr_ = nullptr @@ -316,7 +316,7 @@ Description if (baseType<Targ>::argNames##ConstructorTablePtr_) \ { \ delete baseType<Targ>::argNames##ConstructorTablePtr_; \ - baseType<Targ>::argNames##ConstructorTablePtr_ = NULL; \ + baseType<Targ>::argNames##ConstructorTablePtr_ = nullptr; \ } \ } @@ -327,7 +327,7 @@ Description \ /* Define the constructor function table */ \ baseType<Targ>::argNames##ConstructorTable* \ - baseType<Targ>::argNames##ConstructorTablePtr_ = NULL + baseType<Targ>::argNames##ConstructorTablePtr_ = nullptr //- Define run-time selection table for template classes diff --git a/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H index ebf1d79b6b7d0562e28481cc8dde3a15811aa71c..2e323bda6ebca9a4c0f1a3cb3563b37a5ae6cb94 100644 --- a/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H +++ b/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H @@ -113,7 +113,8 @@ Description if (baseType::memberFunction##argNames##MemberFunctionTablePtr_) \ { \ delete baseType::memberFunction##argNames##MemberFunctionTablePtr_;\ - baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL;\ + baseType::memberFunction##argNames##MemberFunctionTablePtr_ = \ + nullptr; \ } \ } @@ -123,7 +124,7 @@ Description \ /* Define the memberFunction table */ \ baseType::memberFunction##argNames##MemberFunctionTable* \ - baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL + baseType::memberFunction##argNames##MemberFunctionTablePtr_ = nullptr @@ -194,7 +195,7 @@ Description delete baseType<Targ>::memberFunction##argNames## \ MemberFunctionTablePtr_; \ baseType<Targ>::memberFunction##argNames## \ - MemberFunctionTablePtr_ = NULL; \ + MemberFunctionTablePtr_ = nullptr; \ } \ } @@ -206,7 +207,8 @@ Description \ /* Define the memberFunction table */ \ baseType<Targ>::memberFunction##argNames##MemberFunctionTable* \ - baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ = NULL + baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ = \ + nullptr //- Define run-time selection table for template classes diff --git a/src/OpenFOAM/dimensionSet/dimensionSets.C b/src/OpenFOAM/dimensionSet/dimensionSets.C index 85ccde69470b1df5279441a7ba7f95eb65a7092f..577ea7c5974e0f63c165e5bf4af7e76e45e6f760 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSets.C +++ b/src/OpenFOAM/dimensionSet/dimensionSets.C @@ -38,9 +38,9 @@ namespace Foam // Since dimensionSystems() can be reread we actually store a copy of // the controlDict subDict (v.s. a reference to the subDict for e.g. // dimensionedConstants) -dictionary* dimensionSystemsPtr_(NULL); -HashTable<dimensionedScalar>* unitSetPtr_(NULL); -dimensionSets* writeUnitSetPtr_(NULL); +dictionary* dimensionSystemsPtr_(nullptr); +HashTable<dimensionedScalar>* unitSetPtr_(nullptr); +dimensionSets* writeUnitSetPtr_(nullptr); // Helper class to // register re-reader @@ -80,7 +80,7 @@ dictionary& dimensionSystems() { if (!dimensionSystemsPtr_) { - dictionary* cachedPtr = NULL; + dictionary* cachedPtr = nullptr; dimensionSystemsPtr_ = new dictionary ( debug::switchSet diff --git a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H index b40e2fd03b609841c0c4014ee42c811fae10c4b2..d123472f98def6b7cbac762416e30808cc2d99de 100644 --- a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H +++ b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H @@ -76,7 +76,7 @@ public: FatalErrorInFunction << "attempt to access null distributeMap" << abort(FatalError); - return *reinterpret_cast<mapDistributeBase*>(NULL); + return *static_cast<mapDistributeBase*>(nullptr); } //- Are there unmapped values? I.e. do all size() elements get diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index aa454dcafe016b7d3437295bb7d71cf65fb914a8..91f4c9bf7ccced842359a66230eb537d3d43c8f0 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -183,8 +183,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, ds, false), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary(), *this, patchFieldType) { if (debug) @@ -208,8 +208,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, ds, false), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary(), *this, patchFieldTypes, actualPatchTypes) { if (debug) @@ -232,8 +232,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, dt, false), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary(), *this, patchFieldType) { if (debug) @@ -259,8 +259,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, dt, false), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary(), *this, patchFieldTypes, actualPatchTypes) { if (debug) @@ -284,8 +284,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, diField), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(this->mesh().boundary(), *this, ptfl) { if (debug) @@ -310,8 +310,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, ds, iField), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary(), *this, ptfl) { if (debug) @@ -333,8 +333,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, dimless, false), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary()) { readFields(); @@ -369,8 +369,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, mesh, dimless, false), timeIndex_(this->time().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(mesh.boundary()) { readFields(dict); @@ -404,8 +404,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(gf), timeIndex_(gf.timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(*this, gf.boundaryField_) { if (debug) @@ -439,8 +439,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField tgf.isTmp() ), timeIndex_(tgf().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(*this, tgf().boundaryField_) { if (debug) @@ -465,8 +465,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, gf), timeIndex_(gf.timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(*this, gf.boundaryField_) { if (debug) @@ -502,8 +502,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField tgf.isTmp() ), timeIndex_(tgf().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(*this, tgf().boundaryField_) { if (debug) @@ -529,8 +529,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(newName, gf), timeIndex_(gf.timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(*this, gf.boundaryField_) { if (debug) @@ -566,8 +566,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField tgf.isTmp() ), timeIndex_(tgf().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(*this, tgf().boundaryField_) { if (debug) @@ -592,8 +592,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, gf), timeIndex_(gf.timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_(this->mesh().boundary(), *this, patchFieldType) { if (debug) @@ -628,8 +628,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField : Internal(io, gf), timeIndex_(gf.timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_ ( this->mesh().boundary(), @@ -675,8 +675,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField tgf.isTmp() ), timeIndex_(tgf().timeIndex()), - field0Ptr_(NULL), - fieldPrevIterPtr_(NULL), + field0Ptr_(nullptr), + fieldPrevIterPtr_(nullptr), boundaryField_ ( this->mesh().boundary(), diff --git a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C index 8bc8c195b2710a80801ddddea87f661db6205f47..f42c11ecdb3e7cedaab71b3b71d839915b2b7785 100644 --- a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C @@ -350,9 +350,9 @@ template Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>:: ~SlicedGeometricField() { - // Set the internalField storage pointer to NULL before its destruction + // Set the internalField storage pointer to nullptr before its destruction // to protect the field it a slice of. - UList<Type>::shallowCopy(UList<Type>(NULL, 0)); + UList<Type>::shallowCopy(UList<Type>(nullptr, 0)); } @@ -366,9 +366,9 @@ template Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>:: Internal::~Internal() { - // Set the internalField storage pointer to NULL before its destruction + // Set the internalField storage pointer to nullptr before its destruction // to protect the field it a slice of. - UList<Type>::shallowCopy(UList<Type>(NULL, 0)); + UList<Type>::shallowCopy(UList<Type>(nullptr, 0)); } diff --git a/src/OpenFOAM/global/constants/dimensionedConstants.C b/src/OpenFOAM/global/constants/dimensionedConstants.C index c55abd567ec64c00a6b91b7e974e3c2ccb3feadc..357cbc81da7eba930d1f1299e070e20087474124 100644 --- a/src/OpenFOAM/global/constants/dimensionedConstants.C +++ b/src/OpenFOAM/global/constants/dimensionedConstants.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dictionary* dimensionedConstantsPtr_(NULL); +dictionary* dimensionedConstantsPtr_(nullptr); dictionary& dimensionedConstants() { diff --git a/src/OpenFOAM/global/debug/debug.C b/src/OpenFOAM/global/debug/debug.C index 1c90bda00db481cebf67d04bcf503af78ae51261..279be7409036dbd379aea47946ebb8fe8dbde3bb 100644 --- a/src/OpenFOAM/global/debug/debug.C +++ b/src/OpenFOAM/global/debug/debug.C @@ -44,17 +44,17 @@ namespace debug //! \cond ignoreDocumentation //- Skip documentation : local scope only -dictionary* controlDictPtr_(NULL); -dictionary* debugSwitchesPtr_(NULL); -dictionary* infoSwitchesPtr_(NULL); -dictionary* optimisationSwitchesPtr_(NULL); +dictionary* controlDictPtr_(nullptr); +dictionary* debugSwitchesPtr_(nullptr); +dictionary* infoSwitchesPtr_(nullptr); +dictionary* optimisationSwitchesPtr_(nullptr); // Debug switch read and write callback tables. -simpleObjectRegistry* debugObjectsPtr_(NULL); -simpleObjectRegistry* infoObjectsPtr_(NULL); -simpleObjectRegistry* optimisationObjectsPtr_(NULL); -simpleObjectRegistry* dimensionSetObjectsPtr_(NULL); -simpleObjectRegistry* dimensionedConstantObjectsPtr_(NULL); +simpleObjectRegistry* debugObjectsPtr_(nullptr); +simpleObjectRegistry* infoObjectsPtr_(nullptr); +simpleObjectRegistry* optimisationObjectsPtr_(nullptr); +simpleObjectRegistry* dimensionSetObjectsPtr_(nullptr); +simpleObjectRegistry* dimensionedConstantObjectsPtr_(nullptr); // To ensure controlDictPtr_ is deleted at the end of the run @@ -73,9 +73,9 @@ public: deleteDemandDrivenData(dimensionSetObjectsPtr_); deleteDemandDrivenData(dimensionedConstantObjectsPtr_); - debugSwitchesPtr_ = NULL; - infoSwitchesPtr_ = NULL; - optimisationSwitchesPtr_ = NULL; + debugSwitchesPtr_ = nullptr; + infoSwitchesPtr_ = nullptr; + optimisationSwitchesPtr_ = nullptr; deleteDemandDrivenData(controlDictPtr_); } }; diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C index fe2e5bd51424408e024907aed0f57a76c4f223ce..5b089f07ad7e2c18fe001adc8cbe3cca9f5511b4 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -57,7 +57,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable() List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(), boundsHandling_(interpolation2DTable::WARN), fileName_("fileNameIsUndefined"), - reader_(NULL) + reader_(nullptr) {} @@ -72,7 +72,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(values), boundsHandling_(bounds), fileName_(fName), - reader_(NULL) + reader_(nullptr) {} diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index 63b7bad3220fce63218bfcb8fccf3527a62c7e73..8f09b560acb4534eb76ab139abdfd7e5577cac9b 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -61,7 +61,7 @@ Foam::interpolationTable<Type>::interpolationTable() List<Tuple2<scalar, Type>>(), boundsHandling_(interpolationTable::WARN), fileName_("fileNameIsUndefined"), - reader_(NULL) + reader_(nullptr) {} @@ -76,7 +76,7 @@ Foam::interpolationTable<Type>::interpolationTable List<Tuple2<scalar, Type>>(values), boundsHandling_(bounds), fileName_(fName), - reader_(NULL) + reader_(nullptr) {} diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C index 3324e9af3cd9fe3beddcd21f13628fac651c486b..2b83b6865e145fe390d14cec7188b1da213068a3 100644 --- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C +++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C @@ -118,12 +118,12 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::PatchToPatchInterpolation toPatch_(toPatch), alg_(alg), dir_(dir), - pointAddressingPtr_(NULL), - pointWeightsPtr_(NULL), - pointDistancePtr_(NULL), - faceAddressingPtr_(NULL), - faceWeightsPtr_(NULL), - faceDistancePtr_(NULL) + pointAddressingPtr_(nullptr), + pointWeightsPtr_(nullptr), + pointDistancePtr_(nullptr), + faceAddressingPtr_(nullptr), + faceWeightsPtr_(nullptr), + faceDistancePtr_(nullptr) {} diff --git a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C index 30c5ec1e70aee818b615d4bf345028e2285263ab..019afb8aedc2e5ecb8c6404d5adf3ee1dd4108ee 100644 --- a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C +++ b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C @@ -152,8 +152,8 @@ template<class Patch> PrimitivePatchInterpolation<Patch>::PrimitivePatchInterpolation(const Patch& p) : patch_(p), - faceToPointWeightsPtr_(NULL), - faceToEdgeWeightsPtr_(NULL) + faceToPointWeightsPtr_(nullptr), + faceToEdgeWeightsPtr_(nullptr) {} diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H index 2f6035e3cff98b22739776ece83321271c1c1c41..7f99e76a9f2f5424bf0e70a280caae2d46744b19 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H +++ b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.H @@ -93,7 +93,7 @@ public: autoPtr<procLduInterface> clone() { NotImplemented; - return autoPtr<procLduInterface>(NULL); + return autoPtr<procLduInterface>(nullptr); } static autoPtr<procLduInterface> New(Istream& is) diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C index a36b31137bf48950b6872e6e2044e5e900f19935..0e944bd3adb629c7f5644ae2092811faf7e087e3 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C @@ -32,10 +32,10 @@ template<class Type, class DType, class LUType> Foam::LduMatrix<Type, DType, LUType>::LduMatrix(const lduMesh& mesh) : lduMesh_(mesh), - diagPtr_(NULL), - upperPtr_(NULL), - lowerPtr_(NULL), - sourcePtr_(NULL), + diagPtr_(nullptr), + upperPtr_(nullptr), + lowerPtr_(nullptr), + sourcePtr_(nullptr), interfaces_(0), interfacesUpper_(0), interfacesLower_(0) @@ -46,10 +46,10 @@ template<class Type, class DType, class LUType> Foam::LduMatrix<Type, DType, LUType>::LduMatrix(const LduMatrix& A) : lduMesh_(A.lduMesh_), - diagPtr_(NULL), - upperPtr_(NULL), - lowerPtr_(NULL), - sourcePtr_(NULL), + diagPtr_(nullptr), + upperPtr_(nullptr), + lowerPtr_(nullptr), + sourcePtr_(nullptr), interfaces_(0), interfacesUpper_(0), interfacesLower_(0) @@ -80,10 +80,10 @@ template<class Type, class DType, class LUType> Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reuse) : lduMesh_(A.lduMesh_), - diagPtr_(NULL), - upperPtr_(NULL), - lowerPtr_(NULL), - sourcePtr_(NULL), + diagPtr_(nullptr), + upperPtr_(nullptr), + lowerPtr_(nullptr), + sourcePtr_(nullptr), interfaces_(0), interfacesUpper_(0), interfacesLower_(0) @@ -93,25 +93,25 @@ Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reuse) if (A.diagPtr_) { diagPtr_ = A.diagPtr_; - A.diagPtr_ = NULL; + A.diagPtr_ = nullptr; } if (A.upperPtr_) { upperPtr_ = A.upperPtr_; - A.upperPtr_ = NULL; + A.upperPtr_ = nullptr; } if (A.lowerPtr_) { lowerPtr_ = A.lowerPtr_; - A.lowerPtr_ = NULL; + A.lowerPtr_ = nullptr; } if (A.sourcePtr_) { sourcePtr_ = A.sourcePtr_; - A.sourcePtr_ = NULL; + A.sourcePtr_ = nullptr; } } else diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C index 8715b36752f67ec27b0c84d69647d650c16fa91f..6d5f5be9c064b6b268303e3bc0e7be4f6d6b2338 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C @@ -185,7 +185,7 @@ void Foam::LduMatrix<Type, DType, LUType>::operator=(const LduMatrix& A) else if (upperPtr_) { delete upperPtr_; - upperPtr_ = NULL; + upperPtr_ = nullptr; } if (A.lowerPtr_) @@ -195,7 +195,7 @@ void Foam::LduMatrix<Type, DType, LUType>::operator=(const LduMatrix& A) else if (lowerPtr_) { delete lowerPtr_; - lowerPtr_ = NULL; + lowerPtr_ = nullptr; } if (A.sourcePtr_) diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C index aafaf20c09f4e16d722d6534a2697843dbb534df..fd21dc3983c9fe87ad343e6595a03d9a06ea4963 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,7 +100,7 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner> ( - NULL + nullptr ); } } diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C index f15c0fac47c8838a88e777ff64e709c725cf6af0..d05203afc1683bebf81a828eab1f8da2b0e48054 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,7 +92,10 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New << "cannot solve incomplete matrix, no off-diagonal coefficients" << exit(FatalIOError); - return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>(NULL); + return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother> + ( + nullptr + ); } } diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C index 157db46d7b99c506c34d04dd6cf622cb0d6f1893..651be6cee2828b0e31003bef43a034ad2bd24d09 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C @@ -108,7 +108,10 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New "no diagonal or off-diagonal coefficient" << exit(FatalIOError); - return autoPtr<typename LduMatrix<Type, DType, LUType>::solver>(NULL); + return autoPtr<typename LduMatrix<Type, DType, LUType>::solver> + ( + nullptr + ); } } diff --git a/src/OpenFOAM/matrices/Matrix/Matrix.C b/src/OpenFOAM/matrices/Matrix/Matrix.C index 46508d8e3f6353460191829fa5d60c48eba69962..14e6911166dfa777343e38f48e389131ac60e8e2 100644 --- a/src/OpenFOAM/matrices/Matrix/Matrix.C +++ b/src/OpenFOAM/matrices/Matrix/Matrix.C @@ -44,7 +44,7 @@ Foam::Matrix<Form, Type>::Matrix(const label m, const label n) : mRows_(m), nCols_(n), - v_(NULL) + v_(nullptr) { if (mRows_ < 0 || nCols_ < 0) { @@ -62,7 +62,7 @@ Foam::Matrix<Form, Type>::Matrix(const label m, const label n, const zero) : mRows_(m), nCols_(n), - v_(NULL) + v_(nullptr) { if (mRows_ < 0 || nCols_ < 0) { @@ -89,7 +89,7 @@ Foam::Matrix<Form, Type>::Matrix(const label m, const label n, const Type& s) : mRows_(m), nCols_(n), - v_(NULL) + v_(nullptr) { if (mRows_ < 0 || nCols_ < 0) { @@ -116,7 +116,7 @@ Foam::Matrix<Form, Type>::Matrix(const Matrix<Form, Type>& M) : mRows_(M.mRows_), nCols_(M.nCols_), - v_(NULL) + v_(nullptr) { if (M.v_) { @@ -137,7 +137,7 @@ Foam::Matrix<Form, Type>::Matrix(const Matrix<Form2, Type>& M) : mRows_(M.m()), nCols_(M.n()), - v_(NULL) + v_(nullptr) { if (M.v()) { @@ -216,7 +216,7 @@ void Foam::Matrix<Form, Type>::clear() if (v_) { delete[] v_; - v_ = NULL; + v_ = nullptr; } mRows_ = 0; @@ -236,7 +236,7 @@ void Foam::Matrix<Form, Type>::transfer(Matrix<Form, Type>& M) M.nCols_ = 0; v_ = M.v_; - M.v_ = NULL; + M.v_ = nullptr; } diff --git a/src/OpenFOAM/matrices/Matrix/MatrixI.H b/src/OpenFOAM/matrices/Matrix/MatrixI.H index 2ba29e355db27f2fc36772d47ca39b55e16470ca..deed75bd45fcf60bc14d8941fc9bf76010f1ca14 100644 --- a/src/OpenFOAM/matrices/Matrix/MatrixI.H +++ b/src/OpenFOAM/matrices/Matrix/MatrixI.H @@ -32,7 +32,7 @@ inline Foam::Matrix<Form, Type>::Matrix() : mRows_(0), nCols_(0), - v_(NULL) + v_(nullptr) {} diff --git a/src/OpenFOAM/matrices/Matrix/MatrixIO.C b/src/OpenFOAM/matrices/Matrix/MatrixIO.C index 13f613d74eb25ccae46434c6fce6514242f5074d..154a0669146a8abda18dab3b84640c4dadace6f1 100644 --- a/src/OpenFOAM/matrices/Matrix/MatrixIO.C +++ b/src/OpenFOAM/matrices/Matrix/MatrixIO.C @@ -36,7 +36,7 @@ Foam::Matrix<Form, Type>::Matrix(Istream& is) : mRows_(0), nCols_(0), - v_(NULL) + v_(nullptr) { operator>>(is, *this); } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.H index 3c9d1b2fcba7bba16b279fad5b2d34554c5affb0..b5d6f933b1328eaebb02e1b62960a4563396612f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.H +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,9 +153,9 @@ public: lduAddressing(const label nEqns) : size_(nEqns), - losortPtr_(NULL), - ownerStartPtr_(NULL), - losortStartPtr_(NULL) + losortPtr_(nullptr), + ownerStartPtr_(nullptr), + losortStartPtr_(nullptr) {} diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C index 8de7395626370614961600ee53444fa77931f537..11cdf31485f3b81a70828042859dcb9195519ccd 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C @@ -40,18 +40,18 @@ namespace Foam Foam::lduMatrix::lduMatrix(const lduMesh& mesh) : lduMesh_(mesh), - lowerPtr_(NULL), - diagPtr_(NULL), - upperPtr_(NULL) + lowerPtr_(nullptr), + diagPtr_(nullptr), + upperPtr_(nullptr) {} Foam::lduMatrix::lduMatrix(const lduMatrix& A) : lduMesh_(A.lduMesh_), - lowerPtr_(NULL), - diagPtr_(NULL), - upperPtr_(NULL) + lowerPtr_(nullptr), + diagPtr_(nullptr), + upperPtr_(nullptr) { if (A.lowerPtr_) { @@ -73,28 +73,28 @@ Foam::lduMatrix::lduMatrix(const lduMatrix& A) Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reuse) : lduMesh_(A.lduMesh_), - lowerPtr_(NULL), - diagPtr_(NULL), - upperPtr_(NULL) + lowerPtr_(nullptr), + diagPtr_(nullptr), + upperPtr_(nullptr) { if (reuse) { if (A.lowerPtr_) { lowerPtr_ = A.lowerPtr_; - A.lowerPtr_ = NULL; + A.lowerPtr_ = nullptr; } if (A.diagPtr_) { diagPtr_ = A.diagPtr_; - A.diagPtr_ = NULL; + A.diagPtr_ = nullptr; } if (A.upperPtr_) { upperPtr_ = A.upperPtr_; - A.upperPtr_ = NULL; + A.upperPtr_ = nullptr; } } else @@ -120,9 +120,9 @@ Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reuse) Foam::lduMatrix::lduMatrix(const lduMesh& mesh, Istream& is) : lduMesh_(mesh), - lowerPtr_(NULL), - diagPtr_(NULL), - upperPtr_(NULL) + lowerPtr_(nullptr), + diagPtr_(nullptr), + upperPtr_(nullptr) { Switch hasLow(is); Switch hasDiag(is); diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixOperations.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixOperations.C index 3bf180e493fbb7846e06353d8794d42a8582189a..c14078b2615aadbb7cb8bbfb66bfaa5ad93ddd3b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixOperations.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixOperations.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ void Foam::lduMatrix::operator=(const lduMatrix& A) else if (lowerPtr_) { delete lowerPtr_; - lowerPtr_ = NULL; + lowerPtr_ = nullptr; } if (A.upperPtr_) @@ -112,7 +112,7 @@ void Foam::lduMatrix::operator=(const lduMatrix& A) else if (upperPtr_) { delete upperPtr_; - upperPtr_ = NULL; + upperPtr_ = nullptr; } if (A.diagPtr_) diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C index 065079ee2cc36952b82dd0e31616494cfa63fd80..727f400a72d8883449590a4ecb1ba565fb4dd56c 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -141,7 +141,7 @@ Foam::lduMatrix::preconditioner::New "no diagonal or off-diagonal coefficient" << exit(FatalIOError); - return autoPtr<lduMatrix::preconditioner>(NULL); + return autoPtr<lduMatrix::preconditioner>(nullptr); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C index f24a990f9d8f101191ac8180dd0fb7a9fbec56d3..3d3e3bbad0c0800dca96e2fe284ff942b7d6ae53 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -145,7 +145,7 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New "no diagonal or off-diagonal coefficient" << exit(FatalIOError); - return autoPtr<lduMatrix::smoother>(NULL); + return autoPtr<lduMatrix::smoother>(nullptr); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C index 1f6bd82d11834e46de516f425b76ae990f6c0604..d554375cae33932f7042b0e211f0f2896dcfa951 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,7 +125,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New "no diagonal or off-diagonal coefficient" << exit(FatalIOError); - return autoPtr<lduMatrix::solver>(NULL); + return autoPtr<lduMatrix::solver>(nullptr); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C index 7ac02d189f35dc172ad90815fc8dc959c6b400ae..0ac399fb598239511f168d3b38acc54c282eb44e 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C @@ -105,7 +105,7 @@ Foam::lduMatrix::faceH(const Field<Type>& psi) const " the matrix does not have any off-diagonal coefficients." << exit(FatalError); - return tmp<Field<Type>>(NULL); + return tmp<Field<Type>>(nullptr); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index d29f76eb2b3657af9f01e04b259b9d86f4a2126e..334346962ae64e5e60956d9b32762794ad933760 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -561,8 +561,8 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) } // Delete the restrictAddressing for the coarser level - faceRestrictAddressing_.set(curLevel, NULL); - faceFlipMap_.set(curLevel, NULL); + faceRestrictAddressing_.set(curLevel, nullptr); + faceFlipMap_.set(curLevel, nullptr); forAll(prevResAddr, i) { @@ -586,7 +586,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) } // Delete the restrictAddressing for the coarser level - restrictAddressing_.set(curLevel, NULL); + restrictAddressing_.set(curLevel, nullptr); // Patch faces nPatchFaces_[prevLevel] = nPatchFaces_[curLevel]; @@ -620,7 +620,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) // Delete the matrix addressing and coefficients from the previous level // and replace with the corresponding entry from the coarser level - meshLevels_.set(prevLevel, meshLevels_.set(curLevel, NULL)); + meshLevels_.set(prevLevel, meshLevels_.set(curLevel, nullptr)); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 70efe48f4f981e879669673f4b607ddf4a2cef44..6f7665b944bbbcc0035ff9a9c4c8e56322530e48 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -245,7 +245,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration *this, controlDict ) - : autoPtr<GAMGProcAgglomeration>(NULL) + : autoPtr<GAMGProcAgglomeration>(nullptr) ), nCells_(maxLevels_), @@ -481,17 +481,17 @@ void Foam::GAMGAgglomeration::clearLevel(const label i) { if (hasMeshLevel(i)) { - meshLevels_.set(i - 1, NULL); + meshLevels_.set(i - 1, nullptr); if (i < nCells_.size()) { nCells_[i] = -555; - restrictAddressing_.set(i, NULL); + restrictAddressing_.set(i, nullptr); nFaces_[i] = -666; - faceRestrictAddressing_.set(i, NULL); - faceFlipMap_.set(i, NULL); - nPatchFaces_.set(i, NULL); - patchFaceRestrictAddressing_.set(i, NULL); + faceRestrictAddressing_.set(i, nullptr); + faceFlipMap_.set(i, nullptr); + nPatchFaces_.set(i, nullptr); + patchFaceRestrictAddressing_.set(i, nullptr); } } } diff --git a/src/OpenFOAM/memory/autoPtr/autoPtr.H b/src/OpenFOAM/memory/autoPtr/autoPtr.H index 917d0adf280a99c27f44db15a61def36fb200b0f..77dd1966cf975459f1d00bc8a8a95e08dfdfac63 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtr.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtr.H @@ -67,15 +67,15 @@ public: inline explicit autoPtr(T* = 0); //- Construct as copy by transferring pointer to this autoPtr and - // setting the arguments pointer to NULL + // setting the arguments pointer to nullptr inline autoPtr(const autoPtr<T>&); - //- Construct either by transferring pointer or cloning. Should - // only be called with type that supports cloning. + //- Construct either by transferring pointer or cloning. + // Should only be called with type that supports cloning inline autoPtr(const autoPtr<T>&, const bool reuse); - //- Destructor, delete object if pointer is not NULL + //- Destructor, delete object if pointer is not nullptr inline ~autoPtr(); @@ -83,10 +83,10 @@ public: // Check - //- Return true if the autoPtr is empty (ie, no pointer set). + //- Return true if the autoPtr is empty (ie, no pointer set) inline bool empty() const; - //- Return true if the autoPtr valid (ie, the pointer is set). + //- Return true if the autoPtr valid (ie, the pointer is set) inline bool valid() const; @@ -96,14 +96,15 @@ public: inline T* ptr(); //- Set pointer to that given. - // If object pointer already set issue a FatalError. + // If object pointer already set issue a FatalError inline void set(T*); //- If object pointer already set, delete object and set to given // pointer inline void reset(T* = 0); - //- Delete object (if the pointer is valid) and set pointer to NULL. + //- Delete object (if the pointer is valid) and set pointer to + // nullptr inline void clear(); diff --git a/src/OpenFOAM/memory/autoPtr/autoPtrI.H b/src/OpenFOAM/memory/autoPtr/autoPtrI.H index ef199ca20c60ff4d2fde05e0f53af344091d38c1..7c35448f7dfb24d9534f9057a7c6c204c244d0c6 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtrI.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtrI.H @@ -58,7 +58,7 @@ inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reuse) } else { - ptr_ = NULL; + ptr_ = nullptr; } } diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index 7aeedfd9ed1f1a21f9cd274cf34640d6ff6d515f..a337271c402d8a50f352d343d304f5e15b25c00a 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -134,7 +134,7 @@ public: inline T* ptr() const; //- If object pointer points to valid object: - // delete object and set pointer to NULL + // delete object and set pointer to nullptr inline void clear() const; diff --git a/src/OpenFOAM/memory/tmpNrc/tmpNrc.H b/src/OpenFOAM/memory/tmpNrc/tmpNrc.H index b31ad33f437fab2a9ddfa6da49bcbcc901877966..d6b6df0c3165965fb430d1043737a284fabbc7ff 100644 --- a/src/OpenFOAM/memory/tmpNrc/tmpNrc.H +++ b/src/OpenFOAM/memory/tmpNrc/tmpNrc.H @@ -130,7 +130,7 @@ public: inline T* ptr() const; //- If object pointer points to valid object: - // delete object and set pointer to NULL + // delete object and set pointer to nullptr inline void clear() const; diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.C b/src/OpenFOAM/meshes/lduMesh/lduMesh.C index b3250d6b05f75aa945e1e205be3aad64ff5655a1..1717be26c68e28f01bcee18382bc8bdf8fc96302 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.C @@ -40,7 +40,7 @@ defineTypeNameAndDebug(lduMesh, 0); const Foam::objectRegistry& Foam::lduMesh::thisDb() const { NotImplemented; - const objectRegistry* orPtr_ = NULL; + const objectRegistry* orPtr_ = nullptr; return *orPtr_; } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C index 834853cfbbf9b8f1304590491bc5dafde80b12da..2ae0b4a7162b9b667c9170454b71afc902b66ad6 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C @@ -52,7 +52,7 @@ Foam::cellMatcher::cellMatcher vertLabels_(vertPerCell), faceLabels_(facePerCell), cellModelName_(cellModelName), - cellModelPtr_(NULL) + cellModelPtr_(nullptr) { forAll(localFaces_, facei) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H index a6a952a8b7bc70819f27de9b6911a53b65a131ad..4a212e34e11b1a9431813d5ab9bf3b6b82f57fdc 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ inline const Foam::labelList& Foam::cellMatcher::faceLabels() const inline const Foam::cellModel& Foam::cellMatcher::model() const { - if (cellModelPtr_ == NULL) + if (cellModelPtr_ == nullptr) { cellModelPtr_ = cellModeller::lookup(cellModelName_); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C b/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C index 1cfd988d7f6bfb1e0e75d6132664984173fee6d9..8426b1336dfaf627acd644bd4571e499d5ef051b 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C +++ b/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C @@ -46,7 +46,7 @@ Foam::cellModeller::cellModeller() } modelPtrs_.setSize(maxIndex + 1); - modelPtrs_ = NULL; + modelPtrs_ = nullptr; // For all the words in the wordlist, set the details of the model // to those specified by the word name and the other parameters @@ -95,7 +95,7 @@ const Foam::cellModel* Foam::cellModeller::lookup(const word& name) } else { - return NULL; + return nullptr; } } diff --git a/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.H b/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.H index 3c550dea392274ef917b48690d539a39617808ce..490cf2eae607d73d47a382f8d333885ba7407b06 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.H +++ b/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,10 +77,11 @@ public: // Member functions - //- Look up a model by name and return a pointer to the model or NULL + //- Look up a model by name and return a pointer to the model or nullptr static const cellModel* lookup(const word&); - //- Look up a model by index and return a pointer to the model or NULL + //- Look up a model by index and return a pointer to the model or + // nullptr static const cellModel* lookup(const label i) { return modelPtrs_[i]; diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H index 4cb5b6878c32ab9aa62cc7be486c24850c9db67c..5120cd4dfa51234fc24eee1dc019a24430b90ad2 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H @@ -30,7 +30,7 @@ License inline Foam::cellShape::cellShape() : - m(NULL) + m(nullptr) {} diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.C b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.C index 8965d3c932c3fa3bee65cb93c3b2e852e7b0e5ba..76e75829e98c4a4918cee1911df34741ba7ef73c 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.C +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ License Foam::cellShape Foam::tetCell::tetCellShape() const { - static const cellModel* tetModelPtr_ = NULL; + static const cellModel* tetModelPtr_ = nullptr; if (!tetModelPtr_) { diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C index a6d06903e5f61c0d4a7e9d70f94245f01654452c..947a2f5d0f96673a1416de24ca1fba8aeb48fc3b 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C @@ -164,10 +164,10 @@ Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm) mpm_(mpm), insertedPoints_(true), direct_(false), - directAddrPtr_(NULL), - interpolationAddrPtr_(NULL), - weightsPtr_(NULL), - insertedPointLabelsPtr_(NULL) + directAddrPtr_(nullptr), + interpolationAddrPtr_(nullptr), + weightsPtr_(nullptr), + insertedPointLabelsPtr_(nullptr) { // Check for possibility of direct mapping if (mpm_.pointsFromPointsMap().empty()) diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C index b157ecbc2d2c035f6c0efa2639148ea025964e38..cd281f6ec0fc7055e8eb101fd988c074dc7611b2 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C @@ -127,9 +127,9 @@ Foam::pointPatchMapper::pointPatchMapper : 0 ), hasUnmapped_(false), - directAddrPtr_(NULL), - interpolationAddrPtr_(NULL), - weightsPtr_(NULL) + directAddrPtr_(nullptr), + interpolationAddrPtr_(nullptr), + weightsPtr_(nullptr) {} diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index bd0e7eac1a317bb01f9fbb63c1091597d7d139e4..ac9649ccda7ecf971a7da7b4d7d149e0e9f1dcd0 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -1765,12 +1765,12 @@ Foam::globalMeshData::globalMeshData(const polyMesh& mesh) processorPatchIndices_(0), processorPatchNeighbours_(0), nGlobalPoints_(-1), - sharedPointLabelsPtr_(NULL), - sharedPointAddrPtr_(NULL), - sharedPointGlobalLabelsPtr_(NULL), + sharedPointLabelsPtr_(nullptr), + sharedPointAddrPtr_(nullptr), + sharedPointGlobalLabelsPtr_(nullptr), nGlobalEdges_(-1), - sharedEdgeLabelsPtr_(NULL), - sharedEdgeAddrPtr_(NULL) + sharedEdgeLabelsPtr_(nullptr), + sharedEdgeAddrPtr_(nullptr) { updateMesh(); } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C index 9253875b8a66e30611f186fcbeccfbff9c6d6ab2..6e4045b48e67e0e1b125e46da7e1c36dfeec4f01 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C @@ -292,10 +292,10 @@ Foam::cellMapper::cellMapper(const mapPolyMesh& mpm) mpm_(mpm), insertedCells_(true), direct_(false), - directAddrPtr_(NULL), - interpolationAddrPtr_(NULL), - weightsPtr_(NULL), - insertedCellLabelsPtr_(NULL) + directAddrPtr_(nullptr), + interpolationAddrPtr_(nullptr), + weightsPtr_(nullptr), + insertedCellLabelsPtr_(nullptr) { // Check for possibility of direct mapping if diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C index 2e66f75f3cda46e49fd6423484b640013984c2ef..b81b4d23f9080bbafb49e97e27d8533ffca4373f 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C @@ -207,10 +207,10 @@ Foam::faceMapper::faceMapper(const mapPolyMesh& mpm) mpm_(mpm), insertedFaces_(true), direct_(false), - directAddrPtr_(NULL), - interpolationAddrPtr_(NULL), - weightsPtr_(NULL), - insertedFaceLabelsPtr_(NULL) + directAddrPtr_(nullptr), + interpolationAddrPtr_(nullptr), + weightsPtr_(nullptr), + insertedFaceLabelsPtr_(nullptr) { // Check for possibility of direct mapping if diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 28e8ee9c24218fe131cfd9f9c3827dcd53d83e42..9f1db29521285ee4a545d65ddda1f46d2ed23bd2 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -207,8 +207,8 @@ Foam::polyMesh::polyMesh(const IOobject& io) comm_(UPstream::worldComm), geometricD_(Zero), solutionD_(Zero), - tetBasePtIsPtr_(NULL), - cellTreePtr_(NULL), + tetBasePtIsPtr_(nullptr), + cellTreePtr_(nullptr), pointZones_ ( IOobject @@ -263,11 +263,11 @@ Foam::polyMesh::polyMesh(const IOobject& io) ), *this ), - globalMeshDataPtr_(NULL), + globalMeshDataPtr_(nullptr), moving_(false), topoChanging_(false), curMotionTimeIndex_(time().timeIndex()), - oldPointsPtr_(NULL) + oldPointsPtr_(nullptr) { if (exists(owner_.objectPath())) { @@ -401,8 +401,8 @@ Foam::polyMesh::polyMesh comm_(UPstream::worldComm), geometricD_(Zero), solutionD_(Zero), - tetBasePtIsPtr_(NULL), - cellTreePtr_(NULL), + tetBasePtIsPtr_(nullptr), + cellTreePtr_(nullptr), pointZones_ ( IOobject @@ -445,11 +445,11 @@ Foam::polyMesh::polyMesh *this, PtrList<cellZone>() ), - globalMeshDataPtr_(NULL), + globalMeshDataPtr_(nullptr), moving_(false), topoChanging_(false), curMotionTimeIndex_(time().timeIndex()), - oldPointsPtr_(NULL) + oldPointsPtr_(nullptr) { // Check if the faces and cells are valid forAll(faces_, facei) @@ -552,8 +552,8 @@ Foam::polyMesh::polyMesh comm_(UPstream::worldComm), geometricD_(Zero), solutionD_(Zero), - tetBasePtIsPtr_(NULL), - cellTreePtr_(NULL), + tetBasePtIsPtr_(nullptr), + cellTreePtr_(nullptr), pointZones_ ( IOobject @@ -596,11 +596,11 @@ Foam::polyMesh::polyMesh *this, 0 ), - globalMeshDataPtr_(NULL), + globalMeshDataPtr_(nullptr), moving_(false), topoChanging_(false), curMotionTimeIndex_(time().timeIndex()), - oldPointsPtr_(NULL) + oldPointsPtr_(nullptr) { // Check if faces are valid forAll(faces_, facei) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index 99dd28573c1bf6f67c41558043f01c391b7c11db..1f61f7382835afffbad0360ec77c2c3447e9be83 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -624,14 +624,14 @@ public: virtual bool checkFaceOrthogonality ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check face skewness virtual bool checkFaceSkewness ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check edge alignment for 1D/2D cases @@ -661,7 +661,7 @@ public: ( const bool report, const scalar minWeight = 0.05, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check for neighbouring cell volumes @@ -669,7 +669,7 @@ public: ( const bool report, const scalar minRatio = 0.01, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C index ec2c6877c969076d8e25ad919cdc65699845e1b7..91590e5467dfa6698e975dcfa2ecf235e02072f5 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C @@ -799,7 +799,7 @@ bool Foam::polyMesh::checkMeshMotion cellVols, // vols report, // report detailedReport, // detailedReport - NULL // setPtr + nullptr // setPtr ); @@ -809,7 +809,7 @@ bool Foam::polyMesh::checkMeshMotion fAreas, report, // report detailedReport, // detailedReport, - NULL // setPtr + nullptr // setPtr ); error = error || areaError; @@ -822,7 +822,7 @@ bool Foam::polyMesh::checkMeshMotion report, // report, detailedReport, // detailedReport, -SMALL, // minPyrVol - NULL // setPtr + nullptr // setPtr ); error = error || pyrVolError; @@ -834,7 +834,7 @@ bool Foam::polyMesh::checkMeshMotion cellCtrs, report, // report detailedReport, // detailedReport - NULL // setPtr + nullptr // setPtr ); error = error || nonOrthoError; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index 51277de647a11f8785666d38075d060e5b91b79a..f7a6b8d2d34d767a54c40f4686fa278c083e0237 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -475,8 +475,8 @@ Foam::polyMesh::polyMesh comm_(UPstream::worldComm), geometricD_(Zero), solutionD_(Zero), - tetBasePtIsPtr_(NULL), - cellTreePtr_(NULL), + tetBasePtIsPtr_(nullptr), + cellTreePtr_(nullptr), pointZones_ ( IOobject @@ -519,11 +519,11 @@ Foam::polyMesh::polyMesh *this, 0 ), - globalMeshDataPtr_(NULL), + globalMeshDataPtr_(nullptr), moving_(false), topoChanging_(false), curMotionTimeIndex_(time().timeIndex()), - oldPointsPtr_(NULL) + oldPointsPtr_(nullptr) { if (debug) { @@ -759,8 +759,8 @@ Foam::polyMesh::polyMesh comm_(UPstream::worldComm), geometricD_(Zero), solutionD_(Zero), - tetBasePtIsPtr_(NULL), - cellTreePtr_(NULL), + tetBasePtIsPtr_(nullptr), + cellTreePtr_(nullptr), pointZones_ ( IOobject @@ -803,11 +803,11 @@ Foam::polyMesh::polyMesh *this, 0 ), - globalMeshDataPtr_(NULL), + globalMeshDataPtr_(nullptr), moving_(false), topoChanging_(false), curMotionTimeIndex_(time().timeIndex()), - oldPointsPtr_(NULL) + oldPointsPtr_(nullptr) { if (debug) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.H b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.H index 37b56a6844b34438a80da9845366b054baba23d9..0a3ed7a03b8624dbf3504abaf028d71559ff6c8d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ public: const polyMesh& mesh, scalar tol = minTetQuality, const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ); //- Return the tet decomposition of the given face, with diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index 0c9593ca07f19c7ede42a66ec2248d05f0b93d3f..e092325721b7e04983f1a5a6f09c1e3e094d6233 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -608,8 +608,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch rotationAxis_(Zero), rotationCentre_(Zero), separationVector_(Zero), - coupledPointsPtr_(NULL), - coupledEdgesPtr_(NULL) + coupledPointsPtr_(nullptr), + coupledEdgesPtr_(nullptr) { // Neighbour patch might not be valid yet so no transformation // calculation possible. @@ -636,8 +636,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch rotationAxis_(rotationAxis), rotationCentre_(rotationCentre), separationVector_(separationVector), - coupledPointsPtr_(NULL), - coupledEdgesPtr_(NULL) + coupledPointsPtr_(nullptr), + coupledEdgesPtr_(nullptr) { // Neighbour patch might not be valid yet so no transformation // calculation possible. @@ -660,8 +660,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch rotationAxis_(Zero), rotationCentre_(Zero), separationVector_(Zero), - coupledPointsPtr_(NULL), - coupledEdgesPtr_(NULL) + coupledPointsPtr_(nullptr), + coupledEdgesPtr_(nullptr) { if (neighbPatchName_ == word::null && !coupleGroup_.valid()) { @@ -730,8 +730,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch rotationAxis_(pp.rotationAxis_), rotationCentre_(pp.rotationCentre_), separationVector_(pp.separationVector_), - coupledPointsPtr_(NULL), - coupledEdgesPtr_(NULL) + coupledPointsPtr_(nullptr), + coupledEdgesPtr_(nullptr) { // Neighbour patch might not be valid yet so no transformation // calculation possible. @@ -755,8 +755,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch rotationAxis_(pp.rotationAxis_), rotationCentre_(pp.rotationCentre_), separationVector_(pp.separationVector_), - coupledPointsPtr_(NULL), - coupledEdgesPtr_(NULL) + coupledPointsPtr_(nullptr), + coupledEdgesPtr_(nullptr) { if (neighbName == name()) { @@ -787,8 +787,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch rotationAxis_(pp.rotationAxis_), rotationCentre_(pp.rotationCentre_), separationVector_(pp.separationVector_), - coupledPointsPtr_(NULL), - coupledEdgesPtr_(NULL) + coupledPointsPtr_(nullptr), + coupledEdgesPtr_(nullptr) {} diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index ad8e33d401f266e310968a7cef94243048bea338..fb7a1954939ffa7d9da74fc9c2d8ff1a450e83d9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -92,8 +92,8 @@ Foam::polyPatch::polyPatch ), start_(start), boundaryMesh_(bm), - faceCellsPtr_(NULL), - mePtr_(NULL) + faceCellsPtr_(nullptr), + mePtr_(nullptr) { if ( @@ -129,8 +129,8 @@ Foam::polyPatch::polyPatch ), start_(readLabel(dict.lookup("startFace"))), boundaryMesh_(bm), - faceCellsPtr_(NULL), - mePtr_(NULL) + faceCellsPtr_(nullptr), + mePtr_(nullptr) { if ( @@ -163,8 +163,8 @@ Foam::polyPatch::polyPatch ), start_(pp.start()), boundaryMesh_(bm), - faceCellsPtr_(NULL), - mePtr_(NULL) + faceCellsPtr_(nullptr), + mePtr_(nullptr) {} @@ -190,8 +190,8 @@ Foam::polyPatch::polyPatch ), start_(newStart), boundaryMesh_(bm), - faceCellsPtr_(NULL), - mePtr_(NULL) + faceCellsPtr_(nullptr), + mePtr_(nullptr) {} @@ -217,8 +217,8 @@ Foam::polyPatch::polyPatch ), start_(newStart), boundaryMesh_(bm), - faceCellsPtr_(NULL), - mePtr_(NULL) + faceCellsPtr_(nullptr), + mePtr_(nullptr) {} @@ -228,8 +228,8 @@ Foam::polyPatch::polyPatch(const polyPatch& p) primitivePatch(p), start_(p.start_), boundaryMesh_(p.boundaryMesh_), - faceCellsPtr_(NULL), - mePtr_(NULL) + faceCellsPtr_(nullptr), + mePtr_(nullptr) {} diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index 30145ce34a8c3b48ca1fe1b52dd68866e39e0e08..56e6b755e8794e3638e041b2385aa4cc30dbc2d2 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -142,7 +142,7 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh PtrList<ZoneType>(), regIOobject(io), mesh_(mesh), - zoneMapPtr_(NULL) + zoneMapPtr_(nullptr) { read(); } @@ -159,7 +159,7 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh PtrList<ZoneType>(size), regIOobject(io), mesh_(mesh), - zoneMapPtr_(NULL) + zoneMapPtr_(nullptr) { // Optionally read contents, otherwise keep size read(); @@ -177,7 +177,7 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh PtrList<ZoneType>(), regIOobject(io), mesh_(mesh), - zoneMapPtr_(NULL) + zoneMapPtr_(nullptr) { if (!read()) { diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 00fbd050bdac9eefd37aeee268c13c85777df737..7e557268a6e240441f334fef53e415567807dbaa 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -194,10 +194,10 @@ Foam::faceZone::faceZone zone(name, addr, index), flipMap_(fm), zoneMesh_(zm), - patchPtr_(NULL), - masterCellsPtr_(NULL), - slaveCellsPtr_(NULL), - mePtr_(NULL) + patchPtr_(nullptr), + masterCellsPtr_(nullptr), + slaveCellsPtr_(nullptr), + mePtr_(nullptr) { checkAddressing(); } @@ -215,10 +215,10 @@ Foam::faceZone::faceZone zone(name, addr, index), flipMap_(fm), zoneMesh_(zm), - patchPtr_(NULL), - masterCellsPtr_(NULL), - slaveCellsPtr_(NULL), - mePtr_(NULL) + patchPtr_(nullptr), + masterCellsPtr_(nullptr), + slaveCellsPtr_(nullptr), + mePtr_(nullptr) { checkAddressing(); } @@ -235,10 +235,10 @@ Foam::faceZone::faceZone zone(name, dict, this->labelsName, index), flipMap_(dict.lookup("flipMap")), zoneMesh_(zm), - patchPtr_(NULL), - masterCellsPtr_(NULL), - slaveCellsPtr_(NULL), - mePtr_(NULL) + patchPtr_(nullptr), + masterCellsPtr_(nullptr), + slaveCellsPtr_(nullptr), + mePtr_(nullptr) { checkAddressing(); } @@ -256,10 +256,10 @@ Foam::faceZone::faceZone zone(fz, addr, index), flipMap_(fm), zoneMesh_(zm), - patchPtr_(NULL), - masterCellsPtr_(NULL), - slaveCellsPtr_(NULL), - mePtr_(NULL) + patchPtr_(nullptr), + masterCellsPtr_(nullptr), + slaveCellsPtr_(nullptr), + mePtr_(nullptr) { checkAddressing(); } @@ -277,10 +277,10 @@ Foam::faceZone::faceZone zone(fz, addr, index), flipMap_(fm), zoneMesh_(zm), - patchPtr_(NULL), - masterCellsPtr_(NULL), - slaveCellsPtr_(NULL), - mePtr_(NULL) + patchPtr_(nullptr), + masterCellsPtr_(nullptr), + slaveCellsPtr_(nullptr), + mePtr_(nullptr) { checkAddressing(); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C index 1d800731389a54b8465b697fd4e85ea82b62e148..8e26d4e81933da1535bf7bf40e8b95fce48409db 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C @@ -92,7 +92,7 @@ Foam::zone::zone labelList(addr), name_(name), index_(index), - lookupMapPtr_(NULL) + lookupMapPtr_(nullptr) {} @@ -106,7 +106,7 @@ Foam::zone::zone labelList(addr), name_(name), index_(index), - lookupMapPtr_(NULL) + lookupMapPtr_(nullptr) {} @@ -121,7 +121,7 @@ Foam::zone::zone labelList(dict.lookup(labelsName)), name_(name), index_(index), - lookupMapPtr_(NULL) + lookupMapPtr_(nullptr) {} @@ -135,7 +135,7 @@ Foam::zone::zone labelList(addr), name_(z.name()), index_(index), - lookupMapPtr_(NULL) + lookupMapPtr_(nullptr) {} @@ -149,7 +149,7 @@ Foam::zone::zone labelList(addr), name_(z.name()), index_(index), - lookupMapPtr_(NULL) + lookupMapPtr_(nullptr) {} diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C index 7f78dde7b2d93f0f0b66e93dfa5f00f14a7afb87..04c3f9e62a5630bdb4ca800b5ecbedb2f30d1835 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C @@ -43,23 +43,23 @@ PrimitivePatch : FaceList<Face>(faces), points_(points), - edgesPtr_(NULL), + edgesPtr_(nullptr), nInternalEdges_(-1), - boundaryPointsPtr_(NULL), - faceFacesPtr_(NULL), - edgeFacesPtr_(NULL), - faceEdgesPtr_(NULL), - pointEdgesPtr_(NULL), - pointFacesPtr_(NULL), - localFacesPtr_(NULL), - meshPointsPtr_(NULL), - meshPointMapPtr_(NULL), - edgeLoopsPtr_(NULL), - localPointsPtr_(NULL), - localPointOrderPtr_(NULL), - faceCentresPtr_(NULL), - faceNormalsPtr_(NULL), - pointNormalsPtr_(NULL) + boundaryPointsPtr_(nullptr), + faceFacesPtr_(nullptr), + edgeFacesPtr_(nullptr), + faceEdgesPtr_(nullptr), + pointEdgesPtr_(nullptr), + pointFacesPtr_(nullptr), + localFacesPtr_(nullptr), + meshPointsPtr_(nullptr), + meshPointMapPtr_(nullptr), + edgeLoopsPtr_(nullptr), + localPointsPtr_(nullptr), + localPointOrderPtr_(nullptr), + faceCentresPtr_(nullptr), + faceNormalsPtr_(nullptr), + pointNormalsPtr_(nullptr) {} @@ -79,23 +79,23 @@ PrimitivePatch : FaceList<Face>(faces), points_(points), - edgesPtr_(NULL), + edgesPtr_(nullptr), nInternalEdges_(-1), - boundaryPointsPtr_(NULL), - faceFacesPtr_(NULL), - edgeFacesPtr_(NULL), - faceEdgesPtr_(NULL), - pointEdgesPtr_(NULL), - pointFacesPtr_(NULL), - localFacesPtr_(NULL), - meshPointsPtr_(NULL), - meshPointMapPtr_(NULL), - edgeLoopsPtr_(NULL), - localPointsPtr_(NULL), - localPointOrderPtr_(NULL), - faceCentresPtr_(NULL), - faceNormalsPtr_(NULL), - pointNormalsPtr_(NULL) + boundaryPointsPtr_(nullptr), + faceFacesPtr_(nullptr), + edgeFacesPtr_(nullptr), + faceEdgesPtr_(nullptr), + pointEdgesPtr_(nullptr), + pointFacesPtr_(nullptr), + localFacesPtr_(nullptr), + meshPointsPtr_(nullptr), + meshPointMapPtr_(nullptr), + edgeLoopsPtr_(nullptr), + localPointsPtr_(nullptr), + localPointOrderPtr_(nullptr), + faceCentresPtr_(nullptr), + faceNormalsPtr_(nullptr), + pointNormalsPtr_(nullptr) {} @@ -116,23 +116,23 @@ PrimitivePatch : FaceList<Face>(faces, reuse), points_(points, reuse), - edgesPtr_(NULL), + edgesPtr_(nullptr), nInternalEdges_(-1), - boundaryPointsPtr_(NULL), - faceFacesPtr_(NULL), - edgeFacesPtr_(NULL), - faceEdgesPtr_(NULL), - pointEdgesPtr_(NULL), - pointFacesPtr_(NULL), - localFacesPtr_(NULL), - meshPointsPtr_(NULL), - meshPointMapPtr_(NULL), - edgeLoopsPtr_(NULL), - localPointsPtr_(NULL), - localPointOrderPtr_(NULL), - faceCentresPtr_(NULL), - faceNormalsPtr_(NULL), - pointNormalsPtr_(NULL) + boundaryPointsPtr_(nullptr), + faceFacesPtr_(nullptr), + edgeFacesPtr_(nullptr), + faceEdgesPtr_(nullptr), + pointEdgesPtr_(nullptr), + pointFacesPtr_(nullptr), + localFacesPtr_(nullptr), + meshPointsPtr_(nullptr), + meshPointMapPtr_(nullptr), + edgeLoopsPtr_(nullptr), + localPointsPtr_(nullptr), + localPointOrderPtr_(nullptr), + faceCentresPtr_(nullptr), + faceNormalsPtr_(nullptr), + pointNormalsPtr_(nullptr) {} @@ -152,23 +152,23 @@ PrimitivePatch PrimitivePatchName(), FaceList<Face>(pp), points_(pp.points_), - edgesPtr_(NULL), + edgesPtr_(nullptr), nInternalEdges_(-1), - boundaryPointsPtr_(NULL), - faceFacesPtr_(NULL), - edgeFacesPtr_(NULL), - faceEdgesPtr_(NULL), - pointEdgesPtr_(NULL), - pointFacesPtr_(NULL), - localFacesPtr_(NULL), - meshPointsPtr_(NULL), - meshPointMapPtr_(NULL), - edgeLoopsPtr_(NULL), - localPointsPtr_(NULL), - localPointOrderPtr_(NULL), - faceCentresPtr_(NULL), - faceNormalsPtr_(NULL), - pointNormalsPtr_(NULL) + boundaryPointsPtr_(nullptr), + faceFacesPtr_(nullptr), + edgeFacesPtr_(nullptr), + faceEdgesPtr_(nullptr), + pointEdgesPtr_(nullptr), + pointFacesPtr_(nullptr), + localFacesPtr_(nullptr), + meshPointsPtr_(nullptr), + meshPointMapPtr_(nullptr), + edgeLoopsPtr_(nullptr), + localPointsPtr_(nullptr), + localPointOrderPtr_(nullptr), + faceCentresPtr_(nullptr), + faceNormalsPtr_(nullptr), + pointNormalsPtr_(nullptr) {} diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index f1721d8e1a0f4286727bde1f2c5b99d831562120..a7b1e80fabd9d72ed4790bbaa8fda1c68609256a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -434,7 +434,7 @@ public: bool checkTopology ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Checks primitivePatch for faces sharing point but not edge. @@ -446,7 +446,7 @@ public: bool checkPointManifold ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C index 96962082592ae5fc58eaef3367d14241a91e1bab..3ac89f2c61e6a493481e34584917b0402033d1f9 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C @@ -72,16 +72,16 @@ clearTopology() if (edgesPtr_ && faceFacesPtr_ && edgeFacesPtr_ && faceEdgesPtr_) { delete edgesPtr_; - edgesPtr_ = NULL; + edgesPtr_ = nullptr; delete faceFacesPtr_; - faceFacesPtr_ = NULL; + faceFacesPtr_ = nullptr; delete edgeFacesPtr_; - edgeFacesPtr_ = NULL; + edgeFacesPtr_ = nullptr; delete faceEdgesPtr_; - faceEdgesPtr_ = NULL; + faceEdgesPtr_ = nullptr; } deleteDemandDrivenData(boundaryPointsPtr_); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index e514f7b432d6d48a191e446c5a2eefa0933e7261..6ee6505440270a6b8f91f9e360b71cddd7d43201 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C @@ -48,28 +48,28 @@ Foam::primitiveMesh::primitiveMesh() nFaces_(0), nCells_(0), - cellShapesPtr_(NULL), - edgesPtr_(NULL), - ccPtr_(NULL), - ecPtr_(NULL), - pcPtr_(NULL), - - cfPtr_(NULL), - efPtr_(NULL), - pfPtr_(NULL), - - cePtr_(NULL), - fePtr_(NULL), - pePtr_(NULL), - ppPtr_(NULL), - cpPtr_(NULL), + cellShapesPtr_(nullptr), + edgesPtr_(nullptr), + ccPtr_(nullptr), + ecPtr_(nullptr), + pcPtr_(nullptr), + + cfPtr_(nullptr), + efPtr_(nullptr), + pfPtr_(nullptr), + + cePtr_(nullptr), + fePtr_(nullptr), + pePtr_(nullptr), + ppPtr_(nullptr), + cpPtr_(nullptr), labels_(0), - cellCentresPtr_(NULL), - faceCentresPtr_(NULL), - cellVolumesPtr_(NULL), - faceAreasPtr_(NULL) + cellCentresPtr_(nullptr), + faceCentresPtr_(nullptr), + cellVolumesPtr_(nullptr), + faceAreasPtr_(nullptr) {} @@ -88,28 +88,28 @@ Foam::primitiveMesh::primitiveMesh nFaces_(nFaces), nCells_(nCells), - cellShapesPtr_(NULL), - edgesPtr_(NULL), - ccPtr_(NULL), - ecPtr_(NULL), - pcPtr_(NULL), + cellShapesPtr_(nullptr), + edgesPtr_(nullptr), + ccPtr_(nullptr), + ecPtr_(nullptr), + pcPtr_(nullptr), - cfPtr_(NULL), - efPtr_(NULL), - pfPtr_(NULL), + cfPtr_(nullptr), + efPtr_(nullptr), + pfPtr_(nullptr), - cePtr_(NULL), - fePtr_(NULL), - pePtr_(NULL), - ppPtr_(NULL), - cpPtr_(NULL), + cePtr_(nullptr), + fePtr_(nullptr), + pePtr_(nullptr), + ppPtr_(nullptr), + cpPtr_(nullptr), labels_(0), - cellCentresPtr_(NULL), - faceCentresPtr_(NULL), - cellVolumesPtr_(NULL), - faceAreasPtr_(NULL) + cellCentresPtr_(nullptr), + faceCentresPtr_(nullptr), + cellVolumesPtr_(nullptr), + faceAreasPtr_(nullptr) {} diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index 233b982326f3c0eda5851bc02fa89c56af7f8b3b..28057107c48f58e968def9a62b7f445e90f265ca 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -606,35 +606,35 @@ public: virtual bool checkUpperTriangular ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check cell zip-up virtual bool checkCellsZipUp ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check uniqueness of face vertices virtual bool checkFaceVertices ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check for unused points virtual bool checkPoints ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check face-face connectivity virtual bool checkFaceFaces ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; @@ -648,8 +648,8 @@ public: virtual bool checkClosedCells ( const bool report = false, - labelHashSet* setPtr = NULL, - labelHashSet* highAspectSetPtr = NULL, + labelHashSet* setPtr = nullptr, + labelHashSet* highAspectSetPtr = nullptr, const Vector<label>& solutionD = Vector<label>::one ) const; @@ -657,21 +657,21 @@ public: virtual bool checkFaceAreas ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check for negative cell volumes virtual bool checkCellVolumes ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check for non-orthogonality virtual bool checkFaceOrthogonality ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check face pyramid volume @@ -679,14 +679,14 @@ public: ( const bool report = false, const scalar minPyrVol = -SMALL, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check face skewness virtual bool checkFaceSkewness ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check face angles @@ -694,7 +694,7 @@ public: ( const bool report = false, const scalar maxSin = 10, // In degrees - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check face warpage: decompose face and check ratio between @@ -713,7 +713,7 @@ public: ( const bool report, const scalar reportDistSqr, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check edge length @@ -721,14 +721,14 @@ public: ( const bool report, const scalar minLenSqr, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; //- Check for concave cells by the planes of faces virtual bool checkConcaveCells ( const bool report = false, - labelHashSet* setPtr = NULL + labelHashSet* setPtr = nullptr ) const; diff --git a/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C b/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C index ed8b34ab0641605c8026552fe92fd8dbb20f7589..e167a05c1aee6d47f69c529afdfff6edf91e5275 100644 --- a/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C +++ b/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C @@ -48,7 +48,7 @@ Foam::TimeFunction1<Type>::TimeFunction1(const Time& t, const word& name) : time_(t), name_(name), - entry_(NULL) + entry_(nullptr) {} diff --git a/src/OpenFOAM/primitives/ints/int32/int32IO.C b/src/OpenFOAM/primitives/ints/int32/int32IO.C index 4377f95992bba3744353b744cde6cb3d906532e0..a8c972377dba3dd927a9797f0035091a95415e0b 100644 --- a/src/OpenFOAM/primitives/ints/int32/int32IO.C +++ b/src/OpenFOAM/primitives/ints/int32/int32IO.C @@ -84,7 +84,7 @@ int32_t Foam::readInt32(Istream& is) bool Foam::read(const char* buf, int32_t& s) { - char *endptr = NULL; + char *endptr = nullptr; errno = 0; intmax_t l = strtoimax(buf, &endptr, 10); s = int32_t(l); diff --git a/src/OpenFOAM/primitives/ints/int64/int64IO.C b/src/OpenFOAM/primitives/ints/int64/int64IO.C index e9355a30121d4916e893297de733cbe02042e24f..89f14163a0b6023f23dbd5e79ab3bbf766eb97aa 100644 --- a/src/OpenFOAM/primitives/ints/int64/int64IO.C +++ b/src/OpenFOAM/primitives/ints/int64/int64IO.C @@ -84,7 +84,7 @@ int64_t Foam::readInt64(Istream& is) bool Foam::read(const char* buf, int64_t& s) { - char *endptr = NULL; + char *endptr = nullptr; errno = 0; intmax_t l = strtoimax(buf, &endptr, 10); s = int64_t(l); diff --git a/src/OpenFOAM/primitives/ints/uint32/uint32IO.C b/src/OpenFOAM/primitives/ints/uint32/uint32IO.C index 9111c2d741104b14fda923542f2f2b416957e3be..2746938d638028443a87ef1317d997975884fa33 100644 --- a/src/OpenFOAM/primitives/ints/uint32/uint32IO.C +++ b/src/OpenFOAM/primitives/ints/uint32/uint32IO.C @@ -82,7 +82,7 @@ uint32_t Foam::readUint32(Istream& is) bool Foam::read(const char* buf, uint32_t& s) { - char *endptr = NULL; + char *endptr = nullptr; long l = strtol(buf, &endptr, 10); s = uint32_t(l); return (*endptr == 0); diff --git a/src/OpenFOAM/primitives/ints/uint64/uint64IO.C b/src/OpenFOAM/primitives/ints/uint64/uint64IO.C index dfb7ab4db6b521d375ea5b82cd82dab8862ec885..be10f83b014bcad02fb4a264080f3bb41ad5ff63 100644 --- a/src/OpenFOAM/primitives/ints/uint64/uint64IO.C +++ b/src/OpenFOAM/primitives/ints/uint64/uint64IO.C @@ -82,7 +82,7 @@ uint64_t Foam::readUint64(Istream& is) bool Foam::read(const char* buf, uint64_t& s) { - char *endptr = NULL; + char *endptr = nullptr; long l = strtol(buf, &endptr, 10); s = uint64_t(l); return (*endptr == 0); diff --git a/src/OpenFOAM/primitives/strings/lists/hashedWordList.H b/src/OpenFOAM/primitives/strings/lists/hashedWordList.H index cdeeeb00ccce926c9ff8a7e90af65e6d9bda24ff..b906f42f18d371932184167b96745c47539fd3a3 100644 --- a/src/OpenFOAM/primitives/strings/lists/hashedWordList.H +++ b/src/OpenFOAM/primitives/strings/lists/hashedWordList.H @@ -88,7 +88,7 @@ public: //- Construct from number and list of names hashedWordList(const label nNames, const char** names); - //- Construct from a NULL-terminated list of names + //- Construct from a nullptr-terminated list of names hashedWordList(const char** names); //- Construct from Istream diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordRe.C b/src/OpenFOAM/primitives/strings/wordRe/wordRe.C index 95fd22dc8a491a4cd43c3e2a1f853c643bebe9be..c2ab7daec0d4936d2db25253dba456e001ea738a 100644 --- a/src/OpenFOAM/primitives/strings/wordRe/wordRe.C +++ b/src/OpenFOAM/primitives/strings/wordRe/wordRe.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ const Foam::wordRe Foam::wordRe::null; Foam::wordRe::wordRe(Istream& is) : word(), - re_(NULL) + re_(nullptr) { is >> *this; } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index 41d4fbfc9ebca4309b5891028fb9a7f37715b1be..afbad9981437e7426d31d1f24bb1c207069610c7 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -53,7 +53,7 @@ thermalBaffle1DFvPatchScalarField thickness_(p.size()), Qs_(p.size()), solidDict_(), - solidPtr_(NULL), + solidPtr_(nullptr), QrPrevious_(p.size()), QrRelaxation_(1), QrName_("undefined-Qr") diff --git a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C index 12e23ea702878e2943e9051657591dbc9350c4dd..21281b636d55e12db04dbaa99f38c895b36d9bee 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C @@ -61,7 +61,7 @@ NicenoKEqn<BasicTurbulenceModel>::NicenoKEqn type ), - gasTurbulencePtr_(NULL), + gasTurbulencePtr_(nullptr), alphaInversion_ ( diff --git a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C index c682d0b29a355b9d76b3aebd8f0a080ea9c59acd..0dea09849fed56e4648c2b941c51f149ec65b637 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C +++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C @@ -60,7 +60,7 @@ SmagorinskyZhang<BasicTurbulenceModel>::SmagorinskyZhang type ), - gasTurbulencePtr_(NULL), + gasTurbulencePtr_(nullptr), Cmub_ ( diff --git a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C index 31d646b7598e6c5d87ac46011b2e820989b4c89c..f38e8b779d29478447fc04284a54d5607a6f5f2e 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ continuousGasKEqn<BasicTurbulenceModel>::continuousGasKEqn type ), - liquidTurbulencePtr_(NULL), + liquidTurbulencePtr_(nullptr), alphaInversion_ ( diff --git a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C index 7d923e013ffa00f4ff17517ea25ed8f1689dab68..fcdf9c72679296e32ff58c70375181d2dc7437a4 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C @@ -61,7 +61,7 @@ LaheyKEpsilon<BasicTurbulenceModel>::LaheyKEpsilon type ), - gasTurbulencePtr_(NULL), + gasTurbulencePtr_(nullptr), alphaInversion_ ( diff --git a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C index e57eff4b8432445018a74cef4e49a24f5bc1bf58..7e8b5ac4b406bba7b1dd17514eefa9f512e0fc63 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::continuousGasKEpsilon type ), - liquidTurbulencePtr_(NULL), + liquidTurbulencePtr_(nullptr), nutEff_ ( diff --git a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C index 25e47992f25fa5a73a381bc62636b2723ff50328..7f0af09be6231f6b798329e18fdec3d538a8572f 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C @@ -61,7 +61,7 @@ kOmegaSSTSato<BasicTurbulenceModel>::kOmegaSSTSato type ), - gasTurbulencePtr_(NULL), + gasTurbulencePtr_(nullptr), Cmub_ ( diff --git a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C index 57ff8c1de69f8285ae7aac78759ae46e3f4e432c..d0e6316f2cebbc4369b3fde2d8a44b70ec2c1b9e 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C @@ -66,7 +66,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon propertiesName ), - liquidTurbulencePtr_(NULL), + liquidTurbulencePtr_(nullptr), Cmu_ ( diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 8df2f329cf251b47683e5f3763dddb69fb65a431..a8296fffb3541c8229c5e6c5dae39693d806350a 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -42,7 +42,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion ) : CombThermoType(modelType, mesh, phaseName), - singleMixturePtr_(NULL), + singleMixturePtr_(nullptr), wFuel_ ( IOobject diff --git a/src/conversion/meshReader/meshReader.C b/src/conversion/meshReader/meshReader.C index 851492229dd4730e4ebfa1a0461f11a2587871d0..611b655d6f46f020b887b009f1f876c98939d6ed 100644 --- a/src/conversion/meshReader/meshReader.C +++ b/src/conversion/meshReader/meshReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -197,7 +197,7 @@ Foam::meshReader::meshReader const scalar scaleFactor ) : - pointCellsPtr_(NULL), + pointCellsPtr_(nullptr), nInternalFaces_(0), patchStarts_(0), patchSizes_(0), diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.C b/src/conversion/meshReader/starcd/STARCDMeshReader.C index 100d161ab8c600cf20a91b6c8aaa7add2bf9b27e..3ddd01c37b9d65ac28a0eb6c2acae8a8510c44b9 100644 --- a/src/conversion/meshReader/starcd/STARCDMeshReader.C +++ b/src/conversion/meshReader/starcd/STARCDMeshReader.C @@ -411,7 +411,7 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName) } // determine the foam cell shape - const cellModel* curModelPtr = NULL; + const cellModel* curModelPtr = nullptr; // fluid/solid cells switch (shapeId) diff --git a/src/dynamicMesh/attachDetach/attachDetach.C b/src/dynamicMesh/attachDetach/attachDetach.C index 3bec7005c0dd7b1d34f2adc9d43121dc45f1442f..8ce76a11c35af6267c11b85249e283a0987bd53f 100644 --- a/src/dynamicMesh/attachDetach/attachDetach.C +++ b/src/dynamicMesh/attachDetach/attachDetach.C @@ -251,7 +251,7 @@ Foam::attachDetach::attachDetach triggerIndex_(0), state_(UNKNOWN), trigger_(false), - pointMatchMapPtr_(NULL) + pointMatchMapPtr_(nullptr) { checkDefinition(); } @@ -287,7 +287,7 @@ Foam::attachDetach::attachDetach triggerIndex_(0), state_(UNKNOWN), trigger_(false), - pointMatchMapPtr_(NULL) + pointMatchMapPtr_(nullptr) { checkDefinition(); } diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C index 24b5f3be8109a05f710f283627dd8a0f336ac381..6b1960eee98c768184539107ef500e88a170adb5 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C @@ -436,7 +436,7 @@ void Foam::boundaryMesh::markZone // Null constructor Foam::boundaryMesh::boundaryMesh() : - meshPtr_(NULL), + meshPtr_(nullptr), patches_(), meshFace_(), featurePoints_(), @@ -462,7 +462,7 @@ void Foam::boundaryMesh::clearOut() { delete meshPtr_; - meshPtr_ = NULL; + meshPtr_ = nullptr; } } diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C index bc46a7568ce646139b8674a777226b6030fe937d..b59832add3dfec69e11d7fcec771148330a65723 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C @@ -115,7 +115,7 @@ void Foam::fvMeshAdder::MapVolField newPatchi++ ) { - bfld.set(newPatchi, NULL); + bfld.set(newPatchi, nullptr); } @@ -435,7 +435,7 @@ void Foam::fvMeshAdder::MapSurfaceField newPatchi++ ) { - bfld.set(newPatchi, NULL); + bfld.set(newPatchi, nullptr); } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index d2ad4d6f5d5ef57efae0085f4adc50ad072404c2..2fdf0b3c16044be949e1e6ca4d087059e741eb92 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -598,7 +598,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints if (returnReduce(pointToMaster.size(), sumOp<label>()) == 0) { - return autoPtr<mapPolyMesh>(NULL); + return autoPtr<mapPolyMesh>(nullptr); } polyTopoChange meshMod(mesh_); diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C index 2818ef9c95fd50acec16c355bd4c63748a2e4dd1..8b8c616293aa0b39a203513df98a96ed53f306ad 100644 --- a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C @@ -395,7 +395,7 @@ Foam::labelList Foam::fvMeshSubset::getCellsToRemove Foam::fvMeshSubset::fvMeshSubset(const fvMesh& baseMesh) : baseMesh_(baseMesh), - fvMeshSubsetPtr_(NULL), + fvMeshSubsetPtr_(nullptr), pointMap_(0), faceMap_(0), cellMap_(0), diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C index 0e0d45cd439c4dd09d74b9c3bafd10f88e8334b2..0913f7fba79f5b4b4b676bc2c8072b61bcf2a973 100644 --- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C +++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C @@ -149,8 +149,8 @@ Foam::layerAdditionRemoval::layerAdditionRemoval maxLayerThickness_(maxThickness), thicknessFromVolume_(thicknessFromVolume), oldLayerThickness_(-1.0), - pointsPairingPtr_(NULL), - facesPairingPtr_(NULL), + pointsPairingPtr_(nullptr), + facesPairingPtr_(nullptr), triggerRemoval_(-1), triggerAddition_(-1) { @@ -175,8 +175,8 @@ Foam::layerAdditionRemoval::layerAdditionRemoval dict.lookupOrDefault<Switch>("thicknessFromVolume", true) ), oldLayerThickness_(readOldThickness(dict)), - pointsPairingPtr_(NULL), - facesPairingPtr_(NULL), + pointsPairingPtr_(nullptr), + facesPairingPtr_(nullptr), triggerRemoval_(-1), triggerAddition_(-1) { diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C index b49a7090093e36686589f6823ef8cbd425a18fc6..d9aa92fdc3cf801dcdbc359d0cc5fc0d2a346d77 100644 --- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C +++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C @@ -2675,7 +2675,7 @@ Foam::cellCuts::cellCuts pointIsCut_(expand(mesh.nPoints(), meshVerts)), edgeIsCut_(expand(mesh.nEdges(), meshEdges)), edgeWeight_(expand(mesh.nEdges(), meshEdges, meshEdgeWeights)), - faceCutsPtr_(NULL), + faceCutsPtr_(nullptr), faceSplitCut_(cutCells.size()), cellLoops_(mesh.nCells()), nLoops_(-1), @@ -2718,7 +2718,7 @@ Foam::cellCuts::cellCuts pointIsCut_(expand(mesh.nPoints(), meshVerts)), edgeIsCut_(expand(mesh.nEdges(), meshEdges)), edgeWeight_(expand(mesh.nEdges(), meshEdges, meshEdgeWeights)), - faceCutsPtr_(NULL), + faceCutsPtr_(nullptr), faceSplitCut_(mesh.nFaces()/10 + 1), cellLoops_(mesh.nCells()), nLoops_(-1), @@ -2763,7 +2763,7 @@ Foam::cellCuts::cellCuts pointIsCut_(mesh.nPoints(), false), edgeIsCut_(mesh.nEdges(), false), edgeWeight_(mesh.nEdges(), -GREAT), - faceCutsPtr_(NULL), + faceCutsPtr_(nullptr), faceSplitCut_(cellLabels.size()), cellLoops_(mesh.nCells()), nLoops_(-1), @@ -2806,7 +2806,7 @@ Foam::cellCuts::cellCuts pointIsCut_(mesh.nPoints(), false), edgeIsCut_(mesh.nEdges(), false), edgeWeight_(mesh.nEdges(), -GREAT), - faceCutsPtr_(NULL), + faceCutsPtr_(nullptr), faceSplitCut_(refCells.size()), cellLoops_(mesh.nCells()), nLoops_(-1), @@ -2850,7 +2850,7 @@ Foam::cellCuts::cellCuts pointIsCut_(mesh.nPoints(), false), edgeIsCut_(mesh.nEdges(), false), edgeWeight_(mesh.nEdges(), -GREAT), - faceCutsPtr_(NULL), + faceCutsPtr_(nullptr), faceSplitCut_(cellLabels.size()), cellLoops_(mesh.nCells()), nLoops_(-1), @@ -2900,7 +2900,7 @@ Foam::cellCuts::cellCuts pointIsCut_(pointIsCut), edgeIsCut_(edgeIsCut), edgeWeight_(edgeWeight), - faceCutsPtr_(NULL), + faceCutsPtr_(nullptr), faceSplitCut_(faceSplitCut), cellLoops_(cellLoops), nLoops_(nLoops), diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.H b/src/dynamicMesh/meshCut/cellLooper/cellLooper.H index 1f7d579c9a16ca3460a0e667f7ccae6543dd3800..2642fd641f62f4165dbeb20e2540b69c684e1b11 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.H @@ -146,7 +146,7 @@ public: autoPtr<cellLooper> clone() const { NotImplemented; - return autoPtr<cellLooper>(NULL); + return autoPtr<cellLooper>(nullptr); } diff --git a/src/dynamicMesh/meshCut/directions/directions.H b/src/dynamicMesh/meshCut/directions/directions.H index 0a16672e568073c6fbfc8b5d15a21c83ca7bdd84..c81c794ae813f951350996eac00cb743616a0275 100644 --- a/src/dynamicMesh/meshCut/directions/directions.H +++ b/src/dynamicMesh/meshCut/directions/directions.H @@ -142,7 +142,7 @@ public: ( const polyMesh& mesh, const dictionary& dict, - const twoDPointCorrector* correct2DPtr = NULL + const twoDPointCorrector* correct2DPtr = nullptr ); }; diff --git a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C index 6868a9335035d1594e196676b85fa0c907b81e79..4eb2c5c2fa1912d203f05308a36ce9f75f6681ff 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C +++ b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C @@ -455,7 +455,7 @@ void Foam::multiDirRefinement::refineFromDict // How to walk cell circumference. Switch pureGeomCut(dict.lookup("geometricCut")); - autoPtr<cellLooper> cellWalker(NULL); + autoPtr<cellLooper> cellWalker(nullptr); if (pureGeomCut) { cellWalker.reset(new geomCellLooper(mesh)); diff --git a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C index 97b0d055251fc671cb99a33d8afea09e4228415e..71623907fde7ea916639400177b0174e958e4248 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C @@ -77,7 +77,7 @@ void Foam::undoableMeshCutter::printRefTree(Ostream& os) const { if (!splitPtr->isMaster()) { - splitPtr = NULL; + splitPtr = nullptr; break; } @@ -209,9 +209,9 @@ Foam::undoableMeshCutter::~undoableMeshCutter() { splitCell* otherSidePtr = splitPtr->getOther(); - otherSidePtr->parent() = NULL; + otherSidePtr->parent() = nullptr; - splitPtr->parent() = NULL; + splitPtr->parent() = nullptr; } // Delete splitCell (updates pointer on parent to itself) @@ -257,7 +257,7 @@ void Foam::undoableMeshCutter::setRefinement // place. // Create 0th level. Null parent to denote this. - splitCell* parentPtr = new splitCell(celli, NULL); + splitCell* parentPtr = new splitCell(celli, nullptr); splitCell* masterPtr = new splitCell(celli, parentPtr); diff --git a/src/dynamicMesh/meshCut/splitCell/splitCell.C b/src/dynamicMesh/meshCut/splitCell/splitCell.C index db036d918e287062f60fb562ac1e916d4212d98f..ae143cfeb7c8f2747c9ddb7c72f47bc3dc79afb3 100644 --- a/src/dynamicMesh/meshCut/splitCell/splitCell.C +++ b/src/dynamicMesh/meshCut/splitCell/splitCell.C @@ -33,8 +33,8 @@ Foam::splitCell::splitCell(const label celli, splitCell* parent) : celli_(celli), parent_(parent), - master_(NULL), - slave_(NULL) + master_(nullptr), + slave_(nullptr) {} @@ -49,11 +49,11 @@ Foam::splitCell::~splitCell() // Make sure parent does not refer to me anymore. if (myParent->master() == this) { - myParent->master() = NULL; + myParent->master() = nullptr; } else if (myParent->slave() == this) { - myParent->slave() = NULL; + myParent->slave() = nullptr; } else { @@ -112,7 +112,7 @@ Foam::splitCell* Foam::splitCell::getOther() const FatalErrorInFunction << "Cell:" << cellLabel() << abort(FatalError); - return NULL; + return nullptr; } else if (myParent->master() == this) { @@ -128,7 +128,7 @@ Foam::splitCell* Foam::splitCell::getOther() const << " parent's master or slave pointer" << endl << "Cell:" << cellLabel() << abort(FatalError); - return NULL; + return nullptr; } } diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C index a5039a4996d71e3338cff5666142603eaf0e18a2..b4f8f7449f51d2753480751abf1369653fcc244f 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C @@ -1872,10 +1872,10 @@ Foam::faceCoupleInfo::faceCoupleInfo const bool perfectMatch ) : - masterPatchPtr_(NULL), - slavePatchPtr_(NULL), + masterPatchPtr_(nullptr), + slavePatchPtr_(nullptr), cutPoints_(0), - cutFacesPtr_(NULL), + cutFacesPtr_(nullptr), cutToMasterFaces_(0), masterToCutPoints_(0), cutToSlaveFaces_(0), @@ -1981,7 +1981,7 @@ Foam::faceCoupleInfo::faceCoupleInfo ) ), cutPoints_(0), - cutFacesPtr_(NULL), + cutFacesPtr_(nullptr), cutToMasterFaces_(0), masterToCutPoints_(0), cutToSlaveFaces_(0), diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C index 96511ebe4cdf13270d89f47587698d826c115af8..9d1140a71ef129e1bfcdfa2e4e70b7046bc7c4d1 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C @@ -112,7 +112,7 @@ bool Foam::combineFaces::validFace return false; } - bool isNonManifold = bigFace.checkPointManifold(false, NULL); + bool isNonManifold = bigFace.checkPointManifold(false, nullptr); if (isNonManifold) { return false; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C index 0519999c040b081f282a51466acb380e2e1b0a55..251257c112bcdcebbd9ebaf08b746fa8b229e98a 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C @@ -108,14 +108,14 @@ void Foam::refinementHistory::writeDebug Foam::refinementHistory::splitCell8::splitCell8() : parent_(-1), - addedCellsPtr_(NULL) + addedCellsPtr_(nullptr) {} Foam::refinementHistory::splitCell8::splitCell8(const label parent) : parent_(parent), - addedCellsPtr_(NULL) + addedCellsPtr_(nullptr) {} @@ -132,7 +132,7 @@ Foam::refinementHistory::splitCell8::splitCell8(const splitCell8& sc) ( sc.addedCellsPtr_.valid() ? new FixedList<label, 8>(sc.addedCellsPtr_()) - : NULL + : nullptr ) {} @@ -157,7 +157,7 @@ void Foam::refinementHistory::splitCell8::operator=(const splitCell8& s) ( s.addedCellsPtr_.valid() ? new FixedList<label, 8>(s.addedCellsPtr_()) - : NULL + : nullptr ); } @@ -203,7 +203,7 @@ Foam::Istream& Foam::operator>>(Istream& is, refinementHistory::splitCell8& sc) } else { - sc.addedCellsPtr_.reset(NULL); + sc.addedCellsPtr_.reset(nullptr); } return is; @@ -1732,7 +1732,7 @@ void Foam::refinementHistory::combineCells } splitCell8& parentSplit = splitCells_[parentIndex]; - parentSplit.addedCellsPtr_.reset(NULL); + parentSplit.addedCellsPtr_.reset(nullptr); visibleCells_[masterCelli] = parentIndex; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C index 05f06958d526ca5493a94ab26092c9128ed1c58c..9dbe9ea80f2044cbfbf8cb1be30a9fb12ee3f8e9 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -282,7 +282,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChanger::changeMesh } else { - return autoPtr<mapPolyMesh>(NULL); + return autoPtr<mapPolyMesh>(nullptr); } } diff --git a/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C b/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C index 4c1e0855c6b4deb24a75e624988603e189d460d5..2de1c3619a03098c25c13b0c9076b6fe2e6a5594 100644 --- a/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,7 @@ Foam::polyTopoChange& Foam::repatchPolyTopoChanger::meshMod() Foam::repatchPolyTopoChanger::repatchPolyTopoChanger(polyMesh& mesh) : mesh_(mesh), - meshModPtr_(NULL) + meshModPtr_(nullptr) {} diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C index bbe891aa73edd16d371513ccbd2151c086c32719..e0ba1fd8e2a7f3fb118a472c8916cc72338257c4 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C @@ -153,15 +153,15 @@ Foam::enrichedPatch::enrichedPatch slavePointPointHits_(slavePointPointHits), slavePointEdgeHits_(slavePointEdgeHits), slavePointFaceHits_(slavePointFaceHits), - enrichedFacesPtr_(NULL), - meshPointsPtr_(NULL), - localFacesPtr_(NULL), - localPointsPtr_(NULL), - pointPointsPtr_(NULL), - masterPointFacesPtr_(NULL), - cutFacesPtr_(NULL), - cutFaceMasterPtr_(NULL), - cutFaceSlavePtr_(NULL) + enrichedFacesPtr_(nullptr), + meshPointsPtr_(nullptr), + localFacesPtr_(nullptr), + localPointsPtr_(nullptr), + pointPointsPtr_(nullptr), + masterPointFacesPtr_(nullptr), + cutFacesPtr_(nullptr), + cutFaceMasterPtr_(nullptr), + cutFaceSlavePtr_(nullptr) {} diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C index ad1ed4d87164a621b33473d8dfc4c7e3a73b5fc1..52026efb9118122e1e27d1ca251ad2f6bbda95da 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.C +++ b/src/dynamicMesh/slidingInterface/slidingInterface.C @@ -178,19 +178,19 @@ Foam::slidingInterface::slidingInterface edgeMasterCatchFraction_(edgeMasterCatchFractionDefault_), edgeCoPlanarTol_(edgeCoPlanarTolDefault_), edgeEndCutoffTol_(edgeEndCutoffTolDefault_), - cutFaceMasterPtr_(NULL), - cutFaceSlavePtr_(NULL), - masterFaceCellsPtr_(NULL), - slaveFaceCellsPtr_(NULL), - masterStickOutFacesPtr_(NULL), - slaveStickOutFacesPtr_(NULL), - retiredPointMapPtr_(NULL), - cutPointEdgePairMapPtr_(NULL), - slavePointPointHitsPtr_(NULL), - slavePointEdgeHitsPtr_(NULL), - slavePointFaceHitsPtr_(NULL), - masterPointEdgeHitsPtr_(NULL), - projectedSlavePointsPtr_(NULL) + cutFaceMasterPtr_(nullptr), + cutFaceSlavePtr_(nullptr), + masterFaceCellsPtr_(nullptr), + slaveFaceCellsPtr_(nullptr), + masterStickOutFacesPtr_(nullptr), + slaveStickOutFacesPtr_(nullptr), + retiredPointMapPtr_(nullptr), + cutPointEdgePairMapPtr_(nullptr), + slavePointPointHitsPtr_(nullptr), + slavePointEdgeHitsPtr_(nullptr), + slavePointFaceHitsPtr_(nullptr), + masterPointEdgeHitsPtr_(nullptr), + projectedSlavePointsPtr_(nullptr) { checkDefinition(); @@ -256,19 +256,19 @@ Foam::slidingInterface::slidingInterface intersection::algorithmNames_.read(dict.lookup("projection")) ), trigger_(false), - cutFaceMasterPtr_(NULL), - cutFaceSlavePtr_(NULL), - masterFaceCellsPtr_(NULL), - slaveFaceCellsPtr_(NULL), - masterStickOutFacesPtr_(NULL), - slaveStickOutFacesPtr_(NULL), - retiredPointMapPtr_(NULL), - cutPointEdgePairMapPtr_(NULL), - slavePointPointHitsPtr_(NULL), - slavePointEdgeHitsPtr_(NULL), - slavePointFaceHitsPtr_(NULL), - masterPointEdgeHitsPtr_(NULL), - projectedSlavePointsPtr_(NULL) + cutFaceMasterPtr_(nullptr), + cutFaceSlavePtr_(nullptr), + masterFaceCellsPtr_(nullptr), + slaveFaceCellsPtr_(nullptr), + masterStickOutFacesPtr_(nullptr), + slaveStickOutFacesPtr_(nullptr), + retiredPointMapPtr_(nullptr), + cutPointEdgePairMapPtr_(nullptr), + slavePointPointHitsPtr_(nullptr), + slavePointEdgeHitsPtr_(nullptr), + slavePointFaceHitsPtr_(nullptr), + masterPointEdgeHitsPtr_(nullptr), + projectedSlavePointsPtr_(nullptr) { // Optionally default tolerances from dictionary setTolerances(dict); diff --git a/src/edgeMesh/edgeMesh.C b/src/edgeMesh/edgeMesh.C index 4964d0c0b440bf0fdf46bd82a650866ecdc648ba..937a8a373c6ae4c59993798ca9268c7e9b549acb 100644 --- a/src/edgeMesh/edgeMesh.C +++ b/src/edgeMesh/edgeMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,7 +125,7 @@ Foam::edgeMesh::edgeMesh() fileFormats::edgeMeshFormatsCore(), points_(0), edges_(0), - pointEdgesPtr_(NULL) + pointEdgesPtr_(nullptr) {} @@ -138,7 +138,7 @@ Foam::edgeMesh::edgeMesh fileFormats::edgeMeshFormatsCore(), points_(points), edges_(edges), - pointEdgesPtr_(NULL) + pointEdgesPtr_(nullptr) {} @@ -151,7 +151,7 @@ Foam::edgeMesh::edgeMesh fileFormats::edgeMeshFormatsCore(), points_(0), edges_(0), - pointEdgesPtr_(NULL) + pointEdgesPtr_(nullptr) { points_.transfer(pointLst()); edges_.transfer(edgeLst()); diff --git a/src/edgeMesh/edgeMeshI.H b/src/edgeMesh/edgeMeshI.H index cfd6a27d75844e367b57934d00e25f60b077f2ad..4c808c239d56fd837048ba218bc81fca4e2febc6 100644 --- a/src/edgeMesh/edgeMeshI.H +++ b/src/edgeMesh/edgeMeshI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,7 @@ inline Foam::edgeMesh::edgeMesh(const edgeMesh& em) fileFormats::edgeMeshFormatsCore(), points_(em.points_), edges_(em.edges_), - pointEdgesPtr_(NULL) + pointEdgesPtr_(nullptr) {} diff --git a/src/edgeMesh/edgeMeshIO.C b/src/edgeMesh/edgeMeshIO.C index e8bc88f4026abf32e7bfac1d812d7b610ebd9447..6b4dd6f3820c2613eb31a37174a520a19687b7a2 100644 --- a/src/edgeMesh/edgeMeshIO.C +++ b/src/edgeMesh/edgeMeshIO.C @@ -37,7 +37,7 @@ Foam::edgeMesh::edgeMesh : points_(0), edges_(0), - pointEdgesPtr_(NULL) + pointEdgesPtr_(nullptr) { read(name, ext); } @@ -47,7 +47,7 @@ Foam::edgeMesh::edgeMesh(const fileName& name) : points_(0), edges_(0), - pointEdgesPtr_(NULL) + pointEdgesPtr_(nullptr) { read(name); } diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H index d6ea9cdf5c2361ac948ec28b546dd6b6b152e43d..0bcbcfd935c151a60eff2e7b6f6a5af2aad830d4 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H @@ -174,7 +174,7 @@ public: autoPtr<MRFZone> clone() const { NotImplemented; - return autoPtr<MRFZone>(NULL); + return autoPtr<MRFZone>(nullptr); } diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H index 4beb6d612a30192ceb0d9483f7e1bfc08e746f62..506a868bc5bdfeb47e1e99a3ca05d2c0d293fa8a 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H @@ -133,7 +133,7 @@ public: autoPtr<option> clone() const { NotImplemented; - return autoPtr<option>(NULL); + return autoPtr<option>(nullptr); } //- Return pointer to new fvOption object created diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C index 04e34779180f5a6c88b6f97d7ecb1a10f83dc258..98bd38eb72b8f78b5256245923700fe87b3bff53 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C @@ -142,9 +142,9 @@ Foam::slicedFvPatchField<Type>::clone template<class Type> Foam::slicedFvPatchField<Type>::~slicedFvPatchField() { - // Set the fvPatchField storage pointer to NULL before its destruction + // Set the fvPatchField storage pointer to nullptr before its destruction // to protect the field it a slice of. - UList<Type>::shallowCopy(UList<Type>(NULL, 0)); + UList<Type>::shallowCopy(UList<Type>(nullptr, 0)); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 26c447f3452a6111d85cd8f8ce1617029048691e..2222b05b1e5ef4a4d16df2fa6a91a536fc97c5c3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -42,7 +42,7 @@ timeVaryingMappedFixedValueFvPatchField fieldTableName_(iF.name()), setAverage_(false), perturb_(0), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), @@ -75,7 +75,7 @@ timeVaryingMappedFixedValueFvPatchField "planarInterpolation" ) ), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), @@ -135,7 +135,7 @@ timeVaryingMappedFixedValueFvPatchField setAverage_(ptf.setAverage_), perturb_(ptf.perturb_), mapMethod_(ptf.mapMethod_), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), @@ -159,7 +159,7 @@ timeVaryingMappedFixedValueFvPatchField setAverage_(ptf.setAverage_), perturb_(ptf.perturb_), mapMethod_(ptf.mapMethod_), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(ptf.sampleTimes_), startSampleTime_(ptf.startSampleTime_), startSampledValues_(ptf.startSampledValues_), @@ -184,7 +184,7 @@ timeVaryingMappedFixedValueFvPatchField setAverage_(ptf.setAverage_), perturb_(ptf.perturb_), mapMethod_(ptf.mapMethod_), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(ptf.sampleTimes_), startSampleTime_(ptf.startSampleTime_), startSampledValues_(ptf.startSampledValues_), diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C index ef3246303d4970cafe0dbe926d6c58422bca03f9..39ad3b45f78759e4688d0c9c908098c94f588724 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C @@ -142,9 +142,9 @@ Foam::slicedFvsPatchField<Type>::clone template<class Type> Foam::slicedFvsPatchField<Type>::~slicedFvsPatchField() { - // Set the fvsPatchField storage pointer to NULL before its destruction + // Set the fvsPatchField storage pointer to nullptr before its destruction // to protect the field it a slice of. - UList<Type>::shallowCopy(UList<Type>(NULL, 0)); + UList<Type>::shallowCopy(UList<Type>(nullptr, 0)); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C index 53004b478656038a843374ea3d2c6755cd8a202d..5d896b07a9391aed89ca2226fe23b6b22afaa959 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C @@ -141,7 +141,7 @@ tmp<surfaceScalarField> CoEulerDdtScheme<Type>::CofrDeltaT() const << "Incorrect dimensions of phi: " << phi.dimensions() << abort(FatalError); - return tmp<surfaceScalarField>(NULL); + return tmp<surfaceScalarField>(nullptr); } } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H index bec2d9c6f1c4b92c81088253fd01f6038da7e971..991c54d63b9bb3fae544b602906e4c858ecb7a9a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H +++ b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H @@ -92,7 +92,7 @@ public: gaussGrad(const fvMesh& mesh, Istream& is) : gradScheme<Type>(mesh), - tinterpScheme_(NULL) + tinterpScheme_(nullptr) { if (is.eof()) { diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H index c88282da1765e0614c2f04a4632dc0c6f519dfa3..6e593c9c5c80e25732007df3db8d18dfb510a20a 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H @@ -120,8 +120,8 @@ public: laplacianScheme(const fvMesh& mesh, Istream& is) : mesh_(mesh), - tinterpGammaScheme_(NULL), - tsnGradScheme_(NULL) + tinterpGammaScheme_(nullptr), + tsnGradScheme_(nullptr) { tinterpGammaScheme_ = tmp<surfaceInterpolationScheme<GType>> ( diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C index f1249ad65fae13a33f97bd9e9900468f1b186d4d..11e4ab45c9e0edb31a1c6d92f0a9d0d3f062b281 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C @@ -57,7 +57,7 @@ orthogonalSnGrad<Type>::correction ) const { NotImplemented; - return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL); + return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(nullptr); } diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H index db7ad52082ccae1a155d09052c29adbf312e2116..383e36823ee5da3f924f9edf04375965536804de 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H @@ -161,7 +161,10 @@ public: virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> correction(const GeometricField<Type, fvPatchField, volMesh>&) const { - return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL); + return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> + ( + nullptr + ); } //- Return the snGrad of the given cell field diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C index 5693e6cb7fad0902d22b7826da8dd546c30ef342..548bbe71334d076e8c58c40f487e5e6e4d220a25 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C @@ -57,7 +57,7 @@ uncorrectedSnGrad<Type>::correction ) const { NotImplemented; - return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL); + return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(nullptr); } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index fd586598b80a878eae4e516412fa62db0256481f..16270c07d5e5bf154bbda4427cbb25a86f76fcef 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -276,7 +276,7 @@ Foam::fvMatrix<Type>::fvMatrix source_(psi.size(), Zero), internalCoeffs_(psi.mesh().boundary().size()), boundaryCoeffs_(psi.mesh().boundary().size()), - faceFluxCorrectionPtr_(NULL) + faceFluxCorrectionPtr_(nullptr) { if (debug) { @@ -328,7 +328,7 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm) source_(fvm.source_), internalCoeffs_(fvm.internalCoeffs_), boundaryCoeffs_(fvm.boundaryCoeffs_), - faceFluxCorrectionPtr_(NULL) + faceFluxCorrectionPtr_(nullptr) { if (debug) { @@ -373,7 +373,7 @@ Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm) const_cast<fvMatrix<Type>&>(tfvm()).boundaryCoeffs_, tfvm.isTmp() ), - faceFluxCorrectionPtr_(NULL) + faceFluxCorrectionPtr_(nullptr) { if (debug) { @@ -386,7 +386,7 @@ Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm) if (tfvm.isTmp()) { faceFluxCorrectionPtr_ = tfvm().faceFluxCorrectionPtr_; - tfvm().faceFluxCorrectionPtr_ = NULL; + tfvm().faceFluxCorrectionPtr_ = nullptr; } else { @@ -416,7 +416,7 @@ Foam::fvMatrix<Type>::fvMatrix source_(is), internalCoeffs_(psi.mesh().boundary().size()), boundaryCoeffs_(psi.mesh().boundary().size()), - faceFluxCorrectionPtr_(NULL) + faceFluxCorrectionPtr_(nullptr) { if (debug) { diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/IMULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/IMULESTemplates.C index 33c06fae22240ec9904f9f57e4b5a72a8893700a..c1ecbb927fa9374e1e3c6e93549bbb550cae6fd9 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/IMULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/IMULESTemplates.C @@ -40,7 +40,7 @@ namespace MULES inline tmp<surfaceScalarField> interpolate(const RhoType& rho) { NotImplemented; - return tmp<surfaceScalarField>(NULL); + return tmp<surfaceScalarField>(nullptr); } template<> diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 0ba93d1f101ac2537e5b001310ac7c9c629ec748..72a2d5fd80c780d5261b98936d6412ee37cd192a 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -66,7 +66,7 @@ void Foam::fvMesh::clearGeomNotOldVol() slicedVolScalarField::Internal* VPtr = static_cast<slicedVolScalarField::Internal*>(VPtr_); deleteDemandDrivenData(VPtr); - VPtr_ = NULL; + VPtr_ = nullptr; deleteDemandDrivenData(SfPtr_); deleteDemandDrivenData(magSfPtr_); @@ -77,11 +77,11 @@ void Foam::fvMesh::clearGeomNotOldVol() void Foam::fvMesh::updateGeomNotOldVol() { - bool haveV = (VPtr_ != NULL); - bool haveSf = (SfPtr_ != NULL); - bool haveMagSf = (magSfPtr_ != NULL); - bool haveCP = (CPtr_ != NULL); - bool haveCf = (CfPtr_ != NULL); + bool haveV = (VPtr_ != nullptr); + bool haveSf = (SfPtr_ != nullptr); + bool haveMagSf = (magSfPtr_ != nullptr); + bool haveCP = (CPtr_ != nullptr); + bool haveCf = (CfPtr_ != nullptr); clearGeomNotOldVol(); @@ -251,16 +251,16 @@ Foam::fvMesh::fvMesh(const IOobject& io) fvSolution(static_cast<const objectRegistry&>(*this)), data(static_cast<const objectRegistry&>(*this)), boundary_(*this, boundaryMesh()), - lduPtr_(NULL), + lduPtr_(nullptr), curTimeIndex_(time().timeIndex()), - VPtr_(NULL), - V0Ptr_(NULL), - V00Ptr_(NULL), - SfPtr_(NULL), - magSfPtr_(NULL), - CPtr_(NULL), - CfPtr_(NULL), - phiPtr_(NULL) + VPtr_(nullptr), + V0Ptr_(nullptr), + V00Ptr_(nullptr), + SfPtr_(nullptr), + magSfPtr_(nullptr), + CPtr_(nullptr), + CfPtr_(nullptr), + phiPtr_(nullptr) { if (debug) { @@ -361,16 +361,16 @@ Foam::fvMesh::fvMesh fvSolution(static_cast<const objectRegistry&>(*this)), data(static_cast<const objectRegistry&>(*this)), boundary_(*this, boundaryMesh()), - lduPtr_(NULL), + lduPtr_(nullptr), curTimeIndex_(time().timeIndex()), - VPtr_(NULL), - V0Ptr_(NULL), - V00Ptr_(NULL), - SfPtr_(NULL), - magSfPtr_(NULL), - CPtr_(NULL), - CfPtr_(NULL), - phiPtr_(NULL) + VPtr_(nullptr), + V0Ptr_(nullptr), + V00Ptr_(nullptr), + SfPtr_(nullptr), + magSfPtr_(nullptr), + CPtr_(nullptr), + CfPtr_(nullptr), + phiPtr_(nullptr) { if (debug) { @@ -395,16 +395,16 @@ Foam::fvMesh::fvMesh fvSolution(static_cast<const objectRegistry&>(*this)), data(static_cast<const objectRegistry&>(*this)), boundary_(*this, boundaryMesh()), - lduPtr_(NULL), + lduPtr_(nullptr), curTimeIndex_(time().timeIndex()), - VPtr_(NULL), - V0Ptr_(NULL), - V00Ptr_(NULL), - SfPtr_(NULL), - magSfPtr_(NULL), - CPtr_(NULL), - CfPtr_(NULL), - phiPtr_(NULL) + VPtr_(nullptr), + V0Ptr_(nullptr), + V00Ptr_(nullptr), + SfPtr_(nullptr), + magSfPtr_(nullptr), + CPtr_(nullptr), + CfPtr_(nullptr), + phiPtr_(nullptr) { if (debug) { @@ -428,16 +428,16 @@ Foam::fvMesh::fvMesh fvSolution(static_cast<const objectRegistry&>(*this)), data(static_cast<const objectRegistry&>(*this)), boundary_(*this), - lduPtr_(NULL), + lduPtr_(nullptr), curTimeIndex_(time().timeIndex()), - VPtr_(NULL), - V0Ptr_(NULL), - V00Ptr_(NULL), - SfPtr_(NULL), - magSfPtr_(NULL), - CPtr_(NULL), - CfPtr_(NULL), - phiPtr_(NULL) + VPtr_(nullptr), + V0Ptr_(nullptr), + V00Ptr_(nullptr), + SfPtr_(nullptr), + magSfPtr_(nullptr), + CPtr_(nullptr), + CfPtr_(nullptr), + phiPtr_(nullptr) { if (debug) { diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C index fd41e045e77175a3c7e9058bccebca4699512f27..e00d44cb562e039dd700a067f188706d7fdd46ec 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C @@ -213,9 +213,9 @@ Foam::fvPatchMapper::fvPatchMapper faceMap_(faceMap), sizeBeforeMapping_(faceMap.oldPatchSizes()[patch_.index()]), hasUnmapped_(false), - directAddrPtr_(NULL), - interpolationAddrPtr_(NULL), - weightsPtr_(NULL) + directAddrPtr_(nullptr), + interpolationAddrPtr_(nullptr), + weightsPtr_(nullptr) {} diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C index 32e6a39a2c62e2fbe469e06529cbfb24ce89160b..0872af5dc979b0a4871e7a39c155bd33db71a268 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C @@ -152,10 +152,10 @@ Foam::fvSurfaceMapper::fvSurfaceMapper : mesh_(mesh), faceMap_(fMapper), - directAddrPtr_(NULL), - interpolationAddrPtr_(NULL), - weightsPtr_(NULL), - insertedObjectLabelsPtr_(NULL) + directAddrPtr_(nullptr), + interpolationAddrPtr_(nullptr), + weightsPtr_(nullptr), + insertedObjectLabelsPtr_(nullptr) {} diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledFvPatch.C index 6f68e1abff9558aa93a85f620b2458e4ab862929..d263b854d799f073112ac02c0249ad2b7876f1c6 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledFvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ Foam::tmp<Foam::labelField> Foam::regionCoupledFvPatch::internalFieldTransfer } - return tmp<labelField>(NULL); + return tmp<labelField>(nullptr); } diff --git a/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledWallFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledWallFvPatch.C index 382fff4e799f7b7eb3cd54664faa5a6e7f1a4ab9..2aad9298588ed3d46585cc960812ad0bf8f25f3d 100644 --- a/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledWallFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/derived/regionCoupled/regionCoupledWallFvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,7 +63,7 @@ internalFieldTransfer return tmp<labelField>(new labelField(iF.size(), 0)); } - return tmp<labelField>(NULL); + return tmp<labelField>(nullptr); } // ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index ee8943ec822f2acae23eb3eb368b0c401bad4e88..6dc1716e6d81fc1db9a1a3d98663cc0c540f8b46 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -259,8 +259,8 @@ public: const typename GeometricField::Patch& lookupPatchField ( const word& name, - const GeometricField* = NULL, - const Type* = NULL + const GeometricField* = nullptr, + const Type* = nullptr ) const; }; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H index 73cc5ab710613a3b203d9ba2c06308b9a5fc56b0..bd1ad10af787a97126c0d6a686e5332119b0b7f9 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H @@ -315,7 +315,7 @@ public: { return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H index a2f1e3bea219d5e9d1e46deb909df593f4236743..213633d120c91b76b3cf0a8a83b8deae1f7ed5e1 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H @@ -343,7 +343,7 @@ public: { return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H index 2d28a4958441101b6b3a8628b4c0c1ae4ceb1dda..97c02cdb16967c64f5cac06230a5f8806e40f685 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H @@ -239,7 +239,7 @@ public: { return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H index 61b93499131c8fc281a6920f4738da32598e45c4..05b0182380403f8afdfe76ad2b7e7adc2126ca3d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H @@ -110,7 +110,7 @@ public: { NotImplemented; - return tmp<surfaceScalarField>(NULL); + return tmp<surfaceScalarField>(nullptr); } //- Return the face-interpolate of the given cell field diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H index de4294da11e5ebc9a8c996076bcbb66d12747d85..77fc9a0015c30d523371d3c4446f7eab46c1a0ad 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H @@ -219,7 +219,7 @@ public: { return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H index 03fa6647123216ee316e3fc3f4b022c3bfa18c9f..f1a30e1efc481b3d89207a1dacbb38e252e35481 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H @@ -231,7 +231,7 @@ public: { return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H index 6dc51cc79083f3f2b08c69aff82e5f60a0d2c6a4..49ec408ecf9c21885df517ba51c9d2c7a2ef8d2a 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H @@ -110,7 +110,7 @@ public: { NotImplemented; - return tmp<surfaceScalarField>(NULL); + return tmp<surfaceScalarField>(nullptr); } //- Return the face-interpolate of the given cell field diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H index 48f008ae7a1baedb74a1a2f4c631ff8fa5d668cc..6aa892c077f452521d11b3326530ca28e7764dcd 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H @@ -110,7 +110,7 @@ public: { NotImplemented; - return tmp<surfaceScalarField>(NULL); + return tmp<surfaceScalarField>(nullptr); } //- Return the face-interpolate of the given cell field diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H index dbdebfa7d2ca9a4444ca5df71dca8481458acb9c..13473fd2e49dccd4e1f109f3b8ce1160f1c437d2 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H @@ -235,7 +235,7 @@ public: { return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H index 28649caa75dacbc0dcb1f557f83cfded3fb3a037..f02f05d33023beebb65253ca15ee012446057d04 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H @@ -209,7 +209,7 @@ public: return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> ( - NULL + nullptr ); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index c0f548f9af48b6bdf8572b4e9299aec0bfa4409a..6e8f8bc7d459c0eedc7c03377d58484839478849 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -56,10 +56,10 @@ void Foam::surfaceInterpolation::clearOut() Foam::surfaceInterpolation::surfaceInterpolation(const fvMesh& fvm) : mesh_(fvm), - weights_(NULL), - deltaCoeffs_(NULL), - nonOrthDeltaCoeffs_(NULL), - nonOrthCorrectionVectors_(NULL) + weights_(nullptr), + deltaCoeffs_(nullptr), + nonOrthDeltaCoeffs_(nullptr), + nonOrthCorrectionVectors_(nullptr) {} diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H index da6a64fbfff4039506fb4ec41853f1d4e869df5c..8e6c802c5e8e5640f4b27b6f6f1faf91d6e753a6 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H @@ -201,7 +201,10 @@ public: virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> correction(const GeometricField<Type, fvPatchField, volMesh>&) const { - return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL); + return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> + ( + nullptr + ); } //- Return the face-interpolate of the given cell field diff --git a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index e60099d0571951549731033da43d3a87a17107e8..5c0b22c3e9a845b16495d338c9d02d75924c8b25 100644 --- a/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -108,8 +108,8 @@ Foam::functionObjects::fieldValues::fieldValueDelta::fieldValueDelta : writeFiles(name, runTime, dict, name), operation_(opSubtract), - region1Ptr_(NULL), - region2Ptr_(NULL) + region1Ptr_(nullptr), + region2Ptr_(nullptr) { if (!isA<fvMesh>(obr_)) { diff --git a/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.C b/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.C index 4dc3e9e72b67bcba01a4cac210422800bd280bf9..4d0abc685a972045de807a673592c851794f846f 100644 --- a/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.C +++ b/src/functionObjects/field/fieldValues/surfaceRegion/surfaceRegion.C @@ -651,7 +651,7 @@ Foam::functionObjects::fieldValues::surfaceRegion::surfaceRegion ) : fieldValue(name, runTime, dict, typeName), - surfaceWriterPtr_(NULL), + surfaceWriterPtr_(nullptr), regionType_(regionTypeNames_.read(dict.lookup("regionType"))), operation_(operationTypeNames_.read(dict.lookup("operation"))), weightFieldName_("none"), @@ -681,7 +681,7 @@ Foam::functionObjects::fieldValues::surfaceRegion::surfaceRegion ) : fieldValue(name, obr, dict, typeName), - surfaceWriterPtr_(NULL), + surfaceWriterPtr_(nullptr), regionType_(regionTypeNames_.read(dict.lookup("regionType"))), operation_(operationTypeNames_.read(dict.lookup("operation"))), weightFieldName_("none"), diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 32bf9efa12bb85432342565777c285da39328056..d68a5de52a5a5eef4706565cb2812d2386e7ac6f 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -556,9 +556,9 @@ void Foam::pairPatchAgglomeration::combineLevels(const label curLevel) } // Delete the restrictAddressing for the coarser level - restrictAddressing_.set(curLevel, NULL); + restrictAddressing_.set(curLevel, nullptr); - patchLevels_.set(prevLevel, patchLevels_.set(curLevel, NULL)); + patchLevels_.set(prevLevel, patchLevels_.set(curLevel, nullptr)); } diff --git a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C index 0260a370d480a52f50c28c21fec20bcb1f3556fe..4b1751f65693988924e007cecb3582fc83d69b95 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C @@ -75,7 +75,7 @@ displacementComponentLaplacianFvMotionSolver ), cellMotionBoundaryTypes<scalar>(pointDisplacement_.boundaryField()) ), - pointLocation_(NULL), + pointLocation_(nullptr), diffusivityPtr_ ( motionDiffusivity::New(fvMesh_, coeffDict().lookup("diffusivity")) @@ -246,7 +246,7 @@ void Foam::displacementComponentLaplacianFvMotionSolver::updateMesh // Update diffusivity. Note two stage to make sure old one is de-registered // before creating/registering new one. - diffusivityPtr_.reset(NULL); + diffusivityPtr_.reset(nullptr); diffusivityPtr_ = motionDiffusivity::New ( fvMesh_, diff --git a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C index 16e466457a82209853e7225e0a12d2763d653df8..5f297bbb66332e099aa2b98124d5bb2388b95c3e 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C @@ -144,7 +144,7 @@ void Foam::velocityComponentLaplacianFvMotionSolver::updateMesh // Update diffusivity. Note two stage to make sure old one is de-registered // before creating/registering new one. - diffusivityPtr_.reset(NULL); + diffusivityPtr_.reset(nullptr); diffusivityPtr_ = motionDiffusivity::New ( fvMesh_, diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C index b2d12efb6c1ec19d82cfed8a375525825fd5f478..ffa2ce9fc49fafde31007ce969f72639672804d4 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C @@ -187,7 +187,7 @@ void Foam::displacementSBRStressFvMotionSolver::updateMesh // Update diffusivity. Note two stage to make sure old one is de-registered // before creating/registering new one. - diffusivityPtr_.reset(NULL); + diffusivityPtr_.reset(nullptr); diffusivityPtr_ = motionDiffusivity::New ( fvMesh_, diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C index ccb44f877eedc6b393ddf9c17a5cb53a3cadb9a4..705ea0970405535b077acd2bca0ce28997ab34cc 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C @@ -76,7 +76,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver ), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), - pointLocation_(NULL), + pointLocation_(nullptr), diffusivityPtr_ ( motionDiffusivity::New(fvMesh_, coeffDict().lookup("diffusivity")) diff --git a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C index 2c14e54106167765f46ea8fc14dc0f98868138d2..4adf5a4873d2889129bdbd2bc7f2d01267bbebce 100644 --- a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C @@ -146,7 +146,7 @@ void Foam::velocityLaplacianFvMotionSolver::updateMesh // Update diffusivity. Note two stage to make sure old one is de-registered // before creating/registering new one. - diffusivityPtr_.reset(NULL); + diffusivityPtr_.reset(nullptr); diffusivityPtr_ = motionDiffusivity::New ( fvMesh_, diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index b2f3b353177b3df3ac252e6b0e08badfa806a5e5..52d68a6fb6b3b74537fd08875eaa8405a5fd7ad8 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C @@ -81,7 +81,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection // Get fixed points (bit of a hack) - const pointZone* zonePtr = NULL; + const pointZone* zonePtr = nullptr; if (frozenPointsZone_.size() > 0) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C index 82b530d3052d85010812103ddf6105763b742a43..6eee20eb32c0a8b4f2ae546c6a1da0e2f8aa66a3 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C @@ -80,7 +80,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection // Get fixed points (bit of a hack) - const pointZone* zonePtr = NULL; + const pointZone* zonePtr = nullptr; if (frozenPointsZone_.size() > 0) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C index ef03e416d6fd7d6ea6e1e518374f3422fb631c47..ec50acb65f14ee06322d5a1d607169a00c6392d2 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C @@ -42,7 +42,7 @@ timeVaryingMappedFixedValuePointPatchField fieldTableName_(iF.name()), setAverage_(false), perturb_(0), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), @@ -75,7 +75,7 @@ timeVaryingMappedFixedValuePointPatchField "planarInterpolation" ) ), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), @@ -138,7 +138,7 @@ timeVaryingMappedFixedValuePointPatchField setAverage_(ptf.setAverage_), perturb_(ptf.perturb_), mapMethod_(ptf.mapMethod_), - mapperPtr_(NULL), + mapperPtr_(nullptr), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), diff --git a/src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C b/src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C index d41dac0660de04a3761aac3d9f703780ec972949..2fdfeddd133e6e1328228b4375ad87b3d3dff441 100644 --- a/src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C +++ b/src/fvOptions/constraints/fixedTemperatureConstraint/fixedTemperatureConstraint.C @@ -69,7 +69,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint : cellSetOption(name, modelType, dict, mesh), mode_(temperatureModeNames_.read(coeffs_.lookup("mode"))), - Tuniform_(NULL), + Tuniform_(nullptr), TName_("T") { switch (mode_) diff --git a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C index ae861256b5062409dd8ba0b744c3d3aaaa152ce4..8b8c37762c1db75cfb5699f7036e60c00e2511f9 100644 --- a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C +++ b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C @@ -57,7 +57,7 @@ Foam::fv::explicitPorositySource::explicitPorositySource ) : cellSetOption(name, modelType, dict, mesh), - porosityPtr_(NULL) + porosityPtr_(nullptr) { read(dict); diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 1720cc157d8a87b418c6da3798bba1ceb96e8de1..96cd17ce60d55a6ab779935a0a32eb6c5d103ad1 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C @@ -91,7 +91,7 @@ Foam::fv::meanVelocityForce::meanVelocityForce dGradP_(0.0), flowDir_(Ubar_/mag(Ubar_)), relaxation_(coeffs_.lookupOrDefault<scalar>("relaxation", 1.0)), - rAPtr_(NULL) + rAPtr_(nullptr) { coeffs_.lookup("fields") >> fieldNames_; diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index d421d40b7f4480b06f68cb7258bc6e12891c6fac..859ef24a2b1d6366c3faaa59d5da8704bcebe03f 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -123,7 +123,7 @@ Foam::fv::solidificationMeltingSource::Cp() const } } - return tmp<volScalarField>(NULL); + return tmp<volScalarField>(nullptr); } diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C index 0291b20b3b276fdcfff3009be05c55a1c20901bc..0adb2b5ee95af0d82e6e9ef6830c77e98245b832 100644 --- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C @@ -116,7 +116,7 @@ Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource ) : interRegionOption(name, modelType, dict, mesh), - porosityPtr_(NULL), + porosityPtr_(nullptr), firstIter_(true), UName_(coeffs_.lookupOrDefault<word>("U", "U")), muName_(coeffs_.lookupOrDefault<word>("mu", "thermo:mu")) diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C index 081977aa26e25a8ab8c6694537923cebe22f232e..ecf9e8441045682cce2a496eaa4944b80d78a10d 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C @@ -120,7 +120,7 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel mesh ), nbrModelName_(coeffs_.lookup("nbrModel")), - nbrModel_(NULL), + nbrModel_(nullptr), firstIter_(true), timeIndex_(-1), htc_ diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelI.H b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelI.H index 42f7fd28a5c571872c5f79d7978da291be9677e3..c9a57a05d1a46b5e5388be44c178a434af6ef3a4 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelI.H +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::fv::interRegionHeatTransferModel::htc() const inline const Foam::fv::interRegionHeatTransferModel& Foam::fv::interRegionHeatTransferModel::nbrModel() const { - if (nbrModel_ == NULL) + if (nbrModel_ == nullptr) { FatalErrorInFunction << "Neighbour model not set" @@ -70,7 +70,7 @@ Foam::fv::interRegionHeatTransferModel::nbrModel() const inline Foam::fv::interRegionHeatTransferModel& Foam::fv::interRegionHeatTransferModel::nbrModel() { - if (nbrModel_ == NULL) + if (nbrModel_ == nullptr) { FatalErrorInFunction << "Neighbour model not set" diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index b911153f705ae751aa94bb17fb22ab65abf84376..4223cd67789b672f81c3232fd5e466efe041fd02 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -1095,7 +1095,7 @@ template<class ParticleType> Foam::InteractionLists<ParticleType>::InteractionLists(const polyMesh& mesh) : mesh_(mesh), - cloud_(mesh_, "NULL_Cloud", IDLList<ParticleType>()), + cloud_(mesh_, "nullptr_Cloud", IDLList<ParticleType>()), writeCloud_(false), cellMapPtr_(), wallFaceMapPtr_(), diff --git a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C index 58662a716cb9dbc6a5f1474bdb7fdd92ccf20201..be5611162f64769e97f14f45fbcfcc4477827940 100644 --- a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C @@ -93,7 +93,7 @@ Foam::CollidingCloud<CloudType>::CollidingCloud : CloudType(cloudName, rho, U, mu, g, false), constProps_(this->particleProperties()), - collisionModel_(NULL) + collisionModel_(nullptr) { if (this->solution().steadyState()) { @@ -135,7 +135,7 @@ Foam::CollidingCloud<CloudType>::CollidingCloud ) : CloudType(mesh, name, c), - collisionModel_(NULL) + collisionModel_(nullptr) {} diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 1b13722c5e0c777025708a84e1ca5637576bccc9..a6a9ba0b153ca54d98423ea150d83697794ce59d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -282,7 +282,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud : CloudType(rho.mesh(), cloudName, false), kinematicCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), mesh_(rho.mesh()), particleProperties_ ( @@ -349,11 +349,11 @@ Foam::KinematicCloud<CloudType>::KinematicCloud subModelProperties_.subOrEmptyDict("injectionModels"), *this ), - dispersionModel_(NULL), - patchInteractionModel_(NULL), - stochasticCollisionModel_(NULL), - surfaceFilmModel_(NULL), - UIntegrator_(NULL), + dispersionModel_(nullptr), + patchInteractionModel_(nullptr), + stochasticCollisionModel_(nullptr), + surfaceFilmModel_(nullptr), + UIntegrator_(nullptr), UTrans_ ( new volVectorField::Internal @@ -413,7 +413,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud : CloudType(c.mesh_, name, c), kinematicCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), mesh_(c.mesh_), particleProperties_(c.particleProperties_), outputProperties_(c.outputProperties_), @@ -421,7 +421,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud constProps_(c.constProps_), subModelProperties_(c.subModelProperties_), rndGen_(c.rndGen_, true), - cellOccupancyPtr_(NULL), + cellOccupancyPtr_(nullptr), cellLengthScale_(c.cellLengthScale_), rho_(c.rho_), U_(c.U_), @@ -481,7 +481,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud : CloudType(mesh, name, IDLList<parcelType>()), kinematicCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), mesh_(mesh), particleProperties_ ( @@ -512,7 +512,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud constProps_(), subModelProperties_(dictionary::null), rndGen_(0, 0), - cellOccupancyPtr_(NULL), + cellOccupancyPtr_(nullptr), cellLengthScale_(c.cellLengthScale_), rho_(c.rho_), U_(c.U_), @@ -522,13 +522,13 @@ Foam::KinematicCloud<CloudType>::KinematicCloud forces_(*this, mesh), functions_(*this), injectors_(*this), - dispersionModel_(NULL), - patchInteractionModel_(NULL), - stochasticCollisionModel_(NULL), - surfaceFilmModel_(NULL), - UIntegrator_(NULL), - UTrans_(NULL), - UCoeff_(NULL) + dispersionModel_(nullptr), + patchInteractionModel_(nullptr), + stochasticCollisionModel_(nullptr), + surfaceFilmModel_(nullptr), + UIntegrator_(nullptr), + UTrans_(nullptr), + UCoeff_(nullptr) {} diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C index 702d2454b8243178351bb9775eabc6162a0b414d..5cbfaf7418f0e06a2bb1410e9824c14aa32031fe 100644 --- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C @@ -76,9 +76,9 @@ Foam::MPPICCloud<CloudType>::MPPICCloud ) : CloudType(cloudName, rho, U, mu, g, false), - packingModel_(NULL), - dampingModel_(NULL), - isotropyModel_(NULL) + packingModel_(nullptr), + dampingModel_(nullptr), + isotropyModel_(nullptr) { if (this->solution().steadyState()) { @@ -122,9 +122,9 @@ Foam::MPPICCloud<CloudType>::MPPICCloud ) : CloudType(mesh, name, c), - packingModel_(NULL), - dampingModel_(NULL), - isotropyModel_(NULL) + packingModel_(nullptr), + dampingModel_(nullptr), + isotropyModel_(nullptr) {} diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index e3acc3bea1ec009d9ec5ab2ba90e0e0286f32fc2..9343fe5e240deca566ee4fedb0dcd3872f77f364 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -98,10 +98,10 @@ Foam::ReactingCloud<CloudType>::ReactingCloud : CloudType(cloudName, rho, U, g, thermo, false), reactingCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(this->particleProperties()), - compositionModel_(NULL), - phaseChangeModel_(NULL), + compositionModel_(nullptr), + phaseChangeModel_(nullptr), rhoTrans_(thermo.carrier().species().size()) { if (this->solution().active()) @@ -153,7 +153,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud : CloudType(c, name), reactingCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(c.constProps_), compositionModel_(c.compositionModel_->clone()), phaseChangeModel_(c.phaseChangeModel_->clone()), @@ -193,11 +193,11 @@ Foam::ReactingCloud<CloudType>::ReactingCloud : CloudType(mesh, name, c), reactingCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(), compositionModel_(c.compositionModel_->clone()), -// compositionModel_(NULL), - phaseChangeModel_(NULL), +// compositionModel_(nullptr), + phaseChangeModel_(nullptr), rhoTrans_(0) {} diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index c70e8f04c7d64233055ce8fcb6877f4b8d95a267..831208bf433fd867cb9e8555ae9a70231fb6054c 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -84,10 +84,10 @@ Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud : CloudType(cloudName, rho, U, g, thermo, false), reactingMultiphaseCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(this->particleProperties()), - devolatilisationModel_(NULL), - surfaceReactionModel_(NULL), + devolatilisationModel_(nullptr), + surfaceReactionModel_(nullptr), dMassDevolatilisation_(0.0), dMassSurfaceReaction_(0.0) { @@ -117,7 +117,7 @@ Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud : CloudType(c, name), reactingMultiphaseCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(c.constProps_), devolatilisationModel_(c.devolatilisationModel_->clone()), surfaceReactionModel_(c.surfaceReactionModel_->clone()), @@ -136,10 +136,10 @@ Foam::ReactingMultiphaseCloud<CloudType>::ReactingMultiphaseCloud : CloudType(mesh, name, c), reactingMultiphaseCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(), - devolatilisationModel_(NULL), - surfaceReactionModel_(NULL), + devolatilisationModel_(nullptr), + surfaceReactionModel_(nullptr), dMassDevolatilisation_(0.0), dMassSurfaceReaction_(0.0) {} diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index f0340d0b0bdf54a03f7fb76ce7fffca817bec62d..2b47ad1cd04799d906722ec84bb1db9ed36c8245 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -152,17 +152,17 @@ Foam::ThermoCloud<CloudType>::ThermoCloud false ), thermoCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(this->particleProperties()), thermo_(thermo), T_(thermo.thermo().T()), p_(thermo.thermo().p()), - heatTransferModel_(NULL), - TIntegrator_(NULL), + heatTransferModel_(nullptr), + TIntegrator_(nullptr), radiation_(false), - radAreaP_(NULL), - radT4_(NULL), - radAreaPT4_(NULL), + radAreaP_(nullptr), + radT4_(nullptr), + radAreaPT4_(nullptr), hsTrans_ ( new volScalarField::Internal @@ -222,7 +222,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud : CloudType(c, name), thermoCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(c.constProps_), thermo_(c.thermo_), T_(c.T()), @@ -230,9 +230,9 @@ Foam::ThermoCloud<CloudType>::ThermoCloud heatTransferModel_(c.heatTransferModel_->clone()), TIntegrator_(c.TIntegrator_->clone()), radiation_(c.radiation_), - radAreaP_(NULL), - radT4_(NULL), - radAreaPT4_(NULL), + radAreaP_(nullptr), + radT4_(nullptr), + radAreaPT4_(nullptr), hsTrans_ ( new volScalarField::Internal @@ -332,19 +332,19 @@ Foam::ThermoCloud<CloudType>::ThermoCloud : CloudType(mesh, name, c), thermoCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), constProps_(), thermo_(c.thermo()), T_(c.T()), p_(c.p()), - heatTransferModel_(NULL), - TIntegrator_(NULL), + heatTransferModel_(nullptr), + TIntegrator_(nullptr), radiation_(false), - radAreaP_(NULL), - radT4_(NULL), - radAreaPT4_(NULL), - hsTrans_(NULL), - hsCoeff_(NULL) + radAreaP_(nullptr), + radT4_(nullptr), + radAreaPT4_(nullptr), + hsTrans_(nullptr), + hsCoeff_(nullptr) {} diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelTrackingDataI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelTrackingDataI.H index 22d7ccf85a3a80c97f33bc570489be7c2c6cca4e..76b36470d773add5a17cca603b98c85290fff7e6 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelTrackingDataI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelTrackingDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ inline Foam::ThermoParcel<ParcelType>::TrackingData<CloudType>::TrackingData kappa_ ) ), - GInterp_(NULL) + GInterp_(nullptr) { if (cloud.radiation()) { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 8255e894281f02c24521f8f1e317fc128f0860ff..00393be188475a050b96ba0e5513e6ee0fce2654 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -71,7 +71,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion ) : CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), - QPtr_(NULL), + QPtr_(nullptr), patchIDs_(), p_(readScalar(this->coeffDict().lookup("p"))), psi_(this->coeffDict().template lookupOrDefault<scalar>("psi", 2.0)), @@ -109,7 +109,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion ) : CloudFunctionObject<CloudType>(pe), - QPtr_(NULL), + QPtr_(nullptr), patchIDs_(pe.patchIDs_), p_(pe.p_), psi_(pe.psi_), diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C index 14ac5b13668779b39b96135cd0e729d43d5a80c5..b9a692fbf69da46b92f2a683419185ba21204e67 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C @@ -67,7 +67,7 @@ Foam::ParticleTracks<CloudType>::ParticleTracks maxSamples_(readLabel(this->coeffDict().lookup("maxSamples"))), resetOnWrite_(this->coeffDict().lookup("resetOnWrite")), faceHitCounter_(), - cloudPtr_(NULL) + cloudPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C index ad03f5ace1b6d8ff1d61cec176895c7f01826350..a0b95127fde07cda9dfae6822afb7a19e1c8e8ba 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C @@ -41,8 +41,8 @@ Foam::ParticleTrap<CloudType>::ParticleTrap ( this->coeffDict().template lookupOrDefault<word>("alpha", "alpha") ), - alphaPtr_(NULL), - gradAlphaPtr_(NULL), + alphaPtr_(nullptr), + gradAlphaPtr_(nullptr), threshold_(readScalar(this->coeffDict().lookup("threshold"))) {} @@ -56,7 +56,7 @@ Foam::ParticleTrap<CloudType>::ParticleTrap CloudFunctionObject<CloudType>(pt), alphaName_(pt.alphaName_), alphaPtr_(pt.alphaPtr_), - gradAlphaPtr_(NULL), + gradAlphaPtr_(nullptr), threshold_(pt.threshold_) {} @@ -73,7 +73,7 @@ Foam::ParticleTrap<CloudType>::~ParticleTrap() template<class CloudType> void Foam::ParticleTrap<CloudType>::preEvolve() { - if (alphaPtr_ == NULL) + if (alphaPtr_ == nullptr) { const fvMesh& mesh = this->owner().mesh(); const volScalarField& alpha = diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C index dcc5129cfd925fc8caa4ed47ad28bf1012eda603..a8fb05fac24ae96da9a9361f19c7de17ec31641d 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C @@ -53,7 +53,7 @@ Foam::VoidFraction<CloudType>::VoidFraction ) : CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), - thetaPtr_(NULL) + thetaPtr_(nullptr) {} @@ -64,7 +64,7 @@ Foam::VoidFraction<CloudType>::VoidFraction ) : CloudFunctionObject<CloudType>(vf), - thetaPtr_(NULL) + thetaPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index c577013802b7463206fc755bf211728edb05c0bf..5c0087e52f5e7930fb53fc73a9ec394a8eb3f021 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -77,8 +77,8 @@ void Foam::PairCollision<CloudType>::realRealInteraction() // Direct interaction list (dil) const labelListList& dil = il_.dil(); - typename CloudType::parcelType* pA_ptr = NULL; - typename CloudType::parcelType* pB_ptr = NULL; + typename CloudType::parcelType* pA_ptr = nullptr; + typename CloudType::parcelType* pB_ptr = nullptr; List<DynamicList<typename CloudType::parcelType*>>& cellOccupancy = this->owner().cellOccupancy(); @@ -603,8 +603,8 @@ Foam::PairCollision<CloudType>::PairCollision ) : CollisionModel<CloudType>(cm), - pairModel_(NULL), - wallModel_(NULL), + pairModel_(nullptr), + wallModel_(nullptr), il_(cm.owner().mesh()) { // Need to clone to PairModel and WallModel diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C index 2d6030b3059fd6f14134a16e41f5a03c1de1f9c2..8951c6c65368bc4e9706533baa95f490b8d992c4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C @@ -189,7 +189,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject { label cI = inflationCells_[iCI]; - typename CloudType::parcelType* pPtr = NULL; + typename CloudType::parcelType* pPtr = nullptr; forAll(cellOccupancy[cI], cPI) { @@ -281,10 +281,10 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject label cPI = rnd.position(label(0), cellOccupancy[cI].size() - 1); // This has to be a reference to the pointer so that it - // can be set to NULL when the particle is deleted. + // can be set to nullptr when the particle is deleted. typename CloudType::parcelType*& pPtr = cellOccupancy[cI][cPI]; - if (pPtr != NULL) + if (pPtr != nullptr) { scalar pD = pPtr->d(); @@ -378,7 +378,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject this->owner().deleteParticle(*pPtr); - pPtr = NULL; + pPtr = nullptr; } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C index 5ffcb390a02d18866d9ed3f0b7ff5c4444bd970b..c9c7fbc0b5a2a18538d75679642a46abcdaf4fff 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C @@ -55,7 +55,7 @@ Foam::LiftForce<CloudType>::LiftForce : ParticleForce<CloudType>(owner, mesh, dict, forceType, true), UName_(this->coeffs().template lookupOrDefault<word>("U", "U")), - curlUcInterpPtr_(NULL) + curlUcInterpPtr_(nullptr) {} @@ -64,7 +64,7 @@ Foam::LiftForce<CloudType>::LiftForce(const LiftForce& lf) : ParticleForce<CloudType>(lf), UName_(lf.UName_), - curlUcInterpPtr_(NULL) + curlUcInterpPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C index 00737cc110bb0a443918cb51082604a20298a1e9..8426d371403034c796bf5e4a12f759102bb89fd1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C @@ -42,7 +42,7 @@ Foam::ParamagneticForce<CloudType>::ParamagneticForce ( this->coeffs().template lookupOrDefault<word>("HdotGradH", "HdotGradH") ), - HdotGradHInterpPtr_(NULL), + HdotGradHInterpPtr_(nullptr), magneticSusceptibility_ ( readScalar(this->coeffs().lookup("magneticSusceptibility")) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C index eac19829f0750793a119512ef903289f76c3491e..e0d6518fba736461445d2a2875eebc6d6c11d9be 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C @@ -40,7 +40,7 @@ Foam::PressureGradientForce<CloudType>::PressureGradientForce : ParticleForce<CloudType>(owner, mesh, dict, forceType, true), UName_(this->coeffs().template lookupOrDefault<word>("U", "U")), - DUcDtInterpPtr_(NULL) + DUcDtInterpPtr_(nullptr) {} @@ -52,7 +52,7 @@ Foam::PressureGradientForce<CloudType>::PressureGradientForce : ParticleForce<CloudType>(pgf), UName_(pgf.UName_), - DUcDtInterpPtr_(NULL) + DUcDtInterpPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C index 82fdca98e106646ddeb2f15ed377c1db0a486af2..08f065539e9a3e2eeca4abfc48a4316766c6344b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C @@ -36,7 +36,7 @@ Foam::SRFForce<CloudType>::SRFForce ) : ParticleForce<CloudType>(owner, mesh, dict, typeName, false), - srfPtr_(NULL) + srfPtr_(nullptr) {} @@ -47,7 +47,7 @@ Foam::SRFForce<CloudType>::SRFForce ) : ParticleForce<CloudType>(srff), - srfPtr_(NULL) + srfPtr_(nullptr) {} @@ -71,7 +71,7 @@ void Foam::SRFForce<CloudType>::cacheFields(const bool store) } else { - srfPtr_ = NULL; + srfPtr_ = nullptr; } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 4265100e74f06999169b8a01d503ee8c133511b0..42a47f4d45a9ef37e71e78e0a9483f1655c73e8f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -41,8 +41,8 @@ Foam::LocalInteraction<CloudType>::LocalInteraction nStick_(patchData_.size(), 0), massStick_(patchData_.size(), 0.0), writeFields_(this->coeffDict().lookupOrDefault("writeFields", false)), - massEscapePtr_(NULL), - massStickPtr_(NULL) + massEscapePtr_(nullptr), + massStickPtr_(nullptr) { if (writeFields_) { @@ -94,8 +94,8 @@ Foam::LocalInteraction<CloudType>::LocalInteraction nStick_(pim.nStick_), massStick_(pim.massStick_), writeFields_(pim.writeFields_), - massEscapePtr_(NULL), - massStickPtr_(NULL) + massEscapePtr_(nullptr), + massStickPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C index d823496d7ef0b9e20aae1b473753d0ea1cbe31f4..3c33ee10844c006026edaefda152bea2d08df4e9 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C @@ -32,7 +32,7 @@ template<class CloudType> Foam::DampingModel<CloudType>::DampingModel(CloudType& owner) : CloudSubModelBase<CloudType>(owner), - timeScaleModel_(NULL) + timeScaleModel_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C index 3e37bb61ad175cce60ea51329913d3eb062cde18..d9f58b3b231e6627ac1444305fc7cccf71997722 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C @@ -35,8 +35,8 @@ Foam::DampingModels::Relaxation<CloudType>::Relaxation ) : DampingModel<CloudType>(dict, owner, typeName), - uAverage_(NULL), - oneByTimeScaleAverage_(NULL) + uAverage_(nullptr), + oneByTimeScaleAverage_(nullptr) {} @@ -47,7 +47,7 @@ Foam::DampingModels::Relaxation<CloudType>::Relaxation ) : DampingModel<CloudType>(cm), - uAverage_(NULL), + uAverage_(nullptr), oneByTimeScaleAverage_(cm.oneByTimeScaleAverage_->clone()) {} @@ -126,7 +126,7 @@ void Foam::DampingModels::Relaxation<CloudType>::cacheFields(const bool store) } else { - uAverage_ = NULL; + uAverage_ = nullptr; oneByTimeScaleAverage_.clear(); } } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C index 50cad5b9dcb861e3ffdf6d1802a42de0be32011c..d11cfb7a13403d002ff69a1ede384778a6164ddd 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C @@ -33,7 +33,7 @@ template<class CloudType> Foam::IsotropyModel<CloudType>::IsotropyModel(CloudType& owner) : CloudSubModelBase<CloudType>(owner), - timeScaleModel_(NULL) + timeScaleModel_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C index f4d5d0fa582ec561212371e8b869323a517ba405..d11e55e35df6603167e2d425f4db4910fb009536 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C @@ -35,7 +35,7 @@ Foam::PackingModels::Explicit<CloudType>::Explicit ) : PackingModel<CloudType>(dict, owner, typeName), - stressAverage_(NULL), + stressAverage_(nullptr), correctionLimiting_ ( CorrectionLimitingMethod::New @@ -129,8 +129,8 @@ void Foam::PackingModels::Explicit<CloudType>::cacheFields(const bool store) } else { - volumeAverage_ = NULL; - uAverage_ = NULL; + volumeAverage_ = nullptr; + uAverage_ = nullptr; stressAverage_.clear(); } } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index ce800c22c34314968676b7d2187d090dda18daee..9f8cb4ef0c23aed604bb05d39524e973bd2c342a 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -56,8 +56,8 @@ Foam::PackingModels::Implicit<CloudType>::Implicit dimensionedScalar("zero", dimless, 0.0), zeroGradientFvPatchScalarField::typeName ), - phiCorrect_(NULL), - uCorrect_(NULL), + phiCorrect_(nullptr), + uCorrect_(nullptr), applyLimiting_(this->coeffDict().lookup("applyLimiting")), applyGravity_(this->coeffDict().lookup("applyGravity")), alphaMin_(readScalar(this->coeffDict().lookup("alphaMin"))), diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C index e412380d638494fabdd9b90ba389ac3c271dbd8f..38187b8e3a6c4b71e5adfee255c36868b4d6d3b8 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C @@ -34,7 +34,7 @@ template<class CloudType> Foam::PackingModel<CloudType>::PackingModel(CloudType& owner) : CloudSubModelBase<CloudType>(owner), - particleStressModel_(NULL) + particleStressModel_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C index 038d11284d2bcae170300b46dafa8a683aec3a2c..2c1c04c456e4885f51404a49a976a73b05fe91b7 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C @@ -110,7 +110,7 @@ Foam::ParticleStressModels::Lun::dTaudTheta { NotImplemented; - return tmp<Field<scalar>>(NULL); + return tmp<Field<scalar>>(nullptr); } diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index 0ec0ec4727d1ea251d00c41f5705ad79ed3330ec..761dfc8d945eccd03a93e2dd091566f407a5a50d 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -133,8 +133,8 @@ void Foam::moleculeCloud::calculatePairForce() label startOfRequests = Pstream::nRequests(); il_.sendReferredData(cellOccupancy(), pBufs); - molecule* molI = NULL; - molecule* molJ = NULL; + molecule* molI = nullptr; + molecule* molJ = nullptr; { // Real-Real interactions @@ -268,8 +268,8 @@ void Foam::moleculeCloud::removeHighEnergyOverlaps() // Real-Real interaction - molecule* molI = NULL; - molecule* molJ = NULL; + molecule* molI = nullptr; + molecule* molJ = nullptr; { DynamicList<molecule*> molsToDelete; diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C index c2adf842213a9597e11f6277290617c95aaf2d9d..8c3f8fa448ff300e0e61008dff0530416faed1fb 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C @@ -68,7 +68,7 @@ Foam::pairPotential::pairPotential dr_(readScalar(pairPotentialProperties_.lookup("dr"))), forceLookup_(0), energyLookup_(0), - esfPtr_(NULL), + esfPtr_(nullptr), writeTables_(Switch(pairPotentialProperties_.lookup("writeTables"))) {} diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C index b6542dc3a7818637b847797e55e70b0681814140..d5684374f924e3778788f2f78f02da7b9de78ef9 100644 --- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C +++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C @@ -80,10 +80,10 @@ Foam::SprayCloud<CloudType>::SprayCloud : CloudType(cloudName, rho, U, g, thermo, false), sprayCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), averageParcelMass_(0.0), - atomizationModel_(NULL), - breakupModel_(NULL) + atomizationModel_(nullptr), + breakupModel_(nullptr) { if (this->solution().active()) { @@ -115,7 +115,7 @@ Foam::SprayCloud<CloudType>::SprayCloud : CloudType(c, name), sprayCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), averageParcelMass_(c.averageParcelMass_), atomizationModel_(c.atomizationModel_->clone()), breakupModel_(c.breakupModel_->clone()) @@ -132,10 +132,10 @@ Foam::SprayCloud<CloudType>::SprayCloud : CloudType(mesh, name, c), sprayCloud(), - cloudCopyPtr_(NULL), + cloudCopyPtr_(nullptr), averageParcelMass_(0.0), - atomizationModel_(NULL), - breakupModel_(NULL) + atomizationModel_(nullptr), + breakupModel_(nullptr) {} diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index cccba17a2c0f08965d9ac9ba51ac24022d8cc3d0..1ed664749896ef3ec42c46703cbeb8f0c74f12fc 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -54,7 +54,7 @@ Foam::DispersionRASModel<CloudType>::kModel() const << "Database objects include: " << obr.sortedToc() << abort(FatalError); - return tmp<volScalarField>(NULL); + return tmp<volScalarField>(nullptr); } } @@ -84,7 +84,7 @@ Foam::DispersionRASModel<CloudType>::epsilonModel() const << "Database objects include: " << obr.sortedToc() << abort(FatalError); - return tmp<volScalarField>(NULL); + return tmp<volScalarField>(nullptr); } } @@ -99,9 +99,9 @@ Foam::DispersionRASModel<CloudType>::DispersionRASModel ) : DispersionModel<CloudType>(owner), - kPtr_(NULL), + kPtr_(nullptr), ownK_(false), - epsilonPtr_(NULL), + epsilonPtr_(nullptr), ownEpsilon_(false) {} diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C index 1dc9ab7a1fb01f45bcd8dc1390a7ee50c1541005..ef93f6a3cfc1d93afd2af76d9019e0c30b0074ff 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C @@ -37,7 +37,7 @@ Foam::GradientDispersionRAS<CloudType>::GradientDispersionRAS ) : DispersionRASModel<CloudType>(dict, owner), - gradkPtr_(NULL), + gradkPtr_(nullptr), ownGradK_(false) {} @@ -82,7 +82,7 @@ void Foam::GradientDispersionRAS<CloudType>::cacheFields(const bool store) if (ownGradK_) { deleteDemandDrivenData(gradkPtr_); - gradkPtr_ = NULL; + gradkPtr_ = nullptr; ownGradK_ = false; } } diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C index 313cbf0b171543c89d62d8b1f1cc54f9f7ff4d4c..a2228fa5e35aad4398b803c741a78e8d672dd26c 100644 --- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C +++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -77,7 +77,7 @@ Foam::BrownianMotionForce<CloudType>::kModel() const << "Database objects include: " << obr.sortedToc() << abort(FatalError); - return tmp<volScalarField>(NULL); + return tmp<volScalarField>(nullptr); } } @@ -96,7 +96,7 @@ Foam::BrownianMotionForce<CloudType>::BrownianMotionForce rndGen_(owner.rndGen()), lambda_(readScalar(this->coeffs().lookup("lambda"))), turbulence_(readBool(this->coeffs().lookup("turbulence"))), - kPtr_(NULL), + kPtr_(nullptr), ownK_(false) {} @@ -111,7 +111,7 @@ Foam::BrownianMotionForce<CloudType>::BrownianMotionForce rndGen_(bmf.rndGen_), lambda_(bmf.lambda_), turbulence_(bmf.turbulence_), - kPtr_(NULL), + kPtr_(nullptr), ownK_(false) {} diff --git a/src/mesh/blockMesh/block/block.H b/src/mesh/blockMesh/block/block.H index ee88f8c9a326d676fe3897912067675bae20f80e..3e47a80a6fb9f9aa17db2cacc49c4041e5fe331c 100644 --- a/src/mesh/blockMesh/block/block.H +++ b/src/mesh/blockMesh/block/block.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,7 +113,7 @@ public: autoPtr<block> clone() const { NotImplemented; - return autoPtr<block>(NULL); + return autoPtr<block>(nullptr); } diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H index a1e6e60798524d0e29731c9cb618d1e501353584..c245eefccc9f601ae1af43031c9415befc0d3f62 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H @@ -130,7 +130,7 @@ public: autoPtr<blockDescriptor> clone() const { NotImplemented; - return autoPtr<blockDescriptor>(NULL); + return autoPtr<blockDescriptor>(nullptr); } diff --git a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C index 54fbdc75c69a1135969de77f9726d6b59a9bc3cb..c0223efe7170dfb9612fb975f9889e10145ec974 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C @@ -429,7 +429,7 @@ Foam::polyMesh* Foam::blockMesh::createTopology } - polyMesh* blockMeshPtr = NULL; + polyMesh* blockMeshPtr = nullptr; // // Create the patches diff --git a/src/mesh/blockMesh/curvedEdges/curvedEdge.C b/src/mesh/blockMesh/curvedEdges/curvedEdge.C index b3816b016c36518ee22d3eada097b25b0a26210f..02bfb6e5e1b0a84f07917245c97b34f5e376703c 100644 --- a/src/mesh/blockMesh/curvedEdges/curvedEdge.C +++ b/src/mesh/blockMesh/curvedEdges/curvedEdge.C @@ -69,7 +69,7 @@ Foam::curvedEdge::curvedEdge(const curvedEdge& c) Foam::autoPtr<Foam::curvedEdge> Foam::curvedEdge::clone() const { NotImplemented; - return autoPtr<curvedEdge>(NULL); + return autoPtr<curvedEdge>(nullptr); } diff --git a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C index 4515e69025605254b516f900fed980d06d6c09a3..b2a7172e02e98e695582c2dd2679ce10be07bc92 100644 --- a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C @@ -329,7 +329,7 @@ Foam::refinementSurfaces::refinementSurfaces { if (patchInfo.set(pI)) { - patchInfo_.set(pI, patchInfo.set(pI, NULL)); + patchInfo_.set(pI, patchInfo.set(pI, nullptr)); } } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 0ebee5390d23215405ab8fc9a96048b08cc686e1..03f9bab1f0b3168491247b9c3384760aafebdd90 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -607,8 +607,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation tgtWeights_(), tgtWeightsSum_(), triMode_(triMode), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { update(srcPatch, tgtPatch); } @@ -638,8 +638,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation tgtWeights_(), tgtWeightsSum_(), triMode_(triMode), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { update(srcPatch, tgtPatch); } @@ -670,8 +670,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation tgtWeights_(), tgtWeightsSum_(), triMode_(triMode), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { constructFromSurface(srcPatch, tgtPatch, surfPtr); } @@ -702,8 +702,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation tgtWeights_(), tgtWeightsSum_(), triMode_(triMode), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { constructFromSurface(srcPatch, tgtPatch, surfPtr); } @@ -729,8 +729,8 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation tgtWeights_(), tgtWeightsSum_(), triMode_(fineAMI.triMode_), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { label sourceCoarseSize = ( diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C index 897839717d0ee5b6f57e941408bde72da9799ced..cd4eae9048b56ba739ec754ed1b5ddf5881bd569 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C @@ -39,8 +39,8 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField : coupledPointPatchField<Type>(p, iF), cyclicACMIPatch_(refCast<const cyclicACMIPointPatch>(p)), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) {} @@ -54,8 +54,8 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField : coupledPointPatchField<Type>(p, iF, dict), cyclicACMIPatch_(refCast<const cyclicACMIPointPatch>(p)), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) { if (!isType<cyclicACMIPointPatch>(p)) { @@ -80,8 +80,8 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField : coupledPointPatchField<Type>(ptf, p, iF, mapper), cyclicACMIPatch_(refCast<const cyclicACMIPointPatch>(p)), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) { if (!isType<cyclicACMIPointPatch>(this->patch())) { @@ -104,8 +104,8 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField : coupledPointPatchField<Type>(ptf, iF), cyclicACMIPatch_(ptf.cyclicACMIPatch_), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) {} diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C index 8678b33d8669265d3b04e3fb6d86c10d665ce687..2d2d6c524dba0a5965ed5040fae52fdbd818e0c8 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C @@ -39,8 +39,8 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField : coupledPointPatchField<Type>(p, iF), cyclicAMIPatch_(refCast<const cyclicAMIPointPatch>(p)), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) {} @@ -54,8 +54,8 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField : coupledPointPatchField<Type>(p, iF, dict), cyclicAMIPatch_(refCast<const cyclicAMIPointPatch>(p)), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) { if (!isType<cyclicAMIPointPatch>(p)) { @@ -80,8 +80,8 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField : coupledPointPatchField<Type>(ptf, p, iF, mapper), cyclicAMIPatch_(refCast<const cyclicAMIPointPatch>(p)), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) { if (!isType<cyclicAMIPointPatch>(this->patch())) { @@ -104,8 +104,8 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField : coupledPointPatchField<Type>(ptf, iF), cyclicAMIPatch_(ptf.cyclicAMIPatch_), - ppiPtr_(NULL), - nbrPpiPtr_(NULL) + ppiPtr_(nullptr), + nbrPpiPtr_(nullptr) {} diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 257d4737cb8abc25426753f8ccfc9209a0ff6ed7..b02dbed50980440b3e1ce690c90de5bb9dca8f23 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -490,11 +490,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch rotationAngleDefined_(false), rotationAngle_(0.0), separationVector_(Zero), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(false), AMIRequireMatch_(true), AMILowWeightCorrection_(-1.0), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(fileName("surface")) { // Neighbour patch might not be valid yet so no transformation @@ -520,11 +520,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch rotationAngleDefined_(false), rotationAngle_(0.0), separationVector_(Zero), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)), AMIRequireMatch_(true), AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { if (nbrPatchName_ == word::null && !coupleGroup_.valid()) @@ -609,11 +609,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch rotationAngleDefined_(pp.rotationAngleDefined_), rotationAngle_(pp.rotationAngle_), separationVector_(pp.separationVector_), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(pp.AMIReverse_), AMIRequireMatch_(pp.AMIRequireMatch_), AMILowWeightCorrection_(pp.AMILowWeightCorrection_), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(pp.surfDict_) { // Neighbour patch might not be valid yet so no transformation @@ -640,11 +640,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch rotationAngleDefined_(pp.rotationAngleDefined_), rotationAngle_(pp.rotationAngle_), separationVector_(pp.separationVector_), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(pp.AMIReverse_), AMIRequireMatch_(pp.AMIRequireMatch_), AMILowWeightCorrection_(pp.AMILowWeightCorrection_), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(pp.surfDict_) { if (nbrPatchName_ == name()) @@ -678,11 +678,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch rotationAngleDefined_(pp.rotationAngleDefined_), rotationAngle_(pp.rotationAngle_), separationVector_(pp.separationVector_), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(pp.AMIReverse_), AMIRequireMatch_(pp.AMIRequireMatch_), AMILowWeightCorrection_(pp.AMILowWeightCorrection_), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(pp.surfDict_) {} diff --git a/src/meshTools/cellFeatures/cellFeatures.C b/src/meshTools/cellFeatures/cellFeatures.C index 74ce47a30b7873c105f88f6cce18f0741bdf7c73..b49a6b97261f0f3e6b038f4c8bfbb25ff72286fe 100644 --- a/src/meshTools/cellFeatures/cellFeatures.C +++ b/src/meshTools/cellFeatures/cellFeatures.C @@ -383,7 +383,7 @@ Foam::cellFeatures::cellFeatures minCos_(minCos), celli_(celli), featureEdge_(10*mesh.cellEdges()[celli].size()), - facesPtr_(NULL), + facesPtr_(nullptr), faceMap_(0) { const labelList& cEdges = mesh_.cellEdges()[celli_]; diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C index a0bfb14b8fc907164e4c8981aa318a086e575c77..b43d603f6d1bbb3813b8e1a6f73159f7ce94a8be 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C @@ -70,7 +70,7 @@ Foam::tmp<Foam::vectorField> Foam::EulerCoordinateRotation::transform ) const { NotImplemented; - return tmp<vectorField>(NULL); + return tmp<vectorField>(nullptr); } @@ -80,7 +80,7 @@ Foam::tmp<Foam::vectorField> Foam::EulerCoordinateRotation::invTransform ) const { NotImplemented; - return tmp<vectorField>(NULL); + return tmp<vectorField>(nullptr); } @@ -97,7 +97,7 @@ Foam::tmp<Foam::tensorField> Foam::EulerCoordinateRotation::transformTensor ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } @@ -117,7 +117,7 @@ Foam::tmp<Foam::tensorField> Foam::EulerCoordinateRotation::transformTensor ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C index 41e331c2b5d7d09141b8fa200a2096b746d54da3..89630cd0fb591543a123575acc2b8a2faaa88b97 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C @@ -71,7 +71,7 @@ Foam::tmp<Foam::vectorField> Foam::STARCDCoordinateRotation::transform ) const { NotImplemented; - return tmp<vectorField>(NULL); + return tmp<vectorField>(nullptr); } @@ -81,7 +81,7 @@ Foam::tmp<Foam::vectorField> Foam::STARCDCoordinateRotation::invTransform ) const { NotImplemented; - return tmp<vectorField>(NULL); + return tmp<vectorField>(nullptr); } @@ -98,7 +98,7 @@ Foam::tmp<Foam::tensorField> Foam::STARCDCoordinateRotation::transformTensor ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } @@ -118,7 +118,7 @@ Foam::tmp<Foam::tensorField> Foam::STARCDCoordinateRotation::transformTensor ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C index 1c62449c209b1d6aa5ac5cf40300aa7eb2853340..88a62fb45d2a09dfbf44b5c64282f97e4b8e61c8 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C @@ -202,7 +202,7 @@ Foam::tmp<Foam::tensorField> Foam::axesRotation::transformTensor ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } @@ -222,7 +222,7 @@ Foam::tmp<Foam::tensorField> Foam::axesRotation::transformTensor ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index b32b94606b6095f41f7b43315242379b864e62d7..58a5f04772d7c2b188acd704758bb3cfb60830c5 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -943,10 +943,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(pp.size(), offset_), distance_(0), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(false), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(fileName("surface")) {} @@ -970,10 +970,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(offsets), distance_(0), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(false), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(fileName("surface")) {} @@ -997,10 +997,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(0), distance_(0), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(false), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(fileName("surface")) {} @@ -1024,10 +1024,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(0), distance_(distance), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(false), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(fileName("surface")) {} @@ -1048,10 +1048,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(0), distance_(0.0), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { if (!coupleGroup_.valid()) @@ -1130,10 +1130,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(0), distance_(0.0), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { if (mode != NEARESTPATCHFACE && mode != NEARESTPATCHFACEAMI) @@ -1177,10 +1177,10 @@ Foam::mappedPatchBase::mappedPatchBase offsets_(mpb.offsets_), distance_(mpb.distance_), sameRegion_(mpb.sameRegion_), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(mpb.AMIReverse_), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(mpb.surfDict_) {} @@ -1207,10 +1207,10 @@ Foam::mappedPatchBase::mappedPatchBase ), distance_(mpb.distance_), sameRegion_(mpb.sameRegion_), - mapPtr_(NULL), - AMIPtr_(NULL), + mapPtr_(nullptr), + AMIPtr_(nullptr), AMIReverse_(mpb.AMIReverse_), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(mpb.surfDict_) {} diff --git a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C index 482c7e65579ad06ca5b18d0ec4a0fabc2f41b079..02583cd7d76b641d2504712af1967339a34158a0 100644 --- a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C +++ b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,9 +132,9 @@ Foam::regionCoupledBase::regionCoupledBase nbrPatchID_(-1), nbrRegionName_(word::null), sameRegion_(false), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(false), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(fileName("surface")) {} @@ -150,9 +150,9 @@ Foam::regionCoupledBase::regionCoupledBase nbrPatchID_(-1), nbrRegionName_(dict.lookup("neighbourRegion")), sameRegion_(nbrRegionName_ == patch_.boundaryMesh().mesh().name()), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)), - surfPtr_(NULL), + surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) {} @@ -168,7 +168,7 @@ Foam::regionCoupledBase::regionCoupledBase nbrPatchID_(mpb.nbrPatchID_), nbrRegionName_(mpb.nbrRegionName_), sameRegion_(mpb.sameRegion_), - AMIPtr_(NULL), + AMIPtr_(nullptr), AMIReverse_(mpb.AMIReverse_), surfPtr_(mpb.surfPtr_), surfDict_(mpb.surfDict_) diff --git a/src/meshTools/searchableSurface/searchableSurface.H b/src/meshTools/searchableSurface/searchableSurface.H index c7e25cc94a4ae521cdeaf03967d99b3d15c5a66f..9e6321f9e05562ac293ac5330cf494bbeef1b086 100644 --- a/src/meshTools/searchableSurface/searchableSurface.H +++ b/src/meshTools/searchableSurface/searchableSurface.H @@ -138,7 +138,7 @@ public: virtual autoPtr<searchableSurface> clone() const { NotImplemented; - return autoPtr<searchableSurface>(NULL); + return autoPtr<searchableSurface>(nullptr); } diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index 632e159ddd5e48f8d233149972bd5f1ca4ad683e..295af9f0f9530f651af02734380701aa252f2b67 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -54,7 +54,7 @@ namespace Foam } -Foam::HashTable<Foam::string>* Foam::topoSetSource::usageTablePtr_ = NULL; +Foam::HashTable<Foam::string>* Foam::topoSetSource::usageTablePtr_ = nullptr; const Foam::NamedEnum<Foam::topoSetSource::setAction, 8> diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.H b/src/meshTools/sets/topoSetSource/topoSetSource.H index d031a1a0d9300c05b293b72ddb012053401e04ab..5bef2158195ccd502f2317171b45d92b6b563612 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.H +++ b/src/meshTools/sets/topoSetSource/topoSetSource.H @@ -116,7 +116,7 @@ protected: if (usageTablePtr_) { delete usageTablePtr_; - usageTablePtr_ = NULL; + usageTablePtr_ = nullptr; } } }; @@ -243,7 +243,7 @@ public: autoPtr<topoSetSource> clone() const { NotImplemented; - return autoPtr<topoSetSource>(NULL); + return autoPtr<topoSetSource>(nullptr); } diff --git a/src/meshTools/sets/topoSets/topoSet.H b/src/meshTools/sets/topoSets/topoSet.H index bcad4e18361e8c8229e46e34e8e694795ca9cbfb..ffdc64ca48be850d7ce3ac8a993f9269ac02fb87 100644 --- a/src/meshTools/sets/topoSets/topoSet.H +++ b/src/meshTools/sets/topoSets/topoSet.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -220,7 +220,7 @@ public: autoPtr<topoSet> clone() const { NotImplemented; - return autoPtr<topoSet>(NULL); + return autoPtr<topoSet>(nullptr); } diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C index 36f6ac9ca9e418cb38d10128cc4befad5954b8e2..d95b28a9842ca39930b7df5482739a7f16061c1b 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C @@ -135,7 +135,7 @@ Foam::triSurfaceSearch::triSurfaceSearch(const triSurface& surface) surface_(surface), tolerance_(indexedOctree<treeDataTriSurface>::perturbTol()), maxTreeDepth_(10), - treePtr_(NULL) + treePtr_(nullptr) {} @@ -148,7 +148,7 @@ Foam::triSurfaceSearch::triSurfaceSearch surface_(surface), tolerance_(indexedOctree<treeDataTriSurface>::perturbTol()), maxTreeDepth_(10), - treePtr_(NULL) + treePtr_(nullptr) { // Have optional non-standard search tolerance for gappy surfaces. if (dict.readIfPresent("tolerance", tolerance_) && tolerance_ > 0) @@ -174,7 +174,7 @@ Foam::triSurfaceSearch::triSurfaceSearch surface_(surface), tolerance_(tolerance), maxTreeDepth_(maxTreeDepth), - treePtr_(NULL) + treePtr_(nullptr) {} diff --git a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C index ccd7257ee035a911266332d90da155d945757bfd..217c99565c4595885c6a36d33574ff1db11709c6 100644 --- a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C +++ b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C @@ -198,8 +198,8 @@ Foam::twoDPointCorrector::twoDPointCorrector(const polyMesh& mesh) : MeshObject<polyMesh, Foam::UpdateableMeshObject, twoDPointCorrector>(mesh), required_(mesh_.nGeometricD() == 2), - planeNormalPtr_(NULL), - normalEdgeIndicesPtr_(NULL), + planeNormalPtr_(nullptr), + normalEdgeIndicesPtr_(nullptr), isWedge_(false), wedgeAxis_(Zero), wedgeAngle_(0.0) diff --git a/src/parallel/decompose/decompose/fvFieldDecomposer.C b/src/parallel/decompose/decompose/fvFieldDecomposer.C index e007571eb933a9bde6ff2dfeb5ab76e04a42a633..310d0ce1fec4c7cd7c4e85de059546cc3a9d1dd7 100644 --- a/src/parallel/decompose/decompose/fvFieldDecomposer.C +++ b/src/parallel/decompose/decompose/fvFieldDecomposer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,17 +129,17 @@ Foam::fvFieldDecomposer::fvFieldDecomposer patchFieldDecomposerPtrs_ ( procMesh_.boundary().size(), - static_cast<patchFieldDecomposer*>(NULL) + static_cast<patchFieldDecomposer*>(nullptr) ), processorVolPatchFieldDecomposerPtrs_ ( procMesh_.boundary().size(), - static_cast<processorVolPatchFieldDecomposer*>(NULL) + static_cast<processorVolPatchFieldDecomposer*>(nullptr) ), processorSurfacePatchFieldDecomposerPtrs_ ( procMesh_.boundary().size(), - static_cast<processorSurfacePatchFieldDecomposer*>(NULL) + static_cast<processorSurfacePatchFieldDecomposer*>(nullptr) ) { forAll(boundaryAddressing_, patchi) diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/refinementHistory/refinementHistoryConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/refinementHistory/refinementHistoryConstraint.C index a60917157f46e6c92df80ba08d3192ee640dba1f..2a937024100492b5df68dae385c99e9f667a30ca 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/refinementHistory/refinementHistoryConstraint.C +++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/refinementHistory/refinementHistoryConstraint.C @@ -85,7 +85,7 @@ void Foam::refinementHistoryConstraint::add ) const { autoPtr<const refinementHistory> storagePtr; - refinementHistory const* refPtr = NULL; + refinementHistory const* refPtr = nullptr; if (mesh.foundObject<refinementHistory>("refinementHistory")) { @@ -152,7 +152,7 @@ void Foam::refinementHistoryConstraint::apply ) const { autoPtr<const refinementHistory> storagePtr; - refinementHistory const* refPtr = NULL; + refinementHistory const* refPtr = nullptr; if (mesh.foundObject<refinementHistory>("refinementHistory")) { diff --git a/src/parallel/decompose/metisDecomp/metisDecomp.C b/src/parallel/decompose/metisDecomp/metisDecomp.C index 90151843c441f6bb62e24dd0717dbb40aa05d376..3ede45d3f7b874d408f0174fa4974856f75bca51 100644 --- a/src/parallel/decompose/metisDecomp/metisDecomp.C +++ b/src/parallel/decompose/metisDecomp/metisDecomp.C @@ -175,11 +175,11 @@ Foam::label Foam::metisDecomp::decompose const_cast<List<label>&>(xadj).begin(), // indexing into adjncy const_cast<List<label>&>(adjncy).begin(), // neighbour info cellWeights.begin(),// vertexweights - NULL, // vsize: total communication vol + nullptr, // vsize: total communication vol faceWeights.begin(),// edgeweights &nProcs, // nParts processorWeights.begin(), // tpwgts - NULL, // ubvec: processor imbalance (default) + nullptr, // ubvec: processor imbalance (default) options.begin(), &edgeCut, finalDecomp.begin() @@ -194,11 +194,11 @@ Foam::label Foam::metisDecomp::decompose const_cast<List<label>&>(xadj).begin(), // indexing into adjncy const_cast<List<label>&>(adjncy).begin(), // neighbour info cellWeights.begin(),// vertexweights - NULL, // vsize: total communication vol + nullptr, // vsize: total communication vol faceWeights.begin(),// edgeweights &nProcs, // nParts processorWeights.begin(), // tpwgts - NULL, // ubvec: processor imbalance (default) + nullptr, // ubvec: processor imbalance (default) options.begin(), &edgeCut, finalDecomp.begin() diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 4c6d2939cea6d35c50e6fed15c17f735826544df..dcd2596d6b82c553f5f7ea9587517ea0bad6c896 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -492,13 +492,13 @@ Foam::label Foam::ptscotchDecomp::decompose const_cast<SCOTCH_Num*>(xadj+1),// vendloctab, end index ,, const_cast<SCOTCH_Num*>(velotab.begin()),// veloloctab, vtx weights - NULL, // vlblloctab + nullptr, // vlblloctab adjncySize, // edgelocnbr, number of arcs adjncySize, // edgelocsiz const_cast<SCOTCH_Num*>(adjncy), // edgeloctab - NULL, // edgegsttab - NULL // edlotab, edge weights + nullptr, // edgegsttab + nullptr // edlotab, edge weights ), "SCOTCH_dgraphBuild" ); diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.C b/src/parallel/decompose/scotchDecomp/scotchDecomp.C index d76ee941f3963071f4667332d0ff008424a60a16..987ef18a1e61640683526dd698a6c6135adeb224 100644 --- a/src/parallel/decompose/scotchDecomp/scotchDecomp.C +++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.C @@ -338,10 +338,10 @@ Foam::label Foam::scotchDecomp::decomposeOneProc xadj.begin(), // verttab, start index per cell into adjncy &xadj[1], // vendtab, end index ,, velotab.begin(), // velotab, vertex weights - NULL, // vlbltab + nullptr, // vlbltab adjncy.size(), // edgenbr, number of arcs adjncy.begin(), // edgetab - NULL // edlotab, edge weights + nullptr // edlotab, edge weights ), "SCOTCH_graphBuild" ); @@ -421,7 +421,7 @@ Foam::label Foam::scotchDecomp::decomposeOneProc //SCOTCH_Mapping mapdat; - //SCOTCH_graphMapInit(&grafdat, &mapdat, &archdat, NULL); + //SCOTCH_graphMapInit(&grafdat, &mapdat, &archdat, nullptr); //SCOTCH_graphMapCompute(&grafdat, &mapdat, &stradat); /* Perform mapping */ //SCOTCH_graphMapExit(&grafdat, &mapdat); diff --git a/src/parallel/reconstruct/reconstruct/processorMeshes.C b/src/parallel/reconstruct/reconstruct/processorMeshes.C index adc11f5635523af7ce91bf7d52d9d5e514ba0ace..47bd1166d0b13f3cf909e3d07b796dcefa6e4951 100644 --- a/src/parallel/reconstruct/reconstruct/processorMeshes.C +++ b/src/parallel/reconstruct/reconstruct/processorMeshes.C @@ -35,11 +35,11 @@ void Foam::processorMeshes::read() // and fields forAll(databases_, proci) { - meshes_.set(proci, NULL); - pointProcAddressing_.set(proci, NULL); - faceProcAddressing_.set(proci, NULL); - cellProcAddressing_.set(proci, NULL); - boundaryProcAddressing_.set(proci, NULL); + meshes_.set(proci, nullptr); + pointProcAddressing_.set(proci, nullptr); + faceProcAddressing_.set(proci, nullptr); + cellProcAddressing_.set(proci, nullptr); + boundaryProcAddressing_.set(proci, nullptr); } forAll(databases_, proci) diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C index c0912107aaf40023c3ee380d97fefb86d19e3ce7..2935936e8bb69129cbb2cca79ffbef731111d986 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C @@ -216,8 +216,8 @@ energyRegionCoupledFvPatchScalarField coupledFvPatchField<scalar>(p, iF), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(UNDEFINED), - nbrThermoPtr_(NULL), - thermoPtr_(NULL) + nbrThermoPtr_(nullptr), + thermoPtr_(nullptr) {} @@ -233,8 +233,8 @@ energyRegionCoupledFvPatchScalarField coupledFvPatchField<scalar>(ptf, p, iF, mapper), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(ptf.method_), - nbrThermoPtr_(NULL), - thermoPtr_(NULL) + nbrThermoPtr_(nullptr), + thermoPtr_(nullptr) {} @@ -249,8 +249,8 @@ energyRegionCoupledFvPatchScalarField coupledFvPatchField<scalar>(p, iF, dict), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(UNDEFINED), - nbrThermoPtr_(NULL), - thermoPtr_(NULL) + nbrThermoPtr_(nullptr), + thermoPtr_(nullptr) { if (!isA<regionCoupledBase>(this->patch().patch())) @@ -274,8 +274,8 @@ energyRegionCoupledFvPatchScalarField coupledFvPatchField<scalar>(ptf), regionCoupledPatch_(ptf.regionCoupledPatch_), method_(ptf.method_), - nbrThermoPtr_(NULL), - thermoPtr_(NULL) + nbrThermoPtr_(nullptr), + thermoPtr_(nullptr) {} @@ -289,8 +289,8 @@ energyRegionCoupledFvPatchScalarField coupledFvPatchField<scalar>(ptf, iF), regionCoupledPatch_(ptf.regionCoupledPatch_), method_(ptf.method_), - nbrThermoPtr_(NULL), - thermoPtr_(NULL) + nbrThermoPtr_(nullptr), + thermoPtr_(nullptr) {} diff --git a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C index 8e01df73ef6d50a24765884490642c85f8d87e17..257bddf92500b507cf0ee567ccc3c8b956e29b8a 100644 --- a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C +++ b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C @@ -95,9 +95,9 @@ noPyrolysis::noPyrolysis ) : pyrolysisModel(mesh, regionType), - solidChemistry_(NULL), - solidThermo_(NULL), - radiation_(NULL) + solidChemistry_(nullptr), + solidThermo_(nullptr), + radiation_(nullptr) { if (active()) { @@ -115,9 +115,9 @@ noPyrolysis::noPyrolysis ) : pyrolysisModel(mesh, regionType), - solidChemistry_(NULL), - solidThermo_(NULL), - radiation_(NULL) + solidChemistry_(nullptr), + solidThermo_(nullptr), + radiation_(nullptr) { if (active()) { diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H index 92e495b0b55af351067888668596e8886b89fddb..9f3ee2a289290dfef7cfe7375ec41a1464121fce 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H @@ -156,7 +156,7 @@ public: autoPtr<pyrolysisModel> clone() const { NotImplemented; - return autoPtr<pyrolysisModel>(NULL); + return autoPtr<pyrolysisModel>(nullptr); } diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index f1c21e778baa94cb0c5f46de76e3ca6b6d0b85f0..31a9ff533b69df475ff4d31fe4af8d6a444fb14f 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -391,9 +391,9 @@ Foam::regionModels::regionModel::regionModel active_(false), infoOutput_(false), modelName_("none"), - regionMeshPtr_(NULL), + regionMeshPtr_(nullptr), coeffs_(dictionary::null), - outputPropertiesPtr_(NULL), + outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), regionName_("none"), @@ -427,9 +427,9 @@ Foam::regionModels::regionModel::regionModel active_(lookup("active")), infoOutput_(true), modelName_(modelName), - regionMeshPtr_(NULL), + regionMeshPtr_(nullptr), coeffs_(subOrEmptyDict(modelName + "Coeffs")), - outputPropertiesPtr_(NULL), + outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), regionName_(lookup("regionName")), @@ -475,9 +475,9 @@ Foam::regionModels::regionModel::regionModel active_(dict.lookup("active")), infoOutput_(false), modelName_(modelName), - regionMeshPtr_(NULL), + regionMeshPtr_(nullptr), coeffs_(dict.subOrEmptyDict(modelName + "Coeffs")), - outputPropertiesPtr_(NULL), + outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), regionName_(dict.lookup("regionName")), diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index ef1676b79c32c0d220b9428bc24057f32ec29f0f..15154dc33d0874acf952fc0025b3bdd5e3e84711 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -291,7 +291,7 @@ Foam::regionModels::regionModel1D::regionModel1D boundaryFaceCells_(), boundaryFaceOppositeFace_(), nLayers_(0), - nMagSfPtr_(NULL), + nMagSfPtr_(nullptr), moveMesh_(false) {} @@ -309,7 +309,7 @@ Foam::regionModels::regionModel1D::regionModel1D boundaryFaceCells_(regionMesh().nCells()), boundaryFaceOppositeFace_(regionMesh().nCells()), nLayers_(0), - nMagSfPtr_(NULL), + nMagSfPtr_(nullptr), moveMesh_(true) { if (active_) @@ -339,7 +339,7 @@ Foam::regionModels::regionModel1D::regionModel1D boundaryFaceCells_(regionMesh().nCells()), boundaryFaceOppositeFace_(regionMesh().nCells()), nLayers_(0), - nMagSfPtr_(NULL), + nMagSfPtr_(nullptr), moveMesh_(false) { if (active_) diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 360607e4cfa82e79f58fda3a74563a13b8bd9846..0c3571ef307b8be2a3f608ac1c00e7759fe09922 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -164,8 +164,8 @@ Foam::regionModels::singleLayerRegion::singleLayerRegion ) : regionModel(mesh, regionType), - nHatPtr_(NULL), - magSfPtr_(NULL), + nHatPtr_(nullptr), + magSfPtr_(nullptr), passivePatchIDs_() {} @@ -179,8 +179,8 @@ Foam::regionModels::singleLayerRegion::singleLayerRegion ) : regionModel(mesh, regionType, modelName, false), - nHatPtr_(NULL), - magSfPtr_(NULL), + nHatPtr_(nullptr), + magSfPtr_(nullptr), passivePatchIDs_() { if (active_) diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index 5511b2e20022a9789df5c9a682d0862fe2ce4d52..824dd5a203e439feebc4f070c8fc7d5e645cdfe0 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -71,7 +71,7 @@ const thermoSingleLayer& liquidFilmThermo::thermoFilm() const void liquidFilmThermo::initLiquid(const dictionary& dict) { - if (liquidPtr_ != NULL) + if (liquidPtr_ != nullptr) { return; } @@ -108,7 +108,7 @@ liquidFilmThermo::liquidFilmThermo : filmThermoModel(typeName, owner, dict), name_("unknown_liquid"), - liquidPtr_(NULL), + liquidPtr_(nullptr), ownLiquid_(false), useReferenceValues_(readBool(coeffDict_.lookup("useReferenceValues"))), pRef_(0.0), diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C index a504a76507f87f42c732cfde4ee175bc407dce57..2ac323d0f750ad900563b92400f52f250b14abe1 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C +++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C @@ -93,7 +93,7 @@ tmp<volScalarField::Internal> surfaceFilmModel::Srho() const { NotImplemented; - return tmp<volScalarField::Internal>(NULL); + return tmp<volScalarField::Internal>(nullptr); } @@ -102,7 +102,7 @@ surfaceFilmModel::Srho(const label) const { NotImplemented; - return tmp<volScalarField::Internal>(NULL); + return tmp<volScalarField::Internal>(nullptr); } @@ -110,7 +110,7 @@ tmp<volScalarField::Internal> surfaceFilmModel::Sh() const { NotImplemented; - return tmp<volScalarField::Internal>(NULL); + return tmp<volScalarField::Internal>(nullptr); } diff --git a/src/renumber/zoltanRenumber/zoltanRenumber.C b/src/renumber/zoltanRenumber/zoltanRenumber.C index 73c7c5f95399dcee62079a7f1e65422b173068eb..da7a2957b535fc198f3600ba8330bdca0328cf0a 100644 --- a/src/renumber/zoltanRenumber/zoltanRenumber.C +++ b/src/renumber/zoltanRenumber/zoltanRenumber.C @@ -96,7 +96,7 @@ static void get_vertex_list(void *data, int sizeGID, int sizeLID, */ wgt_dim = 0; - obj_wgts = NULL; + obj_wgts = nullptr; for (Foam::label i=0; i<mesh.nCells(); i++) { diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C index aebfb762edcbea4e4b59df797da6c597ccee6b9a..b2236c39c49e25b344729c724b17aafff511a9a9 100644 --- a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C +++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C @@ -295,7 +295,7 @@ void Foam::RBD::rigidBodyModel::makeComposite(const label bodyID) if (!isA<compositeBody>(bodies_[bodyID])) { // Retrieve the un-merged body - autoPtr<rigidBody> bodyPtr = bodies_.set(bodyID, NULL); + autoPtr<rigidBody> bodyPtr = bodies_.set(bodyID, nullptr); // Insert the compositeBody containing the original body bodies_.set diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C index 9eb21c396912a14f9ba25e6311004450931d783e..f14acc6e60af9139bfb749574b7c32c18afe7526 100644 --- a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C +++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C @@ -50,7 +50,7 @@ Foam::RBD::rigidBodyMotion::rigidBodyMotion() aRelax_(1.0), aDamp_(1.0), report_(false), - solver_(NULL) + solver_(nullptr) {} Foam::RBD::rigidBodyMotion::rigidBodyMotion diff --git a/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H b/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H index 537f7d8de5c80e50ac76f1641d3241d9b4af7635..66b373080160dad6880725aca25fddb4661fefd6 100644 --- a/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H +++ b/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H @@ -85,7 +85,7 @@ public: } } - if ((singlePatchProc_ == -1) != (distMapPtr_ != NULL)) + if ((singlePatchProc_ == -1) != (distMapPtr_ != nullptr)) { FatalErrorIn ( @@ -94,7 +94,7 @@ public: ) << "Supply a mapDistributeBase if and only if " << "singlePatchProc is -1" << " singlePatchProc_:" << singlePatchProc_ - << " distMapPtr_:" << (distMapPtr_ != NULL) + << " distMapPtr_:" << (distMapPtr_ != nullptr) << exit(FatalError); } } diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C index 0c2efaaeed2e2b55a2f4538110a886abdac0e983..73d7514d1ca5d907277e247c52e484f7095db694 100644 --- a/src/sampling/meshToMesh/meshToMesh.C +++ b/src/sampling/meshToMesh/meshToMesh.C @@ -653,8 +653,8 @@ Foam::meshToMesh::meshToMesh tgtToSrcCellWght_(), V_(0.0), singleMeshProc_(-1), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { constructNoCuttingPatches ( @@ -689,8 +689,8 @@ Foam::meshToMesh::meshToMesh tgtToSrcCellWght_(), V_(0.0), singleMeshProc_(-1), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { constructNoCuttingPatches(methodName, AMIMethodName, interpAllPatches); } @@ -717,8 +717,8 @@ Foam::meshToMesh::meshToMesh tgtToSrcCellWght_(), V_(0.0), singleMeshProc_(-1), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { constructFromCuttingPatches ( @@ -755,8 +755,8 @@ Foam::meshToMesh::meshToMesh tgtToSrcCellWght_(), V_(0.0), singleMeshProc_(-1), - srcMapPtr_(NULL), - tgtMapPtr_(NULL) + srcMapPtr_(nullptr), + tgtMapPtr_(nullptr) { constructFromCuttingPatches ( diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C index 8c0952d08d4d8320c27e4d649fa2f36159ddfac7..1897147dae55e9da4a2241f617b619fdf8f8ed11 100644 --- a/src/sampling/meshToMesh/meshToMeshTemplates.C +++ b/src/sampling/meshToMesh/meshToMeshTemplates.C @@ -375,7 +375,7 @@ void Foam::meshToMesh::mapSrcToTgt ( AMIList[i].singlePatchProc() == -1 ? &AMIList[i].srcMap() - : NULL + : nullptr ), AMIList[i].tgtAddress(), AMIList[i].tgtWeights() @@ -581,7 +581,7 @@ void Foam::meshToMesh::mapTgtToSrc ( AMIList[i].singlePatchProc() == -1 ? &AMIList[i].tgtMap() - : NULL + : nullptr ), AMIList[i].srcAddress(), AMIList[i].srcWeights() diff --git a/src/sampling/meshToMesh0/meshToMesh0.C b/src/sampling/meshToMesh0/meshToMesh0.C index 73991b8b72bb42a9a12d5cc30c5973faba0b55e2..e4ff3263ace2690aacbd8579f4485dd857f16541 100644 --- a/src/sampling/meshToMesh0/meshToMesh0.C +++ b/src/sampling/meshToMesh0/meshToMesh0.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,9 +52,9 @@ Foam::meshToMesh0::meshToMesh0 patchMap_(patchMap), cellAddressing_(toMesh_.nCells()), boundaryAddressing_(toMesh_.boundaryMesh().size()), - inverseDistanceWeightsPtr_(NULL), - inverseVolumeWeightsPtr_(NULL), - cellToCellAddressingPtr_(NULL), + inverseDistanceWeightsPtr_(nullptr), + inverseVolumeWeightsPtr_(nullptr), + cellToCellAddressingPtr_(nullptr), V_(0.0) { forAll(fromMesh_.boundaryMesh(), patchi) @@ -120,9 +120,9 @@ Foam::meshToMesh0::meshToMesh0 toMesh_(meshTo), cellAddressing_(toMesh_.nCells()), boundaryAddressing_(toMesh_.boundaryMesh().size()), - inverseDistanceWeightsPtr_(NULL), - inverseVolumeWeightsPtr_(NULL), - cellToCellAddressingPtr_(NULL), + inverseDistanceWeightsPtr_(nullptr), + inverseVolumeWeightsPtr_(nullptr), + cellToCellAddressingPtr_(nullptr), V_(0.0) { // check whether both meshes have got the same number diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.H b/src/sampling/sampledSet/sampledSet/sampledSet.H index 7623524f87b62bb15caf883ca9eeffac1726ba10..1f146c9a867cdd63c29eca7abf7f6b7d2d05ccbf 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.H +++ b/src/sampling/sampledSet/sampledSet/sampledSet.H @@ -217,7 +217,7 @@ public: autoPtr<sampledSet> clone() const { NotImplemented; - return autoPtr<sampledSet>(NULL); + return autoPtr<sampledSet>(nullptr); } diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.H b/src/sampling/sampledSet/sampledSets/sampledSets.H index 2e8bc5ac94208feb7e3ef731588ebe9abf15705c..eed3e754cdd78a63cd19532714a2802185542c08 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.H +++ b/src/sampling/sampledSet/sampledSets/sampledSets.H @@ -82,7 +82,7 @@ class sampledSets fieldGroup() : DynamicList<word>(0), - formatter(NULL) + formatter(nullptr) {} //- Construct for a particular format diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C index 9d703f4dc8167c087e567ba8e11d0b0cbd09db92..7b5a2c4c609a681fa73b3aafaa05e7c0171ee4e3 100644 --- a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C +++ b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C @@ -335,9 +335,9 @@ Foam::distanceSurface::distanceSurface average_(dict.lookupOrDefault("average", false)), zoneKey_(keyType::null), needsUpdate_(true), - isoSurfCellPtr_(NULL), - isoSurfPtr_(NULL), - facesPtr_(NULL) + isoSurfCellPtr_(nullptr), + isoSurfPtr_(nullptr), + facesPtr_(nullptr) { // dict.readIfPresent("zone", zoneKey_); // @@ -389,9 +389,9 @@ Foam::distanceSurface::distanceSurface average_(average), zoneKey_(keyType::null), needsUpdate_(true), - isoSurfCellPtr_(NULL), - isoSurfPtr_(NULL), - facesPtr_(NULL) + isoSurfCellPtr_(nullptr), + isoSurfPtr_(nullptr), + facesPtr_(nullptr) {} diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index caaa6a8c8c025fcee9d69d6e3e1eff5a362b8e59..a15f625ed946b19432b0ab4908b11d6dd306ca8b 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -1259,7 +1259,7 @@ Foam::isoSurface::isoSurface bType& bfld = const_cast<bType&>(meshC.boundaryField()); // Clear old value. Cannot resize it since is a slice. - bfld.set(patchi, NULL); + bfld.set(patchi, nullptr); // Set new value we can change bfld.set diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C index 8170fba67798ab120568cef5767a86e919d3f672..deae85c925d8319e7f1faee87fd95f3fec237fb5 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C @@ -90,7 +90,7 @@ Foam::isoSurface::adaptPatchFields ) { // Clear old value. Cannot resize it since is a slice. - sliceFldBf.set(patchi, NULL); + sliceFldBf.set(patchi, nullptr); // Set new value we can change sliceFldBf.set diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C index 91806f79132fbaecc790b047495d00e30a1d92a3..88966077ddf2ab18dc610f7fc565447a9299a545 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C @@ -449,12 +449,12 @@ Foam::sampledIsoSurface::sampledIsoSurface average_(dict.lookupOrDefault("average", false)), zoneID_(dict.lookupOrDefault("zone", word::null), mesh.cellZones()), exposedPatchName_(word::null), - surfPtr_(NULL), - facesPtr_(NULL), + surfPtr_(nullptr), + facesPtr_(nullptr), prevTimeIndex_(-1), - storedVolFieldPtr_(NULL), - volFieldPtr_(NULL), - pointFieldPtr_(NULL) + storedVolFieldPtr_(nullptr), + volFieldPtr_(nullptr), + pointFieldPtr_(nullptr) { if (!sampledSurface::interpolate()) { diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C index 8e31ea4fac05d62cc31c11e19a140ccc6f5460f8..a44c155d0467ffbdf349e18a85d4c0c403ab1ebc 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C @@ -70,7 +70,7 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const // 1. see if field in database // 2. see if field can be read - const volScalarField* cellFldPtr = NULL; + const volScalarField* cellFldPtr = nullptr; if (fvm.foundObject<volScalarField>(isoField_)) { if (debug) @@ -209,7 +209,7 @@ Foam::sampledIsoSurfaceCell::sampledIsoSurfaceCell regularise_(dict.lookupOrDefault("regularise", true)), average_(dict.lookupOrDefault("average", true)), zoneKey_(keyType::null), - facesPtr_(NULL), + facesPtr_(nullptr), prevTimeIndex_(-1), meshCells_(0) {} diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index 7d439f3bfec409812fd2b8adcb457db403347002..da72b196d8d77eaed629036e3d8d8d04edd9a500 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -269,10 +269,10 @@ Foam::sampledCuttingPlane::sampledCuttingPlane zoneID_(dict.lookupOrDefault("zone", word::null), mesh.cellZones()), exposedPatchName_(word::null), needsUpdate_(true), - subMeshPtr_(NULL), - cellDistancePtr_(NULL), - isoSurfPtr_(NULL), - facesPtr_(NULL) + subMeshPtr_(nullptr), + cellDistancePtr_(nullptr), + isoSurfPtr_(nullptr), + facesPtr_(nullptr) { if (zoneID_.index() != -1) { diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 7d6b4916875eeebdc3de94de395a11bc9f8d79ee..d1281cfb457cd542804eb1213faebdcc7771e3f9 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -156,9 +156,9 @@ Foam::sampledSurface::sampledSurface name_(name), mesh_(mesh), interpolate_(interpolate), - SfPtr_(NULL), - magSfPtr_(NULL), - CfPtr_(NULL), + SfPtr_(nullptr), + magSfPtr_(nullptr), + CfPtr_(nullptr), area_(-1) {} @@ -173,9 +173,9 @@ Foam::sampledSurface::sampledSurface name_(name), mesh_(mesh), interpolate_(dict.lookupOrDefault("interpolate", false)), - SfPtr_(NULL), - magSfPtr_(NULL), - CfPtr_(NULL), + SfPtr_(nullptr), + magSfPtr_(nullptr), + CfPtr_(nullptr), area_(-1) { dict.readIfPresent("name", name_); @@ -243,7 +243,7 @@ Foam::tmp<Foam::scalarField> Foam::sampledSurface::sample ) const { NotImplemented; - return tmp<scalarField>(NULL); + return tmp<scalarField>(nullptr); } @@ -253,7 +253,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledSurface::sample ) const { NotImplemented; - return tmp<vectorField>(NULL); + return tmp<vectorField>(nullptr); } @@ -263,7 +263,7 @@ Foam::tmp<Foam::sphericalTensorField> Foam::sampledSurface::sample ) const { NotImplemented; - return tmp<sphericalTensorField>(NULL); + return tmp<sphericalTensorField>(nullptr); } @@ -273,7 +273,7 @@ Foam::tmp<Foam::symmTensorField> Foam::sampledSurface::sample ) const { NotImplemented; - return tmp<symmTensorField>(NULL); + return tmp<symmTensorField>(nullptr); } @@ -283,7 +283,7 @@ Foam::tmp<Foam::tensorField> Foam::sampledSurface::sample ) const { NotImplemented; - return tmp<tensorField>(NULL); + return tmp<tensorField>(nullptr); } diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H index 98db69744a06942a18db8b2634bc402d2f93a614..b0a19707a96dc7ed50f0c2460d68e95b524ddb4c 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H @@ -225,7 +225,7 @@ public: autoPtr<sampledSurface> clone() const { NotImplemented; - return autoPtr<sampledSurface>(NULL); + return autoPtr<sampledSurface>(nullptr); } diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C index 98c596a3461c1dfa5bee2203b5c720e518c93e7d..86d88a9e0edb9ba9cc6f809d1bc8edb68b1a7db8 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C @@ -117,7 +117,7 @@ Foam::sampledSurfaces::sampledSurfaces fieldSelection_(), interpolationScheme_(word::null), mergeList_(), - formatter_(NULL) + formatter_(nullptr) { if (Pstream::parRun()) { @@ -148,7 +148,7 @@ Foam::sampledSurfaces::sampledSurfaces fieldSelection_(), interpolationScheme_(word::null), mergeList_(), - formatter_(NULL) + formatter_(nullptr) { if (Pstream::parRun()) { diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C index d39297292ec3222640c12ba0e5c36168960467b5..503853c7747568a18bacc2a8d8abb702ac126467 100644 --- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C +++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C @@ -64,7 +64,7 @@ bool Foam::sampledThresholdCellFaces::updateGeometry() const // 1. see if field in database // 2. see if field can be read - const volScalarField* cellFldPtr = NULL; + const volScalarField* cellFldPtr = nullptr; if (fvm.foundObject<volScalarField>(fieldName_)) { if (debug) diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C index 06774ef78be1c281f6e017d40aff60ffcbb6f79a..65ad05cc7474702b8540bd98a2414fb1e9242a1f 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C @@ -86,7 +86,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion() aRelax_(1.0), aDamp_(1.0), report_(false), - solver_(NULL) + solver_(nullptr) {} diff --git a/src/surfMesh/surfZone/surfZone/surfZone.H b/src/surfMesh/surfZone/surfZone/surfZone.H index 047bae120e1a55a69dc9247201da9c97fc366e0a..c7692c4643800aed282c2ed0786580acff97a8e4 100644 --- a/src/surfMesh/surfZone/surfZone/surfZone.H +++ b/src/surfMesh/surfZone/surfZone/surfZone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ public: autoPtr<surfZone> clone() const { NotImplemented; - return autoPtr<surfZone>(NULL); + return autoPtr<surfZone>(nullptr); } static autoPtr<surfZone> New(Istream& is) diff --git a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C index 53c8c6aa7645a095a1f81cb7d42eb9a9fb93c446..b307c820c5deb7c17b848c4b3c32286d0762addd 100644 --- a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C +++ b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,9 +47,9 @@ Foam::SLGThermo::SLGThermo(const fvMesh& mesh, fluidThermo& thermo) ) ), thermo_(thermo), - carrier_(NULL), - liquids_(NULL), - solids_(NULL) + carrier_(nullptr), + liquids_(nullptr), + solids_(nullptr) { Info<< "Creating component thermo properties:" << endl; @@ -107,7 +107,7 @@ const Foam::fluidThermo& Foam::SLGThermo::thermo() const const Foam::basicSpecieMixture& Foam::SLGThermo::carrier() const { - if (carrier_ == NULL) + if (carrier_ == nullptr) { FatalErrorInFunction << "carrier requested, but object is not allocated" @@ -222,7 +222,7 @@ Foam::label Foam::SLGThermo::solidId bool Foam::SLGThermo::hasMultiComponentCarrier() const { - return (carrier_ != NULL); + return (carrier_ != nullptr); } diff --git a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H index 33c9f38f55ab9e4272998f3822dc6ddd186f038c..99522911f58acdbbdbdfbddbf592866699403fce 100644 --- a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H +++ b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,9 +31,9 @@ Description - liquids : liquid components - access to elemental properties - solids : solid components - access to elemental properties - If thermo is not a multi-component thermo package, carrier is NULL. + If thermo is not a multi-component thermo package, carrier is nullptr. Similarly, if no liquids or solids are specified, their respective - pointers will also be NULL. + pointers will also be nullptr. Registered to the mesh so that it can be looked-up diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C index 25b79011d9ef7882712ff9809241d99699300bbc..cf54307b15ae4186f2f87f4e44cbb6fd234266cd 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C @@ -75,7 +75,7 @@ Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::ISAT ), MRURetrieve_(this->coeffsDict_.lookupOrDefault("MRURetrieve", false)), maxMRUSize_(this->coeffsDict_.lookupOrDefault("maxMRUSize", 0)), - lastSearch_(NULL), + lastSearch_(nullptr), growPoints_(this->coeffsDict_.lookupOrDefault("growPoints", true)), nRetrieved_(0), nGrowth_(0), @@ -252,7 +252,7 @@ bool Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::grow const scalarField& Rphiq ) { - // If the pointer to the chemPoint is NULL, the function stops + // If the pointer to the chemPoint is nullptr, the function stops if (!phi0) { return false; @@ -290,7 +290,7 @@ Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::cleanAndBalance() // Check all chemPoints to see if we need to delete some of the chemPoints // according to the ellapsed time and number of growths chemPointISAT<CompType, ThermoType>* x = chemisTree_.treeMin(); - while(x != NULL) + while(x != nullptr) { chemPointISAT<CompType, ThermoType>* xtmp = chemisTree_.treeSuccessor(x); @@ -458,7 +458,7 @@ bool Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::retrieve else { // There is no chempoints that we can try to grow - lastSearch_ = NULL; + lastSearch_ = nullptr; } if (retrieved) @@ -566,7 +566,7 @@ bool Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::add // The structure has been changed, it will force the binary tree to // perform a new search and find the most appropriate point still stored - lastSearch_ = NULL; + lastSearch_ = nullptr; // Either cleanAndBalance has changed the tree or it has been cleared // in any case treeCleanedOrCleared should be set to true @@ -586,7 +586,7 @@ bool Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::add scaleFactor(), this->tolerance(), scaleFactor_.size(), - lastSearch_ // lastSearch_ may be NULL (handled by binaryTree) + lastSearch_ // lastSearch_ may be nullptr (handled by binaryTree) ); nAdd_++; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C index a2c5d3899501b649585234d85a597372af0dfc6b..45bf42a4c4e46fb0610cfb7b6a1bfdb8bd6049ce 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C @@ -32,11 +32,11 @@ Foam::binaryNode<CompType, ThermoType>::binaryNode ( ) : - leafLeft_(NULL), - leafRight_(NULL), - nodeLeft_(NULL), - nodeRight_(NULL), - parent_(NULL) + leafLeft_(nullptr), + leafRight_(nullptr), + nodeLeft_(nullptr), + nodeRight_(nullptr), + parent_(nullptr) {} @@ -50,8 +50,8 @@ Foam::binaryNode<CompType, ThermoType>::binaryNode : leafLeft_(elementLeft), leafRight_(elementRight), - nodeLeft_(NULL), - nodeRight_(NULL), + nodeLeft_(nullptr), + nodeRight_(nullptr), parent_(parent), v_(elementLeft->completeSpaceSize(),0.0) { diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C index e7a31e43d9666759f86846b8ca654d681f09b4e8..7ed6495991fdb928f3f63191f2ff7c5627da9329 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C @@ -37,13 +37,13 @@ void Foam::binaryTree<CompType, ThermoType>::insertNode { if (phi0 == phi0->node()->leafRight())// phi0 is on the right { - phi0->node()->leafRight() = NULL; + phi0->node()->leafRight() = nullptr; phi0->node()->nodeRight() = newNode; return; } else if (phi0 == phi0->node()->leafLeft())// phi0 is on the left { - phi0->node()->leafLeft() = NULL; + phi0->node()->leafLeft() = nullptr; phi0->node()->nodeLeft() = newNode; return; @@ -64,7 +64,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree chP* x ) { - if ((n2ndSearch_ < max2ndSearch_) && (y!=NULL)) + if ((n2ndSearch_ < max2ndSearch_) && (y!=nullptr)) { scalar vPhi=0.0; const scalarField& v = y->v(); @@ -76,7 +76,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree } if (vPhi<=a)// on the left side of the node { - if (y->nodeLeft() == NULL)// left is a chemPoint + if (y->nodeLeft() == nullptr)// left is a chemPoint { n2ndSearch_++; if (y->leafLeft()->inEOA(phiq)) @@ -94,7 +94,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree } // not on the left side, try the right side - if ((n2ndSearch_ < max2ndSearch_) && y->nodeRight() == NULL) + if ((n2ndSearch_ < max2ndSearch_) && y->nodeRight() == nullptr) { n2ndSearch_++; // we reach the end of the subTree we can return the result @@ -105,7 +105,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree } else { - x=NULL; + x=nullptr; return false; } } @@ -116,7 +116,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree } else // on right side (symetric of above) { - if (y->nodeRight() == NULL) + if (y->nodeRight() == nullptr) { n2ndSearch_++; if (y->leafRight()->inEOA(phiq)) @@ -134,7 +134,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree } // if we reach this point, the retrieve has // failed on the right side, explore the left side - if ((n2ndSearch_ < max2ndSearch_) && y->nodeLeft() == NULL) + if ((n2ndSearch_ < max2ndSearch_) && y->nodeLeft() == nullptr) { n2ndSearch_++; if (y->leafLeft()->inEOA(phiq)) @@ -144,7 +144,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree } else { - x=NULL; + x=nullptr; return false; } } @@ -164,7 +164,7 @@ bool Foam::binaryTree<CompType, ThermoType>::inSubTree template<class CompType, class ThermoType> void Foam::binaryTree<CompType, ThermoType>::deleteSubTree(bn* subTreeRoot) { - if (subTreeRoot != NULL) + if (subTreeRoot != nullptr) { deleteDemandDrivenData(subTreeRoot->leafLeft()); deleteDemandDrivenData(subTreeRoot->leafRight()); @@ -178,10 +178,10 @@ void Foam::binaryTree<CompType, ThermoType>::deleteSubTree(bn* subTreeRoot) template<class CompType, class ThermoType> void Foam::binaryTree<CompType, ThermoType>::transplant(bn* u, bn* v) { - if (v != NULL) + if (v != nullptr) { // u is root_ - if (u->parent() == NULL) + if (u->parent() == nullptr) { root_ = v; } @@ -206,7 +206,7 @@ void Foam::binaryTree<CompType, ThermoType>::transplant(bn* u, bn* v) else { FatalErrorInFunction - << "trying to transplant a NULL node" + << "trying to transplant a nullptr node" << exit(FatalError); } } @@ -216,11 +216,11 @@ template<class CompType, class ThermoType> Foam::chemPointISAT<CompType, ThermoType>* Foam::binaryTree<CompType, ThermoType>::chemPSibling(bn* y) { - if (y->parent()!=NULL) + if (y->parent()!=nullptr) { if (y == y->parent()->nodeLeft())// y is on the left, return right side { - // might return NULL if the right side is a node + // might return nullptr if the right side is a node return y->parent()->leafRight(); } else if (y == y->parent()->nodeRight()) @@ -232,11 +232,11 @@ Foam::binaryTree<CompType, ThermoType>::chemPSibling(bn* y) FatalErrorInFunction << "wrong addressing of the initial node" << exit(FatalError); - return NULL; + return nullptr; } } // the binaryNode is root_ and has no sibling - return NULL; + return nullptr; } @@ -249,7 +249,7 @@ Foam::binaryTree<CompType, ThermoType>::chemPSibling(chP* x) if (x == x->node()->leafLeft()) { // x is on the left, return right side - // might return NULL if the right side is a node + // might return nullptr if the right side is a node return x->node()->leafRight(); } else if (x == x->node()->leafRight()) @@ -262,11 +262,11 @@ Foam::binaryTree<CompType, ThermoType>::chemPSibling(chP* x) FatalErrorInFunction << "wrong addressing of the initial leaf" << exit(FatalError); - return NULL; + return nullptr; } } // there is only one leaf attached to the root_, no sibling - return NULL; + return nullptr; } @@ -274,7 +274,7 @@ template<class CompType, class ThermoType> Foam::binaryNode<CompType, ThermoType>* Foam::binaryTree<CompType, ThermoType>::nodeSibling(bn* y) { - if (y->parent()!=NULL) + if (y->parent()!=nullptr) { if (y == y->parent()->nodeLeft()) { @@ -290,10 +290,10 @@ Foam::binaryTree<CompType, ThermoType>::nodeSibling(bn* y) FatalErrorInFunction << "wrong addressing of the initial node" << exit(FatalError); - return NULL; + return nullptr; } } - return NULL; + return nullptr; } @@ -318,17 +318,17 @@ Foam::binaryTree<CompType, ThermoType>::nodeSibling(chP* x) FatalErrorInFunction << "wrong addressing of the initial leaf" << exit(FatalError); - return NULL; + return nullptr; } } - return NULL; + return nullptr; } template<class CompType, class ThermoType> void Foam::binaryTree<CompType, ThermoType>::deleteAllNode(bn* subTreeRoot) { - if (subTreeRoot != NULL) + if (subTreeRoot != nullptr) { deleteAllNode(subTreeRoot->nodeLeft()); deleteAllNode(subTreeRoot->nodeRight()); @@ -347,7 +347,7 @@ Foam::binaryTree<CompType, ThermoType>::binaryTree ) : chemistry_(chemistry), - root_(NULL), + root_(nullptr), maxNLeafs_(readLabel(coeffsDict.lookup("maxNLeafs"))), size_(0), n2ndSearch_(0), @@ -361,7 +361,7 @@ template<class CompType, class ThermoType> Foam::label Foam::binaryTree<CompType, ThermoType>::depth(bn* subTreeRoot) { // when we reach the leaf, we return 0 - if (subTreeRoot == NULL) + if (subTreeRoot == nullptr) { return 0; } @@ -412,7 +412,7 @@ void Foam::binaryTree<CompType, ThermoType>::insertNewLeaf else // at least one point stored { // no reference chemPoint, a BT search is required - if (phi0 == NULL) + if (phi0 == nullptr) { binaryTreeSearch(phiq, root_,phi0); } @@ -448,7 +448,7 @@ void Foam::binaryTree<CompType, ThermoType>::insertNewLeaf { // when size is 1, the binaryNode is without hyperplane deleteDemandDrivenData(root_); - newNode = new bn(phi0, newChemPoint, NULL); + newNode = new bn(phi0, newChemPoint, nullptr); root_ = newNode; } @@ -478,7 +478,7 @@ void Foam::binaryTree<CompType, ThermoType>::binaryTreeSearch if (vPhi > a) // on right side (side of the newly added point) { - if (node->nodeRight()!=NULL) + if (node->nodeRight()!=nullptr) { binaryTreeSearch(phiq, node->nodeRight(), nearest); } @@ -490,7 +490,7 @@ void Foam::binaryTree<CompType, ThermoType>::binaryTreeSearch } else // on left side (side of the previously stored point) { - if (node->nodeLeft()!=NULL) + if (node->nodeLeft()!=nullptr) { binaryTreeSearch(phiq, node->nodeLeft(), nearest); } @@ -508,7 +508,7 @@ void Foam::binaryTree<CompType, ThermoType>::binaryTreeSearch } else // no point stored { - nearest = NULL; + nearest = nullptr; } } @@ -525,7 +525,7 @@ bool Foam::binaryTree<CompType, ThermoType>::secondaryBTSearch if ((n2ndSearch_ < max2ndSearch_) && (size_ > 1)) { chP* xS = chemPSibling(x); - if (xS != NULL) + if (xS != nullptr) { n2ndSearch_++; if (xS->inEOA(phiq)) @@ -541,10 +541,10 @@ bool Foam::binaryTree<CompType, ThermoType>::secondaryBTSearch // if we reach this point, no leafs were found at this depth or lower // we move upward in the tree bn* y = x->node(); - while((y->parent()!= NULL) && (n2ndSearch_ < max2ndSearch_)) + while((y->parent()!= nullptr) && (n2ndSearch_ < max2ndSearch_)) { xS = chemPSibling(y); - if (xS != NULL) + if (xS != nullptr) { n2ndSearch_++; if (xS->inEOA(phiq)) @@ -586,10 +586,10 @@ void Foam::binaryTree<CompType, ThermoType>::deleteLeaf(chP*& phi0) bn* x; chP* siblingPhi0 = chemPSibling(phi0); - if (siblingPhi0 != NULL)// the sibling of phi0 is a chemPoint + if (siblingPhi0 != nullptr)// the sibling of phi0 is a chemPoint { // z was root (only two chemPoints in the tree) - if (z->parent() == NULL) + if (z->parent() == nullptr) { root_ = new bn(); root_->leafLeft()=siblingPhi0; @@ -598,13 +598,13 @@ void Foam::binaryTree<CompType, ThermoType>::deleteLeaf(chP*& phi0) else if (z==z->parent()->nodeLeft()) { z->parent()->leafLeft() = siblingPhi0; - z->parent()->nodeLeft() = NULL; + z->parent()->nodeLeft() = nullptr; siblingPhi0->node() = z->parent(); } else if (z == z->parent()->nodeRight()) { z->parent()->leafRight() = siblingPhi0; - z->parent()->nodeRight() = NULL; + z->parent()->nodeRight() = nullptr; siblingPhi0->node() = z->parent(); } else @@ -617,7 +617,7 @@ void Foam::binaryTree<CompType, ThermoType>::deleteLeaf(chP*& phi0) else { x = nodeSibling(phi0); - if (x !=NULL) + if (x !=nullptr) { transplant(z, x); } @@ -646,7 +646,7 @@ void Foam::binaryTree<CompType, ThermoType>::balance() List<chP*> chemPoints(size_); label chPi=0; //2) compute the mean composition - while(x!=NULL) + while(x!=nullptr) { const scalarField& phij = x->phi(); mean += phij; @@ -691,14 +691,14 @@ void Foam::binaryTree<CompType, ThermoType>::balance() phiMaxDir.sort(); // delete reference to all node since the tree is reshaped deleteAllNode(); - root_=NULL; + root_=nullptr; // add the node for the two extremum bn* newNode = new bn ( chemPoints[phiMaxDir.indices()[0]], chemPoints[phiMaxDir.indices()[phiMaxDir.size()-1]], - NULL + nullptr ); root_ = newNode; @@ -729,9 +729,9 @@ template<class CompType, class ThermoType> Foam::chemPointISAT<CompType, ThermoType>* Foam::binaryTree<CompType, ThermoType>::treeMin(bn* subTreeRoot) { - if (subTreeRoot!=NULL) + if (subTreeRoot!=nullptr) { - while(subTreeRoot->nodeLeft() != NULL) + while(subTreeRoot->nodeLeft() != nullptr) { subTreeRoot = subTreeRoot->nodeLeft(); } @@ -739,7 +739,7 @@ Foam::binaryTree<CompType, ThermoType>::treeMin(bn* subTreeRoot) } else { - return NULL; + return nullptr; } } @@ -752,7 +752,7 @@ Foam::binaryTree<CompType, ThermoType>::treeSuccessor(chP* x) { if (x == x->node()->leafLeft()) { - if (x->node()->nodeRight() == NULL) + if (x->node()->nodeRight() == nullptr) { return x->node()->leafRight(); } @@ -764,11 +764,11 @@ Foam::binaryTree<CompType, ThermoType>::treeSuccessor(chP* x) else if (x == x->node()->leafRight()) { bn* y = x->node(); - while((y->parent() !=NULL)) + while((y->parent() !=nullptr)) { if (y == y->parent()->nodeLeft()) { - if (y->parent()->nodeRight() == NULL) + if (y->parent()->nodeRight() == nullptr) { return y->parent()->leafRight(); } @@ -782,18 +782,18 @@ Foam::binaryTree<CompType, ThermoType>::treeSuccessor(chP* x) // when we reach this point, y points to the root and // never entered in the if loop (coming from the right) // so we are at the tree maximum and there is no successor - return NULL; + return nullptr; } else { FatalErrorInFunction << "inconsistent structure of the tree, no leaf and no node" << exit(FatalError); - return NULL; + return nullptr; } } - return NULL; + return nullptr; } @@ -803,8 +803,8 @@ void Foam::binaryTree<CompType, ThermoType>::clear() // recursively delete the element in the subTree deleteSubTree(); - // reset root node (should already be NULL) - root_=NULL; + // reset root node (should already be nullptr) + root_=nullptr; // reset size_ size_=0; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H index 386174327c024e6a843f0398562ffff84bdec147..f1cff9013df55641a510f649b084a6863254532d 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.H @@ -237,7 +237,7 @@ public: const scalar& tolerance, const label& completeSpaceSize, const dictionary& coeffsDict, - binaryNode<CompType, ThermoType>* node = NULL + binaryNode<CompType, ThermoType>* node = nullptr ); //- Construct from another chemPoint and reference to a binary node diff --git a/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C b/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C index 042e11df953540ef2e47aa89140efa1dcc1adae5..57f6e78955392c608d257cf6bf5f8ad233fa9833 100644 --- a/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C +++ b/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C @@ -157,7 +157,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New(Istream& is) << ", should be coeffs or defaultCoeffs" << abort(FatalError); - return autoPtr<liquidProperties>(NULL); + return autoPtr<liquidProperties>(nullptr); } } diff --git a/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C b/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C index 203e7e2a27f7a923c71bc76768f3b289c05527b3..e9c34b5726ba4ae55ad55974424903d87306d304 100644 --- a/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C +++ b/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C @@ -66,7 +66,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New(Istream& is) << ", should be coeffs or defaultCoeffs" << exit(FatalError); - return autoPtr<solidProperties>(NULL); + return autoPtr<solidProperties>(nullptr); } } diff --git a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C index c8ae902c49e8c078b92893ff9d75c04a3692dc8d..22312d5dad78eb0e9f0aabf489cb6dd86e5d3bcf 100644 --- a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,9 +112,9 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T) coeffs_(dictionary::null), solverFreq_(0), firstIter_(true), - absorptionEmission_(NULL), - scatter_(NULL), - soot_(NULL) + absorptionEmission_(nullptr), + scatter_(nullptr), + soot_(nullptr) {} @@ -132,9 +132,9 @@ Foam::radiation::radiationModel::radiationModel coeffs_(subOrEmptyDict(type + "Coeffs")), solverFreq_(1), firstIter_(true), - absorptionEmission_(NULL), - scatter_(NULL), - soot_(NULL) + absorptionEmission_(nullptr), + scatter_(nullptr), + soot_(nullptr) { if (readOpt() == IOobject::NO_READ) { @@ -171,9 +171,9 @@ Foam::radiation::radiationModel::radiationModel coeffs_(subOrEmptyDict(type + "Coeffs")), solverFreq_(1), firstIter_(true), - absorptionEmission_(NULL), - scatter_(NULL), - soot_(NULL) + absorptionEmission_(nullptr), + scatter_(nullptr), + soot_(nullptr) { initialise(); } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/noSoot/noSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/noSoot/noSoot.C index 42429fc5c727c0b4cf0afde945491dc80db00711..dd7ee27b91dcac1c2edd996a1c55d2e67731b0b2 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/noSoot/noSoot.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/noSoot/noSoot.C @@ -66,7 +66,7 @@ void Foam::radiation::noSoot::correct() const Foam::volScalarField& Foam::radiation::noSoot::soot() const { NotImplemented; - return tmp<volScalarField>(NULL); + return tmp<volScalarField>(nullptr); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C index 6f085b5cff4d1ffb442c72235e55eb82abc2c92e..dec25b574613a277fe9fb88abecf499b21fa4e28 100644 --- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C +++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C @@ -304,7 +304,7 @@ Foam::mixerFvMesh::mixerFvMesh ) ), rpm_(readScalar(motionDict_.lookup("rpm"))), - movingPointsMaskPtr_(NULL) + movingPointsMaskPtr_(nullptr) { addZonesAndModifiers(); diff --git a/src/triSurface/tools/labelledTri/sortLabelledTri.H b/src/triSurface/tools/labelledTri/sortLabelledTri.H index 67ae6ee965ba9e56472052c1bdf2e747e4fa72f7..593ebe1eaf95b374c78617fbea6513483822535a 100644 --- a/src/triSurface/tools/labelledTri/sortLabelledTri.H +++ b/src/triSurface/tools/labelledTri/sortLabelledTri.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,7 @@ public: //- Construct null surfAndLabel() : - surfPtr_(NULL), + surfPtr_(nullptr), index_(-1) {} diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index decb3a90d795ff2ee232af60a64afd538beee096..032423dd98b21b415b5f82588bd744e5fff5fcd8 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -595,8 +595,8 @@ Foam::triSurface::triSurface() : ParentType(List<Face>(), pointField()), patches_(0), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) {} @@ -610,8 +610,8 @@ Foam::triSurface::triSurface : ParentType(triangles, points), patches_(patches), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) {} @@ -625,8 +625,8 @@ Foam::triSurface::triSurface : ParentType(triangles, points, reuse), patches_(patches), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) {} @@ -639,8 +639,8 @@ Foam::triSurface::triSurface : ParentType(triangles, points), patches_(patches), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) {} @@ -652,8 +652,8 @@ Foam::triSurface::triSurface : ParentType(triangles, points), patches_(), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) { setDefaultPatches(); } @@ -667,8 +667,8 @@ Foam::triSurface::triSurface : ParentType(convertToTri(triangles, 0), points), patches_(), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) { setDefaultPatches(); } @@ -678,8 +678,8 @@ Foam::triSurface::triSurface(const fileName& name) : ParentType(List<Face>(), pointField()), patches_(), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) { word ext = name.ext(); @@ -693,8 +693,8 @@ Foam::triSurface::triSurface(Istream& is) : ParentType(List<Face>(), pointField()), patches_(), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) { read(is); @@ -706,8 +706,8 @@ Foam::triSurface::triSurface(const Time& d) : ParentType(List<Face>(), pointField()), patches_(), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) { fileName foamFile(d.caseName() + ".ftr"); @@ -725,8 +725,8 @@ Foam::triSurface::triSurface(const triSurface& ts) : ParentType(ts, ts.points()), patches_(ts.patches()), - sortedEdgeFacesPtr_(NULL), - edgeOwnerPtr_(NULL) + sortedEdgeFacesPtr_(nullptr), + edgeOwnerPtr_(nullptr) {}