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 2efa129a33..70f22d77bb 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 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 062e853976..cb1b9956db 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 6c57dd9ed8..8ddb278ec7 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 f3100fc1cb..66d37681df 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& iter) diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index b893d5e489..93d966afa3 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 28d158d627..659a2eba10 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 17237770f5..9d4a55974d 100644 --- a/src/OpenFOAM/containers/Lists/SubList/SubList.H +++ b/src/OpenFOAM/containers/Lists/SubList/SubList.H @@ -76,6 +76,12 @@ public: inline static const SubList& null(); + // Generated Methods + + //- Copy construct + SubList(const SubList&) = default; + + // Constructors //- Construct from UList 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 8d5e24476a..3e5f84633e 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&) = default; + + // Constructors //- Null constructor diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index 33ce77074d..eb405838c5 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 f761b155bf..865d221b7b 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C @@ -77,12 +77,6 @@ Foam::baseIOdictionary::baseIOdictionary } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -Foam::baseIOdictionary::~baseIOdictionary() -{} - - // * * * * * * * * * * * * * * * Members Functions * * * * * * * * * * * * * // const Foam::word& Foam::baseIOdictionary::name() const diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H index 1cbe9a27bb..772b33f114 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H @@ -68,6 +68,18 @@ public: TypeName("dictionary"); + // Generated Methods + + //- Copy construct + baseIOdictionary(const baseIOdictionary&) = default; + + //- Move construct + baseIOdictionary(baseIOdictionary&&) = default; + + //- Destructor + virtual ~baseIOdictionary() = default; + + // Constructors //- Construct given an IOobject @@ -80,11 +92,7 @@ public: baseIOdictionary(const IOobject&, Istream&); - //- Destructor - virtual ~baseIOdictionary(); - - - // Member functions + // Member Functions //- Return complete path + object name if the file exists // either in the case/processor or case otherwise null diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H index 1728e4d5e4..bb283fe9d2 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 25df894d52..cc2db84dbe 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 f80ebfdf2b..ce59a51e77 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 5def2ae71f..74acf11295 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 0e2588fd5c..db19b16684 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 65eb006f97..47b7952ee7 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 a37cb77ad8..ff084e9731 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 5da299e94c..0381efdd76 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 6cfb64502a..98606f8e60 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 f3eb55ee19..9858d8f80a 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 887255a294..e1c2cfaeca 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::readTable() template Foam::interpolation2DTable::interpolation2DTable() : - List>>>(), + List(), bounding_(bounds::normalBounding::WARN), fileName_("fileNameIsUndefined"), reader_(nullptr) @@ -71,7 +71,7 @@ Foam::interpolation2DTable::interpolation2DTable const fileName& fName ) : - List>>>(values), + List(values), bounding_(bounding), fileName_(fName), reader_(nullptr) @@ -81,7 +81,7 @@ Foam::interpolation2DTable::interpolation2DTable template Foam::interpolation2DTable::interpolation2DTable(const fileName& fName) : - List>>>(), + List(), bounding_(bounds::normalBounding::WARN), fileName_(fName), reader_(new openFoamTableReader(dictionary())) @@ -93,7 +93,7 @@ Foam::interpolation2DTable::interpolation2DTable(const fileName& fName) template Foam::interpolation2DTable::interpolation2DTable(const dictionary& dict) : - List>>>(), + List(), bounding_ ( bounds::normalBoundingNames.lookupOrDefault @@ -114,13 +114,13 @@ Foam::interpolation2DTable::interpolation2DTable(const dictionary& dict) template Foam::interpolation2DTable::interpolation2DTable ( - const interpolation2DTable& interpTable + const interpolation2DTable& tbl ) : - List>>>(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_.clone()) {} @@ -312,6 +312,24 @@ Foam::label Foam::interpolation2DTable::Xi // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template +void Foam::interpolation2DTable::operator= +( + const interpolation2DTable& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + reader_.reset(rhs.reader_.clone()); +} + + template Type Foam::interpolation2DTable::operator() ( diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H index a515dcd832..71d0d16158 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>>> { -public: - - // Public data types - - //- Convenience typedef - typedef List>>> 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>> value_type; + + //- Convenience typedef + typedef List>>> 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> const List>& operator[](const label) const; + //- Copy assignment + void operator=(const interpolation2DTable& rhs); + //- Return an interpolated value Type operator()(const scalar valueX, const scalar valueY) const; }; diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index 7d85a7bc9a..b05ffb0d5e 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::readTable() template Foam::interpolationTable::interpolationTable() : - List>(), + List(), bounding_(bounds::repeatableBounding::WARN), fileName_("fileNameIsUndefined"), reader_(nullptr) @@ -74,7 +75,7 @@ Foam::interpolationTable::interpolationTable const fileName& fName ) : - List>(values), + List(values), bounding_(bounding), fileName_(fName), reader_(nullptr) @@ -84,7 +85,7 @@ Foam::interpolationTable::interpolationTable template Foam::interpolationTable::interpolationTable(const fileName& fName) : - List>(), + List(), bounding_(bounds::repeatableBounding::WARN), fileName_(fName), reader_(new openFoamTableReader(dictionary())) @@ -96,7 +97,7 @@ Foam::interpolationTable::interpolationTable(const fileName& fName) template Foam::interpolationTable::interpolationTable(const dictionary& dict) : - List>(), + List(), bounding_ ( bounds::repeatableBoundingNames.lookupOrDefault @@ -117,17 +118,16 @@ Foam::interpolationTable::interpolationTable(const dictionary& dict) template Foam::interpolationTable::interpolationTable ( - const interpolationTable& interpTable + const interpolationTable& tbl ) : - List>(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_.clone()) {} - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template @@ -318,6 +318,24 @@ Type Foam::interpolationTable::rateOfChange(const scalar value) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template +void Foam::interpolationTable::operator= +( + const interpolationTable& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + reader_.reset(rhs.reader_.clone()); +} + + template const Foam::Tuple2& Foam::interpolationTable::operator[](const label i) const diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H index d8cd3d806c..f044a52080 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 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& rhs); + //- Return an element of constant Tuple2 const Tuple2& operator[](const label) const; diff --git a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H index dcdbb63783..e93789a267 100644 --- a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H +++ b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H @@ -73,6 +73,18 @@ class patchIdentifier public: + // Generated Methods + + //- Copy construct + patchIdentifier(const patchIdentifier&) = default; + + //- Copy assignment + patchIdentifier& operator=(const patchIdentifier&) = default; + + //- Destructor + virtual ~patchIdentifier() = default; + + // Constructors //- Construct from components @@ -100,10 +112,6 @@ public: ); - //- Destructor - virtual ~patchIdentifier() = default; - - // Member Functions //- Return the patch name diff --git a/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H b/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H index 74af61c363..f57d86dba9 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 be735e96c9..c5dcc67e73 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 - //- Construct null - inline SymmTensor(); + //- Default construct + SymmTensor() = default; + + //- Copy construct + SymmTensor(const SymmTensor&) = default; + + //- Copy assignment + SymmTensor& operator=(const SymmTensor&) = default; + + + // Constructors //- Construct initialized to zero inline SymmTensor(const Foam::zero); diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H index a126bb676a..38a62f1dbb 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::SymmTensor::SymmTensor() -{} - - template inline Foam::SymmTensor::SymmTensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H index 33ac39ee9f..2b6f1a210d 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 - //- Construct null - inline SymmTensor2D(); + //- Default construct + SymmTensor2D() = default; + + //- Copy construct + SymmTensor2D(const SymmTensor2D&) = default; + + //- Copy assignment + SymmTensor2D& operator=(const SymmTensor2D&) = default; + + + // Constructors //- Construct initialized to zero inline SymmTensor2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H index b8806ca4df..1e615be794 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::SymmTensor2D::SymmTensor2D() -{} - - template inline Foam::SymmTensor2D::SymmTensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H index 9f8941cd0d..eadf6d1b09 100644 --- a/src/OpenFOAM/primitives/Tensor/Tensor.H +++ b/src/OpenFOAM/primitives/Tensor/Tensor.H @@ -89,10 +89,19 @@ public: enum components { XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ }; - // Constructors + // Generated Methods - //- Construct null - inline Tensor(); + //- Default construct + Tensor() = default; + + //- Copy construct + Tensor(const Tensor&) = default; + + //- Copy assignment + Tensor& operator=(const Tensor&) = default; + + + // Constructors //- Construct initialized to zero inline Tensor(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index 9ee8d5c855..e4622291cf 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -30,11 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Tensor::Tensor() -{} - - template inline Foam::Tensor::Tensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H index 618b46a668..5cb63ba0a9 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 - //- Construct null - inline Tensor2D(); + //- Default construct + Tensor2D() = default; + + //- Copy construct + Tensor2D(const Tensor2D&) = default; + + //- 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 bfc1cb6557..1532fb7983 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Tensor2D::Tensor2D() -{} - - template inline Foam::Tensor2D::Tensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector/Vector.H b/src/OpenFOAM/primitives/Vector/Vector.H index f30645c734..278eec5fa6 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 - //- Construct null - inline Vector(); + //- Default construct + Vector() = default; + + //- Copy construct + Vector(const Vector&) = default; + + //- Copy assignment + Vector& operator=(const Vector&) = default; + + + // Constructors //- Construct initialized to zero inline Vector(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Vector/VectorI.H b/src/OpenFOAM/primitives/Vector/VectorI.H index c831921d04..bccfdb6177 100644 --- a/src/OpenFOAM/primitives/Vector/VectorI.H +++ b/src/OpenFOAM/primitives/Vector/VectorI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Vector::Vector() -{} - - template inline Foam::Vector::Vector(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2D.H b/src/OpenFOAM/primitives/Vector2D/Vector2D.H index 431e092dd5..ed82063b72 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 - //- Construct null - inline Vector2D(); + //- Default construct + Vector2D() = default; + + //- Copy construct + Vector2D(const Vector2D&) = default; + + //- Copy assignment + Vector2D& operator=(const Vector2D&) = default; + + + // Constructors //- Construct initialized to zero inline Vector2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H index 576e9442ce..a3e0569dcf 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Vector2D::Vector2D() -{} - - template inline Foam::Vector2D::Vector2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/complex/complex.H b/src/OpenFOAM/primitives/complex/complex.H index f66488b03b..a25ea6a1f2 100644 --- a/src/OpenFOAM/primitives/complex/complex.H +++ b/src/OpenFOAM/primitives/complex/complex.H @@ -90,14 +90,26 @@ class complex public: + // Generated Methods + + //- Copy construct + complex(const complex&) = default; + + //- Copy assignment + complex& operator=(const complex&) = default; + + //- Move construct + complex(complex&&) = default; + + //- Move assignment + complex& operator=(complex&&) = default; + + // Constructors - //- Construct null as zero-initialized + //- Default construct, as zero-initialized inline constexpr complex() noexcept; - //- Default copy constructor - complex(const complex&) = default; - //- Construct zero-initialized from zero class inline constexpr complex(const Foam::zero) noexcept; @@ -173,9 +185,6 @@ public: } - //- Copy assignment - inline void operator=(const complex& c); - //- Assign zero inline void operator=(const Foam::zero); diff --git a/src/OpenFOAM/primitives/complex/complexI.H b/src/OpenFOAM/primitives/complex/complexI.H index f9b4c8034d..02e231fc78 100644 --- a/src/OpenFOAM/primitives/complex/complexI.H +++ b/src/OpenFOAM/primitives/complex/complexI.H @@ -116,13 +116,6 @@ inline Foam::complex Foam::complex::conjugate() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::complex::operator=(const complex& c) -{ - re = c.re; - im = c.im; -} - - inline void Foam::complex::operator=(const Foam::zero) { re = 0; diff --git a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H index a809ae9a92..8fd251ceeb 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H +++ b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H @@ -63,18 +63,21 @@ class Uniform : public Constant { - // Private Member Functions +public: + + //- Declare type-name, virtual type (with debug switch) + TypeName("uniform"); + + + // Generated Methods + + //- Copy construct + Uniform(const Uniform&) = default; //- No copy assignment void operator=(const Uniform&) = delete; -public: - - // Runtime type information - TypeName("uniform"); - - // Constructors //- Construct from entry name and dictionary diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C index fe32dfbc81..da08030c27 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C @@ -43,18 +43,6 @@ Foam::Polynomial::Polynomial() } -template -Foam::Polynomial::Polynomial -( - const Polynomial& poly -) -: - VectorSpace, scalar, PolySize>(poly), - logActive_(poly.logActive_), - logCoeff_(poly.logCoeff_) -{} - - template Foam::Polynomial::Polynomial(const scalar coeffs[PolySize]) : diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H index f608b638ef..aa89cda78a 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H @@ -108,9 +108,6 @@ public: //- Construct null, with all coefficients = 0.0 Polynomial(); - //- Copy constructor - Polynomial(const Polynomial&); - //- Construct from C-array of coefficients explicit Polynomial(const scalar coeffs[PolySize]); diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H index e08cda5c72..1c88d8e5fb 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H @@ -88,6 +88,16 @@ public: static const vectorTensorTransform I; + // Generated Methods + + //- Copy construct + vectorTensorTransform(const vectorTensorTransform&) = default; + + //- Copy assignment + vectorTensorTransform& + operator=(const vectorTensorTransform&) = default; + + // Constructors //- Construct null @@ -151,11 +161,11 @@ public: tmp> transform(const Field&) const; - // Member operators + // Member Operators - inline void operator=(const vectorTensorTransform&); inline void operator&=(const vectorTensorTransform&); + //- Assign translation inline void operator=(const vector&); inline void operator+=(const vector&); inline void operator-=(const vector&); diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H index a2c2259c7f..c1c7cf58f7 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H @@ -173,17 +173,6 @@ inline Foam::pointField Foam::vectorTensorTransform::invTransformPosition // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::vectorTensorTransform::operator= -( - const vectorTensorTransform& tr -) -{ - t_ = tr.t_; - R_ = tr.R_; - hasR_ = tr.hasR_; -} - - inline void Foam::vectorTensorTransform::operator&= ( const vectorTensorTransform& tr diff --git a/src/OpenFOAM/primitives/quaternion/quaternion.H b/src/OpenFOAM/primitives/quaternion/quaternion.H index 0da36e3d77..a9c5999cdc 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 - //- Construct null - inline quaternion(); + //- Default construct + quaternion() = default; + + //- Copy construct + quaternion(const quaternion&) = default; + + //- Copy assignment + quaternion& operator=(const quaternion&) = default; + + + // Constructors //- Construct zero initialized inline quaternion(const Foam::zero); @@ -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 dd4b949299..810f58b4bd 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternionI.H +++ b/src/OpenFOAM/primitives/quaternion/quaternionI.H @@ -28,10 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::quaternion::quaternion() -{} - - inline Foam::quaternion::quaternion(const Foam::zero) : w_(Zero), @@ -585,12 +581,6 @@ inline Foam::vector Foam::quaternion::eulerAngles // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::quaternion::operator=(const quaternion& q) -{ - w_ = q.w_; - v_ = q.v_; -} - inline void Foam::quaternion::operator+=(const quaternion& q) { w_ += q.w_; diff --git a/src/OpenFOAM/primitives/random/Random/Random.C b/src/OpenFOAM/primitives/random/Random/Random.C index 795522aa6c..7f99ae6d5e 100644 --- a/src/OpenFOAM/primitives/random/Random/Random.C +++ b/src/OpenFOAM/primitives/random/Random/Random.C @@ -40,13 +40,9 @@ Foam::Random::Random(const label seedValue) {} -Foam::Random::Random(const Random& r, const bool reset) +Foam::Random::Random(const Random& rnd, const bool reset) : - seed_(r.seed_), - generator_(r.generator_), - uniform01_(), - hasGaussSample_(r.hasGaussSample_), - gaussSample_(r.gaussSample_) + Random(rnd) { if (reset) { diff --git a/src/OpenFOAM/primitives/random/Random/Random.H b/src/OpenFOAM/primitives/random/Random/Random.H index 6ec7032a5f..5d97dec499 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 efffff4de8..f19cbf13c3 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 81036dc53a..09646c6d4c 100644 --- a/src/OpenFOAM/primitives/septernion/septernionI.H +++ b/src/OpenFOAM/primitives/septernion/septernionI.H @@ -27,7 +27,10 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::septernion::septernion() +inline Foam::septernion::septernion(const Foam::zero) +: + t_(Zero), + r_(Zero) {} inline Foam::septernion::septernion(const vector& t, const quaternion& r) @@ -95,12 +98,6 @@ inline Foam::vector Foam::septernion::invTransformPoint(const vector& v) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::septernion::operator=(const septernion& tr) -{ - t_ = tr.t_; - r_ = tr.r_; -} - inline void Foam::septernion::operator*=(const septernion& tr) { t_ = tr.t() + tr.r().invTransform(t_); diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.C b/src/dynamicMesh/boundaryPatch/boundaryPatch.C index 8164e34709..d22f700053 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.C +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.C @@ -59,34 +59,14 @@ Foam::boundaryPatch::boundaryPatch {} -Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p) -: - patchIdentifier(p.name(), p.index(), p.physicalType()), - size_(p.size()), - start_(p.start()) -{} - - Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index) : - patchIdentifier(p.name(), index, p.physicalType()), - size_(p.size()), - start_(p.start()) -{} - - -Foam::autoPtr Foam::boundaryPatch::clone() const + boundaryPatch(p) { - return autoPtr::New(*this); + patchIdentifier::index() = index; } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::boundaryPatch::~boundaryPatch() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::boundaryPatch::write(Ostream& os) const diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.H b/src/dynamicMesh/boundaryPatch/boundaryPatch.H index de01b05e3b..02a2828ae4 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.H +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.H @@ -88,18 +88,15 @@ public: const label index ); - //- Construct as copy - boundaryPatch(const boundaryPatch&); + //- Copy construct, resetting the index + boundaryPatch(const boundaryPatch& p, const label index); - //- Construct as copy, resetting the index - boundaryPatch(const boundaryPatch&, const label index); //- Clone - autoPtr clone() const; - - - //- Destructor - ~boundaryPatch(); + autoPtr clone() const + { + return autoPtr::New(*this); + } // Member Functions diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H index 22139a481d..9d3d4aa6e8 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 a689f76e76..6b814e14ba 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H @@ -51,14 +51,6 @@ inline Foam::directionInfo::directionInfo {} -// Construct as copy -inline Foam::directionInfo::directionInfo(const directionInfo& w2) -: - index_(w2.index()), - n_(w2.n()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H index 837d059f84..3de9fd8f92 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 92bfc65c85..ae65d7e84e 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H @@ -74,13 +74,6 @@ inline Foam::wallNormalInfo::wallNormalInfo(const vector& normal) {} -// Construct as copy -inline Foam::wallNormalInfo::wallNormalInfo(const wallNormalInfo& wpt) -: - normal_(wpt.normal()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::vector& Foam::wallNormalInfo::normal() const diff --git a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H index 6adb9399a2..9e62180e93 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 78e18f1d8e..895e6bc934 100644 --- a/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H +++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H @@ -135,16 +135,6 @@ inline Foam::externalPointEdgePoint::externalPointEdgePoint {} -inline Foam::externalPointEdgePoint::externalPointEdgePoint -( - const externalPointEdgePoint& wpt -) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::externalPointEdgePoint::origin() const diff --git a/src/engine/ignition/ignitionSite.H b/src/engine/ignition/ignitionSite.H index 3f3f0f0484..30b25885b3 100644 --- a/src/engine/ignition/ignitionSite.H +++ b/src/engine/ignition/ignitionSite.H @@ -112,6 +112,12 @@ public: }; + // Generated Methods + + //- Copy construct + ignitionSite(const ignitionSite&) = default; + + // Constructors //- Construct from Istream and database diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H index cd93fe6f27..9e2fd96664 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 f6b7a4fa73..6139c0d8ca 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 5a35da3e99..40a306c4a4 100644 --- a/src/finiteVolume/functionObjects/fieldSelections/fieldSelection/fieldSelectionI.H +++ b/src/finiteVolume/functionObjects/fieldSelections/fieldSelection/fieldSelectionI.H @@ -29,9 +29,9 @@ inline Foam::HashSet Foam::functionObjects::fieldSelection::filters() const { HashSet f; - for (const auto fieldInfo : *this) + for (const fieldInfo& fi : *this) { - f.insert(fieldInfo.name()); + f.insert(fi.name()); } return f; diff --git a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C index 1637cfa145..4b64bad0f8 100644 --- a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C +++ b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C @@ -29,14 +29,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::referredWallFace::referredWallFace() -: - face(), - pts_(), - patchi_() -{} - - Foam::referredWallFace::referredWallFace ( const face& f, @@ -57,27 +49,6 @@ Foam::referredWallFace::referredWallFace } -Foam::referredWallFace::referredWallFace(const referredWallFace& rWF) -: - face(rWF), - pts_(rWF.pts_), - patchi_(rWF.patchi_) -{ - if (this->size() != pts_.size()) - { - FatalErrorInFunction - << "Face and pointField are not the same size. " << nl << (*this) - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::referredWallFace::~referredWallFace() -{} - - // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // bool Foam::referredWallFace::operator==(const referredWallFace& rhs) const diff --git a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H index 19836e5180..88173d2a0c 100644 --- a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H +++ b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H @@ -76,10 +76,13 @@ class referredWallFace public: - // Constructors + // Generated Methods - //- Construct null - referredWallFace(); + //- Default construct + referredWallFace() = default; + + + // Constructors //- Construct from components referredWallFace @@ -89,13 +92,6 @@ public: label patchi ); - //- Construct as copy - referredWallFace(const referredWallFace&); - - - //- Destructor - ~referredWallFace(); - // Member Functions diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C index bbc7a9dcef..6e7e4815a9 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 -Foam::CollisionRecordList::CollisionRecordList() -: - pairRecords_(), - wallRecords_() -{} - - template Foam::CollisionRecordList::CollisionRecordList(Istream& is) : @@ -122,13 +114,6 @@ Foam::CollisionRecordList::CollisionRecordList } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * / - -template -Foam::CollisionRecordList::~CollisionRecordList() -{} - - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // template @@ -385,27 +370,6 @@ void Foam::CollisionRecordList::update() } -// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // - -template -void Foam::CollisionRecordList::operator= -( - const CollisionRecordList& 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 diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H index f59e29e308..39ca34346f 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H @@ -90,10 +90,13 @@ class CollisionRecordList public: - // Constructors + // Generated Methods - //- Construct null - CollisionRecordList(); + //- Default construct + CollisionRecordList() = default; + + + // Constructors //- Construct from Istream CollisionRecordList(Istream&); @@ -110,9 +113,6 @@ public: const Field& wallData ); - //- Destructor - ~CollisionRecordList(); - // Member Functions @@ -196,11 +196,6 @@ public: void update(); - // Member Operators - - void operator=(const CollisionRecordList&); - - // Friend Operators friend bool operator== diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index bf957935ed..35076e8718 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -188,16 +188,6 @@ Foam::phaseProperties::phaseProperties() {} -Foam::phaseProperties::phaseProperties(const phaseProperties& pp) -: - phase_(pp.phase_), - stateLabel_(pp.stateLabel_), - names_(pp.names_), - Y_(pp.Y_), - carrierIds_(pp.carrierIds_) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::phaseProperties::reorder diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H index cd4993e68d..63206d4033 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -124,13 +124,6 @@ public: //- Construct from Istream phaseProperties(Istream& is); - //- Construct as copy - phaseProperties(const phaseProperties& pp); - - - //- Destructor - ~phaseProperties() = default; - // Public Member Functions diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C index ae1e30ed5f..518ab6e03a 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -32,11 +32,7 @@ License Foam::phaseProperties::phaseProperties(Istream& is) : - phase_(UNKNOWN), - stateLabel_("(unknown)"), - names_(), - Y_(), - carrierIds_() + phaseProperties() { is >> *this; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H index 90aa101bc1..22ac751f04 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H @@ -65,13 +65,12 @@ class forceSuSp : public Tuple2 { - public: // Constructors - //- Construct null - inline forceSuSp(); + //- Default construct + forceSuSp() = default; //- Construct zero-initialized content inline forceSuSp(const zero); @@ -108,9 +107,6 @@ public: // Operators - //- Assignment - inline void operator=(const forceSuSp& susp); - //- Addition inline void operator+=(const forceSuSp& susp); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H index 55d28fca81..b9dee1af3c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H @@ -27,10 +27,6 @@ License // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * // -inline Foam::forceSuSp::forceSuSp() -{} - - inline Foam::forceSuSp::forceSuSp(const zero) : Tuple2(vector::zero, 0.0) @@ -87,13 +83,6 @@ inline Foam::scalar& Foam::forceSuSp::Sp() // * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * * // -inline void Foam::forceSuSp::operator=(const forceSuSp& susp) -{ - first() = susp.first(); - second() = susp.second(); -} - - inline void Foam::forceSuSp::operator+=(const forceSuSp& susp) { first() += susp.first(); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index 931a149e50..d4ef00e084 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -71,29 +71,6 @@ SingleKineticRateDevolatilisation } -template -Foam::SingleKineticRateDevolatilisation:: -SingleKineticRateDevolatilisation -( - const SingleKineticRateDevolatilisation& dm -) -: - DevolatilisationModel(dm), - volatileData_(dm.volatileData_), - YVolatile0_(dm.YVolatile0_), - volatileToGasMap_(dm.volatileToGasMap_), - residualCoeff_(dm.residualCoeff_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::SingleKineticRateDevolatilisation:: -~SingleKineticRateDevolatilisation() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index 5825a783b9..8fd901356d 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& dm - ); - //- Construct and return a clone virtual autoPtr> 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 ed1151acac..19544ccebd 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H @@ -126,12 +126,17 @@ class blockDescriptor void findCurvedFaces(); +public: + + // Generated Methods + + //- Copy construct + blockDescriptor(const blockDescriptor&) = default; + //- No copy assignment void operator=(const blockDescriptor&) = delete; -public: - // Constructors //- Construct from components. Optional cellSet/zone name. diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H index 96a021e011..5d4cce8274 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 de65986fd0..641c1c28cf 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H @@ -139,14 +139,6 @@ inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo {} -// Construct as copy -inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo(const patchEdgeFaceInfo& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::patchEdgeFaceInfo::origin() const diff --git a/src/meshTools/algorithms/PointEdgeWave/PointData.H b/src/meshTools/algorithms/PointEdgeWave/PointData.H index 696bd183e6..5ed4cef54f 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 2d3588fe39..60126bb60f 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H @@ -51,14 +51,6 @@ inline Foam::PointData::PointData {} -template -inline Foam::PointData::PointData(const PointData& wpt) -: - pointEdgePoint(wpt), - data_(wpt.data()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H index 32c4f176e3..c2be3566dc 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 117d322818..a1b02cf52f 100644 --- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H +++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H @@ -139,14 +139,6 @@ inline Foam::pointEdgePoint::pointEdgePoint {} -// Construct as copy -inline Foam::pointEdgePoint::pointEdgePoint(const pointEdgePoint& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::pointEdgePoint::origin() const diff --git a/src/meshTools/cellClassification/cellInfo.H b/src/meshTools/cellClassification/cellInfo.H index 8a3b9637c9..08c7640ba3 100644 --- a/src/meshTools/cellClassification/cellInfo.H +++ b/src/meshTools/cellClassification/cellInfo.H @@ -92,11 +92,8 @@ public: //- Construct null inline cellInfo(); - //- Construct from cType - inline cellInfo(const label); - - //- Construct as copy - inline cellInfo(const cellInfo&); + //- Construct from cellClassification type + inline explicit cellInfo(const label ctype); // Member Functions diff --git a/src/meshTools/cellClassification/cellInfoI.H b/src/meshTools/cellClassification/cellInfoI.H index 269d706887..9b25903e6c 100644 --- a/src/meshTools/cellClassification/cellInfoI.H +++ b/src/meshTools/cellClassification/cellInfoI.H @@ -101,17 +101,9 @@ inline Foam::cellInfo::cellInfo() {} -// Construct from components -inline Foam::cellInfo::cellInfo(const label type) +inline Foam::cellInfo::cellInfo(const label ctype) : - type_(type) -{} - - -// Construct as copy -inline Foam::cellInfo::cellInfo(const cellInfo& w2) -: - type_(w2.type()) + type_(ctype) {} diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 6b282f4575..27b7278cd5 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -99,9 +99,6 @@ public: //- Construct from origin, distance inline wallPoint(const point& origin, const scalar distSqr); - //- Construct as copy - inline wallPoint(const wallPoint&); - // Member Functions diff --git a/src/meshTools/cellDist/wallPoint/wallPointI.H b/src/meshTools/cellDist/wallPoint/wallPointI.H index f1735ea045..a39903b683 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointI.H @@ -98,13 +98,6 @@ inline Foam::wallPoint::wallPoint(const point& origin, const scalar distSqr) {} -inline Foam::wallPoint::wallPoint(const wallPoint& wpt) -: - origin_(wpt.origin()), - distSqr_(wpt.distSqr()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::point& Foam::wallPoint::origin() const diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C index 74604f9447..a4d1d6e966 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C @@ -61,24 +61,4 @@ Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState {} -Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState -( - const sixDoFRigidBodyMotionState& sDoFRBMS -) -: - centreOfRotation_(sDoFRBMS.centreOfRotation()), - Q_(sDoFRBMS.Q()), - v_(sDoFRBMS.v()), - a_(sDoFRBMS.a()), - pi_(sDoFRBMS.pi()), - tau_(sDoFRBMS.tau()) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::sixDoFRigidBodyMotionState::~sixDoFRigidBodyMotionState() -{} - - // ************************************************************************* // diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H index 0711471a3c..2182e76841 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H @@ -102,13 +102,6 @@ public: //- Construct from dictionary sixDoFRigidBodyMotionState(const dictionary& dict); - //- Construct as copy - sixDoFRigidBodyMotionState(const sixDoFRigidBodyMotionState&); - - - //- Destructor - ~sixDoFRigidBodyMotionState(); - // Member Functions diff --git a/src/surfMesh/surfZone/surfZone.C b/src/surfMesh/surfZone/surfZone.C index bf99e63b4a..927265ad95 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 b808ff7a80..39cffe72f0 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 80f1334d8a..0f421f529c 100644 --- a/src/surfMesh/triSurface/patches/geometricSurfacePatch.H +++ b/src/surfMesh/triSurface/patches/geometricSurfacePatch.H @@ -93,6 +93,16 @@ public: ClassName("geometricSurfacePatch"); + // Generated Methods + + //- Copy construct + geometricSurfacePatch(const geometricSurfacePatch&) = default; + + //- Copy assignment + geometricSurfacePatch& + operator=(const geometricSurfacePatch&) = default; + + // Constructors //- Construct null diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H index 80a7057e00..3690f89674 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H @@ -133,9 +133,8 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const constAnIsoSolidTransport&); inline void operator+=(const constAnIsoSolidTransport&); diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H index 4b5a5061ba..9c71de10cc 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H @@ -96,16 +96,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constAnIsoSolidTransport::operator= -( - const constAnIsoSolidTransport& ct -) -{ - kappa_ = ct.kappa_; -} - - template inline void Foam::constAnIsoSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H index 4dff53de15..85fca72210 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H @@ -134,13 +134,12 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const constIsoSolidTransport&); inline void operator+=(const constIsoSolidTransport&); - // Friend operators + // Friend Operators friend constIsoSolidTransport operator* ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H index 64333e09c6..bff862dc98 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H @@ -96,17 +96,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constIsoSolidTransport::operator= -( - const constIsoSolidTransport& ct -) -{ - thermo::operator=(ct); - kappa_ = ct.kappa_; -} - - template inline void Foam::constIsoSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H index 09154da058..0725506fd3 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H @@ -142,13 +142,12 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const exponentialSolidTransport&); inline void operator+=(const exponentialSolidTransport&); - // Friend operators + // Friend Operators friend exponentialSolidTransport operator* ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H index c6ca542a95..ff6e380ee1 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H @@ -108,19 +108,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -template -inline void Foam::exponentialSolidTransport::operator= -( - const exponentialSolidTransport& ct -) -{ - kappa0_ = ct.kappa0_; - n0_ = ct.n0_; - Tref_ = ct.Tref_; -} - - template inline void Foam::exponentialSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H index dab5e94af3..401316a5b5 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H @@ -183,14 +183,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const polynomialSolidTransport&); inline void operator+=(const polynomialSolidTransport&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend polynomialSolidTransport operator+ ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H index c27deab24e..0fe8151ceb 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H @@ -120,18 +120,6 @@ inline Foam::scalar Foam::polynomialSolidTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::polynomialSolidTransport::operator= -( - const polynomialSolidTransport& pt -) -{ - Thermo::operator=(pt); - - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::polynomialSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index 690d7f09e6..6ef21b28a7 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -209,14 +209,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const icoPolynomial&); inline void operator+=(const icoPolynomial&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend icoPolynomial operator+ ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H index 684c34434d..66aa55583c 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H @@ -174,18 +174,6 @@ inline Foam::scalar Foam::icoPolynomial::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::icoPolynomial::operator= -( - const icoPolynomial& ip -) -{ - Specie::operator=(ip); - - rhoCoeffs_ = ip.rhoCoeffs_; -} - - template inline void Foam::icoPolynomial::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index a558796944..f131ba9c74 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H @@ -178,14 +178,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const incompressiblePerfectGas&); inline void operator+=(const incompressiblePerfectGas&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend incompressiblePerfectGas operator+ ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index c14e1c30c1..aa35a25173 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -175,17 +175,6 @@ inline Foam::scalar Foam::incompressiblePerfectGas::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::incompressiblePerfectGas::operator= -( - const incompressiblePerfectGas& ipg -) -{ - Specie::operator=(ipg); - pRef_ = ipg.pRef_; -} - - template inline void Foam::incompressiblePerfectGas::operator+= ( diff --git a/src/thermophysicalModels/specie/specie/specie.H b/src/thermophysicalModels/specie/specie/specie.H index 62144a1b65..52cd9ea553 100644 --- a/src/thermophysicalModels/specie/specie/specie.H +++ b/src/thermophysicalModels/specie/specie/specie.H @@ -85,6 +85,12 @@ public: ClassName("specie"); + // Generated Methods + + //- Copy construct + specie(const specie&) = default; + + // Constructors //- Construct from components without name @@ -128,9 +134,11 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators + //- Copy assignment, preserve original name inline void operator=(const specie&); + inline void operator+=(const specie&); inline void operator*=(const scalar); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index f665d0093d..34f37ca7cf 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -228,9 +228,8 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const hPolynomialThermo&); inline void operator+=(const hPolynomialThermo&); inline void operator*=(const scalar); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index 23dc92596b..3fb36c86d7 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -159,22 +159,6 @@ inline Foam::scalar Foam::hPolynomialThermo::dCpdT // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::hPolynomialThermo::operator= -( - const hPolynomialThermo& pt -) -{ - EquationOfState::operator=(pt); - - Hf_ = pt.Hf_; - Sf_ = pt.Sf_; - CpCoeffs_ = pt.CpCoeffs_; - hCoeffs_ = pt.hCoeffs_; - sCoeffs_ = pt.sCoeffs_; -} - - template inline void Foam::hPolynomialThermo::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H index 775f0eabc0..a066647279 100644 --- a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H +++ b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H @@ -159,9 +159,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const WLFTransport&); + // Member Operators inline void operator+=(const WLFTransport&); diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H b/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H index 759d9096bb..36d2af5a76 100644 --- a/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H +++ b/src/thermophysicalModels/specie/transport/WLF/WLFTransportI.H @@ -107,22 +107,6 @@ inline Foam::scalar Foam::WLFTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::WLFTransport::operator= -( - const WLFTransport& wlft -) -{ - Thermo::operator=(wlft); - - mu0_ = wlft.mu0_; - Tr_ = wlft.Tr_; - C1_ = wlft.C1_; - C2_ = wlft.C2_; - rPr_ = wlft.rPr_; -} - - template inline void Foam::WLFTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 9f1a788c20..3179488aed 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -144,9 +144,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const constTransport&); + // Member Operators inline void operator+=(const constTransport&); diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index 881cd9fe68..a3692d19c4 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -110,19 +110,6 @@ inline Foam::scalar Foam::constTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constTransport::operator= -( - const constTransport& ct -) -{ - Thermo::operator=(ct); - - mu_ = ct.mu_; - rPr_ = ct.rPr_; -} - - template inline void Foam::constTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H index c82403590b..0599b7b210 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H @@ -204,9 +204,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const logPolynomialTransport&); + // Member Operators inline void operator+=(const logPolynomialTransport&); diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H index ddf64edf4c..9b53370576 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H @@ -108,19 +108,6 @@ inline Foam::scalar Foam::logPolynomialTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::logPolynomialTransport::operator= -( - const logPolynomialTransport& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::logPolynomialTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index c312e1b4b1..d7fb649f02 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -186,9 +186,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const polynomialTransport&); + // Member Operators inline void operator+=(const polynomialTransport&); diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index 64ac742740..3599c62e7c 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -108,19 +108,6 @@ inline Foam::scalar Foam::polynomialTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::polynomialTransport::operator= -( - const polynomialTransport& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::polynomialTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 014d5e45a1..b2ee7bf4cd 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -169,9 +169,7 @@ public: void write(Ostream& os) const; - // Member operators - - inline void operator=(const sutherlandTransport&); + // Member Operators inline void operator+=(const sutherlandTransport&); diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 7c65cc9955..33f59fc804 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -146,19 +146,6 @@ inline Foam::scalar Foam::sutherlandTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::sutherlandTransport::operator= -( - const sutherlandTransport& st -) -{ - Thermo::operator=(st); - - As_ = st.As_; - Ts_ = st.Ts_; -} - - template inline void Foam::sutherlandTransport::operator+= (