From 385f92732b1a6a97189bd23e54e43bd4dfda65f5 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 19 Apr 2021 10:44:14 +0200 Subject: [PATCH] STYLE: default construct empty dictionaries - some code used copy construct from dictionary::null instead. The result is the same but suggests that something else may be intended. Only need dictionary::null for const-ref usage. --- .../doxygenXmlParser/doxygenXmlParser.C | 7 +++--- .../doxygenXmlParser/doxygenXmlParser.H | 1 - .../createZeroDirectory/boundaryTemplates.C | 12 +++++----- .../createZeroDirectory/caseInfo.C | 8 +++---- src/OpenFOAM/matrices/solution/solution.C | 18 +++++++------- .../primitives/subModelBase/subModelBase.C | 12 +++++----- .../ptscotchDecomp/dummyPtscotchDecomp.C | 11 ++++----- .../trimModel/trimModel/trimModel.C | 3 ++- .../WallInteractionModel.C | 7 +++--- .../WallInteractionModel.H | 8 +++---- .../Templates/KinematicCloud/KinematicCloud.C | 4 ++-- .../Templates/KinematicCloud/KinematicCloud.H | 2 +- .../cloudSolution/cloudSolution.C | 4 ++-- .../KinematicParcel/KinematicParcel.H | 10 ++++---- .../KinematicParcel/KinematicParcelI.H | 4 ++-- .../CloudFunctionObjectList.C | 24 +++++++++---------- .../ParticleForceList/ParticleForceList.C | 10 ++++---- .../thermalShellFvPatchScalarField.C | 4 ++-- .../vibrationShellFvPatchScalarField.C | 4 ++-- .../regionModel/regionModel/regionModel.C | 4 ++-- .../regionModelFunctionObject.C | 3 ++- .../regionModelFunctionObjectList.C | 3 ++- .../thermalBaffleFvPatchScalarField.C | 4 ++-- .../radiationModel/radiationModel.C | 6 ++--- .../Reactions/ReactionList/ReactionList.C | 4 ++-- .../Reactions/ReactionList/ReactionList.H | 2 +- 26 files changed, 89 insertions(+), 90 deletions(-) diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C index 75b8203849..c94c1eb9d6 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,7 +40,7 @@ Foam::doxygenXmlParser::doxygenXmlParser const word& ext ) : - dictionary(dictionary::null) + dictionary() { // Pre-construct and compile regular expressions const regExp nameRe(".*.H"); @@ -155,7 +156,7 @@ Foam::doxygenXmlParser::doxygenXmlParser // preferentially take exact match if it exists if (exactMatch && (tName + "." + ext) == name) { - dictionary dict(dictionary::null); + dictionary dict; dict.add("name", name); dict.add("filename", fName + ".html"); dict.add("path", path); @@ -168,7 +169,7 @@ Foam::doxygenXmlParser::doxygenXmlParser && regExp(".*" + tName + ".*").match(name) ) { - dictionary dict(dictionary::null); + dictionary dict; dict.add("name", name); dict.add("filename", fName + ".html"); dict.add("path", path); diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H index b6e056d268..4a61f9b9f1 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H @@ -53,7 +53,6 @@ class doxygenXmlParser : public dictionary { - public: //- Construct from components diff --git a/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C b/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C index 3923f8db7b..4a436edb41 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C +++ b/applications/utilities/preProcessing/createZeroDirectory/boundaryTemplates.C @@ -40,8 +40,8 @@ Foam::boundaryTemplates::boundaryTemplates const word& solverType ) : - templates_(dictionary::null), - options_(dictionary::null) + templates_(), + options_() { Info<< " Reading boundary templates" << endl; @@ -62,8 +62,8 @@ Foam::boundaryTemplates::boundaryTemplates const word& regionType = dEntry.keyword(); wordList patchTypes(regionBCs.lookup(regionType)); - dictionary regionTemplate = dictionary::null; - dictionary regionOptions = dictionary::null; + dictionary regionTemplate; + dictionary regionOptions; // read general boundary types forAll(patchTypes, i) @@ -250,8 +250,8 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict // look for field name if (patchDict.found(fieldName)) { - dictionary dict(dictionary::null); - const dictionary& fieldDict(patchDict.subDict(fieldName)); + dictionary dict; + const dictionary& fieldDict = patchDict.subDict(fieldName); for (const entry& dEntry : fieldDict) { diff --git a/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C b/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C index fb5191a934..dfca78905f 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C +++ b/applications/utilities/preProcessing/createZeroDirectory/caseInfo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015 OpenCFD Ltd. + Copyright (C) 2015-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -194,7 +194,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField const boundaryTemplates& bcTemplates ) const { - dictionary boundaryField = dictionary::null; + dictionary boundaryField; forAll(boundaryInfo_.names(), j) { @@ -202,7 +202,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField if (boundaryInfo_.constraint()[j]) { - dictionary patchDict = dictionary::null; + dictionary patchDict; patchDict.add("type", boundaryInfo_.types()[j]); // Add value for processor patches @@ -228,7 +228,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField const word& patchType = patchTypes_[conditionI]; - dictionary optionDict = dictionary::null; + dictionary optionDict; if (bcTemplates.optionsRequired(regionPrefix, category, patchType)) { optionDict = bcDict_.subDict(condition).subDict("options"); diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index 498503ff47..757d1b4811 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -135,13 +135,13 @@ Foam::solution::solution IOobject::NO_WRITE ) ), - cache_(dictionary::null), + cache_(), caching_(false), - fieldRelaxDict_(dictionary::null), - eqnRelaxDict_(dictionary::null), + fieldRelaxDict_(), + eqnRelaxDict_(), fieldRelaxDefault_(0), eqnRelaxDefault_(0), - solvers_(dictionary::null) + solvers_() { if ( @@ -179,13 +179,13 @@ Foam::solution::solution ), dict ), - cache_(dictionary::null), + cache_(), caching_(false), - fieldRelaxDict_(dictionary::null), - eqnRelaxDict_(dictionary::null), + fieldRelaxDict_(), + eqnRelaxDict_(), fieldRelaxDefault_(0), eqnRelaxDefault_(0), - solvers_(dictionary::null) + solvers_() { if ( diff --git a/src/OpenFOAM/primitives/subModelBase/subModelBase.C b/src/OpenFOAM/primitives/subModelBase/subModelBase.C index 01830535f1..3e640d2734 100644 --- a/src/OpenFOAM/primitives/subModelBase/subModelBase.C +++ b/src/OpenFOAM/primitives/subModelBase/subModelBase.C @@ -40,12 +40,12 @@ bool Foam::subModelBase::subModelBase::inLine() const Foam::subModelBase::subModelBase(dictionary& properties) : - modelName_(word::null), + modelName_(), properties_(properties), - dict_(dictionary::null), - baseName_(word::null), - modelType_(word::null), - coeffDict_(dictionary::null) + dict_(), + baseName_(), + modelType_(), + coeffDict_() {} @@ -58,7 +58,7 @@ Foam::subModelBase::subModelBase const word& dictExt ) : - modelName_(word::null), + modelName_(), properties_(properties), dict_(dict), baseName_(baseName), diff --git a/src/dummyThirdParty/ptscotchDecomp/dummyPtscotchDecomp.C b/src/dummyThirdParty/ptscotchDecomp/dummyPtscotchDecomp.C index 6e84f20474..11d272a3e0 100644 --- a/src/dummyThirdParty/ptscotchDecomp/dummyPtscotchDecomp.C +++ b/src/dummyThirdParty/ptscotchDecomp/dummyPtscotchDecomp.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -99,13 +99,10 @@ Foam::label Foam::ptscotchDecomp::decompose // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::ptscotchDecomp::ptscotchDecomp -( - const dictionary& decompDict -) +Foam::ptscotchDecomp::ptscotchDecomp(const dictionary& decompDict) : decompositionMethod(decompDict), - coeffsDict_(dictionary::null) + coeffsDict_() {} @@ -116,7 +113,7 @@ Foam::ptscotchDecomp::ptscotchDecomp ) : decompositionMethod(decompDict, regionName), - coeffsDict_(dictionary::null) + coeffsDict_() {} diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C index acddea6590..195d2eef72 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -47,7 +48,7 @@ Foam::trimModel::trimModel : rotor_(rotor), name_(name), - coeffs_(dictionary::null) + coeffs_() { read(dict); } diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C index b0b1d9e02b..f124eafe01 100644 --- a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,9 +33,9 @@ License template Foam::WallInteractionModel::WallInteractionModel(CloudType& owner) : - dict_(dictionary::null), owner_(owner), - coeffDict_(dictionary::null) + dict_(dictionary::null), + coeffDict_() {} @@ -46,8 +47,8 @@ Foam::WallInteractionModel::WallInteractionModel const word& type ) : - dict_(dict), owner_(owner), + dict_(dict), coeffDict_(dict.subDict(type + "Coeffs")) {} diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H index b84d1885c0..5e9eb6b6e1 100644 --- a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H @@ -56,12 +56,12 @@ class WallInteractionModel { // Private data - //- The cloud dictionary - const dictionary& dict_; - - // reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; + //- Reference to the cloud dictionary + const dictionary& dict_; + //- The coefficients dictionary const dictionary coeffDict_; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index fc9c916674..4c9b2a4b70 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2020 OpenCFD Ltd. + Copyright (C) 2016-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -588,7 +588,7 @@ Foam::KinematicCloud::KinematicCloud ), solution_(mesh), constProps_(), - subModelProperties_(dictionary::null), + subModelProperties_(), rndGen_(), cellOccupancyPtr_(nullptr), cellLengthScale_(c.cellLengthScale_), diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index bd6a134a7a..788aa175e8 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -388,7 +388,7 @@ public: //- Return access to the constant properties inline typename parcelType::constantProperties& constProps(); - //- Return reference to the sub-models dictionary + //- Return reference to the sub-models dictionary inline const dictionary& subModelProperties() const; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C index 55175b50d6..3018c6079c 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -97,7 +97,7 @@ Foam::cloudSolution::cloudSolution(const cloudSolution& cs) Foam::cloudSolution::cloudSolution(const fvMesh& mesh) : mesh_(mesh), - dict_(dictionary::null), + dict_(), active_(false), transient_(false), calcFrequency_(0), diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index de7aaccae3..14efa73daf 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2020 OpenCFD Ltd. + Copyright (C) 2016-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -132,14 +132,14 @@ public: // Constructors - //- Null constructor - constantProperties(); + //- Default construct + inline constantProperties(); //- Copy constructor - constantProperties(const constantProperties& cp); + inline constantProperties(const constantProperties& cp); //- Construct from dictionary - constantProperties(const dictionary& parentDict); + inline constantProperties(const dictionary& parentDict); // Member Functions diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index 6763f7b055..d562b7e3e2 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2020 OpenCFD Ltd. + Copyright (C) 2016-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,7 +36,7 @@ template inline Foam::KinematicParcel::constantProperties::constantProperties() : - dict_(dictionary::null), + dict_(), parcelTypeId_(dict_, -1), rhoMin_(dict_, 0.0), rho0_(dict_, 0.0), diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C index 17130ec921..d8cbb01174 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,7 +39,7 @@ Foam::CloudFunctionObjectList::CloudFunctionObjectList : PtrList>(), owner_(owner), - dict_(dictionary::null) + dict_() {} @@ -57,23 +57,19 @@ Foam::CloudFunctionObjectList::CloudFunctionObjectList { if (readFields) { - wordList modelNames(dict.toc()); - Info<< "Constructing cloud functions" << endl; - if (modelNames.size() > 0) + this->resize(dict.size()); + + label count = 0; + for (const word& modelName : dict.toc()) { - this->setSize(modelNames.size()); + const dictionary& modelDict = dict.subDict(modelName); - forAll(modelNames, i) { - const word& modelName = modelNames[i]; - - const dictionary& modelDict(dict.subDict(modelName)); - this->set ( - i, + count, CloudFunctionObject::New ( modelDict, @@ -83,8 +79,10 @@ Foam::CloudFunctionObjectList::CloudFunctionObjectList ) ); } + ++count; } - else + + if (!count) { Info<< " none" << endl; } diff --git a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C index 57a6b3faaf..ce0d14ed3a 100644 --- a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C +++ b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,7 +41,7 @@ Foam::ParticleForceList::ParticleForceList PtrList>(), owner_(owner), mesh_(mesh), - dict_(dictionary::null), + dict_(), calcCoupled_(true), calcNonCoupled_(true) {} @@ -71,7 +72,7 @@ Foam::ParticleForceList::ParticleForceList label count = 0; for (const entry& dEntry : dict) { - const word& model = dEntry.keyword(); + const word& modelName = dEntry.keyword(); if (dEntry.isDict()) { this->set @@ -82,7 +83,7 @@ Foam::ParticleForceList::ParticleForceList owner, mesh, dEntry.dict(), - model + modelName ) ); } @@ -96,11 +97,10 @@ Foam::ParticleForceList::ParticleForceList owner, mesh, dict, - model + modelName ) ); } - ++count; } diff --git a/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.C b/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.C index 6b1db5d3bb..a386a6b388 100644 --- a/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.C +++ b/src/regionFaModels/derivedFvPatchFields/thermalShell/thermalShellFvPatchScalarField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,7 +45,7 @@ thermalShellFvPatchScalarField::thermalShellFvPatchScalarField : fixedValueFvPatchField(p, iF), baffle_(), - dict_(dictionary::null) + dict_() {} diff --git a/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.C b/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.C index 8b91815f80..b2ab02fd72 100644 --- a/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.C +++ b/src/regionFaModels/derivedFvPatchFields/vibrationShell/vibrationShellFvPatchScalarField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -43,7 +43,7 @@ vibrationShellFvPatchScalarField::vibrationShellFvPatchScalarField : mixedFvPatchField(p, iF), baffle_(), - dict_(dictionary::null) + dict_() { refValue() = 0; refGrad() = 0; diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index 70087f338f..485cb1b206 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2020 OpenCFD Ltd. + Copyright (C) 2016-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -360,7 +360,7 @@ Foam::regionModels::regionModel::regionModel active_(false), infoOutput_(false), modelName_("none"), - coeffs_(dictionary::null), + coeffs_(), outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), diff --git a/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObject.C b/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObject.C index fc3930c7a9..acddf1ec6e 100644 --- a/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObject.C +++ b/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObject.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -46,7 +47,7 @@ Foam::regionModels::regionModelFunctionObject::regionModelFunctionObject regionModel& region ) : - dict_(dictionary::null), + dict_(), regionModel_(region), modelType_("modelType") {} diff --git a/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectList.C b/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectList.C index b754e19601..82e14919cb 100644 --- a/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectList.C +++ b/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectList.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,7 +37,7 @@ Foam::regionModels::regionModelFunctionObjectList::regionModelFunctionObjectList : PtrList(), regionModel_(region), - dict_(dictionary::null) + dict_() {} diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index b9656debb4..e79c81d5b1 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd + Copyright (C) 2020-2021 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +50,7 @@ thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField owner_(false), internal_(true), baffle_(), - dict_(dictionary::null), + dict_(), extrudeMeshPtr_() {} diff --git a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C index b2496db224..9d835d9adb 100644 --- a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C @@ -73,13 +73,13 @@ Foam::IOobject Foam::radiation::radiationModel::createIOobject if (io.typeHeaderOk(true)) { io.readOpt(IOobject::MUST_READ_IF_MODIFIED); - return io; } else { io.readOpt(IOobject::NO_READ); - return io; } + + return io; } @@ -129,7 +129,7 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T) time_(T.time()), T_(T), radiation_(false), - coeffs_(dictionary::null), + coeffs_(), solverFreq_(0), firstIter_(true), absorptionEmission_(nullptr), diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C index cb917a7ca4..45f0fe8ac9 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,7 +42,7 @@ Foam::ReactionList::ReactionList SLPtrList>(), species_(species), thermoDb_(thermoDb), - dict_(dictionary::null) + dict_() {} diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H index 4926ba5c7f..750a89565f 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H @@ -81,7 +81,7 @@ public: // Constructors - //- Construct null + //- Default construct ReactionList ( const speciesTable& species,