diff --git a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C index 6b5e74c71f..1edd75e560 100644 --- a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C @@ -651,7 +651,7 @@ int main(int argc, char *argv[]) ); // corrector for mesh motion - twoDPointCorrector* correct2DPtr = NULL; + twoDPointCorrector* correct2DPtr = nullptr; if (motionObj.typeHeaderOk(true)) { diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H index 6c58a72c09..ea12f0aef7 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H @@ -28,7 +28,7 @@ int USERD_set_filenames // remove the last '/' from rootDir if (the_path[lRoot-1] == '/') { - the_path[lRoot-1] = char(NULL); + the_path[lRoot-1] = '\0'; } else { diff --git a/bin/tools/pre-commit-hook b/bin/tools/pre-commit-hook index b4f847d15f..fdf6c50a57 100755 --- a/bin/tools/pre-commit-hook +++ b/bin/tools/pre-commit-hook @@ -62,6 +62,14 @@ die() exit 1 } +# Automatically upgrade copyrights in files. +# Disabled by default since some changes (eg, spelling) do not automatically +# imply an update copyright. +optCopyright=false + +# Run all tests (do not exit on first failure) +optAll=false + #----------------------------------------------------------------------------- # Check content that will be added by this commit. @@ -76,11 +84,27 @@ fi # called manually with arguments for the files/directories to be tested? if [ "$#" -gt 0 ] then - case "$1" in - -h | -help) - die "interactive usage: supply list of files/directories to check" - ;; - esac + while [ "$#" -gt 0 ] + do + case "$1" in + -h | -help) + die "interactive usage: supply list of files/directories to check" + ;; + -copy) + echo "$hookName: adjust copyright enabled" 1>&2 + optCopyright=true + shift + ;; + -all) + echo "$hookName: do all tests (no premature exit)" 1>&2 + optAll=true + shift + ;; + *) + break + ;; + esac + done # obtain list of all specified files/directories fileList=$(git ls-files -- $@ 2>/dev/null) @@ -100,6 +124,8 @@ unset badFiles # join list of files with this amount of space Indent=" " +exitCode=0 + # # report bad files and die if there are any # @@ -114,7 +140,14 @@ dieOnBadFiles() echo "File(s):" 1>&2 echo "$badFiles" 1>&2 echo '' 1>&2 - exit 1 + + exitCode=1 + if [ "$optAll" = true ] + then + return 0 # Continue to the next test + else + exit $exitCode + fi fi } @@ -314,7 +347,7 @@ MESSAGE # -# check that OpenFOAM Foundation copyright is current +# check that copyright date is current # checkCopyright() { @@ -327,9 +360,9 @@ checkCopyright() startYear=`grep "Copyright.*OpenCFD" $f | sed 's/[^0-9]*\([0-9]*\).*/\1/g'` endYear=`grep "Copyright.*-.*OpenCFD" $f | sed 's/[^-]*-\([0-9]*\).*/\1/g'` #echo "startYear=$startYear endYear=$endYear" - if [ "$startYear" != "" ] + if [ -n "$startYear" ] then - if [ "$endYear" != "" ] + if [ -n "$endYear" ] then # Date is of type 2011-2012 OpenCFD Ltd. if [ "$year" != "$endYear" ] @@ -371,7 +404,11 @@ checkLineLengthNonDirective # check for non-standard code patterns checkNonStandardCodePatterns -checkCopyright +# Stop now if there were any errors +[ "$exitCode" = 0 ] || exit $exitCode + +# check copyright date (normally disabled) +[ "$optCopyright" = true ] && checkCopyright exit 0 #------------------------------------------------------------------------------ diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index 8f6c26fbbe..3fbc3b2684 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -1284,7 +1284,7 @@ int Foam::system(const Foam::UList& command) { // in child: // Need command and arguments separately. - // args is a NULL-terminated list of c-strings + // args is a nullptr-terminated list of c-strings CStringList args(SubList(command, 0)); if (argc > 1) diff --git a/src/OSspecific/POSIX/endianI.H b/src/OSspecific/POSIX/endianI.H index 5f47fbd780..ca869ce0c2 100644 --- a/src/OSspecific/POSIX/endianI.H +++ b/src/OSspecific/POSIX/endianI.H @@ -97,10 +97,11 @@ inline uint64_t Foam::endian::swap64(uint64_t u) ); // alternative formulation - // - // u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull); - // u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull); - // return (u >> 32) | (u << 32); + /* + u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull); + u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull); + return (u >> 32) | (u << 32); + */ #endif } diff --git a/src/OpenFOAM/primitives/strings/lists/CStringList.H b/src/OpenFOAM/primitives/strings/lists/CStringList.H index c90ebcb337..42d762a6f0 100644 --- a/src/OpenFOAM/primitives/strings/lists/CStringList.H +++ b/src/OpenFOAM/primitives/strings/lists/CStringList.H @@ -73,7 +73,7 @@ class CStringList // Does not include the final nul-character size_t len_; - //- List of strings, including trailing NULL pointer + //- List of strings, including trailing nullptr char** argv_; //- Flattened content with interspersed nul-characters @@ -109,8 +109,8 @@ public: // Public Members - //- Count the number of parameters until the first NULL pointer. - // Return 0 if argv is NULL. + //- Count the number of parameters until the first nullptr + // Return 0 if argv is nullptr. static inline int count(const char * const argv[]); @@ -120,7 +120,7 @@ public: inline int size() const; //- Return the list of C-strings (ie, argv) - // The position at argc is a NULL pointer + // The position at argc is a nullptr inline char** strings() const; @@ -148,8 +148,8 @@ public: template static List asList(int argc, const char * const argv[]); - //- Create a list from a NULL-terminated list of argv parameters. - // A null pointer for argv is permissible. + //- Create a list from a nullptr-terminated list of argv parameters. + // Using a nullptr for argv is permissible. template static inline List asList(const char * const argv[]); diff --git a/src/conversion/ccm/common/ccmBase.C b/src/conversion/ccm/common/ccmBase.C index 14efe10a5e..82768621d4 100644 --- a/src/conversion/ccm/common/ccmBase.C +++ b/src/conversion/ccm/common/ccmBase.C @@ -85,10 +85,10 @@ bool Foam::ccm::base::close() { if (CCMIOIsValidEntity(globalState_->root)) { - CCMIOCloseFile(NULL, globalState_->root); + CCMIOCloseFile(nullptr, globalState_->root); } delete globalState_; - globalState_ = 0; + globalState_ = nullptr; return true; } diff --git a/src/conversion/ccm/reader/ccmReaderSolution.C b/src/conversion/ccm/reader/ccmReaderSolution.C index e849823b34..76c6fb363a 100644 --- a/src/conversion/ccm/reader/ccmReaderSolution.C +++ b/src/conversion/ccm/reader/ccmReaderSolution.C @@ -52,7 +52,7 @@ void Foam::ccm::reader::determineFieldInfo ( CCMIONextEntity ( - NULL, + nullptr, fieldSetNode, kCCMIOFieldPhase, &phaseI, @@ -74,7 +74,7 @@ void Foam::ccm::reader::determineFieldInfo ( CCMIONextEntity ( - NULL, + nullptr, phaseNode, kCCMIOField, &fieldI, @@ -84,12 +84,12 @@ void Foam::ccm::reader::determineFieldInfo && CCMIOReadField ( - NULL, + nullptr, fieldNode, fullName, shortName, &dims, - NULL + nullptr ) == kCCMIONoErr ) @@ -139,7 +139,7 @@ void Foam::ccm::reader::determineFieldInfo ( CCMIONextEntity ( - NULL, + nullptr, fieldNode, kCCMIOFieldData, &dataI, @@ -149,20 +149,20 @@ void Foam::ccm::reader::determineFieldInfo && CCMIOEntitySize ( - NULL, + nullptr, dataNode, - NULL, + nullptr, &maxId ) == kCCMIONoErr && CCMIOReadFieldDatad ( - NULL, + nullptr, dataNode, - NULL, + nullptr, &dataLocation, - NULL, + nullptr, kCCMIOStart, kCCMIOEnd ) @@ -212,7 +212,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, (globalState_->root), kCCMIOState, &stateI, @@ -230,7 +230,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, stateNode, kCCMIOProcessor, &procI, @@ -240,11 +240,11 @@ bool Foam::ccm::reader::detectSolution() && CCMIOReadProcessor ( - NULL, + nullptr, processorNode, - NULL, // Ignore verticesNode - NULL, // Ignore topologyNode - NULL, // Ignore initialField + nullptr, // Ignore verticesNode + nullptr, // Ignore topologyNode + nullptr, // Ignore initialField &solutionNode ) == kCCMIONoErr @@ -263,7 +263,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, solutionNode, kCCMIORestart, &restartI, @@ -273,7 +273,7 @@ bool Foam::ccm::reader::detectSolution() && CCMIOEntityName ( - NULL, + nullptr, stateNode, solutionName ) @@ -281,13 +281,13 @@ bool Foam::ccm::reader::detectSolution() && CCMIOReadRestartInfo ( - NULL, + nullptr, restartNode, - NULL, // Ignore solverName + nullptr, // Ignore solverName &iteration, &timeValue, - NULL, // Ignore timeUnits - NULL // Ignore startAngle + nullptr, // Ignore timeUnits + nullptr // Ignore startAngle ) == kCCMIONoErr ) @@ -310,7 +310,7 @@ bool Foam::ccm::reader::detectSolution() ( CCMIONextEntity ( - NULL, + nullptr, processorNode, kCCMIOLagrangianData, &lagrangianI, @@ -320,9 +320,9 @@ bool Foam::ccm::reader::detectSolution() && CCMIOReadLagrangianData ( - NULL, + nullptr, lagrangianNode, - NULL, + nullptr, &lagrangianSolutions ) == kCCMIONoErr @@ -366,10 +366,10 @@ Foam::ccm::reader::readField ( CCMIOGetState ( - NULL, + nullptr, (globalState_->root), solutionName.c_str(), - NULL, + nullptr, &stateNode ) != kCCMIONoErr @@ -420,7 +420,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, stateNode, kCCMIOProcessor, &procI, @@ -430,11 +430,11 @@ Foam::ccm::reader::readField && CCMIOReadProcessor ( - NULL, + nullptr, processorNode, - NULL, // Ignore verticesNode - NULL, // Ignore topologyNode - NULL, // Ignore initialField + nullptr, // Ignore verticesNode + nullptr, // Ignore topologyNode + nullptr, // Ignore initialField &solutionNode ) == kCCMIONoErr @@ -448,7 +448,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, solutionNode, kCCMIOFieldPhase, &phaseI, @@ -465,7 +465,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, phaseNode, kCCMIOField, &fieldI, @@ -480,10 +480,10 @@ Foam::ccm::reader::readField ( &(globalState_->error), fieldNode, - NULL, + nullptr, shortName, &dims, - NULL + nullptr ); assertNoError ( @@ -501,7 +501,7 @@ Foam::ccm::reader::readField ( CCMIONextEntity ( - NULL, + nullptr, fieldNode, kCCMIOFieldData, &dataI, @@ -518,20 +518,20 @@ Foam::ccm::reader::readField ( CCMIOEntitySize ( - NULL, + nullptr, dataNode, &n, - NULL + nullptr ) == kCCMIONoErr && CCMIOReadFieldDatad ( - NULL, + nullptr, dataNode, &mapId, &dataLocation, - NULL, + nullptr, kCCMIOStart, kCCMIOEnd ) @@ -549,10 +549,10 @@ Foam::ccm::reader::readField ( CCMIOEntityDescription ( - NULL, + nullptr, dataNode, &len, - NULL + nullptr ) == kCCMIONoErr ) @@ -563,7 +563,7 @@ Foam::ccm::reader::readField ( CCMIOEntityDescription ( - NULL, + nullptr, dataNode, &len, dataLabel @@ -577,7 +577,7 @@ Foam::ccm::reader::readField strstr(fieldName.c_str(), "SIG") || strstr(fieldName.c_str(), "EPS") ) - && strstr(dataLabel, "So") == NULL + && strstr(dataLabel, "So") == nullptr ) { okayCombination = false; @@ -607,8 +607,8 @@ Foam::ccm::reader::readField ( &(globalState_->error), dataNode, - NULL, - NULL, + nullptr, + nullptr, rawData.begin(), kCCMIOStart, kCCMIOEnd diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index 62957304cc..1f81e6fb63 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -592,7 +592,7 @@ Foam::vector Foam::turbulentDFSEMInletFvPatchVectorField::uDashEddy void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies ( - List >& overlappingEddies + List>& overlappingEddies ) const { int oldTag = UPstream::msgType(); @@ -604,7 +604,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies Pstream::scatterList(patchBBs); // Per processor indices into all segments to send - List > dynSendMap(Pstream::nProcs()); + List> dynSendMap(Pstream::nProcs()); forAll(eddies_, i) { @@ -1050,7 +1050,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::updateCoeffs() } // Add contributions from overlapping eddies - List > overlappingEddies(Pstream::nProcs()); + List> overlappingEddies(Pstream::nProcs()); calcOverlappingProcEddies(overlappingEddies); forAll(overlappingEddies, procI) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H index d14d82266f..8b1e38f805 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.H @@ -231,7 +231,7 @@ class turbulentDFSEMInletFvPatchVectorField //- Helper function to interpolate values from the boundary data or // read from dictionary template - tmp > interpolateOrRead + tmp> interpolateOrRead ( const word& fieldName, const dictionary& dict, @@ -240,7 +240,7 @@ class turbulentDFSEMInletFvPatchVectorField //- Helper function to interpolate values from the boundary data template - tmp > interpolateBoundaryData + tmp> interpolateBoundaryData ( const word& fieldName ) const; @@ -258,7 +258,7 @@ class turbulentDFSEMInletFvPatchVectorField // processor void calcOverlappingProcEddies ( - List >& overlappingEddies + List>& overlappingEddies ) const; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C index 1a3cb11434..2a17b6f76a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorFieldTemplates.C @@ -30,7 +30,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::tmp > +Foam::tmp> Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead ( const word& fieldName, @@ -40,7 +40,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead { if (dict.found(fieldName)) { - tmp > tFld + tmp> tFld ( new Field ( @@ -62,7 +62,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead template -Foam::tmp > +Foam::tmp> Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData ( const word& fieldName diff --git a/src/functionObjects/utilities/ensightWrite/ensightWrite.H b/src/functionObjects/utilities/ensightWrite/ensightWrite.H index ce9592f99c..94aae0d714 100644 --- a/src/functionObjects/utilities/ensightWrite/ensightWrite.H +++ b/src/functionObjects/utilities/ensightWrite/ensightWrite.H @@ -72,6 +72,11 @@ Description patches and suppress writing the internalMesh. Consecutive output numbering can be used in conjunction with \c overwrite. +See also + Foam::functionObjects::vtkWrite + Foam::functionObjects::fvMeshFunctionObject + Foam::functionObjects::timeControl + SourceFiles ensightWrite.C ensightWriteTemplates.C diff --git a/src/functionObjects/utilities/vtkWrite/vtkWrite.H b/src/functionObjects/utilities/vtkWrite/vtkWrite.H index 025e92bdab..2ea05fb3cf 100644 --- a/src/functionObjects/utilities/vtkWrite/vtkWrite.H +++ b/src/functionObjects/utilities/vtkWrite/vtkWrite.H @@ -62,6 +62,7 @@ Usage \endtable See also + Foam::functionObjects::ensightWrite Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::timeControl diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 9276992b91..0eb597a1c2 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -123,7 +123,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights const label nCoarseI = max(fineToCoarse) + 1; labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse)); - HashSet > fineFeaturedFaces(coarsePatch.nEdges()/10); + HashSet> fineFeaturedFaces(coarsePatch.nEdges()/10); // Map fine faces with featured edge into coarse faces forAllConstIter(EdgeMap, facePairWeight_, iter) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H index 3ccfa5db27..f492bf6c1f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.H @@ -180,9 +180,9 @@ public: ); //- Construct and return a clone - virtual autoPtr > clone() const + virtual autoPtr> clone() const { - return autoPtr > + return autoPtr> ( new InjectedParticleDistributionInjection(*this) ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H index b96cdd33a8..a87c72ecfd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.H @@ -145,9 +145,9 @@ public: ); //- Construct and return a clone - virtual autoPtr > clone() const + virtual autoPtr> clone() const { - return autoPtr > + return autoPtr> ( new InjectedParticleInjection(*this) ); diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C index b191f076a2..38551410c0 100644 --- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C +++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C @@ -358,8 +358,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation const bool nearestOnly, const coordinateSystem& referenceCS, const label sourceSize, - const List >& nearestVertex, - const List >& nearestVertexWeight + const List>& nearestVertex, + const List>& nearestVertexWeight ) : perturb_(perturb), diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H index ce468fcc02..8fee32b443 100644 --- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H +++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H @@ -123,8 +123,8 @@ public: const bool nearestOnly, const coordinateSystem& referenceCS, const label sourceSize, - const List >& nearestVertex, - const List >& nearestVertexWeight + const List>& nearestVertex, + const List>& nearestVertexWeight ); //- Construct and return a clone diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 9e7001454d..d22979477c 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -1047,7 +1047,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() interpolationCells_.transfer(interpolationCells); - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index 4a5cdbe8a2..8e7c96247e 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -488,7 +488,7 @@ void Foam::cellCellStencils::inverseDistance::markDonors // Indices of tgtcells to send over to each processor - List > tgtSendCells(Pstream::nProcs()); + List> tgtSendCells(Pstream::nProcs()); forAll(srcOverlapProcs, i) { label procI = srcOverlapProcs[i]; @@ -1548,7 +1548,7 @@ void Foam::cellCellStencils::inverseDistance::createStencil } // Re-do the mapDistribute - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); } @@ -1902,7 +1902,7 @@ bool Foam::cellCellStencils::inverseDistance::update() } interpolationCells_.transfer(interpolationCells); - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index ed4e2e251e..7a9b2906f6 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -317,7 +317,7 @@ void Foam::cellCellStencils::trackingInverseDistance::markDonors // Indices of tgtcells to send over to each processor - List > tgtSendCells(Pstream::nProcs()); + List> tgtSendCells(Pstream::nProcs()); forAll(srcOverlapProcs, i) { label procI = srcOverlapProcs[i]; @@ -768,7 +768,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() } interpolationCells_.transfer(interpolationCells); - List > compactMap; + List> compactMap; mapDistribute map(globalCells, cellStencil_, compactMap); cellInterpolationMap_.transfer(map); diff --git a/src/overset/oversetPolyPatch/oversetFvPatchField.H b/src/overset/oversetPolyPatch/oversetFvPatchField.H index 3a337996ee..b7c923fcd5 100644 --- a/src/overset/oversetPolyPatch/oversetFvPatchField.H +++ b/src/overset/oversetPolyPatch/oversetFvPatchField.H @@ -103,9 +103,9 @@ public: oversetFvPatchField(const oversetFvPatchField&); //- Construct and return a clone - virtual tmp > clone() const + virtual tmp> clone() const { - return tmp > + return tmp> ( new oversetFvPatchField(*this) ); @@ -119,12 +119,12 @@ public: ); //- Construct and return a clone setting internal field reference - virtual tmp > clone + virtual tmp> clone ( const DimensionedField& iF ) const { - return tmp > + return tmp> ( new oversetFvPatchField(*this, iF) ); diff --git a/src/randomProcesses/windowModels/windowModel/windowModel.H b/src/randomProcesses/windowModels/windowModel/windowModel.H index b9e1845fe0..c5219830ac 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModel.H +++ b/src/randomProcesses/windowModels/windowModel/windowModel.H @@ -118,7 +118,7 @@ public: //- Return the windowed data template - tmp > apply + tmp> apply ( const Field& fld, const label windowI diff --git a/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C b/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C index 76f1241a83..9d3e478c04 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C +++ b/src/randomProcesses/windowModels/windowModel/windowModelTemplates.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ template -Foam::tmp > Foam::windowModel::apply +Foam::tmp> Foam::windowModel::apply ( const Field& fld, const label windowI @@ -44,7 +44,7 @@ Foam::tmp > Foam::windowModel::apply } - tmp > tresult(new Field(nSamples, pTraits::zero)); + tmp> tresult(new Field(nSamples, pTraits::zero)); Field& result = tresult.ref(); label nWindow = nWindowsTotal(fld.size()); diff --git a/src/sampling/sampledSurface/readers/surfaceReader.H b/src/sampling/sampledSurface/readers/surfaceReader.H index 2ccdc470de..9b2b242e88 100644 --- a/src/sampling/sampledSurface/readers/surfaceReader.H +++ b/src/sampling/sampledSurface/readers/surfaceReader.H @@ -108,7 +108,7 @@ public: virtual wordList fieldNames(const label timeIndex) const = 0; //- Return a scalar field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -116,7 +116,7 @@ public: ) const = 0; //- Return a vector field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -124,7 +124,7 @@ public: ) const = 0; //- Return a sphericalTensor field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -132,7 +132,7 @@ public: ) const = 0; //- Return a symmTensor field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, @@ -140,7 +140,7 @@ public: ) const = 0; //- Return a tensor field at a given time - virtual tmp > field + virtual tmp> field ( const label timeIndex, const label fieldIndex, diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H index 86f253d215..69e1d84665 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H @@ -64,7 +64,7 @@ class boundaryRadiationProperties // Private data //- Ptr list of boundaryRadiationProperties - List > + List> radBoundaryPropertiesPtrList_; diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H index 6c4bb39ef1..d8b2a19e3c 100644 --- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H @@ -153,7 +153,7 @@ public: ) const = 0; //- Return net solid sensible enthalpy [J/Kg] - virtual tmp > RRsHs() const = 0; + virtual tmp> RRsHs() const = 0; //- Return specie Table for gases virtual const speciesTable& gasTable() const = 0; diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H index 4d022e2870..6ccf451bc5 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H @@ -188,7 +188,7 @@ public: inline tmp RRs() const; //- Return net solid sensible enthalpy - inline tmp > RRsHs() const; + inline tmp> RRsHs() const; //- Solve the reaction system for the given time step // and return the characteristic time diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H index 067f7d823c..74cf06d7dd 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H @@ -97,10 +97,10 @@ Foam::solidChemistryModel::RRs() const template -inline Foam::tmp > +inline Foam::tmp> Foam::solidChemistryModel::RRsHs() const { - tmp > tRRsHs + tmp> tRRsHs ( new DimensionedField ( diff --git a/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C b/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C index 4086598f34..d344fe7cb3 100644 --- a/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/Grimshaw/GrimshawWaveModel.C @@ -72,7 +72,8 @@ Foam::scalar Foam::waveModels::Grimshaw::eta const scalar eps2 = eps*eps; const scalar eps3 = eps*eps2; - const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); + const scalar C = + sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); const scalar ts = 3.5*h/sqrt(H/h); const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta); @@ -109,7 +110,8 @@ Foam::vector Foam::waveModels::Grimshaw::Uf const scalar eps2 = eps*eps; const scalar eps3 = eps*eps2; - const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); + const scalar C = + sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3); const scalar ts = 3.5*h/sqrt(eps); const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta); @@ -228,19 +230,19 @@ void Foam::waveModels::Grimshaw::setVelocity if (fraction > 0) { - const label paddlei = faceToPaddle_[facei]; + const label paddlei = faceToPaddle_[facei]; - const vector Uf = this->Uf - ( - waveHeight_, - waterDepthRef_, - xPaddle_[paddlei], - yPaddle_[paddlei], - waveAngle_, - t, - x0_, - z - ); + const vector Uf = this->Uf + ( + waveHeight_, + waterDepthRef_, + xPaddle_[paddlei], + yPaddle_[paddlei], + waveAngle_, + t, + x0_, + z + ); U_[facei] = fraction*Uf*tCoeff; } diff --git a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C index 6ef4fd3f94..5fc76286a9 100644 --- a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.C @@ -320,19 +320,19 @@ void Foam::waveModels::McCowan::setVelocity if (fraction > 0) { - const label paddlei = faceToPaddle_[facei]; + const label paddlei = faceToPaddle_[facei]; - const vector Uf = this->Uf - ( - waveHeight_, - waterDepthRef_, - xPaddle_[paddlei], - yPaddle_[paddlei], - waveAngle_, - t, - x0_, - z - ); + const vector Uf = this->Uf + ( + waveHeight_, + waterDepthRef_, + xPaddle_[paddlei], + yPaddle_[paddlei], + waveAngle_, + t, + x0_, + z + ); U_[facei] = fraction*Uf*tCoeff; } diff --git a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H index 0ad144bea0..93abfc6d63 100644 --- a/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H +++ b/src/waveModels/waveGenerationModels/derived/McCowan/McCowanWaveModel.H @@ -74,14 +74,14 @@ protected: virtual scalar newtonRapsonF1 ( const scalar x0, - const scalar H, + const scalar H, const scalar h ) const; virtual scalar newtonRapsonF2 ( const scalar x0, - const scalar H, + const scalar H, const scalar h, const scalar xa, const scalar m, diff --git a/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C b/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C index 433723cc27..ccf5861605 100644 --- a/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/StokesV/StokesVWaveModel.C @@ -615,7 +615,11 @@ void Foam::waveModels::StokesV::initialise f1 = pi*H/d - 2*pi/(k*d)*(lambda + l3*b33 + l5*(b35 + b55)); - f2 = (2*pi*d)/(mag(g_)*sqr(T)) - k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2); + f2 = + ( + (2*pi*d)/(mag(g_)*sqr(T)) + - k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2) + ); const scalar lambdaPr = (f1*Bmat21 - f2*Bmat11)/(Bmat11*Bmat22 - Bmat12*Bmat21);