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 2efa129a33bc03154bd4529b2f993f22cb4ba33d..70f22d77bba213548be5ba40c3a653dcb025c40d 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 062e853976e7cc8d0d7aff8daef7367a031c7e44..cb1b9956dbbed49b0c512ac1fedc50e70f514537 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 6c57dd9ed8b30a34191f1f11bcbd8b5f0910d3b2..8ddb278ec71f9b5104319ae2ca77257ebf5d1ffb 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 f3100fc1cbfacfc7cfe4d03a716500eb7d51aed7..66d37681dfb8e29cf5f7539e9f1085959d4bf0fc 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 b893d5e4895e3965fce7475a0408c948c6978586..93d966afa30f4f6398c3bc814a1418ebfe5e0916 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 28d158d627f05e061547b032fd2adee76a88f5b2..659a2eba106591baff46599d5f86356bc40500da 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 17237770f504229f268601a8c5ae76dbe84d1fba..9d4a55974d9882ead8685698dfad7af24bfd8832 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 8d5e24476ae6c4a8ce067e208c9f2b4dafb2c4ff..3e5f84633e25dbf2bfd1628f4f91c421cb764602 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 33ce77074defd7644e02cc04a189d77413a0696c..eb405838c5a9232d546042484a6ea0f3d36c4535 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 f761b155bfaffc57485c25fdb045cf44f7306f35..865d221b7b2d760213d35ffcab0df0b1565c42fd 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 1cbe9a27bb8105c4e8072bec1f646789a4bd70c0..772b33f1145f9071459c0c97e81462d15717dd54 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 1728e4d5e4aa3deb39f601d9cf88ac1c21ee5e78..bb283fe9d217018105bb552a8223335702e44061 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 25df894d52588e63543dce40f96def3e763128ba..cc2db84dbe6778cd4591ddb77640da7d7a1395f4 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 f80ebfdf2b4561b557adc173986ac86bca1cb368..ce59a51e773fdb1dc38d8102db4f6794d6a1e260 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 5def2ae71f09b75cf9cea72310a3dbbcfd35eb65..74acf1129514233f0293a1ee7153fe45d41ea73e 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 0e2588fd5c00a408ed864e3c54311f3ca534c155..db19b16684b71eed20bc8d90cd35eaea13670138 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 65eb006f97b83c5343ae8ccc5048142b30ad4f28..47b7952ee76fc080dd68ecc327efe4ae8b07b15c 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 a37cb77ad8dc32835904a094df7c52ef2b45d52d..ff084e9731e4f7a9624f4ed61327702589e4bbc8 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 5da299e94c45de15b8fc1a0863dedc4ab061fb3c..0381efdd761313ae0a6f2bc5919196d53713eaf9 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 6cfb64502af095f228c47c8ba5c0a3523421c079..98606f8e60d587dce98a68035e5ce249940f6ead 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 f3eb55ee194e275797e4dbdc468cfff4c0fdcc00..9858d8f80ac55ca2028df431073b4598707d9ff3 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 887255a294a1ccbdda8c4050e53419e717b69823..e1c2cfaeca2860dda67d9174251788da8fcf087d 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 a515dcd832c3ca8c766e9236a97b6f7046b67f35..71d0d16158cdc7ac3be18d1bf475d626775d4a47 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 7d85a7bc9aa15983c9f392eeb820a1fa299a45d0..b05ffb0d5e67d10d6fa10e93e14c1ee7f3e3c7e9 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 d8cd3d806c817e9f5706214d919fb3cbd7ccf6ed..f044a520804c86d4cac2ed1a131b1a47e11c3156 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 dcdbb6378337d42e7506ccf652e8ffc769029e72..e93789a267865a7189fe0283278ffa062b238179 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 74af61c3635e069fea64620bc78ec2774aeab1f8..f57d86dba9ce5deb598a272d548d795ed96b5273 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 be735e96c9fde1ad4f43d7385edfe47026ec0d0f..c5dcc67e73a08109b1f5908e6deee7ff36b85c38 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 a126bb676a55a54613772466d2ca405d027672a5..38a62f1dbb184351a06fe09095578312771512a8 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 33ac39ee9f23cbae50d2407d83e0e46ff6d7c233..2b6f1a210dbc16b820feb42323a1c5b4892383ce 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 b8806ca4dfec9f468fa01a06abbfe5f54cb89252..1e615be79424d973a15dfad03fe0499826425e9e 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 9f8941cd0d2bcd3e3ad90ea9379da05f21cf2021..eadf6d1b0974a4fac0a8b2ee6c7913077cb13028 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 9ee8d5c855d963c3f4d14aaa82c421891561159c..e4622291cfd446757cc03ab32b15e3443320f0c9 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 618b46a66881349b1d03d209addcd3d7274986c1..5cb63ba0a9e300a2548ce11e7dcc61f18f444d34 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 bfc1cb65576fb378682c3c316e6bd13d66181111..1532fb798396e8d17e593b3546e570292828ef5d 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 f30645c7342ad601f403d1f8bcffa05c60f3dbbf..278eec5fa6451faf616a6271308c2213bff2949e 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 c831921d0436a3218fc0fac7cd8b44b082bbdeda..bccfdb617706a82446af516fbe2c151ae8698dae 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 431e092dd50899594967de7318166d74414f7d5a..ed82063b7217ea45a07d0099757d0098d64ae0bb 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 576e9442ce9727c55f5163374a2df754918f0d15..a3e0569dcf4542a9ecf1420f5b872ba60ea8c27a 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 f66488b03bd75e19fc288076aeec9226473fae64..a25ea6a1f28caf3fc8fff573e2f83f56a00fd7c8 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 f9b4c8034d16affd1e5b477231887142dfce1638..02e231fc78f67ddb9991ef1f1f9487bc4b4f0129 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 a809ae9a92c0e8c781b543c761ecd766ec61cbf9..8fd251ceebea3772c37b926a466455987655b51b 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 fe32dfbc814164a1dc5079e985ddcaf9f72f78aa..da08030c273013f935ddbbaf6eb181c14add28a7 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 f608b638ef76eb074e21e43f1202d520a2419a02..aa89cda78abbca83fcd2021bddfc34cadaac3a7c 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 e08cda5c72b1467a803e7cba5f5531118759d490..1c88d8e5fba63197e3f9e1a90adec1db44b5f848 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 a2c2259c7fd7902af4fb4559f72efebdd77bce47..c1c7cf58f731f3377a62c82f76cdf496b6e498e5 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 0da36e3d77024ccba8f278026e7fc3304791e914..a9c5999cdc5f1322f16a4fdcf85c16c6530ed0cc 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 dd4b949299a8a091446ab81446f650f8dc45c08c..810f58b4bdb790dff11457547f93f7a3b14fe312 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 795522aa6c2c672edcd08aad683dfbe6b5833c56..7f99ae6d5e40aced3aaef95054fa7d086fa063d4 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 6ec7032a5f92d07807018b8dbfb6035cba0f9236..5d97dec4996fded423788001a84c658ba92678f4 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 efffff4de8d8a620bd4c2060292388ba3b69d7ae..f19cbf13c35dbee025eb4e1a94396abac114b7f2 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 81036dc53a49f42bd95e97ea00a6a65faf453d91..09646c6d4c5afd01eac1cdc9da36c5524f3c7244 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 8164e34709a9c4d596820eaf08b9ff8ce9f08c74..d22f7000530576687300750041614eca62138277 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 de01b05e3b1cc8dce3711658af78a60a1f3dea50..02a2828ae4ffc403f1113993e88e428a4e308032 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 22139a481d25bcf73eebe89078dc6dc68417bdc5..9d3d4aa6e89fae1d3735f0f3ce4592fa3296ebc0 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 a689f76e76003df0159b3e408f2d2b5660aa6e69..6b814e14bafc3db7f29c05c52ad945fdbad8dda2 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 837d059f84dca97a2bac36ab21a924c160ddbadc..3de9fd8f92c30a8b3d8f62172634dbbed16411fb 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 92bfc65c854531d6541495ebd8c4ca043768b9b0..ae65d7e84e9671fde76915975e7fe55e7f7cd812 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 6adb9399a2ed50ff8969a998a72b1c3d3ac047da..9e62180e93f0253e5be6b45d8afbc9a2f189570f 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 78e18f1d8efd96a7f6ddd75a7963db694498630a..895e6bc934ed4ae7f5037910931caba5755831d5 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 3f3f0f0484ec92ef2f8bc509fa34c391489820d5..30b25885b365d338772cd54266bc3a3714d280b4 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 cd93fe6f27c9b6fa38c88377e4c6a66b404266a4..9e2fd966642e03266d419e5a6b354a81fdfd38d6 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 f6b7a4fa736becd04364bbc700c087b10452518e..6139c0d8cae0bcf5277b543ea432337b23c4a4db 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 5a35da3e99f175ce0d691d867fc61c87ebdc6e2d..40a306c4a4f9f5cd6b876055049306c3e3f821c7 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 1637cfa145c576a649aa5de4deaf76fe10003a66..4b64bad0f84ef51f0ff9d40d580e1634a35df857 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 19836e51802d95be727ae55371dae05c3e9d1e35..88173d2a0c1a61d5404d87c7834f6b2b3652e61f 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 bbc7a9dcef27a8311e4d3320830e73935f9b3f33..6e7e4815a98b58d41663e8409a173b772504fd85 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 f59e29e308f8bd5bee9931bb46f8f69de36f46bd..39ca34346fc092ba7fefe29384495a8434b70306 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 bf957935ed1a55b2884657a8da61bc455a899d7a..35076e8718b5bb075ba22286361d3b3e447ad96a 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 cd4993e68d74bfc51ca0abf49bff914a0458a57b..63206d40337ec56f09d849d0e4aa4645cb04b838 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 ae1e30ed5f44f7851ff2bb6042d9a7e74c3ad956..518ab6e03aac235f6d5e27889eb686ab7a982ab1 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 90aa101bc12398c6ebc5e8d39efd956d4ed29725..22ac751f04ae16fc04b366e999f4196060a13f5b 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 55d28fca81fad20b116b6e7ed82aa40707c0a054..b9dee1af3c98a7a887d65aca4a119c697fd7a225 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 931a149e50ddd6802292bcc47e26214a22eff6a9..d4ef00e0849a0b0e53ebfd63552dfb4ba1b3bead 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 5825a783b9784df119b397146ba29d914e9f6242..8fd901356d1923d4442db2ca0138bbb05cd15374 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 ed1151acace549e185dbb99f65e2db257938e49a..19544ccebd32809989b21c6b61a303d6cd0249f0 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 96a021e0112ab8884b98780303ee9a2ebc4e6940..5d4cce827495972145c6572cb29f1718db0094ed 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 de65986fd0c98a97b673128706182559ea0a10c3..641c1c28cf0051f7299f564be2676c5fad6f8ab2 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 696bd183e68ca06181d439cfa9980c2a4c7fd398..5ed4cef54fb811608a1762296e5ee5818ed7e342 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 2d3588fe39f8e6a6a985852d8651944c9fc36cc9..60126bb60fe48855afaaef83b04133b82beaa5d1 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 32c4f176e3829903b575e7f3806b8c41836ba6ef..c2be3566dc682b45a28177f7cd8a7db54f49f973 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 117d322818c82ed27385f53a69e8cc6c8be4eea0..a1b02cf52f78b3a1344cfd6c6101ca4599437de5 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 8a3b9637c9e310debfc0b6a48af5189e30902c66..08c7640ba34cbaedc225f678e55e9ce5201783a3 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 269d706887082e67b02dd3091384023773dedb2a..9b25903e6ce6f3742aa9c5143b79a2a3f8802508 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 6b282f4575194d23cfc58ce41b584580c1b7d81e..27b7278cd5c43b14472a122c2e58b12c0c363ada 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 f1735ea045aec8b812f06129d594ab4856ecce97..a39903b683b8929c131104f3880ddda9be9279bc 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 74604f94472fcf90154eca567a987c94a46167dc..a4d1d6e966c57b51e178bcd1677c10dfceccb44a 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 0711471a3c0c078487b873dbfae84bac9aaa7cb0..2182e768419c75a338d32be6fcadb94f1532025f 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 bf99e63b4a46320487802261ee668ed50cb59831..927265ad950b2f0c08bf375e5d3b99e6b17f70e5 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 b808ff7a80d2dead5e7d6b508bfb1e05fccfccbc..39cffe72f0412040852ea8cef8f175eb4481bbb4 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 80f1334d8ab85880aac92bf04e4bb5e3688bcd0f..0f421f529ca488e62d2599b97dc46b6cb494ecb4 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 80a7057e000b146008c2849f660bba6ef268ab6c..3690f8967457c6dcaf8486741c6fd5528cb065b2 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 4b5a5061ba943e1fffa6b086ac8089707e5a089d..9c71de10ccf22986d506ff6cbd02a2114c8b5d35 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 4dff53de151b08667e7515ad2bf56a6d4aa2e57f..85fca72210779b6438950294ae32258fd5377d56 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 64333e09c62d470186bc176d04d1ea0fc7bbe6e0..bff862dc9843bb6a0bb458dc6969e05beb308d20 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 09154da058f40cbaa5f68a5af430b7553e778d32..0725506fd36556bd5ece7d9806ae337d7764459d 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 c6ca542a957efcc513bcf4fbfddcf9b5284296d9..ff6e380ee1b19844eb77e65c78d150f3cfd27140 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 dab5e94af39339a6d1444759f11209e6aca786af..401316a5b523b49438a3d785e133d725475b9bc3 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 c27deab24ee24d3d9d4653c09bbe6c1b299ad878..0fe8151cebdc0f3d2c9d5c076450b28c3d6cc0b4 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 690d7f09e65fa3ff1d57e16f1368ab8cb4ab9327..6ef21b28a72b8515bf74607aa541941f54259bf0 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 684c34434d67a594af68dd9cff2e65b04e3ba906..66aa55583c1de878bb5ba418b677d676f9a3da5d 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 a5587969446f185b21fce87eaac5a609c565b630..f131ba9c74ab83189f9a8a9bbca9030f8e11a81b 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 c14e1c30c144f09609e2abe5865391b277ca192b..aa35a251738e0d713ab7ca84642018ece086b6cf 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 62144a1b65013e19340fbedabdc0c4d07623b997..52cd9ea5536522367a7ded5f86e01c3ec6d25580 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 f665d0093da1d457f83ac73f3996beab492014c6..34f37ca7cff687b1945501b17c4f50d8fd905e3c 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 23dc92596b41c86bc6ea9785046745b40033f8e7..3fb36c86d703b705a0be016dcf1c18c322af6650 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 775f0eabc0a0355efad0d8dacf4c7d81aa5bbc3e..a0666472792a665fa455b5997ecaacdf16b8eb1c 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 759d9096bb8e971d096f717c562ed5ce2e738fde..36d2af5a763639cb7f2fdaf622810d4bcf35bd44 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 9f1a788c207b76fdac10b96adaf1402e58686277..3179488aedcd12edbed73379424665866dc2aeb4 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 881cd9fe68cb5c74b33213ae411be9a0f393a5e3..a3692d19c48982e01e12dcb5ed95ed420cf36406 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 c82403590b787c6816879f7bf4f971b4c94500f9..0599b7b21091ad892a5d2075dbdb01a3a11df551 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 ddf64edf4c67ac4152c942949761017e7697075b..9b53370576f456f6846f9e399c29d8d496fd71a3 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 c312e1b4b1e77ce6853d94ed9c84968cf86aa0a7..d7fb649f0253a2a4608edd4518aebe68c114bfac 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 64ac742740ecae0f08d725ec4823f000361f8a31..3599c62e7c3ef515a7611323379dbd9508fcbc49 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 014d5e45a1af293ec887223615fb67ff0bacf0e0..b2ee7bf4cd7fd17d1e57ab1ce17cde11be6271b6 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 7c65cc995553d55375ef0adcd32437a2f7a7f6d1..33f59fc804b960a2bd41ac2b66c830b4329d1c98 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+= (