From c278b93d7a07591ee8e3db1fc33ffd4d6e1d4137 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Tue, 28 Jan 2020 12:46:27 +0100 Subject: [PATCH] COMP: backport of updates for gcc-92 compilation STYLE: add typedefs for interpolation tables --- .../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 | 15 +++++--- src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H | 15 +++++--- src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H | 9 +++-- src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C | 28 ++++++++++++++ src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H | 18 +++++++-- 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 | 38 ++++++++++++++----- .../interpolation2DTable.H | 29 +++++++------- .../interpolationTable/interpolationTable.C | 38 ++++++++++++++----- .../interpolationTable/interpolationTable.H | 16 +++++++- .../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 | 15 ++++++-- src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H | 5 --- 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 | 15 +++++--- .../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 | 36 ------------------ .../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 | 20 +--------- .../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 ------- 116 files changed, 510 insertions(+), 732 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 2efa129a33b..70f22d77bba 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H @@ -143,6 +143,13 @@ public: typedef indexedVertex<Gt,Vb2> 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 062e853976e..cb1b9956dbb 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 6c57dd9ed8b..8ddb278ec71 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 f3100fc1cbf..66d37681dfb 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -766,8 +766,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<true>& iter) diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index b893d5e4895..93d966afa30 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 28d158d627f..659a2eba106 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 17237770f50..9d4a55974d9 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<T>& null(); + // Generated Methods + + //- Copy construct + SubList(const SubList&) = default; + + // Constructors //- Construct from UList and sub-list size, start at 0 diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H index 8d5e24476ae..3e5f84633e2 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.H +++ b/src/OpenFOAM/containers/Lists/UList/UList.H @@ -213,6 +213,12 @@ public: }; + // Generated Methods + + //- Copy construct + UList(const UList<T>&) = default; + + // Constructors //- Null constructor diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index 33ce77074de..eb405838c5a 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -259,6 +259,15 @@ public: ); + // Generated Methods + + //- Copy construct + IOobject(const IOobject&) = default; + + //- Destructor + virtual ~IOobject() = default; + + // Constructors //- Construct from name, instance, registry, io options @@ -328,10 +337,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 f761b155bfa..865d221b7b2 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 1cbe9a27bb8..772b33f1145 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 1728e4d5e4a..bb283fe9d21 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H @@ -140,6 +140,15 @@ protected: public: + // Generated Methods + + //- Copy construct + IOstream(const IOstream&) = default; + + //- Destructor + virtual ~IOstream() = default; + + // Constructors //- Construct with specified stream option @@ -165,10 +174,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 25df894d525..cc2db84dbe6 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H @@ -72,6 +72,15 @@ class Istream public: + // Generated Methods + + //- Copy construct + Istream(const Istream&) = default; + + //- Destructor + virtual ~Istream() = default; + + // Constructors //- Construct and set stream status @@ -87,11 +96,7 @@ public: {} - //- Destructor - virtual ~Istream() = default; - - - // Member functions + // Member Functions // Read functions diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H index f80ebfdf2b4..ce59a51e773 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H @@ -75,6 +75,15 @@ protected: public: + // Generated Methods + + //- Copy construct + Ostream(const Ostream&) = default; + + //- Destructor + virtual ~Ostream() = default; + + // Constructors //- Construct and set stream status @@ -90,11 +99,7 @@ public: {} - //- Destructor - virtual ~Ostream() = default; - - - // Member functions + // Member Functions // Write functions diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H index 5def2ae71f0..74acf112951 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 0e2588fd5c0..db19b16684b 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C @@ -301,4 +301,32 @@ void Foam::ITstream::rewind() } +// * * * * * * * * * * * * * * * 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 65eb006f97b..47b7952ee76 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H @@ -273,10 +273,22 @@ public: } - // Print + // Output - //- Print description of stream to Ostream - void print(Ostream& os) const; + //- Print stream description to Ostream + void print(Ostream& os) 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 a37cb77ad8d..ff084e9731e 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 5da299e94c4..0381efdd761 100644 --- a/src/OpenFOAM/db/error/error.C +++ b/src/OpenFOAM/db/error/error.C @@ -128,7 +128,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 6cfb64502af..98606f8e60d 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 f3eb55ee194..9858d8f80ac 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -65,6 +65,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 887255a294a..e1c2cfaeca2 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,7 @@ void Foam::interpolation2DTable<Type>::readTable() template<class Type> Foam::interpolation2DTable<Type>::interpolation2DTable() : - List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(), + List<value_type>(), bounding_(bounds::normalBounding::WARN), fileName_("fileNameIsUndefined"), reader_(nullptr) @@ -71,7 +71,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable const fileName& fName ) : - List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(values), + List<value_type>(values), bounding_(bounding), fileName_(fName), reader_(nullptr) @@ -81,7 +81,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable template<class Type> Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName) : - List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(), + List<value_type>(), bounding_(bounds::normalBounding::WARN), fileName_(fName), reader_(new openFoamTableReader<Type>(dictionary())) @@ -93,7 +93,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName) template<class Type> Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict) : - List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(), + List<value_type>(), bounding_ ( bounds::normalBoundingNames.lookupOrDefault @@ -114,13 +114,13 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict) template<class Type> Foam::interpolation2DTable<Type>::interpolation2DTable ( - const interpolation2DTable& interpTable + const interpolation2DTable& tbl ) : - List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List<value_type>(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_.clone()) {} @@ -312,6 +312,24 @@ Foam::label Foam::interpolation2DTable<Type>::Xi // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template<class Type> +void Foam::interpolation2DTable<Type>::operator= +( + const interpolation2DTable<Type>& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast<List<value_type>&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + reader_.reset(rhs.reader_.clone()); +} + + template<class Type> Type Foam::interpolation2DTable<Type>::operator() ( diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H index a515dcd832c..71d0d16158c 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,17 +58,7 @@ class interpolation2DTable : public List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> { -public: - - // Public data types - - //- Convenience typedef - typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table; - - -private: - - // Private data + // Private Data //- Handling for out-of-bound values bounds::normalBounding bounding_; @@ -103,6 +94,15 @@ private: public: + // Public Data Types + + //- The element data type + typedef Tuple2<scalar, List<Tuple2<scalar, Type>>> value_type; + + //- Convenience typedef + typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table; + + // Constructors //- Construct null @@ -122,8 +122,8 @@ public: //- Construct by reading file name and outOfBounds from dictionary interpolation2DTable(const dictionary& dict); - //- Construct copy - interpolation2DTable(const interpolation2DTable& interpTable); + //- Copy construct + interpolation2DTable(const interpolation2DTable& tbl); // Member Functions @@ -141,6 +141,9 @@ public: //- Return an element of constant List<Tuple2<scalar, Type>> const List<Tuple2<scalar, Type>>& operator[](const label) const; + //- Copy assignment + void operator=(const interpolation2DTable<Type>& 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 7d85a7bc9aa..b05ffb0d5e6 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,7 +60,7 @@ void Foam::interpolationTable<Type>::readTable() template<class Type> Foam::interpolationTable<Type>::interpolationTable() : - List<Tuple2<scalar, Type>>(), + List<value_type>(), bounding_(bounds::repeatableBounding::WARN), fileName_("fileNameIsUndefined"), reader_(nullptr) @@ -74,7 +75,7 @@ Foam::interpolationTable<Type>::interpolationTable const fileName& fName ) : - List<Tuple2<scalar, Type>>(values), + List<value_type>(values), bounding_(bounding), fileName_(fName), reader_(nullptr) @@ -84,7 +85,7 @@ Foam::interpolationTable<Type>::interpolationTable template<class Type> Foam::interpolationTable<Type>::interpolationTable(const fileName& fName) : - List<Tuple2<scalar, Type>>(), + List<value_type>(), bounding_(bounds::repeatableBounding::WARN), fileName_(fName), reader_(new openFoamTableReader<Type>(dictionary())) @@ -96,7 +97,7 @@ Foam::interpolationTable<Type>::interpolationTable(const fileName& fName) template<class Type> Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict) : - List<Tuple2<scalar, Type>>(), + List<value_type>(), bounding_ ( bounds::repeatableBoundingNames.lookupOrDefault @@ -117,17 +118,16 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict) template<class Type> Foam::interpolationTable<Type>::interpolationTable ( - const interpolationTable& interpTable + const interpolationTable& tbl ) : - List<Tuple2<scalar, Type>>(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List<value_type>(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_.clone()) {} - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> @@ -318,6 +318,24 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template<class Type> +void Foam::interpolationTable<Type>::operator= +( + const interpolationTable<Type>& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast<List<value_type>&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + reader_.reset(rhs.reader_.clone()); +} + + template<class Type> const Foam::Tuple2<Foam::scalar, Type>& Foam::interpolationTable<Type>::operator[](const label i) const diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H index d8cd3d806c8..f044a520804 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H @@ -104,6 +104,15 @@ class interpolationTable public: + // Public Data Types + + //- The element data type + typedef Tuple2<scalar, Type> value_type; + + //- The mapped data type + typedef Type mapped_type; + + // Constructors //- Construct null @@ -125,8 +134,8 @@ public: // This is a specialised constructor used by patchFields interpolationTable(const dictionary& dict); - //- Construct copy - interpolationTable(const interpolationTable& interpTable); + //- Copy construct + interpolationTable(const interpolationTable& tbl); // Member Functions @@ -145,6 +154,9 @@ public: // Member Operators + //- Copy assignment + void operator=(const interpolationTable<Type>& rhs); + //- Return an element of constant Tuple2<scalar, Type> const Tuple2<scalar, Type>& operator[](const label) const; diff --git a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H index dcdbb637833..e93789a2678 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 74af61c3635..f57d86dba9c 100644 --- a/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H +++ b/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H @@ -83,6 +83,15 @@ public: static const word emptyType; + // Generated Methods + + //- Copy construct + surfZoneIdentifier(const surfZoneIdentifier&) = default; + + //- Copy assignment + surfZoneIdentifier& operator=(const surfZoneIdentifier&) = default; + + // Constructors //- Construct null diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H index be735e96c9f..c5dcc67e73a 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H @@ -79,10 +79,19 @@ public: enum components { XX, XY, XZ, YY, YZ, ZZ }; - // Constructors + // Generated Methods + + //- Default construct + SymmTensor() = default; + + //- Copy construct + SymmTensor(const SymmTensor&) = default; - //- Construct null - inline SymmTensor(); + //- 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 a126bb676a5..38a62f1dbb1 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Cmpt> -inline Foam::SymmTensor<Cmpt>::SymmTensor() -{} - - template<class Cmpt> inline Foam::SymmTensor<Cmpt>::SymmTensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H index 33ac39ee9f2..2b6f1a210db 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H @@ -79,10 +79,19 @@ public: enum components { XX, XY, YY }; - // Constructors + // Generated Methods + + //- Default construct + SymmTensor2D() = default; + + //- Copy construct + SymmTensor2D(const SymmTensor2D&) = default; - //- Construct null - inline SymmTensor2D(); + //- 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 b8806ca4dfe..1e615be7942 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Cmpt> -inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D() -{} - - template<class Cmpt> inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H index 9f8941cd0d2..eadf6d1b097 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 + + //- Default construct + Tensor() = default; + + //- Copy construct + Tensor(const Tensor&) = default; - //- Construct null - inline Tensor(); + //- 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 9ee8d5c855d..e4622291cfd 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Cmpt> -inline Foam::Tensor<Cmpt>::Tensor() -{} - - template<class Cmpt> inline Foam::Tensor<Cmpt>::Tensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H index 618b46a6688..5cb63ba0a9e 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H @@ -83,10 +83,19 @@ public: enum components { XX, XY, YX, YY }; - // Constructors + // Generated Methods + + //- Default construct + Tensor2D() = default; + + //- Copy construct + Tensor2D(const Tensor2D&) = default; - //- Construct null - inline Tensor2D(); + //- Copy assignment + Tensor2D& operator=(const Tensor2D&) = default; + + + // Constructors //- Construct initialized to zero inline Tensor2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H index bfc1cb65576..1532fb79839 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Cmpt> -inline Foam::Tensor2D<Cmpt>::Tensor2D() -{} - - template<class Cmpt> inline Foam::Tensor2D<Cmpt>::Tensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector/Vector.H b/src/OpenFOAM/primitives/Vector/Vector.H index f30645c7342..278eec5fa64 100644 --- a/src/OpenFOAM/primitives/Vector/Vector.H +++ b/src/OpenFOAM/primitives/Vector/Vector.H @@ -80,10 +80,19 @@ public: enum components { X, Y, Z }; - // Constructors + // Generated Methods + + //- Default construct + Vector() = default; + + //- Copy construct + Vector(const Vector&) = default; - //- Construct null - inline Vector(); + //- 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 c831921d043..bccfdb61770 100644 --- a/src/OpenFOAM/primitives/Vector/VectorI.H +++ b/src/OpenFOAM/primitives/Vector/VectorI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Cmpt> -inline Foam::Vector<Cmpt>::Vector() -{} - - template<class Cmpt> inline Foam::Vector<Cmpt>::Vector(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2D.H b/src/OpenFOAM/primitives/Vector2D/Vector2D.H index 431e092dd50..ed82063b721 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2D.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2D.H @@ -73,10 +73,19 @@ public: enum components { X, Y }; - // Constructors + // Generated Methods + + //- Default construct + Vector2D() = default; + + //- Copy construct + Vector2D(const Vector2D&) = default; - //- Construct null - inline Vector2D(); + //- 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 576e9442ce9..a3e0569dcf4 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Cmpt> -inline Foam::Vector2D<Cmpt>::Vector2D() -{} - - template<class Cmpt> inline Foam::Vector2D<Cmpt>::Vector2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/complex/complex.H b/src/OpenFOAM/primitives/complex/complex.H index f66488b03bd..a25ea6a1f28 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 f9b4c8034d1..02e231fc78f 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 a809ae9a92c..8fd251ceebe 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H +++ b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H @@ -63,16 +63,19 @@ class Uniform : public Constant<Type> { - // Private Member Functions +public: - //- No copy assignment - void operator=(const Uniform<Type>&) = delete; + //- Declare type-name, virtual type (with debug switch) + TypeName("uniform"); -public: + // Generated Methods - // Runtime type information - TypeName("uniform"); + //- Copy construct + Uniform<Type>(const Uniform&) = default; + + //- No copy assignment + void operator=(const Uniform<Type>&) = delete; // Constructors diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C index fe32dfbc814..da08030c273 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C @@ -43,18 +43,6 @@ Foam::Polynomial<PolySize>::Polynomial() } -template<int PolySize> -Foam::Polynomial<PolySize>::Polynomial -( - const Polynomial<PolySize>& poly -) -: - VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly), - logActive_(poly.logActive_), - logCoeff_(poly.logCoeff_) -{} - - template<int PolySize> Foam::Polynomial<PolySize>::Polynomial(const scalar coeffs[PolySize]) : diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H index f608b638ef7..aa89cda78ab 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 e08cda5c72b..1c88d8e5fba 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<Field<Type>> transform(const Field<Type>&) 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 a2c2259c7fd..c1c7cf58f73 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 0da36e3d770..a9c5999cdc5 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternion.H +++ b/src/OpenFOAM/primitives/quaternion/quaternion.H @@ -128,10 +128,19 @@ public: static const quaternion I; - // Constructors + // Generated Methods + + //- Default construct + quaternion() = default; + + //- Copy construct + quaternion(const quaternion&) = default; - //- Construct null - inline quaternion(); + //- Copy assignment + quaternion& operator=(const quaternion&) = default; + + + // Constructors //- Construct zero initialized inline quaternion(const Foam::zero); @@ -223,7 +232,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 dd4b949299a..810f58b4bdb 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 795522aa6c2..7f99ae6d5e4 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 6ec7032a5f9..5d97dec4996 100644 --- a/src/OpenFOAM/primitives/random/Random/Random.H +++ b/src/OpenFOAM/primitives/random/Random/Random.H @@ -90,12 +90,8 @@ public: //- Construct with seed value Random(const label seedValue = 123456); - //- 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 efffff4de8d..f19cbf13c35 100644 --- a/src/OpenFOAM/primitives/septernion/septernion.H +++ b/src/OpenFOAM/primitives/septernion/septernion.H @@ -86,10 +86,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); @@ -130,9 +142,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 81036dc53a4..09646c6d4c5 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 8164e34709a..d22f7000530 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> Foam::boundaryPatch::clone() const + boundaryPatch(p) { - return autoPtr<boundaryPatch>::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 de01b05e3b1..02a2828ae4f 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<boundaryPatch> clone() const; - - - //- Destructor - ~boundaryPatch(); + autoPtr<boundaryPatch> clone() const + { + return autoPtr<boundaryPatch>::New(*this); + } // Member Functions diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H index 22139a481d2..9d3d4aa6e89 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H @@ -141,9 +141,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 a689f76e760..6b814e14baf 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<class TrackingData> diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H index 837d059f84d..3de9fd8f92c 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H @@ -89,8 +89,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 92bfc65c854..ae65d7e84e9 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 6adb9399a2e..9e62180e93f 100644 --- a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H +++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H @@ -124,9 +124,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 78e18f1d8ef..895e6bc934e 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 3f3f0f0484e..30b25885b36 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 cd93fe6f27c..9e2fd966642 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H @@ -83,6 +83,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 f6b7a4fa736..6139c0d8cae 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H @@ -68,6 +68,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 5a35da3e99f..40a306c4a4f 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::wordRe> Foam::functionObjects::fieldSelection::filters() const { HashSet<wordRe> 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 1637cfa145c..4b64bad0f84 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 19836e51802..88173d2a0c1 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 + + //- Default construct + referredWallFace() = default; - //- Construct null - referredWallFace(); + + // 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 bbc7a9dcef2..6e7e4815a98 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C @@ -30,14 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class PairType, class WallType> -Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList() -: - pairRecords_(), - wallRecords_() -{} - - template<class PairType, class WallType> Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList(Istream& is) : @@ -122,13 +114,6 @@ Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * / - -template<class PairType, class WallType> -Foam::CollisionRecordList<PairType, WallType>::~CollisionRecordList() -{} - - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // template<class PairType, class WallType> @@ -385,27 +370,6 @@ void Foam::CollisionRecordList<PairType, WallType>::update() } -// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // - -template<class PairType, class WallType> -void Foam::CollisionRecordList<PairType, WallType>::operator= -( - const CollisionRecordList<PairType, WallType>& rhs -) -{ - // Check for assignment to self - if (this == &rhs) - { - FatalErrorInFunction - << "Attempted assignment to self" - << abort(FatalError); - } - - pairRecords_ = rhs.pairRecords_; - wallRecords_ = rhs.wallRecords_; -} - - // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // template<class PairType, class WallType> diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H index f59e29e308f..39ca34346fc 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 + + //- Default construct + CollisionRecordList() = default; - //- Construct null - CollisionRecordList(); + + // Constructors //- Construct from Istream CollisionRecordList(Istream&); @@ -110,9 +113,6 @@ public: const Field<WallType>& wallData ); - //- Destructor - ~CollisionRecordList(); - // Member Functions @@ -196,11 +196,6 @@ public: void update(); - // Member Operators - - void operator=(const CollisionRecordList&); - - // Friend Operators friend bool operator== <PairType, WallType> diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index bf957935ed1..35076e8718b 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 cd4993e68d7..63206d40337 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 ae1e30ed5f4..518ab6e03aa 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 90aa101bc12..22ac751f04a 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<vector, scalar> { - 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 55d28fca81f..b9dee1af3c9 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, scalar>(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 931a149e50d..d4ef00e0849 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<class CloudType> -Foam::SingleKineticRateDevolatilisation<CloudType>:: -SingleKineticRateDevolatilisation -( - const SingleKineticRateDevolatilisation<CloudType>& dm -) -: - DevolatilisationModel<CloudType>(dm), - volatileData_(dm.volatileData_), - YVolatile0_(dm.YVolatile0_), - volatileToGasMap_(dm.volatileToGasMap_), - residualCoeff_(dm.residualCoeff_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class CloudType> -Foam::SingleKineticRateDevolatilisation<CloudType>:: -~SingleKineticRateDevolatilisation() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class CloudType> diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index 5825a783b97..8fd901356d1 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H @@ -111,18 +111,6 @@ class SingleKineticRateDevolatilisation E_(readScalar(is)) {} - //- Construct as copy - volatileData(const volatileData& vd) - : - name_(vd.name_), - A1_(vd.A1_), - E_(vd.E_) - {} - - - //- Destructor - ~volatileData() - {} // Public Member Functions @@ -208,12 +196,6 @@ public: CloudType& owner ); - //- Construct copy - SingleKineticRateDevolatilisation - ( - const SingleKineticRateDevolatilisation<CloudType>& dm - ); - //- Construct and return a clone virtual autoPtr<DevolatilisationModel<CloudType>> clone() const { @@ -225,7 +207,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 ed1151acace..19544ccebd3 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 96a021e0112..5d4cce82749 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H @@ -113,9 +113,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 de65986fd0c..641c1c28cf0 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 696bd183e68..5ed4cef54fb 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointData.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointData.H @@ -90,9 +90,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 2d3588fe39f..60126bb60fe 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H @@ -51,14 +51,6 @@ inline Foam::PointData<DataType>::PointData {} -template<class DataType> -inline Foam::PointData<DataType>::PointData(const PointData<DataType>& wpt) -: - pointEdgePoint(wpt), - data_(wpt.data()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class DataType> diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H index 32c4f176e38..c2be3566dc6 100644 --- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H +++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H @@ -114,9 +114,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 117d322818c..a1b02cf52f7 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 8a3b9637c9e..08c7640ba34 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 269d7068870..9b25903e6ce 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 6b282f45751..27b7278cd5c 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 f1735ea045a..a39903b683b 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 74604f94472..a4d1d6e966c 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 0711471a3c0..2182e768419 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 bf99e63b4a4..927265ad950 100644 --- a/src/surfMesh/surfZone/surfZone.C +++ b/src/surfMesh/surfZone/surfZone.C @@ -88,14 +88,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 b808ff7a80d..39cffe72f04 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 @@ -108,9 +117,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 80f1334d8ab..0f421f529ca 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 80a7057e000..3690f896745 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 4b5a5061ba9..9c71de10ccf 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<class Thermo> -inline void Foam::constAnIsoSolidTransport<Thermo>::operator= -( - const constAnIsoSolidTransport<Thermo>& ct -) -{ - kappa_ = ct.kappa_; -} - - template<class Thermo> inline void Foam::constAnIsoSolidTransport<Thermo>::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H index 4dff53de151..85fca722107 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* <Thermo> ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H index 64333e09c62..bff862dc984 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<class thermo> -inline void Foam::constIsoSolidTransport<thermo>::operator= -( - const constIsoSolidTransport<thermo>& ct -) -{ - thermo::operator=(ct); - kappa_ = ct.kappa_; -} - - template<class thermo> inline void Foam::constIsoSolidTransport<thermo>::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H index 09154da058f..0725506fd36 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* <Thermo> ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H index c6ca542a957..ff6e380ee1b 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<class Thermo> -inline void Foam::exponentialSolidTransport<Thermo>::operator= -( - const exponentialSolidTransport<Thermo>& ct -) -{ - kappa0_ = ct.kappa0_; - n0_ = ct.n0_; - Tref_ = ct.Tref_; -} - - template<class Thermo> inline void Foam::exponentialSolidTransport<Thermo>::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H index dab5e94af39..401316a5b52 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+ <Thermo, PolySize> ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H index c27deab24ee..0fe8151cebd 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<Thermo, PolySize>::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo, int PolySize> -inline void Foam::polynomialSolidTransport<Thermo, PolySize>::operator= -( - const polynomialSolidTransport<Thermo, PolySize>& pt -) -{ - Thermo::operator=(pt); - - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template<class Thermo, int PolySize> inline void Foam::polynomialSolidTransport<Thermo, PolySize>::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index 690d7f09e65..6ef21b28a72 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+ <Specie, PolySize> ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H index 684c34434d6..66aa55583c1 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<Specie, PolySize>::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Specie, int PolySize> -inline void Foam::icoPolynomial<Specie, PolySize>::operator= -( - const icoPolynomial<Specie, PolySize>& ip -) -{ - Specie::operator=(ip); - - rhoCoeffs_ = ip.rhoCoeffs_; -} - - template<class Specie, int PolySize> inline void Foam::icoPolynomial<Specie, PolySize>::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index a5587969446..f131ba9c74a 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+ <Specie> ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index c14e1c30c14..aa35a251738 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<Specie>::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Specie> -inline void Foam::incompressiblePerfectGas<Specie>::operator= -( - const incompressiblePerfectGas<Specie>& ipg -) -{ - Specie::operator=(ipg); - pRef_ = ipg.pRef_; -} - - template<class Specie> inline void Foam::incompressiblePerfectGas<Specie>::operator+= ( diff --git a/src/thermophysicalModels/specie/specie/specie.H b/src/thermophysicalModels/specie/specie/specie.H index 62144a1b650..52cd9ea5536 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 f665d0093da..34f37ca7cff 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 23dc92596b4..3fb36c86d70 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<EquationOfState, PolySize>::dCpdT // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class EquationOfState, int PolySize> -inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator= -( - const hPolynomialThermo<EquationOfState, PolySize>& pt -) -{ - EquationOfState::operator=(pt); - - Hf_ = pt.Hf_; - Sf_ = pt.Sf_; - CpCoeffs_ = pt.CpCoeffs_; - hCoeffs_ = pt.hCoeffs_; - sCoeffs_ = pt.sCoeffs_; -} - - template<class EquationOfState, int PolySize> inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H index 775f0eabc0a..a0666472792 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 759d9096bb8..36d2af5a763 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<Thermo>::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo> -inline void Foam::WLFTransport<Thermo>::operator= -( - const WLFTransport<Thermo>& wlft -) -{ - Thermo::operator=(wlft); - - mu0_ = wlft.mu0_; - Tr_ = wlft.Tr_; - C1_ = wlft.C1_; - C2_ = wlft.C2_; - rPr_ = wlft.rPr_; -} - - template<class Thermo> inline void Foam::WLFTransport<Thermo>::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 9f1a788c207..3179488aedc 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 881cd9fe68c..a3692d19c48 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<Thermo>::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo> -inline void Foam::constTransport<Thermo>::operator= -( - const constTransport<Thermo>& ct -) -{ - Thermo::operator=(ct); - - mu_ = ct.mu_; - rPr_ = ct.rPr_; -} - - template<class Thermo> inline void Foam::constTransport<Thermo>::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H index c82403590b7..0599b7b2109 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 ddf64edf4c6..9b53370576f 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<Thermo, PolySize>::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo, int PolySize> -inline void Foam::logPolynomialTransport<Thermo, PolySize>::operator= -( - const logPolynomialTransport<Thermo, PolySize>& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template<class Thermo, int PolySize> inline void Foam::logPolynomialTransport<Thermo, PolySize>::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index c312e1b4b1e..d7fb649f025 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 64ac742740e..3599c62e7c3 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<Thermo, PolySize>::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo, int PolySize> -inline void Foam::polynomialTransport<Thermo, PolySize>::operator= -( - const polynomialTransport<Thermo, PolySize>& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template<class Thermo, int PolySize> inline void Foam::polynomialTransport<Thermo, PolySize>::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 014d5e45a1a..b2ee7bf4cd7 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 7c65cc99555..33f59fc804b 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<Thermo>::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class Thermo> -inline void Foam::sutherlandTransport<Thermo>::operator= -( - const sutherlandTransport<Thermo>& st -) -{ - Thermo::operator=(st); - - As_ = st.As_; - Ts_ = st.Ts_; -} - - template<class Thermo> inline void Foam::sutherlandTransport<Thermo>::operator+= ( -- GitLab