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 d6d8dd9601..8355ecc3d6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H @@ -141,6 +141,13 @@ public: typedef indexedVertex Other; }; + + // Generated Methods + + //- Copy construct + indexedVertex(const indexedVertex&) = default; + + // Constructors inline indexedVertex(); diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index 85e19aed49..506af1c006 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -784,8 +784,8 @@ public: // Constructors - //- Construct null (end iterator) - inline iterator() {} + //- Default construct (end iterator) + iterator() = default; //- Copy construct from similar access type inline explicit iterator(const Iterator& iter) @@ -828,8 +828,11 @@ public: // Constructors - //- Construct null (end iterator) - inline const_iterator() {} + //- Default construct (end iterator) + const_iterator() = default; + + //- Copy construct + const_iterator(const const_iterator&) = default; //- Copy construct from similar access type inline explicit const_iterator(const Iterator& iter) diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index d65363113e..4f83bce5d7 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H @@ -200,6 +200,9 @@ public: public: + //- Copy construct + iterator(const iterator&) = default; + //- Construct for a given DLListBase and link inline iterator(DLListBase&, link*); @@ -240,6 +243,9 @@ public: //- Construct from a non-const iterator inline const_iterator(const DLListBase::iterator& iter); + //- Copy construct + const_iterator(const const_iterator&) = default; + //- Currently pointing at a valid entry inline bool found() const; @@ -277,6 +283,9 @@ public: //- Construct for a given DLListBase and link inline const_reverse_iterator(const DLListBase& lst, const link*); + //- Copy construct + const_reverse_iterator(const const_reverse_iterator&) = default; + //- Currently pointing at a valid entry inline bool found() const; diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H index 421922d3b8..ba6b946722 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/SLListBase/SLListBase.H @@ -182,6 +182,9 @@ public: public: + //- Copy construct + iterator(const iterator&) = default; + //- Construct for a given SLListBase and link inline iterator(SLListBase&, link*); @@ -222,6 +225,9 @@ public: //- Construct from a non-const iterator inline const_iterator(const SLListBase::iterator& iter); + //- Copy construct + const_iterator(const const_iterator&) = default; + //- Currently pointing at a valid entry inline bool found() const; diff --git a/src/OpenFOAM/containers/Lists/SubList/SubList.H b/src/OpenFOAM/containers/Lists/SubList/SubList.H index 1a02f11d79..d870a70a5b 100644 --- a/src/OpenFOAM/containers/Lists/SubList/SubList.H +++ b/src/OpenFOAM/containers/Lists/SubList/SubList.H @@ -64,6 +64,12 @@ public: inline static const SubList& null(); + // Generated Methods + + //- Copy construct + SubList(const SubList&) = default; + + // Constructors //- Construct from UList and sub-list size diff --git a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H index 2fb26f4a36..46f301043b 100644 --- a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H +++ b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H @@ -80,6 +80,12 @@ public: const labelUList& addr ); + //- Copy construct (shallow copy of values and addressing arrays) + UIndirectList(const UIndirectList& list) + : + UIndirectList(list.completeList_, list.addressing_) + {} + // Member Functions diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H index 76e5362d3a..032f7d59be 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.H +++ b/src/OpenFOAM/containers/Lists/UList/UList.H @@ -174,6 +174,12 @@ public: }; + // Generated Methods + + //- Copy construct + UList(const UList&) = default; + + // Constructors //- Null constructor diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index d97bc75153..44f2a8f4c2 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -340,12 +340,6 @@ Foam::IOobject::IOobject {} -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -Foam::IOobject::~IOobject() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::objectRegistry& Foam::IOobject::db() const diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index c520fbd890..d3e2c1dd06 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -220,6 +220,15 @@ public: static inline word groupName(StringType name, const word& group); + // Generated Methods + + //- Copy construct + IOobject(const IOobject&) = default; + + //- Destructor + virtual ~IOobject() = default; + + // Constructors //- Construct from name, instance, registry, io options @@ -289,10 +298,6 @@ public: } - //- Destructor - virtual ~IOobject(); - - // Member Functions // General access diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C index ef8e34185a..a5df77d07e 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C +++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C @@ -169,14 +169,6 @@ Foam::CompactIOField::CompactIOField } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::CompactIOField::~CompactIOField() -{} - - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H index 02fbedacc7..775f01d156 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H +++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H @@ -85,6 +85,9 @@ public: // Constructors + //- Default copy construct + CompactIOField(const CompactIOField&) = default; + //- Construct from IOobject CompactIOField(const IOobject&); @@ -103,7 +106,7 @@ public: // Destructor - virtual ~CompactIOField(); + virtual ~CompactIOField() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C index 3cb85ba18a..0edaa9986f 100644 --- a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C +++ b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C @@ -91,13 +91,6 @@ Foam::GlobalIOField::GlobalIOField } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::GlobalIOField::~GlobalIOField() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H index f4b4124f87..52904615da 100644 --- a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H +++ b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H @@ -61,6 +61,9 @@ public: // Constructors + //- Default copy construct + GlobalIOField(const GlobalIOField&) = default; + //- Construct from IOobject GlobalIOField(const IOobject&); @@ -75,7 +78,7 @@ public: //- Destructor - virtual ~GlobalIOField(); + virtual ~GlobalIOField() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C index bad4fe1237..5f26307cf5 100644 --- a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C +++ b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C @@ -87,13 +87,6 @@ Foam::GlobalIOList::GlobalIOList } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::GlobalIOList::~GlobalIOList() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H index 1f7cb9c466..5a8cb73e62 100644 --- a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H +++ b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H @@ -61,6 +61,9 @@ public: // Constructors + //- Default copy construct + GlobalIOList(const GlobalIOList&) = default; + //- Construct from IOobject GlobalIOList(const IOobject&); @@ -75,7 +78,7 @@ public: //- Destructor - virtual ~GlobalIOList(); + virtual ~GlobalIOList() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.C b/src/OpenFOAM/db/IOobjects/IOField/IOField.C index 41d386e2d5..42e4f592e0 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -166,12 +166,6 @@ Foam::IOField::IOField(const IOobject& io, const Xfer>& f) } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::IOField::~IOField() -{} - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.H b/src/OpenFOAM/db/IOobjects/IOField/IOField.H index 768c8b05ea..78b9536a26 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.H +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.H @@ -61,6 +61,9 @@ public: // Constructors + //- Default copy construct + IOField(const IOField&) = default; + //- Construct from IOobject IOField(const IOobject&); @@ -78,7 +81,7 @@ public: //- Destructor - virtual ~IOField(); + virtual ~IOField() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C index 3859e4de04..c20d1520c9 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -129,13 +129,6 @@ Foam::IOList::IOList(const IOobject& io, const Xfer>& list) } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::IOList::~IOList() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.H b/src/OpenFOAM/db/IOobjects/IOList/IOList.H index ea5b42dc50..dfdadecf86 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.H +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.H @@ -62,6 +62,9 @@ public: // Constructors + //- Default copy construct + IOList(const IOList&) = default; + //- Construct from IOobject IOList(const IOobject&); @@ -76,7 +79,7 @@ public: //- Destructor - virtual ~IOList(); + virtual ~IOList() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C index 3e1cea8c95..e10ac19fde 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C @@ -128,13 +128,6 @@ Foam::IOMap::IOMap(const IOobject& io, const Xfer>& map) } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::IOMap::~IOMap() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H index 5dce64772f..7c61a3960b 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H @@ -63,6 +63,9 @@ public: // Constructors + //- Default copy construct + IOMap(const IOMap&) = default; + //- Construct from IOobject IOMap(const IOobject&); @@ -77,7 +80,7 @@ public: //- Destructor - virtual ~IOMap(); + virtual ~IOMap() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C index 9e39ab5150..353ba17829 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C @@ -141,13 +141,6 @@ Foam::IOPtrList::IOPtrList(const IOobject& io, const Xfer>& list) } -// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // - -template -Foam::IOPtrList::~IOPtrList() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H index 09df9ba721..2f8b15a887 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H @@ -62,6 +62,9 @@ public: // Constructors + //- Default copy construct + IOPtrList(const IOPtrList&) = default; + //- Construct from IOobject using given Istream constructor class template IOPtrList(const IOobject&, const INew&); @@ -80,7 +83,7 @@ public: //- Destructor - virtual ~IOPtrList(); + virtual ~IOPtrList() = default; // Member functions diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C index de28e1f295..91a48440dc 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.C @@ -75,12 +75,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 5aeb311d6f..bf137248f3 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/baseIOdictionary.H @@ -66,6 +66,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 @@ -78,11 +90,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 653fe66e50..cc923e626f 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H @@ -263,6 +263,15 @@ protected: public: + // Generated Methods + + //- Copy construct + IOstream(const IOstream&) = default; + + //- Destructor + virtual ~IOstream() = default; + + // Constructors //- Construct setting format and version @@ -284,11 +293,6 @@ public: } - //- Destructor - virtual ~IOstream() - {} - - // Member functions // Access diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H index e55211309d..9eebae08b7 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H @@ -70,6 +70,15 @@ class Istream public: + // Generated Methods + + //- Copy construct + Istream(const Istream&) = default; + + //- Destructor + virtual ~Istream() = default; + + // Constructors //- Construct and set stream status @@ -85,12 +94,7 @@ public: {} - //- Destructor - virtual ~Istream() - {} - - - // 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 1c6d2131bc..c4edc55820 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H @@ -72,6 +72,15 @@ protected: public: + // Generated Methods + + //- Copy construct + Ostream(const Ostream&) = default; + + //- Destructor + virtual ~Ostream() = default; + + // Constructors //- Construct and set stream status @@ -87,12 +96,7 @@ public: {} - //- Destructor - virtual ~Ostream() - {} - - - // 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 8218a5a3d6..587cd64b47 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H @@ -59,14 +59,17 @@ class OSstream std::ostream& os_; - // Private Member Functions +public: + + // Generated Methods + + //- Copy construct + OSstream(const OSstream&) = default; //- Disallow default bitwise 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 499bad8cb2..7f14d1c2b2 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 4e13175f0d..f801b3a8e1 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H @@ -271,10 +271,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 4ddaa2473f..5a65531a95 100644 --- a/src/OpenFOAM/db/error/IOerror.C +++ b/src/OpenFOAM/db/error/IOerror.C @@ -52,7 +52,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 42a63d30f6..ec6a88d955 100644 --- a/src/OpenFOAM/db/error/error.C +++ b/src/OpenFOAM/db/error/error.C @@ -129,7 +129,7 @@ Foam::error::error(const error& err) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::error::~error() throw() +Foam::error::~error() noexcept { delete messageStreamPtr_; } diff --git a/src/OpenFOAM/db/error/error.H b/src/OpenFOAM/db/error/error.H index 5674df7a69..f531628256 100644 --- a/src/OpenFOAM/db/error/error.H +++ b/src/OpenFOAM/db/error/error.H @@ -97,7 +97,7 @@ public: //- Destructor - virtual ~error() throw(); + virtual ~error() noexcept; // Static Member Functions @@ -247,7 +247,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 3058b8e5b0..e0a7abcee7 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H @@ -63,6 +63,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 b624145aeb..d86d0a18e8 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -2,8 +2,11 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,7 +56,7 @@ void Foam::interpolation2DTable::readTable() template Foam::interpolation2DTable::interpolation2DTable() : - List>>>(), + List(), bounding_(bounds::normalBounding::WARN), fileName_("fileNameIsUndefined"), reader_(nullptr) @@ -68,7 +71,7 @@ Foam::interpolation2DTable::interpolation2DTable const fileName& fName ) : - List>>>(values), + List(values), bounding_(bounding), fileName_(fName), reader_(nullptr) @@ -78,7 +81,7 @@ Foam::interpolation2DTable::interpolation2DTable template Foam::interpolation2DTable::interpolation2DTable(const fileName& fName) : - List>>>(), + List(), bounding_(bounds::normalBounding::WARN), fileName_(fName), reader_(new openFoamTableReader(dictionary())) @@ -90,7 +93,7 @@ Foam::interpolation2DTable::interpolation2DTable(const fileName& fName) template Foam::interpolation2DTable::interpolation2DTable(const dictionary& dict) : - List>>>(), + List(), bounding_ ( bounds::normalBoundingNames.lookupOrFailsafe @@ -110,17 +113,16 @@ Foam::interpolation2DTable::interpolation2DTable(const dictionary& dict) template Foam::interpolation2DTable::interpolation2DTable ( - const interpolation2DTable& interpTable + const interpolation2DTable& tbl ) : - List>>>(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_, false) // clone {} - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template @@ -308,6 +310,29 @@ Foam::label Foam::interpolation2DTable::Xi // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template +void Foam::interpolation2DTable::operator= +( + const interpolation2DTable& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + // reader_.reset(rhs.reader_.clone()); + reader_.reset(); + if (rhs.reader_.valid()) + { + reader_.reset(rhs.reader_().clone().ptr()); // clone + } +} + + template Type Foam::interpolation2DTable::operator() ( diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H index 5c4eb31057..71d0d16158 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H @@ -2,8 +2,11 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | www.openfoam.com \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,17 +58,7 @@ class interpolation2DTable : public List>>> { -public: - - // Public data types - - //- Convenience typedef - typedef List>>> table; - - -private: - - // Private data + // Private Data //- Handling for out-of-bound values bounds::normalBounding bounding_; @@ -101,6 +94,15 @@ private: public: + // Public Data Types + + //- The element data type + typedef Tuple2>> value_type; + + //- Convenience typedef + typedef List>>> table; + + // Constructors //- Construct null @@ -120,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 @@ -139,6 +141,9 @@ public: //- Return an element of constant List> const List>& operator[](const label) const; + //- Copy assignment + void operator=(const interpolation2DTable& rhs); + //- Return an interpolated value Type operator()(const scalar valueX, const scalar valueY) const; }; diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index 8b162427e7..eda488bb52 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -2,8 +2,11 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | www.openfoam.com \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,7 +60,7 @@ void Foam::interpolationTable::readTable() template Foam::interpolationTable::interpolationTable() : - List>(), + List(), bounding_(bounds::repeatableBounding::WARN), fileName_("fileNameIsUndefined"), reader_(nullptr) @@ -72,7 +75,7 @@ Foam::interpolationTable::interpolationTable const fileName& fName ) : - List>(values), + List(values), bounding_(bounding), fileName_(fName), reader_(nullptr) @@ -82,7 +85,7 @@ Foam::interpolationTable::interpolationTable template Foam::interpolationTable::interpolationTable(const fileName& fName) : - List>(), + List(), bounding_(bounds::repeatableBounding::WARN), fileName_(fName), reader_(new openFoamTableReader(dictionary())) @@ -94,7 +97,7 @@ Foam::interpolationTable::interpolationTable(const fileName& fName) template Foam::interpolationTable::interpolationTable(const dictionary& dict) : - List>(), + List(), bounding_ ( bounds::repeatableBoundingNames.lookupOrFailsafe @@ -114,17 +117,16 @@ Foam::interpolationTable::interpolationTable(const dictionary& dict) template Foam::interpolationTable::interpolationTable ( - const interpolationTable& interpTable + const interpolationTable& tbl ) : - List>(interpTable), - bounding_(interpTable.bounding_), - fileName_(interpTable.fileName_), - reader_(interpTable.reader_) // note: steals reader. Used in write(). + List(tbl), + bounding_(tbl.bounding_), + fileName_(tbl.fileName_), + reader_(tbl.reader_, false) // clone {} - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template @@ -315,6 +317,29 @@ Type Foam::interpolationTable::rateOfChange(const scalar value) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template +void Foam::interpolationTable::operator= +( + const interpolationTable& rhs +) +{ + if (this == &rhs) + { + return; + } + + static_cast&>(*this) = rhs; + bounding_ = rhs.bounding_; + fileName_ = rhs.fileName_; + // reader_.reset(rhs.reader_.clone()); + reader_.reset(); + if (rhs.reader_.valid()) + { + reader_.reset(rhs.reader_().clone().ptr()); // clone + } +} + + template const Foam::Tuple2& Foam::interpolationTable::operator[](const label i) const diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H index e75040703e..6acf475176 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H @@ -2,8 +2,10 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | www.openfoam.com \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2011-2016 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -102,6 +104,15 @@ class interpolationTable public: + // Public Data Types + + //- The element data type + typedef Tuple2 value_type; + + //- The mapped data type + typedef Type mapped_type; + + // Constructors //- Construct null @@ -123,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 @@ -143,6 +154,9 @@ public: // Member Operators + //- Copy assignment + void operator=(const interpolationTable& rhs); + //- Return an element of constant Tuple2 const Tuple2& operator[](const label) const; diff --git a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C index 274549fb3c..26f6241d5f 100644 --- a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C +++ b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.C @@ -72,12 +72,6 @@ Foam::patchIdentifier::patchIdentifier {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::patchIdentifier::~patchIdentifier() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::patchIdentifier::inGroup(const word& name) const diff --git a/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H b/src/OpenFOAM/meshes/Identifiers/patch/patchIdentifier.H index 760744a87e..870c1b0f34 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(); - - // 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 26922f5aef..05bfa90a12 100644 --- a/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H +++ b/src/OpenFOAM/meshes/Identifiers/surface/surfZoneIdentifier.H @@ -80,6 +80,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 036f63e84e..4259627aea 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H @@ -77,10 +77,19 @@ public: enum components { XX, XY, XZ, YY, YZ, ZZ }; - // Constructors + // Generated Methods - //- Construct null - inline SymmTensor(); + //- Default construct + SymmTensor() = default; + + //- Copy construct + SymmTensor(const SymmTensor&) = default; + + //- Copy assignment + SymmTensor& operator=(const SymmTensor&) = default; + + + // Constructors //- Construct initialized to zero inline SymmTensor(const Foam::zero); diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H index be703817a5..508c346d94 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::SymmTensor::SymmTensor() -{} - - template inline Foam::SymmTensor::SymmTensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H index 141f15f2d2..1d80ff3ea6 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H @@ -77,10 +77,19 @@ public: enum components { XX, XY, YY }; - // Constructors + // Generated Methods - //- Construct null - inline SymmTensor2D(); + //- Default construct + SymmTensor2D() = default; + + //- Copy construct + SymmTensor2D(const SymmTensor2D&) = default; + + //- Copy assignment + SymmTensor2D& operator=(const SymmTensor2D&) = default; + + + // Constructors //- Construct initialized to zero inline SymmTensor2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H index 769fe9e6be..85ba3ef755 100644 --- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H +++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H @@ -28,11 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::SymmTensor2D::SymmTensor2D() -{} - - template inline Foam::SymmTensor2D::SymmTensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H index ee670f07b9..a9c7c96c83 100644 --- a/src/OpenFOAM/primitives/Tensor/Tensor.H +++ b/src/OpenFOAM/primitives/Tensor/Tensor.H @@ -85,10 +85,19 @@ public: enum components { XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ }; - // Constructors + // Generated Methods - //- Construct null - inline Tensor(); + //- Default construct + Tensor() = default; + + //- Copy construct + Tensor(const Tensor&) = default; + + //- Copy assignment + Tensor& operator=(const Tensor&) = default; + + + // Constructors //- Construct initialized to zero inline Tensor(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index c8ecbc7ce6..3279425fe6 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -27,11 +27,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Tensor::Tensor() -{} - - template inline Foam::Tensor::Tensor(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H index 5ee3db5827..756eb0225f 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H @@ -80,10 +80,19 @@ public: enum components { XX, XY, YX, YY }; - // Constructors + // Generated Methods - //- Construct null - inline Tensor2D(); + //- Default construct + Tensor2D() = default; + + //- Copy construct + Tensor2D(const Tensor2D&) = default; + + //- Copy assignment + Tensor2D& operator=(const Tensor2D&) = default; + + + // Constructors //- Construct initialized to zero inline Tensor2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H index 7f6be0d324..7aa9c9957a 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H @@ -25,11 +25,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Tensor2D::Tensor2D() -{} - - template inline Foam::Tensor2D::Tensor2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector/Vector.H b/src/OpenFOAM/primitives/Vector/Vector.H index 8929027e03..91e3fab29d 100644 --- a/src/OpenFOAM/primitives/Vector/Vector.H +++ b/src/OpenFOAM/primitives/Vector/Vector.H @@ -76,10 +76,19 @@ public: enum components { X, Y, Z }; - // Constructors + // Generated Methods - //- Construct null - inline Vector(); + //- Default construct + Vector() = default; + + //- Copy construct + Vector(const Vector&) = default; + + //- Copy assignment + Vector& operator=(const Vector&) = default; + + + // Constructors //- Construct initialized to zero inline Vector(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Vector/VectorI.H b/src/OpenFOAM/primitives/Vector/VectorI.H index 518a398dc5..6210a7cc79 100644 --- a/src/OpenFOAM/primitives/Vector/VectorI.H +++ b/src/OpenFOAM/primitives/Vector/VectorI.H @@ -25,11 +25,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Vector::Vector() -{} - - template inline Foam::Vector::Vector(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2D.H b/src/OpenFOAM/primitives/Vector2D/Vector2D.H index 58546c6933..9103a43be4 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2D.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2D.H @@ -70,10 +70,19 @@ public: enum components { X, Y }; - // Constructors + // Generated Methods - //- Construct null - inline Vector2D(); + //- Default construct + Vector2D() = default; + + //- Copy construct + Vector2D(const Vector2D&) = default; + + //- Copy assignment + Vector2D& operator=(const Vector2D&) = default; + + + // Constructors //- Construct initialized to zero inline Vector2D(const Foam::zero); diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H index 3148e7d0af..9b46bcd2e4 100644 --- a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H +++ b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H @@ -25,11 +25,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::Vector2D::Vector2D() -{} - - template inline Foam::Vector2D::Vector2D(const Foam::zero) : diff --git a/src/OpenFOAM/primitives/complex/complex.H b/src/OpenFOAM/primitives/complex/complex.H index debae297fe..d084fd5a7c 100644 --- a/src/OpenFOAM/primitives/complex/complex.H +++ b/src/OpenFOAM/primitives/complex/complex.H @@ -95,6 +95,15 @@ public: static const complex one; + // Generated Methods + + //- Copy construct + complex(const complex&) = default; + + //- Copy assignment + complex& operator=(const complex&) = default; + + // Constructors //- Construct null @@ -126,7 +135,6 @@ public: // Member operators - inline void operator=(const complex&); inline void operator+=(const complex&); inline void operator-=(const complex&); inline void operator*=(const complex&); diff --git a/src/OpenFOAM/primitives/complex/complexI.H b/src/OpenFOAM/primitives/complex/complexI.H index 0332b3d0d6..44f825bfa8 100644 --- a/src/OpenFOAM/primitives/complex/complexI.H +++ b/src/OpenFOAM/primitives/complex/complexI.H @@ -31,6 +31,9 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // inline complex::complex() +: + re(0), + im(0) {} @@ -75,13 +78,6 @@ inline complex complex::conjugate() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void complex::operator=(const complex& c) -{ - re = c.re; - im = c.im; -} - - inline void complex::operator+=(const complex& c) { re += c.re; diff --git a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H index 836e82dfc8..d336b5a10a 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H +++ b/src/OpenFOAM/primitives/functions/Function1/Uniform/Uniform.H @@ -61,18 +61,21 @@ class Uniform : public Constant { - // Private Member Functions - - //- Disallow default bitwise assignment - void operator=(const Uniform&); - - public: - // Runtime type information + //- Declare type-name, virtual type (with debug switch) TypeName("uniform"); + // Generated Methods + + //- Copy construct + Uniform(const Uniform&) = default; + + //- No copy assignment + void operator=(const Uniform&) = delete; + + // Constructors //- Construct from entry name and dictionary diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C index 4d99d698bf..5b14db08bd 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C @@ -41,18 +41,6 @@ Foam::Polynomial::Polynomial() } -template -Foam::Polynomial::Polynomial -( - const Polynomial& poly -) -: - VectorSpace, scalar, PolySize>(poly), - logActive_(poly.logActive_), - logCoeff_(poly.logCoeff_) -{} - - template Foam::Polynomial::Polynomial(const scalar coeffs[PolySize]) : diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H index 7ba6f797c9..1a1b553409 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H @@ -106,9 +106,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 c4db7aa53f..4d8fb84a50 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H @@ -86,6 +86,16 @@ public: static const vectorTensorTransform I; + // Generated Methods + + //- Copy construct + vectorTensorTransform(const vectorTensorTransform&) = default; + + //- Copy assignment + vectorTensorTransform& + operator=(const vectorTensorTransform&) = default; + + // Constructors //- Construct null @@ -149,11 +159,11 @@ public: tmp> transform(const Field&) const; - // Member operators + // Member Operators - inline void operator=(const vectorTensorTransform&); inline void operator&=(const vectorTensorTransform&); + //- Assign translation inline void operator=(const vector&); inline void operator+=(const vector&); inline void operator-=(const vector&); diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H index 2290352d7a..1906f938fc 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H @@ -171,17 +171,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 a36b0eed35..fa1d37ab72 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternion.H +++ b/src/OpenFOAM/primitives/quaternion/quaternion.H @@ -119,10 +119,22 @@ public: static const quaternion I; + // Generated Methods + + //- Default construct + quaternion() = default; + + //- Copy construct + quaternion(const quaternion&) = default; + + //- Copy assignment + quaternion& operator=(const quaternion&) = default; + + // Constructors - //- Construct null - inline quaternion(); + //- Construct zero initialized + inline quaternion(const Foam::zero); //- Construct given scalar and vector parts inline quaternion(const scalar w, const vector& v); @@ -213,7 +225,6 @@ public: // Member operators - inline void operator=(const quaternion&); inline void operator+=(const quaternion&); inline void operator-=(const quaternion&); inline void operator*=(const quaternion&); diff --git a/src/OpenFOAM/primitives/quaternion/quaternionI.H b/src/OpenFOAM/primitives/quaternion/quaternionI.H index b64fc8f26b..36b25c3eeb 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternionI.H +++ b/src/OpenFOAM/primitives/quaternion/quaternionI.H @@ -25,7 +25,10 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::quaternion::quaternion() +inline Foam::quaternion::quaternion(const Foam::zero) +: + w_(Zero), + v_(Zero) {} @@ -523,12 +526,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 13073f586e..9c5926d219 100644 --- a/src/OpenFOAM/primitives/random/Random/Random.C +++ b/src/OpenFOAM/primitives/random/Random/Random.C @@ -49,12 +49,9 @@ Foam::Random::Random(const label seed) } -Foam::Random::Random(const Random& r, const bool reset) +Foam::Random::Random(const Random& rnd, const bool reset) : - buffer_(r.buffer_), - seed_(r.seed_), - hasGaussSample_(r.hasGaussSample_), - gaussSample_(r.gaussSample_) + Random(rnd) { if (reset) { @@ -67,12 +64,6 @@ Foam::Random::Random(const Random& r, const bool reset) } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::Random::~Random() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::Random::reset(const label seed) diff --git a/src/OpenFOAM/primitives/random/Random/Random.H b/src/OpenFOAM/primitives/random/Random/Random.H index fb348fdafa..8acd75bc65 100644 --- a/src/OpenFOAM/primitives/random/Random/Random.H +++ b/src/OpenFOAM/primitives/random/Random/Random.H @@ -82,15 +82,11 @@ public: //- Construct given seed and sample count Random(const label seed = 123456); - //- Copy constructor with optional reset of sampleI - Random(const Random& r, const bool reset = false); + //- Copy construct with possible reset of seed + Random(const Random& rnd, const bool reset); - // Destructor - ~Random(); - - - // Member functions + // Member Functions // Access diff --git a/src/OpenFOAM/primitives/septernion/septernion.H b/src/OpenFOAM/primitives/septernion/septernion.H index eb34cb5a6e..424febb2d9 100644 --- a/src/OpenFOAM/primitives/septernion/septernion.H +++ b/src/OpenFOAM/primitives/septernion/septernion.H @@ -84,10 +84,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); @@ -128,9 +140,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 8acf2b51e9..d76272c33b 100644 --- a/src/OpenFOAM/primitives/septernion/septernionI.H +++ b/src/OpenFOAM/primitives/septernion/septernionI.H @@ -25,7 +25,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) @@ -93,12 +96,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 38c1d6b91e..39c9a985a7 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.C +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.C @@ -57,34 +57,14 @@ Foam::boundaryPatch::boundaryPatch {} -Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p) -: - patchIdentifier(p.name(), p.index(), p.physicalType()), - size_(p.size()), - start_(p.start()) -{} - - Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index) : - patchIdentifier(p.name(), index, p.physicalType()), - size_(p.size()), - start_(p.start()) -{} - - -Foam::autoPtr Foam::boundaryPatch::clone() const + boundaryPatch(p) { - return autoPtr(new boundaryPatch(*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 32f8fdacae..0ebca886bd 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.H +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.H @@ -86,18 +86,15 @@ public: const label index ); - //- Construct as copy - boundaryPatch(const boundaryPatch&); + //- Copy construct, resetting the index + boundaryPatch(const boundaryPatch& p, const label index); - //- Construct as copy, resetting the index - boundaryPatch(const boundaryPatch&, const label index); //- Clone - autoPtr clone() const; - - - //- Destructor - ~boundaryPatch(); + autoPtr clone() const + { + return autoPtr(new boundaryPatch(*this)); + } // Member Functions diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H index 3dbe50f4f5..b10c5f38a7 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H @@ -139,9 +139,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 cd2a14ec66..48dd55495b 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H @@ -49,14 +49,6 @@ inline Foam::directionInfo::directionInfo {} -// Construct as copy -inline Foam::directionInfo::directionInfo(const directionInfo& w2) -: - index_(w2.index()), - n_(w2.n()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H index 587fc95da2..927386b5c8 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H @@ -87,8 +87,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 11c06f9fe7..c40c815a93 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H @@ -72,13 +72,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 1735252269..9c109b9422 100644 --- a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H +++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H @@ -122,9 +122,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 e1cfd8e81c..7bd8e2bace 100644 --- a/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H +++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H @@ -133,16 +133,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 e8d3db5340..ae9e42ed21 100644 --- a/src/engine/ignition/ignitionSite.H +++ b/src/engine/ignition/ignitionSite.H @@ -110,6 +110,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 76b4ff80cc..80e3ca2d30 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H @@ -81,6 +81,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 2e9ebbefda..375d8f08a3 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H @@ -66,6 +66,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/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C index 25550be990..285fcda5fd 100644 --- a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C +++ b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.C @@ -27,14 +27,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::referredWallFace::referredWallFace() -: - face(), - pts_(), - patchi_() -{} - - Foam::referredWallFace::referredWallFace ( const face& f, @@ -55,27 +47,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 5c20c81092..045cff3506 100644 --- a/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H +++ b/src/lagrangian/basic/InteractionLists/referredWallFace/referredWallFace.H @@ -74,10 +74,13 @@ class referredWallFace public: - // Constructors + // Generated Methods - //- Construct null - referredWallFace(); + //- Default construct + referredWallFace() = default; + + + // Constructors //- Construct from components referredWallFace @@ -87,13 +90,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 06f0f24da9..0c4f357246 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C @@ -28,14 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::CollisionRecordList::CollisionRecordList() -: - pairRecords_(), - wallRecords_() -{} - - template Foam::CollisionRecordList::CollisionRecordList(Istream& is) : @@ -120,13 +112,6 @@ Foam::CollisionRecordList::CollisionRecordList } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * / - -template -Foam::CollisionRecordList::~CollisionRecordList() -{} - - // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // template @@ -383,27 +368,6 @@ void Foam::CollisionRecordList::update() } -// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // - -template -void Foam::CollisionRecordList::operator= -( - const CollisionRecordList& rhs -) -{ - // Check for assignment to self - if (this == &rhs) - { - FatalErrorInFunction - << "Attempted assignment to self" - << abort(FatalError); - } - - pairRecords_ = rhs.pairRecords_; - wallRecords_ = rhs.wallRecords_; -} - - // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H index 44e444dd88..985ebc209d 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H @@ -88,10 +88,13 @@ class CollisionRecordList public: - // Constructors + // Generated Methods - //- Construct null - CollisionRecordList(); + //- Default construct + CollisionRecordList() = default; + + + // Constructors //- Construct from Istream CollisionRecordList(Istream&); @@ -108,9 +111,6 @@ public: const Field& wallData ); - //- Destructor - ~CollisionRecordList(); - // Member Functions @@ -194,11 +194,6 @@ public: void update(); - // Member Operators - - void operator=(const CollisionRecordList&); - - // Friend Operators friend bool operator== diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index 27f74158e2..6d01ecb4af 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -186,22 +186,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_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseProperties::~phaseProperties() -{} - - // * * * * * * * * * * * * * * * 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 87b6882d6c..c496c349c2 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -122,13 +122,6 @@ public: //- Construct from Istream phaseProperties(Istream&); - //- Construct as copy - phaseProperties(const phaseProperties&); - - - //- Destructor - ~phaseProperties(); - // Public Member Functions diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C index 00ccbe7739..b45daba9aa 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -30,36 +30,9 @@ License Foam::phaseProperties::phaseProperties(Istream& is) : - phase_(UNKNOWN), - stateLabel_("(unknown)"), - names_(0), - Y_(0), - carrierIds_(0) + phaseProperties() { - is.check(FUNCTION_NAME); - - dictionaryEntry phaseInfo(dictionary::null, is); - - phase_ = phaseTypeNames[phaseInfo.keyword()]; - stateLabel_ = phaseToStateLabel(phase_); - - const label nComponents = phaseInfo.size(); - if (nComponents) - { - names_.setSize(nComponents, "unknownSpecie"); - Y_.setSize(nComponents, 0.0); - carrierIds_.setSize(nComponents, -1); - - label cmptI = 0; - forAllConstIter(IDLList, phaseInfo, iter) - { - names_[cmptI] = iter().keyword(); - Y_[cmptI] = readScalar(phaseInfo.lookup(names_[cmptI])); - cmptI++; - } - - checkTotalMassFraction(); - } + 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 df57b2ff4f..d9e33a5860 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H @@ -41,6 +41,7 @@ SourceFiles #define forceSuSp_H #include "Tuple2.H" +#include "vector.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -63,13 +64,15 @@ class forceSuSp : public Tuple2 { - public: // Constructors - //- Construct null - inline forceSuSp(); + //- Default construct + forceSuSp() = default; + + //- Construct zero-initialized content + inline forceSuSp(const zero); //- Construct given Tuple2 inline forceSuSp(const Tuple2& susp); @@ -103,9 +106,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 e9919fde4d..fbf42419b7 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H @@ -25,7 +25,9 @@ License // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * // -inline Foam::forceSuSp::forceSuSp() +inline Foam::forceSuSp::forceSuSp(const zero) +: + Tuple2(vector::zero, 0.0) {} @@ -79,13 +81,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 a4a5b1c184..50e28bf418 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -69,29 +69,6 @@ SingleKineticRateDevolatilisation } -template -Foam::SingleKineticRateDevolatilisation:: -SingleKineticRateDevolatilisation -( - const SingleKineticRateDevolatilisation& dm -) -: - DevolatilisationModel(dm), - volatileData_(dm.volatileData_), - YVolatile0_(dm.YVolatile0_), - volatileToGasMap_(dm.volatileToGasMap_), - residualCoeff_(dm.residualCoeff_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::SingleKineticRateDevolatilisation:: -~SingleKineticRateDevolatilisation() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index 2d8ecbc5c6..8cc7f0eb34 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H @@ -109,18 +109,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 @@ -206,12 +194,6 @@ public: CloudType& owner ); - //- Construct copy - SingleKineticRateDevolatilisation - ( - const SingleKineticRateDevolatilisation& dm - ); - //- Construct and return a clone virtual autoPtr> clone() const { @@ -223,7 +205,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 e4d3b72cb9..b5fc9f4034 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H @@ -126,15 +126,17 @@ class blockDescriptor void findCurvedFaces(); +public: - // Private Member Functions + // Generated Methods + + //- Copy construct + blockDescriptor(const blockDescriptor&) = default; //- Disallow default bitwise assignment void operator=(const blockDescriptor&); -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 7e142c02a0..d7d8138cc5 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H @@ -111,9 +111,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 be99c29713..4b3dbd200e 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H @@ -137,14 +137,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 bbfdb461a5..971a4d237c 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointData.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointData.H @@ -88,9 +88,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 52385f4620..797b19197d 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H @@ -48,14 +48,6 @@ inline Foam::PointData::PointData {} -template -inline Foam::PointData::PointData(const PointData& wpt) -: - pointEdgePoint(wpt), - data_(wpt.data()) -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H index e7ff086dfd..9054175c5d 100644 --- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H +++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H @@ -112,9 +112,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 42f363093b..fab83f0bea 100644 --- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H +++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePointI.H @@ -137,14 +137,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 1912c20bbe..13ffdae322 100644 --- a/src/meshTools/cellClassification/cellInfo.H +++ b/src/meshTools/cellClassification/cellInfo.H @@ -90,11 +90,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 41b43f3cc9..365f9ed38d 100644 --- a/src/meshTools/cellClassification/cellInfoI.H +++ b/src/meshTools/cellClassification/cellInfoI.H @@ -99,17 +99,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 c8dca3b8c6..aec844c9ed 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -97,9 +97,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 79c1a4a9ec..f80cfebba7 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointI.H @@ -96,13 +96,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 f6328c1057..e3829a0def 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C @@ -59,24 +59,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 e7e7eda097..0c700b367a 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.H @@ -100,13 +100,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/surfZone.C b/src/surfMesh/surfZone/surfZone/surfZone.C index b51cdcf60b..361d1763f7 100644 --- a/src/surfMesh/surfZone/surfZone/surfZone.C +++ b/src/surfMesh/surfZone/surfZone/surfZone.C @@ -86,14 +86,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/surfZone.H b/src/surfMesh/surfZone/surfZone/surfZone.H index c7692c4643..5334f4d72d 100644 --- a/src/surfMesh/surfZone/surfZone/surfZone.H +++ b/src/surfMesh/surfZone/surfZone/surfZone.H @@ -79,6 +79,15 @@ public: ClassName("surfZone"); + // Generated Methods + + //- Copy construct + surfZone(const surfZone&) = default; + + //- Copy assignment + surfZone& operator=(const surfZone&) = default; + + // Constructors //- Construct null @@ -105,9 +114,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 cd796d3d0c..d4cc842991 100644 --- a/src/surfMesh/triSurface/patches/geometricSurfacePatch.H +++ b/src/surfMesh/triSurface/patches/geometricSurfacePatch.H @@ -80,6 +80,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 3b75b4ebe6..99bc707123 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H @@ -131,9 +131,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 ee58b30ace..74eb3801ee 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H @@ -97,16 +97,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constAnIsoSolidTransport::operator= -( - const constAnIsoSolidTransport& ct -) -{ - kappa_ = ct.kappa_; -} - - template inline void Foam::constAnIsoSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H index 5de4c38fcf..15ab74c6e5 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H @@ -132,13 +132,12 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const constIsoSolidTransport&); inline void operator+=(const constIsoSolidTransport&); - // Friend operators + // Friend Operators friend constIsoSolidTransport operator* ( diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H index 0065451548..4799265d16 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H @@ -97,17 +97,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constIsoSolidTransport::operator= -( - const constIsoSolidTransport& ct -) -{ - thermo::operator=(ct); - kappa_ = ct.kappa_; -} - - template inline void Foam::constIsoSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H index 1d69fdefad..d47badacc5 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H @@ -140,13 +140,12 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const exponentialSolidTransport&); inline void operator+=(const exponentialSolidTransport&); - // Friend operators + // Friend Operators friend exponentialSolidTransport operator* ( diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H index dd5e5e526f..7fe337c704 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H @@ -109,19 +109,6 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -template -inline void Foam::exponentialSolidTransport::operator= -( - const exponentialSolidTransport& ct -) -{ - kappa0_ = ct.kappa0_; - n0_ = ct.n0_; - Tref_ = ct.Tref_; -} - - template inline void Foam::exponentialSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H index 3cb7a3b3ec..ca560780ed 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H @@ -175,14 +175,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const polynomialSolidTransport&); inline void operator+=(const polynomialSolidTransport&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend polynomialSolidTransport operator+ ( diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H index b0cc6e0384..71f14a045c 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H @@ -124,18 +124,6 @@ inline Foam::scalar Foam::polynomialSolidTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::polynomialSolidTransport::operator= -( - const polynomialSolidTransport& pt -) -{ - Thermo::operator=(pt); - - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::polynomialSolidTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index a024e8320b..bd3c68075e 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -192,14 +192,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const icoPolynomial&); inline void operator+=(const icoPolynomial&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend icoPolynomial operator+ ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H index 66edf3f842..92d0eb07f1 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H @@ -156,18 +156,6 @@ inline Foam::scalar Foam::icoPolynomial::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::icoPolynomial::operator= -( - const icoPolynomial& ip -) -{ - Specie::operator=(ip); - - rhoCoeffs_ = ip.rhoCoeffs_; -} - - template inline void Foam::icoPolynomial::operator+= ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index 5f26245115..63e3aafb9a 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H @@ -170,14 +170,13 @@ public: void write(Ostream& os) const; - // Member operators + // Member Operators - inline void operator=(const incompressiblePerfectGas&); inline void operator+=(const incompressiblePerfectGas&); inline void operator*=(const scalar); - // Friend operators + // Friend Operators friend incompressiblePerfectGas operator+ ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index d04880a6db..07a8147518 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -157,17 +157,6 @@ inline Foam::scalar Foam::incompressiblePerfectGas::CpMCv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::incompressiblePerfectGas::operator= -( - const incompressiblePerfectGas& ipg -) -{ - Specie::operator=(ipg); - pRef_ = ipg.pRef_; -} - - template inline void Foam::incompressiblePerfectGas::operator+= ( diff --git a/src/thermophysicalModels/specie/specie/specie.H b/src/thermophysicalModels/specie/specie/specie.H index 192c42931f..1e915fbffe 100644 --- a/src/thermophysicalModels/specie/specie/specie.H +++ b/src/thermophysicalModels/specie/specie/specie.H @@ -83,6 +83,12 @@ public: ClassName("specie"); + // Generated Methods + + //- Copy construct + specie(const specie&) = default; + + // Constructors //- Construct from components without name @@ -126,9 +132,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 ca1a873bf9..9d45c01237 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -207,9 +207,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 fb5ac1bdeb..c9ef48cd7e 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -128,22 +128,6 @@ inline Foam::scalar Foam::hPolynomialThermo::S // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::hPolynomialThermo::operator= -( - const hPolynomialThermo& pt -) -{ - EquationOfState::operator=(pt); - - Hf_ = pt.Hf_; - Sf_ = pt.Sf_; - CpCoeffs_ = pt.CpCoeffs_; - hCoeffs_ = pt.hCoeffs_; - sCoeffs_ = pt.sCoeffs_; -} - - template inline void Foam::hPolynomialThermo::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 0cf7fe1dfd..f5e90cea1a 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -142,9 +142,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 ab865dd9ab..3f7407c55b 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -114,19 +114,6 @@ inline Foam::scalar Foam::constTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::constTransport::operator= -( - const constTransport& ct -) -{ - Thermo::operator=(ct); - - mu_ = ct.mu_; - rPr_ = ct.rPr_; -} - - template inline void Foam::constTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H index 2eb3b4bc41..1aa3f0c27c 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H @@ -196,9 +196,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 558c41eb48..5d662b5d85 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H @@ -112,19 +112,6 @@ inline Foam::scalar Foam::logPolynomialTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::logPolynomialTransport::operator= -( - const logPolynomialTransport& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::logPolynomialTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index ef5a2eb14f..7b27c3d43b 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -178,9 +178,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 6540d00ed4..a597bd1839 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -112,19 +112,6 @@ inline Foam::scalar Foam::polynomialTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::polynomialTransport::operator= -( - const polynomialTransport& pt -) -{ - Thermo::operator=(pt); - - muCoeffs_ = pt.muCoeffs_; - kappaCoeffs_ = pt.kappaCoeffs_; -} - - template inline void Foam::polynomialTransport::operator+= ( diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index f86b7bcb13..e6ffca11a3 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -167,9 +167,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 e9a16c4ca1..26d14c9d6f 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -150,19 +150,6 @@ inline Foam::scalar Foam::sutherlandTransport::alphah // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::sutherlandTransport::operator= -( - const sutherlandTransport& st -) -{ - Thermo::operator=(st); - - As_ = st.As_; - Ts_ = st.Ts_; -} - - template inline void Foam::sutherlandTransport::operator+= (