From 58f905ff70468ff822bbdfe58b06db899586bf1d Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 5 Aug 2016 17:19:38 +0100 Subject: [PATCH] C++11: Replaced the C NULL with the safer C++11 nullptr Requires gcc version 4.7 or higher --- .../electromagnetics/mhdFoam/createPhiB.H | 2 +- .../twoPhaseMixtureThermo.C | 6 +- .../phaseModel/phaseModel.C | 6 +- .../multiphaseSystem/phaseModel/phaseModel.C | 2 +- .../multiphase/multiphaseEulerFoam/pEqn.H | 2 +- .../multiphaseMixture/phase/phase.C | 4 +- .../HeatTransferPhaseSystem.C | 4 +- .../MovingPhaseModel/MovingPhaseModel.C | 2 +- .../phaseModel/phaseModel/phaseModel.C | 6 +- .../phaseSystem/phaseSystemTemplates.C | 2 +- .../IATE/IATEsources/IATEsource/IATEsource.H | 4 +- .../IATE/IATEsources/IATEsource/IATEsource.H | 4 +- .../solidDisplacementFoam/createFields.H | 2 +- .../test/HashingSpeed/Test-HashingSpeed.C | 6 +- applications/test/regex/Test-regex.C | 2 +- .../advanced/autoRefineMesh/autoRefineMesh.C | 2 +- .../mesh/advanced/selectCells/selectCells.C | 4 +- .../Optional/ccm26ToFoam/ccm26ToFoam.C | 104 ++++++++------ .../fluentMeshToFoam/extrudedQuadCellShape.C | 2 +- .../extrudedTriangleCellShape.C | 2 +- .../unv/block_with_inlet_outlet.UNV | 24 ++-- .../mesh/conversion/sammToFoam/sammMesh.C | 2 +- .../mesh/conversion/star3ToFoam/starMesh.C | 4 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 6 +- .../conformalVoronoiMesh.C | 2 +- .../conformalVoronoiMeshCalcDualMesh.C | 2 +- .../searchableSurfaceFeatures.H | 4 +- .../faceSelection/faceSelection.H | 4 +- .../faceSelection/faceZoneSelection.H | 4 +- .../searchableSurfaceSelection.H | 4 +- .../manipulation/mirrorMesh/mirrorFvMesh.C | 2 +- .../mesh/manipulation/setSet/setSet.C | 2 +- .../decomposePar/decomposePar.C | 20 +-- .../decomposePar/domainDecomposition.C | 2 +- .../decomposePar/pointFieldDecomposer.C | 4 +- .../reconstructParMesh/reconstructParMesh.C | 2 +- .../foamToEnsight/ensightField.C | 6 +- .../foamToEnsight/ensightMesh.C | 2 +- .../foamToEnsight/foamToEnsight.C | 2 +- .../foamToEnsightParts/foamToEnsightParts.C | 2 +- .../foamToTecplot360/tecplotWriter.C | 24 ++-- .../dataConversion/smapToFoam/smapToFoam.C | 6 +- .../PV3FoamReader/vtkPV3FoamReader.cxx | 10 +- .../PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C | 12 +- .../PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C | 4 +- .../vtkPV3Foam/vtkPV3FoamMeshLagrangian.C | 4 +- .../vtkPV3Foam/vtkPV3FoamUpdateInfo.C | 4 +- .../vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H | 2 +- .../vtkPV3blockMeshReader.cxx | 8 +- .../vtkPV3blockMesh/vtkPV3blockMesh.C | 10 +- .../PVFoamReader/vtkPVFoamReader.cxx | 8 +- .../PVFoamReader/vtkPVFoam/vtkPVFoam.C | 12 +- .../PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C | 2 +- .../vtkPVFoam/vtkPVFoamMeshLagrangian.C | 2 +- .../vtkPVFoam/vtkPVFoamUpdateInfo.C | 4 +- .../vtkPVFoam/vtkPVFoamUpdateInfoFields.H | 2 +- .../vtkPVblockMeshReader.cxx | 6 +- .../vtkPVblockMesh/vtkPVblockMesh.C | 10 +- .../steadyParticleTracksTemplates.C | 8 +- .../miscellaneous/pdfPlot/createFields.H | 2 +- ...ateExternalCoupledPatchGeometryTemplates.C | 2 +- .../foamUpgradeCyclics/foamUpgradeCyclics.C | 6 +- .../surface/surfaceCoarsen/bunnylod/list.h | 2 +- .../surfaceCoarsen/bunnylod/progmesh.C | 4 +- .../surface/surfaceCoarsen/bunnylod/winmain.C | 30 ++-- src/OSspecific/POSIX/POSIX.C | 22 +-- src/OSspecific/POSIX/fileMonitor.C | 4 +- src/OSspecific/POSIX/printStack.C | 12 +- src/OSspecific/POSIX/regExp.C | 4 +- src/OSspecific/POSIX/signals/sigFpe.C | 14 +- src/OSspecific/POSIX/signals/sigInt.C | 8 +- src/OSspecific/POSIX/signals/sigQuit.C | 8 +- src/OSspecific/POSIX/signals/sigSegv.C | 8 +- .../POSIX/signals/sigStopAtWriteNow.C | 6 +- src/OSspecific/POSIX/signals/sigWriteNow.C | 6 +- src/OSspecific/POSIX/timer.C | 2 +- .../DictionaryBase/DictionaryBase.C | 6 +- .../DictionaryBase/DictionaryBase.H | 6 +- .../HashTables/HashTable/HashTable.C | 12 +- .../HashTables/HashTable/HashTableI.H | 4 +- .../HashTables/HashTable/HashTableIO.C | 4 +- .../linkTypes/DLListBase/DLListBase.H | 4 +- .../linkTypes/DLListBase/DLListBaseI.H | 4 +- .../linkTypes/SLListBase/SLListBase.H | 4 +- .../linkTypes/SLListBase/SLListBaseI.H | 4 +- src/OpenFOAM/containers/Lists/List/List.C | 24 ++-- src/OpenFOAM/containers/Lists/List/ListIO.C | 2 +- .../containers/Lists/PtrList/PtrList.C | 2 +- .../containers/Lists/PtrList/PtrList.H | 4 +- .../containers/Lists/PtrList/PtrListI.H | 2 +- .../containers/Lists/UPtrList/UPtrList.C | 4 +- .../containers/Lists/UPtrList/UPtrList.H | 2 +- .../containers/Lists/UPtrList/UPtrListI.H | 2 +- src/OpenFOAM/db/IOobject/IOobject.C | 4 +- src/OpenFOAM/db/IOobject/IOobject.H | 4 +- src/OpenFOAM/db/IOobjectList/IOobjectList.C | 2 +- src/OpenFOAM/db/IOobjectList/IOobjectList.H | 4 +- src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C | 2 +- src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C | 2 +- src/OpenFOAM/db/IOstreams/token/token.H | 2 +- src/OpenFOAM/db/IOstreams/token/tokenI.H | 2 +- src/OpenFOAM/db/dictionary/dictionary.C | 18 +-- src/OpenFOAM/db/dictionary/dictionary.H | 8 +- src/OpenFOAM/db/dictionary/dictionaryIO.C | 2 +- src/OpenFOAM/db/dictionary/entry/entryIO.C | 4 +- .../functionEntries/codeStream/codeStream.C | 4 +- .../dlLibraryTable/dlLibraryTable.C | 4 +- .../functionObject/functionObject.H | 2 +- .../functionObjectList/functionObjectList.C | 2 +- .../functionObjectList/functionObjectList.H | 2 +- src/OpenFOAM/db/regIOobject/regIOobject.C | 14 +- src/OpenFOAM/db/regIOobject/regIOobjectRead.C | 2 +- .../construction/runTimeSelectionTables.H | 8 +- .../memberFunctionSelectionTables.H | 10 +- src/OpenFOAM/dimensionSet/dimensionSets.C | 8 +- .../fields/Fields/Field/FieldMapper.H | 2 +- .../GeometricField/GeometricField.C | 68 +++++----- .../SlicedGeometricField.C | 8 +- .../global/constants/dimensionedConstants.C | 4 +- src/OpenFOAM/global/debug/debug.C | 24 ++-- .../interpolation2DTable.C | 4 +- .../interpolationTable/interpolationTable.C | 4 +- .../PatchToPatchInterpolation.C | 12 +- .../PrimitivePatchInterpolation.C | 4 +- .../LUscalarMatrix/procLduInterface.H | 2 +- .../matrices/LduMatrix/LduMatrix/LduMatrix.C | 32 ++--- .../LduMatrix/LduMatrix/LduMatrixOperations.C | 4 +- .../LduMatrix/LduMatrixPreconditioner.C | 4 +- .../LduMatrix/LduMatrix/LduMatrixSmoother.C | 7 +- .../LduMatrix/LduMatrix/LduMatrixSolver.C | 5 +- src/OpenFOAM/matrices/Matrix/Matrix.C | 14 +- src/OpenFOAM/matrices/Matrix/MatrixI.H | 2 +- src/OpenFOAM/matrices/Matrix/MatrixIO.C | 2 +- .../lduMatrix/lduAddressing/lduAddressing.H | 8 +- .../matrices/lduMatrix/lduMatrix/lduMatrix.C | 30 ++-- .../lduMatrix/lduMatrix/lduMatrixOperations.C | 6 +- .../lduMatrix/lduMatrixPreconditioner.C | 4 +- .../lduMatrix/lduMatrix/lduMatrixSmoother.C | 4 +- .../lduMatrix/lduMatrix/lduMatrixSolver.C | 4 +- .../lduMatrix/lduMatrix/lduMatrixTemplates.C | 2 +- .../GAMGAgglomerateLduAddressing.C | 8 +- .../GAMGAgglomeration/GAMGAgglomeration.C | 14 +- src/OpenFOAM/memory/autoPtr/autoPtr.H | 17 +-- src/OpenFOAM/memory/autoPtr/autoPtrI.H | 2 +- src/OpenFOAM/memory/tmp/tmp.H | 2 +- src/OpenFOAM/memory/tmpNrc/tmpNrc.H | 2 +- src/OpenFOAM/meshes/lduMesh/lduMesh.C | 2 +- .../meshShapes/cellMatcher/cellMatcher.C | 2 +- .../meshShapes/cellMatcher/cellMatcherI.H | 4 +- .../meshShapes/cellModeller/cellModeller.C | 4 +- .../meshShapes/cellModeller/cellModeller.H | 7 +- .../meshes/meshShapes/cellShape/cellShapeI.H | 2 +- .../meshes/meshShapes/tetCell/tetCell.C | 4 +- .../pointMesh/pointMeshMapper/pointMapper.C | 8 +- .../pointMeshMapper/pointPatchMapper.C | 6 +- .../polyMesh/globalMeshData/globalMeshData.C | 10 +- .../mapPolyMesh/cellMapper/cellMapper.C | 8 +- .../mapPolyMesh/faceMapper/faceMapper.C | 8 +- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 24 ++-- src/OpenFOAM/meshes/polyMesh/polyMesh.H | 8 +- .../polyMesh/polyMeshCheck/polyMeshCheck.C | 8 +- .../meshes/polyMesh/polyMeshFromShapeMesh.C | 16 +-- .../polyMeshTetDecomposition.H | 4 +- .../constraint/cyclic/cyclicPolyPatch.C | 24 ++-- .../polyPatches/polyPatch/polyPatch.C | 24 ++-- .../meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C | 6 +- .../meshes/polyMesh/zones/faceZone/faceZone.C | 40 +++--- .../meshes/polyMesh/zones/zone/zone.C | 10 +- .../PrimitivePatch/PrimitivePatch.C | 128 +++++++++--------- .../PrimitivePatch/PrimitivePatch.H | 4 +- .../PrimitivePatch/PrimitivePatchClear.C | 8 +- .../meshes/primitiveMesh/primitiveMesh.C | 68 +++++----- .../meshes/primitiveMesh/primitiveMesh.H | 32 ++--- .../functions/TimeFunction1/TimeFunction1.C | 2 +- src/OpenFOAM/primitives/ints/int32/int32IO.C | 2 +- src/OpenFOAM/primitives/ints/int64/int64IO.C | 2 +- .../primitives/ints/uint32/uint32IO.C | 2 +- .../primitives/ints/uint64/uint64IO.C | 2 +- .../primitives/strings/lists/hashedWordList.H | 2 +- .../primitives/strings/wordRe/wordRe.C | 4 +- .../thermalBaffle1DFvPatchScalarField.C | 2 +- .../phaseCompressible/LES/Niceno/NicenoKEqn.C | 2 +- .../LES/SmagorinskyZhang/SmagorinskyZhang.C | 2 +- .../LES/continuousGasKEqn/continuousGasKEqn.C | 4 +- .../RAS/LaheyKEpsilon/LaheyKEpsilon.C | 2 +- .../continuousGasKEpsilon.C | 4 +- .../RAS/kOmegaSSTSato/kOmegaSSTSato.C | 2 +- .../RAS/mixtureKEpsilon/mixtureKEpsilon.C | 2 +- .../singleStepCombustion.C | 2 +- src/conversion/meshReader/meshReader.C | 4 +- .../meshReader/starcd/STARCDMeshReader.C | 2 +- src/dynamicMesh/attachDetach/attachDetach.C | 4 +- src/dynamicMesh/boundaryMesh/boundaryMesh.C | 4 +- .../fvMeshAdder/fvMeshAdderTemplates.C | 4 +- .../fvMeshDistribute/fvMeshDistribute.C | 2 +- src/dynamicMesh/fvMeshSubset/fvMeshSubset.C | 2 +- .../layerAdditionRemoval.C | 8 +- src/dynamicMesh/meshCut/cellCuts/cellCuts.C | 12 +- .../meshCut/cellLooper/cellLooper.H | 2 +- .../meshCut/directions/directions.H | 2 +- .../multiDirRefinement/multiDirRefinement.C | 2 +- .../undoableMeshCutter/undoableMeshCutter.C | 8 +- src/dynamicMesh/meshCut/splitCell/splitCell.C | 12 +- .../polyMeshAdder/faceCoupleInfo.C | 8 +- .../polyTopoChange/combineFaces.C | 2 +- .../hexRef8/refinementHistory.C | 12 +- .../polyTopoChanger/polyTopoChanger.C | 4 +- .../repatchPolyTopoChanger.C | 4 +- .../enrichedPatch/enrichedPatch.C | 18 +-- .../slidingInterface/slidingInterface.C | 52 +++---- src/edgeMesh/edgeMesh.C | 8 +- src/edgeMesh/edgeMeshI.H | 4 +- src/edgeMesh/edgeMeshIO.C | 4 +- .../cfdTools/general/MRF/MRFZone.H | 2 +- .../cfdTools/general/fvOptions/fvOption.H | 2 +- .../basic/sliced/slicedFvPatchField.C | 4 +- .../timeVaryingMappedFixedValueFvPatchField.C | 10 +- .../basic/sliced/slicedFvsPatchField.C | 4 +- .../CoEulerDdtScheme/CoEulerDdtScheme.C | 2 +- .../gradSchemes/gaussGrad/gaussGrad.H | 2 +- .../laplacianScheme/laplacianScheme.H | 4 +- .../orthogonalSnGrad/orthogonalSnGrad.C | 2 +- .../snGradSchemes/snGradScheme/snGradScheme.H | 5 +- .../uncorrectedSnGrad/uncorrectedSnGrad.C | 2 +- .../fvMatrices/fvMatrix/fvMatrix.C | 10 +- .../solvers/MULES/IMULESTemplates.C | 2 +- src/finiteVolume/fvMesh/fvMesh.C | 84 ++++++------ .../fvMesh/fvMeshMapper/fvPatchMapper.C | 6 +- .../fvMesh/fvMeshMapper/fvSurfaceMapper.C | 8 +- .../regionCoupled/regionCoupledFvPatch.C | 4 +- .../regionCoupled/regionCoupledWallFvPatch.C | 4 +- .../fvMesh/fvPatches/fvPatch/fvPatch.H | 4 +- .../schemes/CoBlended/CoBlended.H | 2 +- .../schemes/cellCoBlended/cellCoBlended.H | 2 +- .../schemes/fixedBlended/fixedBlended.H | 2 +- .../schemes/harmonic/harmonic.H | 2 +- .../schemes/limiterBlended/limiterBlended.H | 2 +- .../schemes/localBlended/localBlended.H | 2 +- .../schemes/localMax/localMax.H | 2 +- .../schemes/localMin/localMin.H | 2 +- .../outletStabilised/outletStabilised.H | 2 +- .../schemes/skewCorrected/skewCorrected.H | 2 +- .../surfaceInterpolation.C | 8 +- .../surfaceInterpolationScheme.H | 5 +- .../fieldValueDelta/fieldValueDelta.C | 4 +- .../fieldValues/surfaceRegion/surfaceRegion.C | 4 +- .../pairPatchAgglomeration.C | 4 +- ...lacementComponentLaplacianFvMotionSolver.C | 4 +- ...velocityComponentLaplacianFvMotionSolver.C | 2 +- .../displacementSBRStressFvMotionSolver.C | 2 +- .../displacementLaplacianFvMotionSolver.C | 2 +- .../velocityLaplacianFvMotionSolver.C | 2 +- ...surfaceDisplacementPointPatchVectorField.C | 2 +- ...aceSlipDisplacementPointPatchVectorField.C | 2 +- ...meVaryingMappedFixedValuePointPatchField.C | 6 +- .../fixedTemperatureConstraint.C | 2 +- .../explicitPorositySource.C | 2 +- .../meanVelocityForce/meanVelocityForce.C | 2 +- .../solidificationMeltingSource.C | 2 +- .../interRegionExplicitPorositySource.C | 2 +- .../interRegionHeatTransferModel.C | 2 +- .../interRegionHeatTransferModelI.H | 6 +- .../basic/InteractionLists/InteractionLists.C | 2 +- .../Templates/CollidingCloud/CollidingCloud.C | 4 +- .../Templates/KinematicCloud/KinematicCloud.C | 34 ++--- .../clouds/Templates/MPPICCloud/MPPICCloud.C | 12 +- .../Templates/ReactingCloud/ReactingCloud.C | 14 +- .../ReactingMultiphaseCloud.C | 14 +- .../Templates/ThermoCloud/ThermoCloud.C | 36 ++--- .../ThermoParcel/ThermoParcelTrackingDataI.H | 4 +- .../ParticleErosion/ParticleErosion.C | 4 +- .../ParticleTracks/ParticleTracks.C | 2 +- .../ParticleTrap/ParticleTrap.C | 8 +- .../VoidFraction/VoidFraction.C | 4 +- .../PairCollision/PairCollision.C | 8 +- .../InflationInjection/InflationInjection.C | 8 +- .../ParticleForces/Lift/LiftForce/LiftForce.C | 4 +- .../Paramagnetic/ParamagneticForce.C | 2 +- .../PressureGradient/PressureGradientForce.C | 4 +- .../Kinematic/ParticleForces/SRF/SRFForce.C | 6 +- .../LocalInteraction/LocalInteraction.C | 8 +- .../DampingModels/DampingModel/DampingModel.C | 2 +- .../DampingModels/Relaxation/Relaxation.C | 8 +- .../IsotropyModel/IsotropyModel.C | 2 +- .../MPPIC/PackingModels/Explicit/Explicit.C | 6 +- .../MPPIC/PackingModels/Implicit/Implicit.C | 4 +- .../PackingModels/PackingModel/PackingModel.C | 2 +- .../MPPIC/ParticleStressModels/Lun/Lun.C | 2 +- .../molecule/moleculeCloud/moleculeCloud.C | 8 +- .../pairPotential/basic/pairPotential.C | 2 +- .../clouds/Templates/SprayCloud/SprayCloud.C | 14 +- .../DispersionRASModel/DispersionRASModel.C | 8 +- .../GradientDispersionRAS.C | 4 +- .../BrownianMotion/BrownianMotionForce.C | 6 +- src/mesh/blockMesh/block/block.H | 4 +- .../blockDescriptor/blockDescriptor.H | 2 +- .../blockMesh/blockMesh/blockMeshTopology.C | 2 +- src/mesh/blockMesh/curvedEdges/curvedEdge.C | 2 +- .../refinementSurfaces/refinementSurfaces.C | 2 +- .../AMIInterpolation/AMIInterpolation.C | 20 +-- .../cyclicACMIPointPatchField.C | 16 +-- .../cyclicAMIPointPatchField.C | 16 +-- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 20 +-- src/meshTools/cellFeatures/cellFeatures.C | 2 +- .../EulerCoordinateRotation.C | 8 +- .../STARCDCoordinateRotation.C | 8 +- .../coordinateRotation/axesRotation.C | 4 +- .../mappedPolyPatch/mappedPatchBase.C | 48 +++---- .../regionCoupledBase.C | 12 +- .../searchableSurface/searchableSurface.H | 2 +- .../sets/topoSetSource/topoSetSource.C | 2 +- .../sets/topoSetSource/topoSetSource.H | 4 +- src/meshTools/sets/topoSets/topoSet.H | 4 +- .../triSurfaceSearch/triSurfaceSearch.C | 6 +- .../twoDPointCorrector/twoDPointCorrector.C | 4 +- .../decompose/decompose/fvFieldDecomposer.C | 8 +- .../refinementHistoryConstraint.C | 4 +- .../decompose/metisDecomp/metisDecomp.C | 8 +- .../decompose/ptscotchDecomp/ptscotchDecomp.C | 6 +- .../decompose/scotchDecomp/scotchDecomp.C | 6 +- .../reconstruct/reconstruct/processorMeshes.C | 10 +- .../energyRegionCoupledFvPatchScalarField.C | 20 +-- .../pyrolysisModels/noPyrolysis/noPyrolysis.C | 12 +- .../pyrolysisModel/pyrolysisModel.H | 2 +- .../regionModel/regionModel/regionModel.C | 12 +- .../regionModel/regionModel1D/regionModel1D.C | 6 +- .../singleLayerRegion/singleLayerRegion.C | 8 +- .../liquidFilmThermo/liquidFilmThermo.C | 4 +- .../surfaceFilmModel/surfaceFilmModel.C | 6 +- src/renumber/zoltanRenumber/zoltanRenumber.C | 2 +- .../rigidBodyModel/rigidBodyModel.C | 2 +- .../rigidBodyMotion/rigidBodyMotion.C | 2 +- .../distributedWeightedFvPatchFieldMapper.H | 4 +- src/sampling/meshToMesh/meshToMesh.C | 16 +-- src/sampling/meshToMesh/meshToMeshTemplates.C | 4 +- src/sampling/meshToMesh0/meshToMesh0.C | 14 +- .../sampledSet/sampledSet/sampledSet.H | 2 +- .../sampledSet/sampledSets/sampledSets.H | 2 +- .../distanceSurface/distanceSurface.C | 12 +- .../sampledSurface/isoSurface/isoSurface.C | 2 +- .../isoSurface/isoSurfaceTemplates.C | 2 +- .../isoSurface/sampledIsoSurface.C | 10 +- .../isoSurface/sampledIsoSurfaceCell.C | 4 +- .../sampledCuttingPlane/sampledCuttingPlane.C | 8 +- .../sampledSurface/sampledSurface.C | 22 +-- .../sampledSurface/sampledSurface.H | 2 +- .../sampledSurfaces/sampledSurfaces.C | 4 +- .../sampledThresholdCellFaces.C | 2 +- .../sixDoFRigidBodyMotion.C | 2 +- src/surfMesh/surfZone/surfZone/surfZone.H | 4 +- .../SLGThermo/SLGThermo/SLGThermo.C | 12 +- .../SLGThermo/SLGThermo/SLGThermo.H | 6 +- .../TDACChemistryModel/tabulation/ISAT/ISAT.C | 12 +- .../tabulation/ISAT/binaryNode/binaryNode.C | 14 +- .../tabulation/ISAT/binaryTree/binaryTree.C | 110 +++++++-------- .../ISAT/chemPointISAT/chemPointISAT.H | 2 +- .../liquidProperties/liquidProperties.C | 2 +- .../solidProperties/solidPropertiesNew.C | 2 +- .../radiationModel/radiationModel.C | 20 +-- .../submodels/sootModel/noSoot/noSoot.C | 2 +- .../mixerFvMesh/mixerFvMesh.C | 2 +- .../tools/labelledTri/sortLabelledTri.H | 4 +- src/triSurface/triSurface/triSurface.C | 40 +++--- 363 files changed, 1468 insertions(+), 1416 deletions(-) diff --git a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H index f79a80b827..401917f555 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 a3217a073b..c713498ef6 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 2d3a7b6163..c97a5a1382 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::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 7929a9d1ad..4392e62ac9 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::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index af4905abc9..8e2d78cbec 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 ae68ff1682..5fc59061a4 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::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 07b41eb771..9fee19e77f 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::dmdt const Foam::phaseModel& phase ) const { - return tmp(NULL); + return tmp(nullptr); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 4563f191b9..6e5aac34dd 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::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 8d73c1286c..9fa7c0f589 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::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } @@ -168,7 +168,7 @@ bool Foam::phaseModel::compressible() const const Foam::tmp& Foam::phaseModel::divU() const { NotImplemented; - static tmp divU_(NULL); + static tmp 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 3ab4a91ec5..01f36c881c 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 noModel(NULL); + autoPtr 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 b9f0f15af2..5e135c1615 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 clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(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 fc2456871e..c7655b9c34 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 clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H index ffaada3879..fd97d416f9 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H @@ -16,7 +16,7 @@ volVectorField D ); -autoPtr Tptr(NULL); +autoPtr Tptr(nullptr); if (thermalStress) { diff --git a/applications/test/HashingSpeed/Test-HashingSpeed.C b/applications/test/HashingSpeed/Test-HashingSpeed.C index 5937ad741e..2d759ab99f 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 35fa73a2cc..6f506f7659 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 d8eb8af676..7f8cb092bb 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 176cb966b8..b09742c313 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 surf(NULL); + autoPtr surf(nullptr); // Search engine on surface. - autoPtr querySurf(NULL); + autoPtr 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 d45222b50d..854dea352b 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 mapData(nVertices, 0); List 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(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(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(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 mapData(nCells); std::vector 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 faces(size); - CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, NULL, &faces[0], + CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, nullptr, &faces[0], kCCMIOStart, kCCMIOEnd); std::vector 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 013481821b..457b555ad1 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 e781a66f1f..a2e0acf8ce 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 64a2dff296..d62033b9ce 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 188d1d35a1..5b62de154a 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 7f48b0518c..898c0c8f1d 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 a1f8fecf13..29969e66c8 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 newPatches(patches.size(), static_cast(NULL)); + List newPatches + ( + patches.size(), + static_cast(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 d764f08b5e..d94dc425aa 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 50553ec4c6..5a3f86f6ac 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 e114d71021..3b7335d620 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 clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H index 20cb82808f..41eb0b6315 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 clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H index 08a3abee31..10b7f377ed 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 clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H index d5c04ae1ea..30262ef8a9 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 clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C index cfe65a5589..afbf8f557e 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 0feb0c3b72..cda9ec1292 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 fileStreamPtr(NULL); + autoPtr fileStreamPtr(nullptr); if (batch) { diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index cb7b4b5e86..bc94782641 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*> ( mesh.nCells(), - static_cast*>(NULL) + static_cast*>(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 d54d25b381..3cad0f554e 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 92b9a4c4e4..77fcd6211a 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(NULL) + static_cast(nullptr) ) { forAll(boundaryAddressing_, patchi) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index fb3a22b74c..6a97d2be57 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -227,7 +227,7 @@ autoPtr mergeSharedPoints if (returnReduce(pointToMaster.size(), sumOp