From f62d6d96aaf88076cc08473ae7962c09014467f9 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Mon, 13 Jan 2020 09:44:58 +0000 Subject: [PATCH 1/8] BUG: reactingOneDim - corrected DiNum calc for parallel running. Fixes #1552 --- .../pyrolysisModels/reactingOneDim/reactingOneDim.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index e55dc74abb..43a9e543af 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -622,7 +622,7 @@ scalar reactingOneDim::solidRegionDiffNo() const DiNum = max(KrhoCpbyDelta.primitiveField())*time().deltaTValue(); } - return DiNum; + return returnReduce(DiNum, maxOp()); } From c234acf1ed7c944193ab15f7150bde3f9ff61af0 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Mon, 20 Jan 2020 17:27:11 +0000 Subject: [PATCH 2/8] BUG: add switch for nu:DphitEff in kEpsilonPhitF (fixes #1560) Including `nu` in `DphitEff` even though it is not present in (LUU:Eq. 17) provided higher level of resemblance to benchmarks for the tests considered, particularly for the peak skin friction (yet, pressure-related predictions were unaffected). Users can switch off `nu` in `DphitEff` by using `includeNu` entry in `kEpsilonPhitFCoeffs` in order to follow the reference paper thereat. `includeNu` is left `true` by default. See GitLab issue #1560, LUU: Laurence, D. R., Uribe, J. C., & Utyuzhnikov, S. V. (2005). --- .../RAS/kEpsilonPhitF/kEpsilonPhitF.C | 38 ++++++---- .../RAS/kEpsilonPhitF/kEpsilonPhitF.H | 76 +++++++++++-------- 2 files changed, 70 insertions(+), 44 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.C b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.C index 6f6636a998..3f9c95958a 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -121,9 +121,18 @@ kEpsilonPhitF::kEpsilonPhitF ), kEpsilonPhitFBase(), + includeNu_ + ( + Switch::getOrAddToDict + ( + "includeNu", + this->coeffDict_, + true + ) + ), Cmu_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -132,7 +141,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Ceps1a_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Ceps1a", this->coeffDict_, @@ -141,7 +150,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Ceps1b_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Ceps1b", this->coeffDict_, @@ -150,7 +159,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Ceps1c_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Ceps1c", this->coeffDict_, @@ -159,7 +168,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Ceps2_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Ceps2", this->coeffDict_, @@ -168,7 +177,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Cf1_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Cf1", this->coeffDict_, @@ -177,7 +186,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Cf2_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Cf2", this->coeffDict_, @@ -186,7 +195,7 @@ kEpsilonPhitF::kEpsilonPhitF ), CL_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "CL", this->coeffDict_, @@ -195,7 +204,7 @@ kEpsilonPhitF::kEpsilonPhitF ), Ceta_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "Ceta", this->coeffDict_, @@ -204,7 +213,7 @@ kEpsilonPhitF::kEpsilonPhitF ), CT_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "CT", this->coeffDict_, @@ -213,7 +222,7 @@ kEpsilonPhitF::kEpsilonPhitF ), sigmaK_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "sigmaK", this->coeffDict_, @@ -222,7 +231,7 @@ kEpsilonPhitF::kEpsilonPhitF ), sigmaEps_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "sigmaEps", this->coeffDict_, @@ -231,7 +240,7 @@ kEpsilonPhitF::kEpsilonPhitF ), sigmaPhit_ ( - dimensioned::getOrAddToDict + dimensionedScalar::getOrAddToDict ( "sigmaPhit", this->coeffDict_, @@ -341,6 +350,7 @@ bool kEpsilonPhitF::read() { if (eddyViscosity>::read()) { + includeNu_.readIfPresent("includeNu", this->coeffDict()); Cmu_.readIfPresent(this->coeffDict()); Ceps1a_.readIfPresent(this->coeffDict()); Ceps1b_.readIfPresent(this->coeffDict()); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.H b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.H index 23f2e5c802..a0e3140078 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilonPhitF/kEpsilonPhitF.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,11 +34,15 @@ Description compressible flows. The model is a three-transport-equation linear-eddy-viscosity turbulence - closure model alongside an elliptic relaxation equation: - - Turbulent kinetic energy, \c k, - - Turbulent kinetic energy dissipation rate, \c epsilon, - - Normalised wall-normal fluctuating velocity scale, \c phit, - - Elliptic relaxation factor, \c f. + closure model alongside an elliptic relaxation equation. + + \heading Input fields + \plaintable + k | Turbulent kinetic energy [m2/s2] + epsilon | Turbulent kinetic energy dissipation rate [m2/s3] + phit | Normalised wall-normal fluctuating velocity scale [-] + f | Elliptic relaxation factor [1/s] + \endplaintable Reference: \verbatim @@ -53,19 +57,20 @@ Description \verbatim kEpsilonPhitFCoeffs { - Cmu 0.22, // Turbulent viscosity constant - Ceps1a 1.4, // Model constant for epsilon - Ceps1b 1.0, // Model constant for epsilon - Ceps1c 0.05, // Model constant for epsilon - Ceps2 1.9, // Model constant for epsilon - Cf1 1.4, // Model constant for f - Cf2 0.3, // Model constant for f - CL 0.25, // Model constant for L - Ceta 110.0, // Model constant for L - CT 6.0, // Model constant for T - sigmaK 1.0, // Turbulent Prandtl number for k - sigmaEps 1.3, // Turbulent Prandtl number for epsilon - sigmaPhit 1.0, // Turbulent Prandtl number for phit = sigmaK + includeNu true; // include nu in (LUU: Eq. 17), see Notes + Cmu 0.22; // Turbulent viscosity constant + Ceps1a 1.4; // Model constant for epsilon + Ceps1b 1.0; // Model constant for epsilon + Ceps1c 0.05; // Model constant for epsilon + Ceps2 1.9; // Model constant for epsilon + Cf1 1.4; // Model constant for f + Cf2 0.3; // Model constant for f + CL 0.25; // Model constant for L + Ceta 110.0; // Model constant for L + CT 6.0; // Model constant for T + sigmaK 1.0; // Turbulent Prandtl number for k + sigmaEps 1.3; // Turbulent Prandtl number for epsilon + sigmaPhit 1.0; // Turbulent Prandtl number for phit = sigmaK } \endverbatim @@ -74,6 +79,14 @@ Note However, the name 'phi' preexisted in OpenFOAM; therefore, this name was replaced by 'phit' herein. + Including \c nu in \c DphitEff even though it is not present in (LUU:Eq. 17) + provided higher level of resemblance to benchmarks for the tests considered, + particularly for the peak skin friction (yet, pressure-related predictions + were unaffected). Users can switch off \c nu in \c DphitEff by using + \c includeNu entry in \c kEpsilonPhitFCoeffs as shown above in order to + follow the reference paper thereat. \c includeNu is left \c true by default. + See GitLab issue #1560. + SourceFiles kEpsilonPhitF.C @@ -119,6 +132,8 @@ protected: // Protected Data + Switch includeNu_; + // Model coefficients dimensionedScalar Cmu_; @@ -210,7 +225,7 @@ public: //- Re-read model coefficients if they have changed virtual bool read(); - //- Return the effective diffusivity for k + //- Return the effective diffusivity for k (LUU:Eq. 3) tmp DkEff() const { return tmp @@ -223,7 +238,7 @@ public: ); } - //- Return the effective diffusivity for epsilon + //- Return the effective diffusivity for epsilon (LUU:Eq. 4) tmp DepsilonEff() const { return tmp @@ -236,17 +251,18 @@ public: ); } - //- Return the effective diffusivity for phit + //- Return the effective diffusivity for phit (LUU:Eq. 17) tmp DphitEff() const { - return tmp - ( - new volScalarField - ( - "DphitEff", - this->nut_/sigmaPhit_ + this->nu() - ) - ); + auto tfld = + tmp::New("DphitEff", this->nut_/sigmaPhit_); + + if (includeNu_) + { + tfld.ref() += this->nu(); + } + + return tfld; } //- Return the turbulent kinetic energy field From 3be7610710c5d0242c83e6fa6456e993b8f8d24e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 27 Jan 2020 11:04:25 +0100 Subject: [PATCH 3/8] BUG: incorrect Nastran surface output and segmentation faults #1571 - indexing error in the output of values resulted in uniform output in most cases. - allocation error for on-the-fly triangulation ENH: changed decomposed storage from DynamicList to plain faceList for clearer allocation control and better overhead --- .../writers/nastran/nastranSurfaceWriter.C | 50 ++++++++++--------- .../writers/nastran/nastranSurfaceWriter.H | 16 +++--- .../nastran/nastranSurfaceWriterImpl.C | 25 ++++++---- 3 files changed, 49 insertions(+), 42 deletions(-) diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriter.C b/src/surfMesh/writers/nastran/nastranSurfaceWriter.C index 3bfd799dad..69d4ae84d4 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriter.C +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriter.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -129,8 +129,8 @@ void Foam::surfaceWriters::nastranWriter::writeFace Ostream& os, const word& faceType, const labelUList& facePts, - const label nFace, - const label PID + const label elemId, + const label propId ) const { // Only valid surface elements are CTRIA3 and CQUAD4 @@ -147,12 +147,12 @@ void Foam::surfaceWriters::nastranWriter::writeFace // For CTRIA3 elements, cols 7 onwards are not used - writeKeyword(os, faceType) << separator_; + writeKeyword(os, faceType) << separator_; os.setf(std::ios_base::right); - writeValue(os, nFace) << separator_; - writeValue(os, PID); + writeValue(os, elemId) << separator_; + writeValue(os, propId); switch (writeFormat_) { @@ -204,7 +204,7 @@ void Foam::surfaceWriters::nastranWriter::writeGeometry ( Ostream& os, const meshedSurf& surf, - List>& decomposedFaces + List& decomposedFaces ) const { const pointField& points = surf.points(); @@ -222,42 +222,46 @@ void Foam::surfaceWriters::nastranWriter::writeGeometry writeCoord(os, points[pointi], pointi); } - // Write faces + // Write faces, with on-the-fly decomposition (triangulation) decomposedFaces.clear(); - decomposedFaces.setSize(faces.size()); + decomposedFaces.resize(faces.size()); os << "$" << nl << "$ Faces" << nl << "$" << nl; - label nFace = 0; // the element-id + label elemId = 0; // The element-id forAll(faces, facei) { const face& f = faces[facei]; + faceList& decomp = decomposedFaces[facei]; + // 1-offset for PID - const label PID = 1 + (facei < zones.size() ? zones[facei] : 0); + const label propId = 1 + (facei < zones.size() ? zones[facei] : 0); if (f.size() == 3) { - writeFace(os, "CTRIA3", f, ++nFace, PID); - decomposedFaces[facei].append(f); + writeFace(os, "CTRIA3", f, ++elemId, propId); + decomp.resize(1); + decomp[0] = f; } else if (f.size() == 4) { - writeFace(os, "CQUAD4", f, ++nFace, PID); - decomposedFaces[facei].append(f); + writeFace(os, "CQUAD4", f, ++elemId, propId); + decomp.resize(1); + decomp[0] = f; } else { // Decompose poly face into tris - label nTri = 0; - faceList triFaces; - f.triangles(points, nTri, triFaces); + decomp.resize(f.nTriangles()); - forAll(triFaces, trii) + label nTri = 0; + f.triangles(points, nTri, decomp); + + for (const face& f2 : decomp) { - writeFace(os, "CTRIA3", triFaces[trii], ++nFace, PID); - decomposedFaces[facei].append(triFaces[trii]); + writeFace(os, "CTRIA3", f2, ++elemId, propId); } } } @@ -275,7 +279,7 @@ Foam::Ostream& Foam::surfaceWriters::nastranWriter::writeFooter labelList pidsUsed = labelHashSet(surf.zoneIds()).sortedToc(); if (pidsUsed.empty()) { - pidsUsed.setSize(1, Zero); // fallback + pidsUsed.resize(1, Zero); // fallback } for (auto pid : pidsUsed) @@ -431,7 +435,7 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::write() << "$" << nl << "BEGIN BULK" << nl; - List> decomposedFaces; + List decomposedFaces; writeGeometry(os, surf, decomposedFaces); writeFooter(os, surf) diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriter.H b/src/surfMesh/writers/nastran/nastranSurfaceWriter.H index 4bd29f5c72..d2c0da73f4 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriter.H +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriter.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -151,8 +151,8 @@ private: Ostream& os, const word& faceType, const labelUList& facePts, - const label EID, //!< 1-based Element Id - const label PID //!< 1-based Property Id + const label elemId, //!< 1-based Element Id + const label propId //!< 1-based Property Id ) const; //- Main driver to write the surface mesh geometry @@ -160,7 +160,7 @@ private: ( Ostream& os, const meshedSurf& surf, - List>& decomposedFaces + List& decomposedFaces ) const; //- Write the formatted keyword to the output stream @@ -184,7 +184,7 @@ private: Ostream& os, const loadFormat format, const Type& value, - const label EID //!< 1-based Element Id + const label elemId //!< 1-based Element Id ) const; @@ -199,16 +199,16 @@ private: public: - //- Runtime type information + //- Declare type-name, virtual type (with debug switch) TypeNameNoDebug("nastran"); // Constructors - //- Construct null + //- Default construct. Default SHORT format nastranWriter(); - //- Construct with some output options + //- Construct with some output options. Default LONG format explicit nastranWriter(const dictionary& options); //- Construct from components diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C b/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C index da1014b0c4..3b29d8a2c2 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriterImpl.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -70,7 +70,7 @@ Foam::Ostream& Foam::surfaceWriters::nastranWriter::writeFaceValue Ostream& os, const loadFormat format, const Type& value, - const label EID + const label elemId ) const { // Fixed short/long formats supporting PLOAD2 and PLOAD4: @@ -87,7 +87,7 @@ Foam::Ostream& Foam::surfaceWriters::nastranWriter::writeFaceValue // 3 EID : element ID // 4 onwards : load values - label SID = 1; + const label setId = 1; Type scaledValue = scale_*value; @@ -98,7 +98,7 @@ Foam::Ostream& Foam::surfaceWriters::nastranWriter::writeFaceValue // Write load set ID os.setf(std::ios_base::right); - writeValue(os, SID) << separator_; + writeValue(os, setId) << separator_; switch (format) { @@ -119,13 +119,13 @@ Foam::Ostream& Foam::surfaceWriters::nastranWriter::writeFaceValue writeValue(os, scalar(0)) << separator_; } - writeValue(os, EID); + writeValue(os, elemId); break; } case loadFormat::PLOAD4 : { - writeValue(os, EID); + writeValue(os, elemId); for (direction d = 0; d < pTraits::nComponents; ++d) { @@ -197,7 +197,7 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::writeTemplate mkDir(outputFile.path()); } - const scalar timeValue = 0.0; + const scalar timeValue(0); OFstream os(outputFile); fileFormats::NASCore::setPrecision(os, writeFormat_); @@ -214,7 +214,7 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::writeTemplate << "$" << nl << "BEGIN BULK" << nl; - List> decomposedFaces; + List decomposedFaces; writeGeometry(os, surf, decomposedFaces); os << "$" << nl @@ -225,7 +225,7 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::writeTemplate if (this->isPointData()) { - for (const DynamicList& dFaces : decomposedFaces) + for (const faceList& dFaces : decomposedFaces) { for (const face& f : dFaces) { @@ -243,12 +243,15 @@ Foam::fileName Foam::surfaceWriters::nastranWriter::writeTemplate } else { - for (const DynamicList& dFaces : decomposedFaces) + auto valIter = values.cbegin(); + + for (const faceList& dFaces : decomposedFaces) { forAll(dFaces, facei) { - writeFaceValue(os, format, values[facei], ++elemId); + writeFaceValue(os, format, *valIter, ++elemId); } + ++valIter; } } From 21de95bb818f56499b84362e3b06bcf9a2d6a9f6 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 28 Jan 2020 16:08:53 +0100 Subject: [PATCH 4/8] COMP: exprResultGlobals typo in FULLDEBUG --- src/OpenFOAM/expressions/exprResult/exprResultGlobals.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/expressions/exprResult/exprResultGlobals.C b/src/OpenFOAM/expressions/exprResult/exprResultGlobals.C index cd3d302fcb..04e270d641 100644 --- a/src/OpenFOAM/expressions/exprResult/exprResultGlobals.C +++ b/src/OpenFOAM/expressions/exprResult/exprResultGlobals.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2018 Bernhard Gschaider - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -203,7 +203,7 @@ Foam::expressions::exprResultGlobals::get { WarningInFunction << "No scope " << scopeName << " for " << name << nl - << "Known global scopes: " << variables_.sortToc() << nl; + << "Known global scopes: " << variables_.sortedToc() << nl; } #endif } From e252ec46dcd8620de1be040b85f160329ca0d85e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 28 Jan 2020 16:09:18 +0100 Subject: [PATCH 5/8] COMP: backport of updates for gcc-92 compilation --- .../indexedVertex/indexedVertex.H | 7 ++++ .../containers/Bits/PackedList/PackedList.H | 6 ++++ src/OpenFOAM/containers/Bits/bitSet/bitSet.H | 6 ++++ .../HashTables/HashTable/HashTable.H | 7 ++-- .../linkTypes/DLListBase/DLListBase.H | 3 ++ .../linkTypes/SLListBase/SLListBase.H | 3 ++ .../containers/Lists/SubList/SubList.H | 6 ++++ src/OpenFOAM/containers/Lists/UList/UList.H | 6 ++++ src/OpenFOAM/db/IOobject/IOobject.H | 13 +++++--- .../IOobjects/IOdictionary/baseIOdictionary.C | 6 ---- .../IOobjects/IOdictionary/baseIOdictionary.H | 18 +++++++--- .../db/IOstreams/IOstreams/IOstream.H | 13 +++++--- src/OpenFOAM/db/IOstreams/IOstreams/Istream.H | 13 +++++--- src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H | 13 +++++--- src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H | 9 +++-- src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C | 28 ++++++++++++++++ src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H | 24 ++++++++++---- src/OpenFOAM/db/error/IOerror.C | 2 +- src/OpenFOAM/db/error/error.C | 2 +- src/OpenFOAM/db/error/error.H | 4 +-- .../basic/value/valuePointPatchField.H | 6 ++++ .../interpolation2DTable.C | 28 +++++++++++++--- .../interpolation2DTable.H | 5 ++- .../interpolationTable/interpolationTable.C | 29 ++++++++++++---- .../interpolationTable/interpolationTable.H | 5 ++- .../Identifiers/patch/patchIdentifier.H | 16 ++++++--- .../Identifiers/surface/surfZoneIdentifier.H | 9 +++++ .../primitives/SymmTensor/SymmTensor.H | 15 +++++++-- .../primitives/SymmTensor/SymmTensorI.H | 5 --- .../primitives/SymmTensor2D/SymmTensor2D.H | 15 +++++++-- .../primitives/SymmTensor2D/SymmTensor2DI.H | 5 --- src/OpenFOAM/primitives/Tensor/Tensor.H | 15 +++++++-- src/OpenFOAM/primitives/Tensor/TensorI.H | 5 --- src/OpenFOAM/primitives/Tensor2D/Tensor2D.H | 9 ++++- src/OpenFOAM/primitives/Vector/Vector.H | 15 +++++++-- src/OpenFOAM/primitives/Vector/VectorI.H | 5 --- src/OpenFOAM/primitives/Vector2D/Vector2D.H | 15 +++++++-- src/OpenFOAM/primitives/Vector2D/Vector2DI.H | 5 --- src/OpenFOAM/primitives/complex/complex.H | 23 +++++++++---- src/OpenFOAM/primitives/complex/complexI.H | 7 ---- .../functions/Function1/Uniform/Uniform.H | 17 ++++++---- .../functions/Polynomial/Polynomial.C | 12 ------- .../functions/Polynomial/Polynomial.H | 3 -- .../vectorTensorTransform.H | 14 ++++++-- .../vectorTensorTransformI.H | 11 ------- .../primitives/quaternion/quaternion.H | 16 ++++++--- .../primitives/quaternion/quaternionI.H | 10 ------ .../primitives/random/Random/Random.C | 8 ++--- .../primitives/random/Random/Random.H | 8 ++--- .../primitives/septernion/septernion.H | 19 ++++++++--- .../primitives/septernion/septernionI.H | 11 +++---- src/dynamicMesh/boundaryPatch/boundaryPatch.C | 24 ++------------ src/dynamicMesh/boundaryPatch/boundaryPatch.H | 15 ++++----- .../directions/directionInfo/directionInfo.H | 3 -- .../directions/directionInfo/directionInfoI.H | 8 ----- .../wallNormalInfo/wallNormalInfo.H | 3 +- .../wallNormalInfo/wallNormalInfoI.H | 7 ---- .../pointPatchDist/externalPointEdgePoint.H | 3 -- .../pointPatchDist/externalPointEdgePointI.H | 10 ------ src/engine/ignition/ignitionSite.H | 6 ++++ .../finiteVolume/fvc/fvcSmooth/smoothData.H | 9 +++++ .../finiteVolume/fvc/fvcSmooth/sweepData.H | 9 +++++ .../fieldSelection/fieldSelectionI.H | 4 +-- .../referredWallFace/referredWallFace.C | 29 ---------------- .../referredWallFace/referredWallFace.H | 16 ++++----- .../CollisionRecordList/CollisionRecordList.C | 33 ------------------- .../CollisionRecordList/CollisionRecordList.H | 17 ++++------ .../phaseProperties/phaseProperties.C | 10 ------ .../phaseProperties/phaseProperties.H | 7 ---- .../phaseProperties/phasePropertiesIO.C | 6 +--- .../ParticleForces/forceSuSp/forceSuSp.H | 8 ++--- .../ParticleForces/forceSuSp/forceSuSpI.H | 11 ------- .../SingleKineticRateDevolatilisation.C | 23 ------------- .../SingleKineticRateDevolatilisation.H | 19 +---------- .../blockDescriptor/blockDescriptor.H | 9 +++-- .../PatchEdgeFaceWave/patchEdgeFaceInfo.H | 3 -- .../PatchEdgeFaceWave/patchEdgeFaceInfoI.H | 8 ----- .../algorithms/PointEdgeWave/PointData.H | 3 -- .../algorithms/PointEdgeWave/PointDataI.H | 8 ----- .../algorithms/PointEdgeWave/pointEdgePoint.H | 3 -- .../PointEdgeWave/pointEdgePointI.H | 8 ----- src/meshTools/cellClassification/cellInfo.H | 7 ++-- src/meshTools/cellClassification/cellInfoI.H | 12 ++----- src/meshTools/cellDist/wallPoint/wallPoint.H | 3 -- src/meshTools/cellDist/wallPoint/wallPointI.H | 7 ---- .../sixDoFRigidBodyMotionState.C | 20 ----------- .../sixDoFRigidBodyMotionState.H | 7 ---- src/surfMesh/surfZone/surfZone.C | 8 ----- src/surfMesh/surfZone/surfZone.H | 12 +++++-- .../patches/geometricSurfacePatch.H | 10 ++++++ .../const/constAnIsoSolidTransport.H | 3 +- .../const/constAnIsoSolidTransportI.H | 10 ------ .../transport/const/constIsoSolidTransport.H | 5 ++- .../transport/const/constIsoSolidTransportI.H | 11 ------- .../exponential/exponentialSolidTransport.H | 5 ++- .../exponential/exponentialSolidTransportI.H | 13 -------- .../polynomial/polynomialSolidTransport.H | 5 ++- .../polynomial/polynomialSolidTransportI.H | 12 ------- .../icoPolynomial/icoPolynomial.H | 5 ++- .../icoPolynomial/icoPolynomialI.H | 12 ------- .../incompressiblePerfectGas.H | 5 ++- .../incompressiblePerfectGasI.H | 11 ------- .../specie/specie/specie.H | 10 +++++- .../thermo/hPolynomial/hPolynomialThermo.H | 3 +- .../thermo/hPolynomial/hPolynomialThermoI.H | 16 --------- .../specie/transport/WLF/WLFTransport.H | 4 +-- .../specie/transport/WLF/WLFTransportI.H | 16 --------- .../specie/transport/const/constTransport.H | 4 +-- .../specie/transport/const/constTransportI.H | 13 -------- .../logPolynomial/logPolynomialTransport.H | 4 +-- .../logPolynomial/logPolynomialTransportI.H | 13 -------- .../polynomial/polynomialTransport.H | 4 +-- .../polynomial/polynomialTransportI.H | 13 -------- .../sutherland/sutherlandTransport.H | 4 +-- .../sutherland/sutherlandTransportI.H | 13 -------- 115 files changed, 476 insertions(+), 701 deletions(-) diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H index 17eae124f7..75796f0acd 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H @@ -144,6 +144,13 @@ public: typedef indexedVertex Other; }; + + // Generated Methods + + //- Copy construct + indexedVertex(const indexedVertex&) = default; + + // Constructors inline indexedVertex(); diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H index 47525c617e..4157814cbb 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H @@ -472,6 +472,12 @@ public: public: + //- Copy construct + reference(const reference&) = default; + + //- Move construct + reference(reference&&) = default; + //- Value assignment inline void operator=(const reference& other); diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H index a617a9434d..1ef3dd638b 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H @@ -447,6 +447,12 @@ public: public: + //- Copy construct + reference(const reference&) = default; + + //- Move construct + reference(reference&&) = default; + //- Flip the bit at the position, no range-checking inline void flip(); diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index 9fc07ea5e8..9af8f1fa70 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -741,8 +741,11 @@ public: // Constructors - //- Construct null (end iterator) - inline const_iterator() = default; + //- Default construct (end iterator) + const_iterator() = default; + + //- Copy construct + const_iterator(const const_iterator&) = default; //- Copy construct from similar access type inline explicit const_iterator(const Iterator& iter) diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index 3c8bff4203..7bcaa2a99c 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H @@ -233,6 +233,9 @@ public: public: + //- Copy construct + iterator(const iterator&) = default; + //- Construct for a node on a list inline iterator(DLListBase* list, link* item); diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H index ccc7c9ab97..4dba620516 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H @@ -209,6 +209,9 @@ public: public: + //- Copy construct + iterator(const iterator&) = default; + //- Construct for a node on the list inline iterator(SLListBase* list, link* item); diff --git a/src/OpenFOAM/containers/Lists/SubList/SubList.H b/src/OpenFOAM/containers/Lists/SubList/SubList.H index 4d9773d706..80b9c7dd41 100644 --- a/src/OpenFOAM/containers/Lists/SubList/SubList.H +++ b/src/OpenFOAM/containers/Lists/SubList/SubList.H @@ -76,6 +76,12 @@ public: inline static const SubList& null(); + // Generated Methods + + //- Copy construct + SubList(const SubList&) = default; + + // Constructors //- Construct from UList, the entire size diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H index 3ce31eb20b..c8ff893f95 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.H +++ b/src/OpenFOAM/containers/Lists/UList/UList.H @@ -208,6 +208,12 @@ public: }; + // Generated Methods + + //- Copy construct + UList(const UList&) = default; + + // Constructors //- Null constructor diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index 2496c63b5c..3b7f3fd271 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -267,6 +267,15 @@ public: ); + // Generated Methods + + //- Copy construct + IOobject(const IOobject&) = default; + + //- Destructor + virtual ~IOobject() = default; + + // Constructors //- Construct from name, instance, registry, io options @@ -336,10 +345,6 @@ public: } - //- Destructor - virtual ~IOobject() = default; - - // Member Functions // General access diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C index f761b155bf..865d221b7b 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C @@ -77,12 +77,6 @@ Foam::baseIOdictionary::baseIOdictionary } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -Foam::baseIOdictionary::~baseIOdictionary() -{} - - // * * * * * * * * * * * * * * * Members Functions * * * * * * * * * * * * * // const Foam::word& Foam::baseIOdictionary::name() const diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H index 1cbe9a27bb..772b33f114 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H @@ -68,6 +68,18 @@ public: TypeName("dictionary"); + // Generated Methods + + //- Copy construct + baseIOdictionary(const baseIOdictionary&) = default; + + //- Move construct + baseIOdictionary(baseIOdictionary&&) = default; + + //- Destructor + virtual ~baseIOdictionary() = default; + + // Constructors //- Construct given an IOobject @@ -80,11 +92,7 @@ public: baseIOdictionary(const IOobject&, Istream&); - //- Destructor - virtual ~baseIOdictionary(); - - - // Member functions + // Member Functions //- Return complete path + object name if the file exists // either in the case/processor or case otherwise null diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H index a2f5515fc2..8985560a32 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H @@ -147,6 +147,15 @@ protected: public: + // Generated Methods + + //- Copy construct + IOstream(const IOstream&) = default; + + //- Destructor + virtual ~IOstream() = default; + + // Constructors //- Construct with specified stream option @@ -174,10 +183,6 @@ public: {} - //- Destructor - virtual ~IOstream() = default; - - // Member Functions // Access diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H index c37f55950d..7ab49e2315 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H @@ -74,6 +74,15 @@ class Istream public: + // Generated Methods + + //- Copy construct + Istream(const Istream&) = default; + + //- Destructor + virtual ~Istream() = default; + + // Constructors //- Construct and set stream status @@ -89,10 +98,6 @@ public: {} - //- Destructor - virtual ~Istream() = default; - - // Member Functions // Read Functions diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H index 6b0696e2b1..27b24faef2 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H @@ -74,6 +74,15 @@ protected: public: + // Generated Methods + + //- Copy construct + Ostream(const Ostream&) = default; + + //- Destructor + virtual ~Ostream() = default; + + // Constructors //- Construct and set stream status @@ -88,10 +97,6 @@ public: {} - //- Destructor - virtual ~Ostream() = default; - - // Member Functions // Write Functions diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H index 018cd79987..c5b3b8effa 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H @@ -62,14 +62,17 @@ class OSstream std::ostream& os_; - // Private Member Functions +public: + + // Generated Methods + + //- Copy construct + OSstream(const OSstream&) = default; //- No copy assignment void operator=(const OSstream&) = delete; -public: - // Constructors //- Construct as wrapper around std::ostream and set stream status diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C index f61de4c53b..6198296bf8 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C @@ -453,4 +453,32 @@ void Foam::ITstream::append(tokenList&& newTokens, const bool lazy) } +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +void Foam::ITstream::operator=(const ITstream& is) +{ + Istream::operator=(is); + tokenList::operator=(is); + name_ = is.name_; + + rewind(); +} + + +void Foam::ITstream::operator=(const tokenList& toks) +{ + tokenList::operator=(toks); + + rewind(); +} + + +void Foam::ITstream::operator=(tokenList&& toks) +{ + tokenList::operator=(std::move(toks)); + + rewind(); +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H index 170285844e..8abfb3c33c 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H @@ -328,14 +328,26 @@ public: } - // Output + // Output - //- Print description of stream to Ostream - void print(Ostream& os) const; + //- Print stream description to Ostream + void print(Ostream& os) const; - //- Concatenate tokens into a space-separated std::string. - //- The resulting string may contain quote characters. - std::string toString() const; + //- Concatenate tokens into a space-separated std::string. + //- The resulting string may contain quote characters. + std::string toString() const; + + + // Member Operators + + //- Copy assignment, with rewind() + void operator=(const ITstream& is); + + //- Copy assignment of tokens, with rewind() + void operator=(const tokenList& toks); + + //- Move assignment of tokens, with rewind() + void operator=(tokenList&& toks); }; diff --git a/src/OpenFOAM/db/error/IOerror.C b/src/OpenFOAM/db/error/IOerror.C index 55e7de0645..203d5e545a 100644 --- a/src/OpenFOAM/db/error/IOerror.C +++ b/src/OpenFOAM/db/error/IOerror.C @@ -55,7 +55,7 @@ Foam::IOerror::IOerror(const dictionary& errDict) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::IOerror::~IOerror() throw() +Foam::IOerror::~IOerror() noexcept {} diff --git a/src/OpenFOAM/db/error/error.C b/src/OpenFOAM/db/error/error.C index ecb74cdf64..cbf12f19eb 100644 --- a/src/OpenFOAM/db/error/error.C +++ b/src/OpenFOAM/db/error/error.C @@ -129,7 +129,7 @@ Foam::error::error(const error& err) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::error::~error() throw() +Foam::error::~error() noexcept { delete messageStreamPtr_; } diff --git a/src/OpenFOAM/db/error/error.H b/src/OpenFOAM/db/error/error.H index 7717bb002f..e06848ae45 100644 --- a/src/OpenFOAM/db/error/error.H +++ b/src/OpenFOAM/db/error/error.H @@ -95,7 +95,7 @@ public: //- Destructor - virtual ~error() throw(); + virtual ~error() noexcept; // Static Member Functions @@ -239,7 +239,7 @@ public: //- Destructor - virtual ~IOerror() throw(); + virtual ~IOerror() noexcept; // Member functions diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H index 23336a4fe3..0d9c313361 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -60,6 +60,12 @@ public: TypeName("value"); + // Generated Methods + + //- Copy construct + valuePointPatchField(const valuePointPatchField&) = default; + + // Constructors //- Construct from patch and internal field diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C index f417b3a24a..a10cbc0586 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -114,13 +114,13 @@ Foam::interpolation2DTable::interpolation2DTable(const dictionary& dict) template Foam::interpolation2DTable::interpolation2DTable ( - const interpolation2DTable& interpTable + const interpolation2DTable& tbl ) : - List(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_.clone()) {} @@ -218,6 +218,24 @@ Foam::label Foam::interpolation2DTable::Xi // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template +void Foam::interpolation2DTable::operator= +( + const interpolation2DTable& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + reader_.reset(rhs.reader_.clone()); +} + + template Type Foam::interpolation2DTable::operator() ( diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H index 10aae764b6..aec649e1d4 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H @@ -120,7 +120,7 @@ public: explicit interpolation2DTable(const dictionary& dict); //- Copy construct - interpolation2DTable(const interpolation2DTable& interpTable); + interpolation2DTable(const interpolation2DTable& tbl); // Member Functions @@ -135,6 +135,9 @@ public: // Member Operators + //- Copy assignment + void operator=(const interpolation2DTable& rhs); + //- Return an interpolated value Type operator()(const scalar valueX, const scalar valueY) const; diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index e101a55668..2127abf464 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -118,17 +118,16 @@ Foam::interpolationTable::interpolationTable(const dictionary& dict) template Foam::interpolationTable::interpolationTable ( - const interpolationTable& interpTable + const interpolationTable& tbl ) : - List(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_.clone()) {} - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template @@ -491,6 +490,24 @@ Foam::interpolationTable::interpolateValues // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template +void Foam::interpolationTable::operator= +( + const interpolationTable& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + reader_.reset(rhs.reader_.clone()); +} + + template const Foam::Tuple2& Foam::interpolationTable::operator[](label idx) const diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H index 97ecbc051c..e627813fdc 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H @@ -135,7 +135,7 @@ public: explicit interpolationTable(const dictionary& dict); //- Copy construct - interpolationTable(const interpolationTable& interpTable); + interpolationTable(const interpolationTable& tbl); // Member Functions @@ -172,6 +172,9 @@ public: // Member Operators + //- Copy assignment + void operator=(const interpolationTable& rhs); + //- Return an element of constant Tuple2 const Tuple2& operator[](label idx) const; diff --git a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H index dcdbb63783..e93789a267 100644 --- a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H +++ b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H @@ -73,6 +73,18 @@ class patchIdentifier public: + // Generated Methods + + //- Copy construct + patchIdentifier(const patchIdentifier&) = default; + + //- Copy assignment + patchIdentifier& operator=(const patchIdentifier&) = default; + + //- Destructor + virtual ~patchIdentifier() = default; + + // Constructors //- Construct from components @@ -100,10 +112,6 @@ public: ); - //- Destructor - virtual ~patchIdentifier() = default; - - // Member Functions //- Return the patch name diff --git a/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H b/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H index aec04a0c18..f9762b9ac5 100644 --- a/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H +++ b/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H @@ -78,6 +78,15 @@ public: static const word emptyType; + // Generated Methods + + //- Copy construct + surfZoneIdentifier(const surfZoneIdentifier&) = default; + + //- Copy assignment + surfZoneIdentifier& operator=(const surfZoneIdentifier&) = default; + + // Constructors //- Construct null, with index zero diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H index 998c6b5b33..46d188b757 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H @@ -81,10 +81,19 @@ public: enum components { XX, XY, XZ, YY, YZ, ZZ }; - // Constructors + // Generated Methods - //- Construct null - inline SymmTensor(); + //- Default construct + SymmTensor() = default; + + //- Copy construct + SymmTensor(const SymmTensor&) = default; + + //- Copy assignment + SymmTensor& operator=(const SymmTensor&) = default; + + + // Constructors //- Construct initialized to zero inline SymmTensor(const Foam::zero); diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H index a079fa3a0a..55814644a4 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::SymmTensor::SymmTensor() -{} - - template inline Foam::SymmTensor::SymmTensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H index 3ccdcd9bd8..2156ddb37b 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H @@ -81,10 +81,19 @@ public: enum components { XX, XY, YY }; - // Constructors + // Generated Methods - //- Construct null - inline SymmTensor2D(); + //- Default construct + SymmTensor2D() = default; + + //- Copy construct + SymmTensor2D(const SymmTensor2D&) = default; + + //- Copy assignment + SymmTensor2D& operator=(const SymmTensor2D&) = default; + + + // Constructors //- Construct initialized to zero inline SymmTensor2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H index ff8316e976..8b85636347 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::SymmTensor2D::SymmTensor2D() -{} - - template inline Foam::SymmTensor2D::SymmTensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H index 253bcc00d5..a0443f8038 100644 --- a/src/OpenFOAM/primitives/Tensor/Tensor.H +++ b/src/OpenFOAM/primitives/Tensor/Tensor.H @@ -89,10 +89,19 @@ public: enum components { XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ }; - // Constructors + // Generated Methods - //- Construct null - inline Tensor(); + //- Default construct + Tensor() = default; + + //- Copy construct + Tensor(const Tensor&) = default; + + //- Copy assignment + Tensor& operator=(const Tensor&) = default; + + + // Constructors //- Construct initialized to zero inline Tensor(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index 537f483589..4e8cb92c04 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Tensor::Tensor() -{} - - template inline Foam::Tensor::Tensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H index 688a9f05c3..b96d36ddb5 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H @@ -82,11 +82,18 @@ public: //- Component labeling enumeration enum components { XX, XY, YX, YY }; + // Generated Methods - //- Construct null + //- Default construct Tensor2D() = default; + //- Copy construct + Tensor2D(const Tensor2D&) = default; + + //- Copy assignment + Tensor2D& operator=(const Tensor2D&) = default; + // Constructors diff --git a/src/OpenFOAM/primitives/Vector/Vector.H b/src/OpenFOAM/primitives/Vector/Vector.H index 100a6f704d..5dd9a05ffb 100644 --- a/src/OpenFOAM/primitives/Vector/Vector.H +++ b/src/OpenFOAM/primitives/Vector/Vector.H @@ -81,10 +81,19 @@ public: enum components { X, Y, Z }; - // Constructors + // Generated Methods - //- Construct null - inline Vector(); + //- Default construct + Vector() = default; + + //- Copy construct + Vector(const Vector&) = default; + + //- Copy assignment + Vector& operator=(const Vector&) = default; + + + // Constructors //- Construct initialized to zero inline Vector(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Vector/VectorI.H b/src/OpenFOAM/primitives/Vector/VectorI.H index c831921d04..bccfdb6177 100644 --- a/src/OpenFOAM/primitives/Vector/VectorI.H +++ b/src/OpenFOAM/primitives/Vector/VectorI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Vector::Vector() -{} - - template inline Foam::Vector::Vector(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2D.H b/src/OpenFOAM/primitives/Vector2D/Vector2D.H index 85d6da3307..fe7a8a7a25 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2D.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2D.H @@ -74,10 +74,19 @@ public: enum components { X, Y }; - // Constructors + // Generated Methods - //- Construct null - inline Vector2D(); + //- Default construct + Vector2D() = default; + + //- Copy construct + Vector2D(const Vector2D&) = default; + + //- Copy assignment + Vector2D& operator=(const Vector2D&) = default; + + + // Constructors //- Construct initialized to zero inline Vector2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H index 576e9442ce..a3e0569dcf 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Vector2D::Vector2D() -{} - - template inline Foam::Vector2D::Vector2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/complex/complex.H b/src/OpenFOAM/primitives/complex/complex.H index 15f9ddf082..440d7e448a 100644 --- a/src/OpenFOAM/primitives/complex/complex.H +++ b/src/OpenFOAM/primitives/complex/complex.H @@ -90,14 +90,26 @@ class complex public: + // Generated Methods + + //- Copy construct + complex(const complex&) = default; + + //- Copy assignment + complex& operator=(const complex&) = default; + + //- Move construct + complex(complex&&) = default; + + //- Move assignment + complex& operator=(complex&&) = default; + + // Constructors - //- Construct null as zero-initialized + //- Default construct, as zero-initialized inline constexpr complex() noexcept; - //- Default copy constructor - complex(const complex&) = default; - //- Construct zero-initialized from zero class inline constexpr complex(const Foam::zero) noexcept; @@ -173,9 +185,6 @@ public: } - //- Copy assignment - inline void operator=(const complex& c); - //- Assign zero inline void operator=(const Foam::zero); diff --git a/src/OpenFOAM/primitives/complex/complexI.H b/src/OpenFOAM/primitives/complex/complexI.H index f9b4c8034d..02e231fc78 100644 --- a/src/OpenFOAM/primitives/complex/complexI.H +++ b/src/OpenFOAM/primitives/complex/complexI.H @@ -116,13 +116,6 @@ inline Foam::complex Foam::complex::conjugate() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::complex::operator=(const complex& c) -{ - re = c.re; - im = c.im; -} - - inline void Foam::complex::operator=(const Foam::zero) { re = 0; diff --git a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H index a809ae9a92..8fd251ceeb 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H +++ b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H @@ -63,18 +63,21 @@ class Uniform : public Constant { - // Private Member Functions +public: + + //- Declare type-name, virtual type (with debug switch) + TypeName("uniform"); + + + // Generated Methods + + //- Copy construct + Uniform(const Uniform&) = default; //- No copy assignment void operator=(const Uniform&) = delete; -public: - - // Runtime type information - TypeName("uniform"); - - // Constructors //- Construct from entry name and dictionary diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C index fe32dfbc81..da08030c27 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C @@ -43,18 +43,6 @@ Foam::Polynomial::Polynomial() } -template -Foam::Polynomial::Polynomial -( - const Polynomial& poly -) -: - VectorSpace, scalar, PolySize>(poly), - logActive_(poly.logActive_), - logCoeff_(poly.logCoeff_) -{} - - template Foam::Polynomial::Polynomial(const scalar coeffs[PolySize]) : diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H index f608b638ef..aa89cda78a 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H @@ -108,9 +108,6 @@ public: //- Construct null, with all coefficients = 0.0 Polynomial(); - //- Copy constructor - Polynomial(const Polynomial&); - //- Construct from C-array of coefficients explicit Polynomial(const scalar coeffs[PolySize]); diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H index 7d3831a722..5705294596 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H @@ -88,6 +88,16 @@ public: static const vectorTensorTransform I; + // Generated Methods + + //- Copy construct + vectorTensorTransform(const vectorTensorTransform&) = default; + + //- Copy assignment + vectorTensorTransform& + operator=(const vectorTensorTransform&) = default; + + // Constructors //- Construct null @@ -151,11 +161,11 @@ public: tmp> transform(const Field&) const; - // Member operators + // Member Operators - inline void operator=(const vectorTensorTransform&); inline void operator&=(const vectorTensorTransform&); + //- Assign translation inline void operator=(const vector&); inline void operator+=(const vector&); inline void operator-=(const vector&); diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H index a2c2259c7f..c1c7cf58f7 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H @@ -173,17 +173,6 @@ inline Foam::pointField Foam::vectorTensorTransform::invTransformPosition // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::vectorTensorTransform::operator= -( - const vectorTensorTransform& tr -) -{ - t_ = tr.t_; - R_ = tr.R_; - hasR_ = tr.hasR_; -} - - inline void Foam::vectorTensorTransform::operator&= ( const vectorTensorTransform& tr diff --git a/src/OpenFOAM/primitives/quaternion/quaternion.H b/src/OpenFOAM/primitives/quaternion/quaternion.H index 635b54b7d9..36f2ea6748 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternion.H +++ b/src/OpenFOAM/primitives/quaternion/quaternion.H @@ -127,10 +127,19 @@ public: static const quaternion I; - // Constructors + // Generated Methods - //- Construct null - inline quaternion(); + //- Default construct + quaternion() = default; + + //- Copy construct + quaternion(const quaternion&) = default; + + //- Copy assignment + quaternion& operator=(const quaternion&) = default; + + + // Constructors //- Construct zero initialized inline quaternion(const Foam::zero); @@ -222,7 +231,6 @@ public: // Member Operators - inline void operator=(const quaternion& q); inline void operator+=(const quaternion& q); inline void operator-=(const quaternion& q); inline void operator*=(const quaternion& q); diff --git a/src/OpenFOAM/primitives/quaternion/quaternionI.H b/src/OpenFOAM/primitives/quaternion/quaternionI.H index dd4b949299..810f58b4bd 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternionI.H +++ b/src/OpenFOAM/primitives/quaternion/quaternionI.H @@ -28,10 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::quaternion::quaternion() -{} - - inline Foam::quaternion::quaternion(const Foam::zero) : w_(Zero), @@ -585,12 +581,6 @@ inline Foam::vector Foam::quaternion::eulerAngles // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::quaternion::operator=(const quaternion& q) -{ - w_ = q.w_; - v_ = q.v_; -} - inline void Foam::quaternion::operator+=(const quaternion& q) { w_ += q.w_; diff --git a/src/OpenFOAM/primitives/random/Random/Random.C b/src/OpenFOAM/primitives/random/Random/Random.C index 795522aa6c..7f99ae6d5e 100644 --- a/src/OpenFOAM/primitives/random/Random/Random.C +++ b/src/OpenFOAM/primitives/random/Random/Random.C @@ -40,13 +40,9 @@ Foam::Random::Random(const label seedValue) {} -Foam::Random::Random(const Random& r, const bool reset) +Foam::Random::Random(const Random& rnd, const bool reset) : - seed_(r.seed_), - generator_(r.generator_), - uniform01_(), - hasGaussSample_(r.hasGaussSample_), - gaussSample_(r.gaussSample_) + Random(rnd) { if (reset) { diff --git a/src/OpenFOAM/primitives/random/Random/Random.H b/src/OpenFOAM/primitives/random/Random/Random.H index c09fd3ac58..ba1040537f 100644 --- a/src/OpenFOAM/primitives/random/Random/Random.H +++ b/src/OpenFOAM/primitives/random/Random/Random.H @@ -101,12 +101,8 @@ public: //- Construct with seed value explicit Random(const label seedValue = defaultSeed); - //- Copy construct with optional reset of seed - Random(const Random& r, const bool reset = false); - - - //- Destructor - ~Random() = default; + //- Copy construct with possible reset of seed + Random(const Random& rnd, const bool reset); // Member Functions diff --git a/src/OpenFOAM/primitives/septernion/septernion.H b/src/OpenFOAM/primitives/septernion/septernion.H index 53e5a53c23..9ba291e750 100644 --- a/src/OpenFOAM/primitives/septernion/septernion.H +++ b/src/OpenFOAM/primitives/septernion/septernion.H @@ -85,10 +85,22 @@ public: static const septernion I; + // Generated Methods + + //- Default construct + septernion() = default; + + //- Copy construct + septernion(const septernion&) = default; + + //- Copy assignment + septernion& operator=(const septernion&) = default; + + // Constructors - //- Construct null - inline septernion(); + //- Construct zero initialized + inline septernion(const Foam::zero); //- Construct given a translation vector and rotation quaternion inline septernion(const vector& t, const quaternion& r); @@ -129,9 +141,8 @@ public: inline vector invTransformPoint(const vector& v) const; - // Member operators + // Member Operators - inline void operator=(const septernion&); inline void operator*=(const septernion&); inline void operator=(const vector&); diff --git a/src/OpenFOAM/primitives/septernion/septernionI.H b/src/OpenFOAM/primitives/septernion/septernionI.H index 81036dc53a..09646c6d4c 100644 --- a/src/OpenFOAM/primitives/septernion/septernionI.H +++ b/src/OpenFOAM/primitives/septernion/septernionI.H @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::septernion::septernion() +inline Foam::septernion::septernion(const Foam::zero) +: + t_(Zero), + r_(Zero) {} inline Foam::septernion::septernion(const vector& t, const quaternion& r) @@ -95,12 +98,6 @@ inline Foam::vector Foam::septernion::invTransformPoint(const vector& v) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::septernion::operator=(const septernion& tr) -{ - t_ = tr.t_; - r_ = tr.r_; -} - inline void Foam::septernion::operator*=(const septernion& tr) { t_ = tr.t() + tr.r().invTransform(t_); diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.C b/src/dynamicMesh/boundaryPatch/boundaryPatch.C index 8164e34709..d22f700053 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.C +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.C @@ -59,34 +59,14 @@ Foam::boundaryPatch::boundaryPatch {} -Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p) -: - patchIdentifier(p.name(), p.index(), p.physicalType()), - size_(p.size()), - start_(p.start()) -{} - - Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index) : - patchIdentifier(p.name(), index, p.physicalType()), - size_(p.size()), - start_(p.start()) -{} - - -Foam::autoPtr Foam::boundaryPatch::clone() const + boundaryPatch(p) { - return autoPtr::New(*this); + patchIdentifier::index() = index; } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::boundaryPatch::~boundaryPatch() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::boundaryPatch::write(Ostream& os) const diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.H b/src/dynamicMesh/boundaryPatch/boundaryPatch.H index de01b05e3b..02a2828ae4 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.H +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.H @@ -88,18 +88,15 @@ public: const label index ); - //- Construct as copy - boundaryPatch(const boundaryPatch&); + //- Copy construct, resetting the index + boundaryPatch(const boundaryPatch& p, const label index); - //- Construct as copy, resetting the index - boundaryPatch(const boundaryPatch&, const label index); //- Clone - autoPtr clone() const; - - - //- Destructor - ~boundaryPatch(); + autoPtr clone() const + { + return autoPtr::New(*this); + } // Member Functions diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H index 4865e8f2d1..5ac870c5fd 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H @@ -140,9 +140,6 @@ public: const vector& n ); - //- Construct as copy - inline directionInfo(const directionInfo&); - // Member Functions diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H index a689f76e76..6b814e14ba 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H @@ -51,14 +51,6 @@ inline Foam::directionInfo::directionInfo {} -// Construct as copy -inline Foam::directionInfo::directionInfo(const directionInfo& w2) -: - index_(w2.index()), - n_(w2.n()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H index 73da1fab90..2e88688fe9 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H @@ -86,8 +86,7 @@ public: //- Construct from normal inline wallNormalInfo(const vector& normal); - //- Construct as copy - inline wallNormalInfo(const wallNormalInfo&); + // Member Functions diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H index 92bfc65c85..ae65d7e84e 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H @@ -74,13 +74,6 @@ inline Foam::wallNormalInfo::wallNormalInfo(const vector& normal) {} -// Construct as copy -inline Foam::wallNormalInfo::wallNormalInfo(const wallNormalInfo& wpt) -: - normal_(wpt.normal()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::vector& Foam::wallNormalInfo::normal() const diff --git a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H index d38c265c8f..197ad49aec 100644 --- a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H +++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H @@ -121,9 +121,6 @@ public: //- Construct from origin, distance inline externalPointEdgePoint(const point&, const scalar); - //- Construct as copy - inline externalPointEdgePoint(const externalPointEdgePoint&); - // Member Functions diff --git a/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H b/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H index 78e18f1d8e..895e6bc934 100644 --- a/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H +++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H @@ -135,16 +135,6 @@ inline Foam::externalPointEdgePoint::externalPointEdgePoint {} -inline Foam::externalPointEdgePoint::externalPointEdgePoint -( - const externalPointEdgePoint& wpt -) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::externalPointEdgePoint::origin() const diff --git a/src/engine/ignition/ignitionSite.H b/src/engine/ignition/ignitionSite.H index 3f3f0f0484..30b25885b3 100644 --- a/src/engine/ignition/ignitionSite.H +++ b/src/engine/ignition/ignitionSite.H @@ -112,6 +112,12 @@ public: }; + // Generated Methods + + //- Copy construct + ignitionSite(const ignitionSite&) = default; + + // Constructors //- Construct from Istream and database diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H index f425d03634..3bbd68dcbe 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H @@ -84,6 +84,15 @@ private: public: + // Generated Methods + + //- Copy construct + smoothData(const smoothData&) = default; + + //- Copy assignment + smoothData& operator=(const smoothData&) = default; + + // Constructors //- Construct null diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H index aad84f2337..2a7530e4e0 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H @@ -69,6 +69,15 @@ class sweepData public: + // Generated Methods + + //- Copy construct + sweepData(const sweepData&) = default; + + //- Copy assignment + sweepData& operator=(const sweepData&) = default; + + // Constructors //- Construct null diff --git a/src/finiteVolume/functionObjects/fieldSelections/fieldSelection/fieldSelectionI.H b/src/finiteVolume/functionObjects/fieldSelections/fieldSelection/fieldSelectionI.H index 5a35da3e99..40a306c4a4 100644 --- a/src/finiteVolume/functionObjects/fieldSelections/fieldSelection/fieldSelectionI.H +++ b/src/finiteVolume/functionObjects/fieldSelections/fieldSelection/fieldSelectionI.H @@ -29,9 +29,9 @@ inline Foam::HashSet Foam::functionObjects::fieldSelection::filters() const { HashSet f; - for (const auto fieldInfo : *this) + for (const fieldInfo& fi : *this) { - f.insert(fieldInfo.name()); + f.insert(fi.name()); } return f; diff --git a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C index 1637cfa145..4b64bad0f8 100644 --- a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C +++ b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C @@ -29,14 +29,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::referredWallFace::referredWallFace() -: - face(), - pts_(), - patchi_() -{} - - Foam::referredWallFace::referredWallFace ( const face& f, @@ -57,27 +49,6 @@ Foam::referredWallFace::referredWallFace } -Foam::referredWallFace::referredWallFace(const referredWallFace& rWF) -: - face(rWF), - pts_(rWF.pts_), - patchi_(rWF.patchi_) -{ - if (this->size() != pts_.size()) - { - FatalErrorInFunction - << "Face and pointField are not the same size. " << nl << (*this) - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::referredWallFace::~referredWallFace() -{} - - // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // bool Foam::referredWallFace::operator==(const referredWallFace& rhs) const diff --git a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H index 19836e5180..88173d2a0c 100644 --- a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H +++ b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H @@ -76,10 +76,13 @@ class referredWallFace public: - // Constructors + // Generated Methods - //- Construct null - referredWallFace(); + //- Default construct + referredWallFace() = default; + + + // Constructors //- Construct from components referredWallFace @@ -89,13 +92,6 @@ public: label patchi ); - //- Construct as copy - referredWallFace(const referredWallFace&); - - - //- Destructor - ~referredWallFace(); - // Member Functions diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C index fecdcb9177..3e38d8d720 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C @@ -31,14 +31,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::CollisionRecordList::CollisionRecordList() -: - pairRecords_(), - wallRecords_() -{} - - template Foam::CollisionRecordList::CollisionRecordList(Istream& is) : @@ -123,13 +115,6 @@ Foam::CollisionRecordList::CollisionRecordList } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * / - -template -Foam::CollisionRecordList::~CollisionRecordList() -{} - - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // template @@ -386,24 +371,6 @@ void Foam::CollisionRecordList::update() } -// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // - -template -void Foam::CollisionRecordList::operator= -( - const CollisionRecordList& rhs -) -{ - if (this == &rhs) - { - return; // Self-assignment is a no-op - } - - pairRecords_ = rhs.pairRecords_; - wallRecords_ = rhs.wallRecords_; -} - - // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H index f59e29e308..39ca34346f 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H @@ -90,10 +90,13 @@ class CollisionRecordList public: - // Constructors + // Generated Methods - //- Construct null - CollisionRecordList(); + //- Default construct + CollisionRecordList() = default; + + + // Constructors //- Construct from Istream CollisionRecordList(Istream&); @@ -110,9 +113,6 @@ public: const Field& wallData ); - //- Destructor - ~CollisionRecordList(); - // Member Functions @@ -196,11 +196,6 @@ public: void update(); - // Member Operators - - void operator=(const CollisionRecordList&); - - // Friend Operators friend bool operator== diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index bf957935ed..35076e8718 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -188,16 +188,6 @@ Foam::phaseProperties::phaseProperties() {} -Foam::phaseProperties::phaseProperties(const phaseProperties& pp) -: - phase_(pp.phase_), - stateLabel_(pp.stateLabel_), - names_(pp.names_), - Y_(pp.Y_), - carrierIds_(pp.carrierIds_) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::phaseProperties::reorder diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H index cd4993e68d..63206d4033 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -124,13 +124,6 @@ public: //- Construct from Istream phaseProperties(Istream& is); - //- Construct as copy - phaseProperties(const phaseProperties& pp); - - - //- Destructor - ~phaseProperties() = default; - // Public Member Functions diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C index ae1e30ed5f..518ab6e03a 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -32,11 +32,7 @@ License Foam::phaseProperties::phaseProperties(Istream& is) : - phase_(UNKNOWN), - stateLabel_("(unknown)"), - names_(), - Y_(), - carrierIds_() + phaseProperties() { is >> *this; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H index 90aa101bc1..22ac751f04 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H @@ -65,13 +65,12 @@ class forceSuSp : public Tuple2 { - public: // Constructors - //- Construct null - inline forceSuSp(); + //- Default construct + forceSuSp() = default; //- Construct zero-initialized content inline forceSuSp(const zero); @@ -108,9 +107,6 @@ public: // Operators - //- Assignment - inline void operator=(const forceSuSp& susp); - //- Addition inline void operator+=(const forceSuSp& susp); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H index 55d28fca81..b9dee1af3c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H @@ -27,10 +27,6 @@ License // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * // -inline Foam::forceSuSp::forceSuSp() -{} - - inline Foam::forceSuSp::forceSuSp(const zero) : Tuple2(vector::zero, 0.0) @@ -87,13 +83,6 @@ inline Foam::scalar& Foam::forceSuSp::Sp() // * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * * // -inline void Foam::forceSuSp::operator=(const forceSuSp& susp) -{ - first() = susp.first(); - second() = susp.second(); -} - - inline void Foam::forceSuSp::operator+=(const forceSuSp& susp) { first() += susp.first(); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index 931a149e50..d4ef00e084 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -71,29 +71,6 @@ SingleKineticRateDevolatilisation } -template -Foam::SingleKineticRateDevolatilisation:: -SingleKineticRateDevolatilisation -( - const SingleKineticRateDevolatilisation& dm -) -: - DevolatilisationModel(dm), - volatileData_(dm.volatileData_), - YVolatile0_(dm.YVolatile0_), - volatileToGasMap_(dm.volatileToGasMap_), - residualCoeff_(dm.residualCoeff_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::SingleKineticRateDevolatilisation:: -~SingleKineticRateDevolatilisation() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index ed853be55e..ddc25ebba7 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H @@ -112,17 +112,6 @@ class SingleKineticRateDevolatilisation E_(readScalar(is)) {} - //- Construct as copy - volatileData(const volatileData& vd) - : - name_(vd.name_), - A1_(vd.A1_), - E_(vd.E_) - {} - - - //- Destructor - ~volatileData() = default; // Public Member Functions @@ -208,12 +197,6 @@ public: CloudType& owner ); - //- Construct copy - SingleKineticRateDevolatilisation - ( - const SingleKineticRateDevolatilisation& dm - ); - //- Construct and return a clone virtual autoPtr> clone() const { @@ -225,7 +208,7 @@ public: //- Destructor - virtual ~SingleKineticRateDevolatilisation(); + virtual ~SingleKineticRateDevolatilisation() = default; // Member Functions diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H index ed1151acac..19544ccebd 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H @@ -126,12 +126,17 @@ class blockDescriptor void findCurvedFaces(); +public: + + // Generated Methods + + //- Copy construct + blockDescriptor(const blockDescriptor&) = default; + //- No copy assignment void operator=(const blockDescriptor&) = delete; -public: - // Constructors //- Construct from components. Optional cellSet/zone name. diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H index 1c4d3e8814..7a06c2ad96 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H @@ -109,9 +109,6 @@ public: //- Construct from origin, distance inline patchEdgeFaceInfo(const point&, const scalar); - //- Construct as copy - inline patchEdgeFaceInfo(const patchEdgeFaceInfo&); - // Member Functions diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H index de65986fd0..641c1c28cf 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H @@ -139,14 +139,6 @@ inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo {} -// Construct as copy -inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo(const patchEdgeFaceInfo& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::patchEdgeFaceInfo::origin() const diff --git a/src/meshTools/algorithms/PointEdgeWave/PointData.H b/src/meshTools/algorithms/PointEdgeWave/PointData.H index efb8e8d308..083fa0a6b3 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointData.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointData.H @@ -87,9 +87,6 @@ public: const DataType& data ); - //- Construct as copy - inline PointData(const PointData&); - // Member Functions diff --git a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H index 2d3588fe39..60126bb60f 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H @@ -51,14 +51,6 @@ inline Foam::PointData::PointData {} -template -inline Foam::PointData::PointData(const PointData& wpt) -: - pointEdgePoint(wpt), - data_(wpt.data()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H index e0fbfe22c4..807ee54b80 100644 --- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H +++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H @@ -111,9 +111,6 @@ public: //- Construct from origin, distance inline pointEdgePoint(const point&, const scalar); - //- Construct as copy - inline pointEdgePoint(const pointEdgePoint&); - // Member Functions diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H index 117d322818..a1b02cf52f 100644 --- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H +++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H @@ -139,14 +139,6 @@ inline Foam::pointEdgePoint::pointEdgePoint {} -// Construct as copy -inline Foam::pointEdgePoint::pointEdgePoint(const pointEdgePoint& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::pointEdgePoint::origin() const diff --git a/src/meshTools/cellClassification/cellInfo.H b/src/meshTools/cellClassification/cellInfo.H index cad4a64380..3d88d6b23d 100644 --- a/src/meshTools/cellClassification/cellInfo.H +++ b/src/meshTools/cellClassification/cellInfo.H @@ -92,11 +92,8 @@ public: //- Construct null inline cellInfo(); - //- Construct from cType - inline cellInfo(const label); - - //- Construct as copy - inline cellInfo(const cellInfo&); + //- Construct from cellClassification type + inline explicit cellInfo(const label ctype); // Member Functions diff --git a/src/meshTools/cellClassification/cellInfoI.H b/src/meshTools/cellClassification/cellInfoI.H index 269d706887..9b25903e6c 100644 --- a/src/meshTools/cellClassification/cellInfoI.H +++ b/src/meshTools/cellClassification/cellInfoI.H @@ -101,17 +101,9 @@ inline Foam::cellInfo::cellInfo() {} -// Construct from components -inline Foam::cellInfo::cellInfo(const label type) +inline Foam::cellInfo::cellInfo(const label ctype) : - type_(type) -{} - - -// Construct as copy -inline Foam::cellInfo::cellInfo(const cellInfo& w2) -: - type_(w2.type()) + type_(ctype) {} diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 27f08d58b8..4d7444838b 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -99,9 +99,6 @@ public: //- Construct from origin, distance inline wallPoint(const point& origin, const scalar distSqr); - //- Construct as copy - inline wallPoint(const wallPoint&); - // Member Functions diff --git a/src/meshTools/cellDist/wallPoint/wallPointI.H b/src/meshTools/cellDist/wallPoint/wallPointI.H index f1735ea045..a39903b683 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointI.H @@ -98,13 +98,6 @@ inline Foam::wallPoint::wallPoint(const point& origin, const scalar distSqr) {} -inline Foam::wallPoint::wallPoint(const wallPoint& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::wallPoint::origin() const diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C index 74604f9447..a4d1d6e966 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C @@ -61,24 +61,4 @@ Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState {} -Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState -( - const sixDoFRigidBodyMotionState& sDoFRBMS -) -: - centreOfRotation_(sDoFRBMS.centreOfRotation()), - Q_(sDoFRBMS.Q()), - v_(sDoFRBMS.v()), - a_(sDoFRBMS.a()), - pi_(sDoFRBMS.pi()), - tau_(sDoFRBMS.tau()) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::sixDoFRigidBodyMotionState::~sixDoFRigidBodyMotionState() -{} - - // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H index 0711471a3c..2182e76841 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H @@ -102,13 +102,6 @@ public: //- Construct from dictionary sixDoFRigidBodyMotionState(const dictionary& dict); - //- Construct as copy - sixDoFRigidBodyMotionState(const sixDoFRigidBodyMotionState&); - - - //- Destructor - ~sixDoFRigidBodyMotionState(); - // Member Functions diff --git a/src/surfMesh/surfZone/surfZone.C b/src/surfMesh/surfZone/surfZone.C index 7abb405e16..7713d0b930 100644 --- a/src/surfMesh/surfZone/surfZone.C +++ b/src/surfMesh/surfZone/surfZone.C @@ -97,14 +97,6 @@ Foam::surfZone::surfZone {} -Foam::surfZone::surfZone(const surfZone& zone) -: - surfZoneIdentifier(zone, zone.index()), - size_(zone.size()), - start_(zone.start()) -{} - - Foam::surfZone::surfZone(const surfZone& zone, const label index) : surfZoneIdentifier(zone, index), diff --git a/src/surfMesh/surfZone/surfZone.H b/src/surfMesh/surfZone/surfZone.H index 93d55d6807..6ab4eb74aa 100644 --- a/src/surfMesh/surfZone/surfZone.H +++ b/src/surfMesh/surfZone/surfZone.H @@ -82,6 +82,15 @@ public: ClassName("surfZone"); + // Generated Methods + + //- Copy construct + surfZone(const surfZone&) = default; + + //- Copy assignment + surfZone& operator=(const surfZone&) = default; + + // Constructors //- Construct null with zero start, size, index @@ -111,9 +120,6 @@ public: const label index ); - //- Construct as copy - surfZone(const surfZone&); - //- Construct from another zone, resetting the index surfZone(const surfZone&, const label index); diff --git a/src/surfMesh/triSurface/patches/geometricSurfacePatch.H b/src/surfMesh/triSurface/patches/geometricSurfacePatch.H index 80f1334d8a..0f421f529c 100644 --- a/src/surfMesh/triSurface/patches/geometricSurfacePatch.H +++ b/src/surfMesh/triSurface/patches/geometricSurfacePatch.H @@ -93,6 +93,16 @@ public: ClassName("geometricSurfacePatch"); + // Generated Methods + + //- Copy construct + geometricSurfacePatch(const geometricSurfacePatch&) = default; + + //- Copy assignment + geometricSurfacePatch& + operator=(const geometricSurfacePatch&) = default; + + // Constructors //- Construct null diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H index 80a7057e00..3690f89674 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H @@ -133,9 +133,8 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const constAnIsoSolidTransport&); inline void operator+=(const constAnIsoSolidTransport&); diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H index 4b5a5061ba..9c71de10cc 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H @@ -96,16 +96,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constAnIsoSolidTransport::operator= -( - const constAnIsoSolidTransport& ct -) -{ - kappa_ = ct.kappa_; -} - - template inline void Foam::constAnIsoSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H index 4dff53de15..85fca72210 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H @@ -134,13 +134,12 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const constIsoSolidTransport&); inline void operator+=(const constIsoSolidTransport&); - // Friend operators + // Friend Operators friend constIsoSolidTransport operator* ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H index 64333e09c6..bff862dc98 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H @@ -96,17 +96,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constIsoSolidTransport::operator= -( - const constIsoSolidTransport& ct -) -{ - thermo::operator=(ct); - kappa_ = ct.kappa_; -} - - template inline void Foam::constIsoSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H index 09154da058..0725506fd3 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H @@ -142,13 +142,12 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const exponentialSolidTransport&); inline void operator+=(const exponentialSolidTransport&); - // Friend operators + // Friend Operators friend exponentialSolidTransport operator* ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H index c6ca542a95..ff6e380ee1 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H @@ -108,19 +108,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -template -inline void Foam::exponentialSolidTransport::operator= -( - const exponentialSolidTransport& ct -) -{ - kappa0_ = ct.kappa0_; - n0_ = ct.n0_; - Tref_ = ct.Tref_; -} - - template inline void Foam::exponentialSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H index dab5e94af3..401316a5b5 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H @@ -183,14 +183,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const polynomialSolidTransport&); inline void operator+=(const polynomialSolidTransport&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend polynomialSolidTransport operator+ ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H index c27deab24e..0fe8151ceb 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H @@ -120,18 +120,6 @@ inline Foam::scalar Foam::polynomialSolidTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::polynomialSolidTransport::operator= -( - const polynomialSolidTransport& pt -) -{ - Thermo::operator=(pt); - - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::polynomialSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index 690d7f09e6..6ef21b28a7 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -209,14 +209,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const icoPolynomial&); inline void operator+=(const icoPolynomial&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend icoPolynomial operator+ ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H index 684c34434d..66aa55583c 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H @@ -174,18 +174,6 @@ inline Foam::scalar Foam::icoPolynomial::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::icoPolynomial::operator= -( - const icoPolynomial& ip -) -{ - Specie::operator=(ip); - - rhoCoeffs_ = ip.rhoCoeffs_; -} - - template inline void Foam::icoPolynomial::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index a558796944..f131ba9c74 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H @@ -178,14 +178,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const incompressiblePerfectGas&); inline void operator+=(const incompressiblePerfectGas&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend incompressiblePerfectGas operator+ ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index c14e1c30c1..aa35a25173 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -175,17 +175,6 @@ inline Foam::scalar Foam::incompressiblePerfectGas::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::incompressiblePerfectGas::operator= -( - const incompressiblePerfectGas& ipg -) -{ - Specie::operator=(ipg); - pRef_ = ipg.pRef_; -} - - template inline void Foam::incompressiblePerfectGas::operator+= ( diff --git a/src/thermophysicalModels/specie/specie/specie.H b/src/thermophysicalModels/specie/specie/specie.H index 62144a1b65..52cd9ea553 100644 --- a/src/thermophysicalModels/specie/specie/specie.H +++ b/src/thermophysicalModels/specie/specie/specie.H @@ -85,6 +85,12 @@ public: ClassName("specie"); + // Generated Methods + + //- Copy construct + specie(const specie&) = default; + + // Constructors //- Construct from components without name @@ -128,9 +134,11 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators + //- Copy assignment, preserve original name inline void operator=(const specie&); + inline void operator+=(const specie&); inline void operator*=(const scalar); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index f665d0093d..34f37ca7cf 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -228,9 +228,8 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const hPolynomialThermo&); inline void operator+=(const hPolynomialThermo&); inline void operator*=(const scalar); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index 23dc92596b..3fb36c86d7 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -159,22 +159,6 @@ inline Foam::scalar Foam::hPolynomialThermo::dCpdT // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::hPolynomialThermo::operator= -( - const hPolynomialThermo& pt -) -{ - EquationOfState::operator=(pt); - - Hf_ = pt.Hf_; - Sf_ = pt.Sf_; - CpCoeffs_ = pt.CpCoeffs_; - hCoeffs_ = pt.hCoeffs_; - sCoeffs_ = pt.sCoeffs_; -} - - template inline void Foam::hPolynomialThermo::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H index 775f0eabc0..a066647279 100644 --- a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H +++ b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H @@ -159,9 +159,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const WLFTransport&); + // Member Operators inline void operator+=(const WLFTransport&); diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H b/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H index 759d9096bb..36d2af5a76 100644 --- a/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H +++ b/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H @@ -107,22 +107,6 @@ inline Foam::scalar Foam::WLFTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::WLFTransport::operator= -( - const WLFTransport& wlft -) -{ - Thermo::operator=(wlft); - - mu0_ = wlft.mu0_; - Tr_ = wlft.Tr_; - C1_ = wlft.C1_; - C2_ = wlft.C2_; - rPr_ = wlft.rPr_; -} - - template inline void Foam::WLFTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 9f1a788c20..3179488aed 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -144,9 +144,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const constTransport&); + // Member Operators inline void operator+=(const constTransport&); diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index 881cd9fe68..a3692d19c4 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -110,19 +110,6 @@ inline Foam::scalar Foam::constTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constTransport::operator= -( - const constTransport& ct -) -{ - Thermo::operator=(ct); - - mu_ = ct.mu_; - rPr_ = ct.rPr_; -} - - template inline void Foam::constTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H index c82403590b..0599b7b210 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H @@ -204,9 +204,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const logPolynomialTransport&); + // Member Operators inline void operator+=(const logPolynomialTransport&); diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H index ddf64edf4c..9b53370576 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H @@ -108,19 +108,6 @@ inline Foam::scalar Foam::logPolynomialTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::logPolynomialTransport::operator= -( - const logPolynomialTransport& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::logPolynomialTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index c312e1b4b1..d7fb649f02 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -186,9 +186,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const polynomialTransport&); + // Member Operators inline void operator+=(const polynomialTransport&); diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index 64ac742740..3599c62e7c 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -108,19 +108,6 @@ inline Foam::scalar Foam::polynomialTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::polynomialTransport::operator= -( - const polynomialTransport& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::polynomialTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 014d5e45a1..b2ee7bf4cd 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -169,9 +169,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const sutherlandTransport&); + // Member Operators inline void operator+=(const sutherlandTransport&); diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 7c65cc9955..33f59fc804 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -146,19 +146,6 @@ inline Foam::scalar Foam::sutherlandTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::sutherlandTransport::operator= -( - const sutherlandTransport& st -) -{ - Thermo::operator=(st); - - As_ = st.As_; - Ts_ = st.Ts_; -} - - template inline void Foam::sutherlandTransport::operator+= ( From 9a4851268e2df0f3a1d7247ead35193893193831 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 29 Jan 2020 18:32:37 +0100 Subject: [PATCH 6/8] GIT: update reference for modules/adios (stale tag at time of release) --- modules/adios | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/adios b/modules/adios index c4f53dc5e7..8cdeac3896 160000 --- a/modules/adios +++ b/modules/adios @@ -1 +1 @@ -Subproject commit c4f53dc5e7c5b116f6153c650b70352e32414999 +Subproject commit 8cdeac3896adb841c0aacfe0c697edecf891476c From 370d1a45899b419088e7c98513e50fcc225bdf54 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 29 Jan 2020 18:35:01 +0100 Subject: [PATCH 7/8] CONFIG: bump patch level --- META-INFO/api-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META-INFO/api-info b/META-INFO/api-info index fb939a878f..cc89bc1cef 100644 --- a/META-INFO/api-info +++ b/META-INFO/api-info @@ -1,2 +1,2 @@ api=1912 -patch=0 +patch=200129 From d3bcc71b6490c5d120a3b7ea2e7dce8d9fded28c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 31 Jan 2020 12:08:31 +0100 Subject: [PATCH 8/8] COMP: avoid -Wstringop-truncation warning - the gcc c++/9 includes now inline strncpy, which obliterates the previous method of suppressing the warning. Now simply allocate additional space for the nul character. COMP: silence some icc warnings --- src/fileFormats/ensight/file/ensightFile.C | 14 +++++-------- ...lentDigitalFilterInletFvPatchVectorField.C | 21 ++++++++----------- .../schemes/weightedFlux/weightedFlux.H | 2 +- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/fileFormats/ensight/file/ensightFile.C b/src/fileFormats/ensight/file/ensightFile.C index dd4bdeb4b6..4cdb931fff 100644 --- a/src/fileFormats/ensight/file/ensightFile.C +++ b/src/fileFormats/ensight/file/ensightFile.C @@ -166,19 +166,15 @@ Foam::Ostream& Foam::ensightFile::write Foam::Ostream& Foam::ensightFile::write(const char* value) { - // Parentheses around strncpy to silence the GCC -Wstringop-truncation - // warning, which is spurious here. - // The max-size and buffer-size *are* identical, which means the buffer - // may not have a nul terminator. However, this is properly handled in - // the subsequent binary write and the ASCII write explicitly adds - // a nul terminator. + // Output 80 chars, but allocate for trailing nul character + // to avoid -Wstringop-truncation warnings/errors. - char buf[80]; - (strncpy(buf, value, 80)); // max 80 chars or padded with nul if smaller + char buf[80+1]; + strncpy(buf, value, 80); // max 80 chars or padded with nul if smaller if (format() == IOstream::BINARY) { - write(buf, sizeof(buf)); + write(buf, 80); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchVectorField.C index 9a4310711b..014dc2d527 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDigitalFilterInlet/turbulentDigitalFilterInletFvPatchVectorField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -96,11 +96,11 @@ Foam::turbulentDigitalFilterInletFvPatchVectorField::patchIndexPairs() const vector nf(computePatchNormal()); // Find the second local coordinate direction - direction minCmpt = -1; - scalar minMag = VGREAT; - for (direction cmpt = 0; cmpt < pTraits::nComponents; ++cmpt) + direction minCmpt = 0; + scalar minMag = mag(nf[minCmpt]); + for (direction cmpt = 1; cmpt < pTraits::nComponents; ++cmpt) { - scalar s = mag(nf[cmpt]); + const scalar s = mag(nf[cmpt]); if (s < minMag) { minMag = s; @@ -110,7 +110,7 @@ Foam::turbulentDigitalFilterInletFvPatchVectorField::patchIndexPairs() // Create the second local coordinate direction vector e2(Zero); - e2[minCmpt] = 1.0; + e2[minCmpt] = 1; // Remove normal component e2 -= (nf&e2)*nf; @@ -147,17 +147,14 @@ Foam::turbulentDigitalFilterInletFvPatchVectorField::patchIndexPairs() // Compute virtual-actual patch index pairs List> indexPairs(this->size(), Pair