diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index b0edac8799ca533f86583b1495d54b2e29e04ee8..96fc8ca422b658741a62c9d67b4e91a3a004944f 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -627,36 +627,36 @@ fields/cloud/cloud.C Fields = fields/Fields +$(Fields)/Field/FieldBase.C $(Fields)/labelField/labelField.C -$(Fields)/scalarField/scalarField.C -$(Fields)/vectorField/vectorField.C -$(Fields)/vector2DField/vector2DField.C -$(Fields)/sphericalTensorField/sphericalTensorField.C -$(Fields)/diagTensorField/diagTensorField.C -$(Fields)/symmTensorField/symmTensorField.C -$(Fields)/tensorField/tensorField.C -$(Fields)/quaternionField/quaternionField.C -$(Fields)/triadField/triadField.C -$(Fields)/complexFields/complexFields.C - $(Fields)/labelField/labelIOField.C $(Fields)/labelField/labelFieldIOField.C +$(Fields)/scalarField/scalarField.C $(Fields)/scalarField/scalarIOField.C $(Fields)/scalarField/scalarFieldIOField.C +$(Fields)/vectorField/vectorField.C $(Fields)/vectorField/vectorIOField.C $(Fields)/vectorField/vectorFieldIOField.C +$(Fields)/vector2DField/vector2DField.C $(Fields)/vector2DField/vector2DIOField.C $(Fields)/vector2DField/vector2DFieldIOField.C +$(Fields)/sphericalTensorField/sphericalTensorField.C $(Fields)/sphericalTensorField/sphericalTensorIOField.C $(Fields)/sphericalTensorField/sphericalTensorFieldIOField.C +$(Fields)/diagTensorField/diagTensorField.C $(Fields)/diagTensorField/diagTensorIOField.C $(Fields)/diagTensorField/diagTensorFieldIOField.C +$(Fields)/symmTensorField/symmTensorField.C $(Fields)/symmTensorField/symmTensorIOField.C $(Fields)/symmTensorField/symmTensorFieldIOField.C +$(Fields)/tensorField/tensorField.C $(Fields)/tensorField/tensorIOField.C $(Fields)/tensorField/tensorFieldIOField.C +$(Fields)/quaternionField/quaternionField.C $(Fields)/quaternionField/quaternionIOField.C +$(Fields)/triadField/triadField.C $(Fields)/triadField/triadIOField.C +$(Fields)/complexFields/complexFields.C $(Fields)/transformField/transformField.C diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H index 93147ece1d12c8d8a0e639d4ec847bbe3f11a267..215a52542192b7bee0f78948776c35c48217b5e6 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H @@ -63,7 +63,7 @@ inline Foam::SubDimensionedField<Type, GeoMesh>::SubDimensionedField const SubDimensionedField<Type, GeoMesh>& sfield ) : - tmp<SubDimensionedField<Type, GeoMesh>>::refCount(), + refCount(), SubField<Type>(sfield) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C index d9778371b4a798ff135d0c53f9d671ddd2ede3f8..ad98f6a02f1b8759cfe077705874e7645331e7fe 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - Generic fieldField type. - \*---------------------------------------------------------------------------*/ #include "FieldField.H" @@ -137,7 +134,7 @@ FieldField<Field, Type>::FieldField template<template<class> class Field, class Type> FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f) : - tmp<FieldField<Field, Type>>::refCount(), + refCount(), PtrList<Field<Type>>(f) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H index 19d4ff5cdc119b79413752cd5b0fdde182f9faa4..bae0375b68109a84832206b02c77a035405c4877 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H @@ -73,7 +73,7 @@ Ostream& operator<< template<template<class> class Field, class Type> class FieldField : - public tmp<FieldField<Field, Type>>::refCount, + public refCount, public PtrList<Field<Type>> { diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index 7cc7c55e6fd6ffce46ee04430b6bd183fc7cd303..5422b19a134695175843bfe30aa91534cd8eeb08 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -29,12 +29,6 @@ License #include "contiguous.H" #include "mapDistributeBase.H" -// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * // - -template<class Type> -const char* const Foam::Field<Type>::typeName("Field"); - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Type> diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H index e8a91b03066386df43aacd5e89cd8a836728bd50..ae4f2bfcdbc8aa6fa1a615873150f47d5d16d93c 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.H +++ b/src/OpenFOAM/fields/Fields/Field/Field.H @@ -47,6 +47,7 @@ SourceFiles #include "VectorSpace.H" #include "scalarList.H" #include "labelList.H" +#include "FieldBase.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,7 +74,7 @@ Ostream& operator<<(Ostream&, const tmp<Field<Type>>&); template<class Type> class Field : - public tmp<Field<Type>>::refCount, + public FieldBase, public List<Type> { @@ -86,11 +87,6 @@ public: typedef SubField<Type> subField; - // Static data members - - static const char* const typeName; - - // Static Member Functions //- Return nullObject reference field diff --git a/src/OpenFOAM/fields/Fields/Field/FieldBase.C b/src/OpenFOAM/fields/Fields/Field/FieldBase.C new file mode 100644 index 0000000000000000000000000000000000000000..91157104f44b65c6c2031b856c850daab02e6284 --- /dev/null +++ b/src/OpenFOAM/fields/Fields/Field/FieldBase.C @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "FieldBase.H" + +// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * // + +const char* const Foam::FieldBase::typeName("Field"); + + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/Fields/Field/FieldBase.H b/src/OpenFOAM/fields/Fields/Field/FieldBase.H new file mode 100644 index 0000000000000000000000000000000000000000..5de4169ad3a2d53af803d251303c0db523f01bee --- /dev/null +++ b/src/OpenFOAM/fields/Fields/Field/FieldBase.H @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::FieldBase + +Description + Template invariant parts for Field + +SourceFiles + FieldBase.C + +\*---------------------------------------------------------------------------*/ + +#ifndef FieldBase_H +#define FieldBase_H + +#include "refCount.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class FieldBase Declaration +\*---------------------------------------------------------------------------*/ + +class FieldBase +: + public refCount +{ +public: + + // Static data members + + //- Typename for Field + static const char* const typeName; + + + // Constructors + + //- Construct null, with refCount zero + constexpr FieldBase() noexcept + : + refCount() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/Fields/Field/SubField.H b/src/OpenFOAM/fields/Fields/Field/SubField.H index 07ecd1443fc936d10ba1815ed075def3b580ee89..1a7fb9cb91365e56c3d8e66e4806b7ac474c11f8 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubField.H +++ b/src/OpenFOAM/fields/Fields/Field/SubField.H @@ -59,7 +59,7 @@ template<class Type> class SubField; template<class Type> class SubField : - public tmp<SubField<Type>>::refCount, + public refCount, public SubList<Type> { diff --git a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H index 4919f78fe1cf0526d370ebcedf8f0e98559da0fd..d0ed35b5dcadd9fb9a9b8323ab67692e24f04bc8 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H +++ b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H @@ -74,7 +74,7 @@ inline Foam::SubField<Type>::SubField const SubField<Type>& sfield ) : - tmp<SubField<Type>>::refCount(), + refCount(), SubList<Type>(sfield) {} diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C index d03e6e842597e4ee5e52ae2bc8836a5866b7c40d..0f8cb617c5a721c2d665bd0cd9f3741a72624cd7 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C @@ -38,18 +38,11 @@ Foam::Function1<Type>::Function1(const word& entryName) template<class Type> Foam::Function1<Type>::Function1(const Function1<Type>& de) : - tmp<Function1<Type>>::refCount(), + refCount(), name_(de.name_) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -Foam::Function1<Type>::~Function1() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> @@ -111,8 +104,8 @@ Foam::FieldFunction1<Function1Type>::value const scalarField& x ) const { - tmp<Field<Type>> tfld(new Field<Type>(x.size())); - Field<Type>& fld = tfld.ref(); + auto tfld = tmp<Field<Type>>::New(x.size()); + auto& fld = tfld.ref(); forAll(x, i) { @@ -152,8 +145,8 @@ Foam::FieldFunction1<Function1Type>::integrate const scalarField& x2 ) const { - tmp<Field<Type>> tfld(new Field<Type>(x1.size())); - Field<Type>& fld = tfld.ref(); + auto tfld = tmp<Field<Type>>::New(x1.size()); + auto& fld = tfld.ref(); forAll(x1, i) { diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H index 327a045ec22cef8b1da627b0d4dbb93d40081f6e..0784f12e17f5aa5f9657b6bf67f465607b397b98 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H @@ -61,11 +61,11 @@ template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&); template<class Type> class Function1 : - public tmp<Function1<Type>>::refCount + public refCount { // Private Member Functions - //- Disallow default bitwise assignment + //- No copy assignment void operator=(const Function1<Type>&) = delete; @@ -119,7 +119,7 @@ public: //- Destructor - virtual ~Function1(); + virtual ~Function1() = default; // Member Functions @@ -194,8 +194,7 @@ public: //- Destructor - virtual ~FieldFunction1() - {} + virtual ~FieldFunction1() = default; // Member Functions diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.H b/src/finiteArea/faMatrices/faMatrix/faMatrix.H index 82289005a6e68bb1f8e33a37afde306f1f3b73ab..702a366d74df90bcab18897ee8cbf3f779bec2aa 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrix.H +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.H @@ -71,7 +71,7 @@ Ostream& operator<<(Ostream&, const faMatrix<Type>&); template<class Type> class faMatrix : - public tmp<faMatrix<Type>>::refCount, + public refCount, public lduMatrix { // Private data diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C index ca63afc7882048563465dfed8cccefcc412496af..c2384815978abde9b54a19f412b5961fbb4874a2 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C @@ -46,7 +46,7 @@ namespace fv template<class Type> convectionScheme<Type>::convectionScheme(const convectionScheme& cs) : - tmp<convectionScheme<Type>>::refCount(), + refCount(), mesh_(cs.mesh_) {} diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H index aa409f3c265f9a5bc55ffc045cb3850ab4a3ccde..543ec60ff01eddf8d7ad0d36b5420654bd602062 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H @@ -67,7 +67,7 @@ namespace fv template<class Type> class convectionScheme : - public tmp<convectionScheme<Type>>::refCount + public refCount { // Private data diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C index ffdc4c25b8bfc5c9c2019f969248e2306460c957..70208e97903e96cf01e9aa026b6045cef5e2f4aa 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - Abstract base class for finite volume calculus d2dt2 schemes. - \*---------------------------------------------------------------------------*/ #include "fv.H" @@ -84,13 +81,6 @@ tmp<d2dt2Scheme<Type>> d2dt2Scheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -d2dt2Scheme<Type>::~d2dt2Scheme() -{} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace fv diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H index b00888c5779f05f42a8ad4b6189574ac87f4f017..f52dab06eed185074186ce8dbdf73783efa6f444 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H @@ -25,7 +25,7 @@ Class Foam::fv::d2dt2Scheme Description - Abstract base class for d2dt2 schemes. + Abstract base class for finite volume d2dt2 schemes. SourceFiles d2dt2Scheme.C @@ -64,7 +64,7 @@ namespace fv template<class Type> class d2dt2Scheme : - public tmp<d2dt2Scheme<Type>>::refCount + public refCount { protected: @@ -76,11 +76,11 @@ protected: // Private Member Functions - //- Disallow copy construct - d2dt2Scheme(const d2dt2Scheme&); + //- No copy construct + d2dt2Scheme(const d2dt2Scheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const d2dt2Scheme&); + //- No copy assignment + void operator=(const d2dt2Scheme&) = delete; public: @@ -127,7 +127,7 @@ public: //- Destructor - virtual ~d2dt2Scheme(); + virtual ~d2dt2Scheme() = default; // Member Functions diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C index fd4f502ed991ea0fa282ebee81da93fac88470fc..a7fa362d7248b46a42c659714f6202c03e70349c 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C @@ -84,13 +84,6 @@ tmp<ddtScheme<Type>> ddtScheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -ddtScheme<Type>::~ddtScheme() -{} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> @@ -120,14 +113,11 @@ tmp<fvMatrix<Type>> ddtScheme<Type>::fvmDdt { NotImplemented; - return tmp<fvMatrix<Type>> + return tmp<fvMatrix<Type>>::New ( - new fvMatrix<Type> - ( - vf, - alpha.dimensions()*rho.dimensions() - *vf.dimensions()*dimVol/dimTime - ) + vf, + alpha.dimensions()*rho.dimensions() + *vf.dimensions()*dimVol/dimTime ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H index 8a1dfbaa8de439fd766febe6aee2123ffef64c29..55fcc68ca1cef3f19e2626cd8c3704e56bbb5d30 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H @@ -30,7 +30,6 @@ Group Description Abstract base class for ddt schemes. - SourceFiles ddtScheme.C @@ -68,7 +67,7 @@ namespace fv template<class Type> class ddtScheme : - public tmp<ddtScheme<Type>>::refCount + public refCount { protected: @@ -83,11 +82,11 @@ protected: // Private Member Functions - //- Disallow copy construct - ddtScheme(const ddtScheme&); + //- No copy construct + ddtScheme(const ddtScheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const ddtScheme&); + //- No copy assignment + void operator=(const ddtScheme&) = delete; public: @@ -136,7 +135,7 @@ public: //- Destructor - virtual ~ddtScheme(); + virtual ~ddtScheme() = default; // Member Functions diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C index 8c71aafcb3dc3b1b2422729a040a1e048113980a..66b7f83df2fa2ecc66fd4803d1f6e6aac0f77b27 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C @@ -85,16 +85,6 @@ tmp<divScheme<Type>> divScheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -divScheme<Type>::~divScheme() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace fv diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H index 1f93d225c9e75b0de4766ac5ca0ed70d935879b4..3b5e948a0e0ee353edd0a811ac8292a3e8a3660d 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H @@ -67,7 +67,7 @@ namespace fv template<class Type> class divScheme : - public tmp<divScheme<Type>>::refCount + public refCount { protected: @@ -80,11 +80,11 @@ protected: // Private Member Functions - //- Disallow copy construct - divScheme(const divScheme&); + //- No copy construct + divScheme(const divScheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const divScheme&); + //- No copy assignment + void operator=(const divScheme&) = delete; public: @@ -133,7 +133,7 @@ public: //- Destructor - virtual ~divScheme(); + virtual ~divScheme() = default; // Member Functions diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C index 1a055779f19bcd493cd7ebeae40feb01e736f595..414fe7b8ce6506506d8851b0915e8ecac255f22d 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C @@ -72,12 +72,6 @@ Foam::tmp<Foam::fv::gradScheme<Type>> Foam::fv::gradScheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -Foam::fv::gradScheme<Type>::~gradScheme() -{} - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H index 4e6ca98bf6135ba71dfbd648d8dad65d3cbc8392..1ed984b2138a2e5859215565c61c8ae9956f1494 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H @@ -60,7 +60,7 @@ namespace fv template<class Type> class gradScheme : - public tmp<gradScheme<Type>>::refCount + public refCount { // Private data @@ -69,11 +69,11 @@ class gradScheme // Private Member Functions - //- Disallow copy construct - gradScheme(const gradScheme&); + //- No copy construct + gradScheme(const gradScheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const gradScheme&); + //- No copy assignment + void operator=(const gradScheme&) = delete; public: @@ -114,7 +114,7 @@ public: //- Destructor - virtual ~gradScheme(); + virtual ~gradScheme() = default; // Member Functions diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C index 0a774bdf5dcf6a8f2680a829b2fc7f1bb0937ea0..fefd505876195f33093e1a50d2b0fdb2bdc4ee19 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C @@ -83,13 +83,6 @@ tmp<laplacianScheme<Type, GType>> laplacianScheme<Type, GType>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type, class GType> -laplacianScheme<Type, GType>::~laplacianScheme() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type, class GType> diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H index cb9e02ab382087cc7701bbce96362b69095f4984..ea2d07bc95d2a474c395b7a94a2f5d29df68405f 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H @@ -68,7 +68,7 @@ namespace fv template<class Type, class GType> class laplacianScheme : - public tmp<laplacianScheme<Type, GType>>::refCount + public refCount { protected: @@ -84,11 +84,11 @@ private: // Private Member Functions - //- Disallow copy construct - laplacianScheme(const laplacianScheme&); + //- No copy construct + laplacianScheme(const laplacianScheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const laplacianScheme&); + //- No copy assignment + void operator=(const laplacianScheme&) = delete; public: @@ -162,7 +162,7 @@ public: //- Destructor - virtual ~laplacianScheme(); + virtual ~laplacianScheme() = default; // Member Functions diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C index d5422e729d5a6b66488e43ff41e24371b62ef8dc..245a01406503f740e8d521ee884cbef681370e13 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C @@ -85,13 +85,6 @@ tmp<snGradScheme<Type>> snGradScheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -snGradScheme<Type>::~snGradScheme() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H index 14821c17c287bd4bcb521935a375f563a662908d..5c9ad02d4c0eda8fcdfff7141b8ba1d78213ca36 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H @@ -63,7 +63,7 @@ namespace fv template<class Type> class snGradScheme : - public tmp<snGradScheme<Type>>::refCount + public refCount { // Private data @@ -73,11 +73,11 @@ class snGradScheme // Private Member Functions - //- Disallow copy construct - snGradScheme(const snGradScheme&); + //- No copy construct + snGradScheme(const snGradScheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const snGradScheme&); + //- No copy assignment + void operator=(const snGradScheme&) = delete; public: @@ -118,7 +118,7 @@ public: //- Destructor - virtual ~snGradScheme(); + virtual ~snGradScheme() = default; // Member Functions diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index a312cd97f9740c1e73a6d8d63fcfc3e1925fb049..8a18e7446aa1d01dc8ae733cbd2af02955836269 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -321,7 +321,7 @@ Foam::fvMatrix<Type>::fvMatrix template<class Type> Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm) : - tmp<fvMatrix<Type>>::refCount(), + refCount(), lduMatrix(fvm), psi_(fvm.psi_), dimensions_(fvm.dimensions_), diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index 4cad056ab2f6ff08d27307b12618cb5b597d35f3..1acbb4300ea4159d6b970fc1cb69079fe3678ac2 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -114,7 +114,7 @@ template<class T> class UIndirectList; template<class Type> class fvMatrix : - public tmp<fvMatrix<Type>>::refCount, + public refCount, public lduMatrix { // Private data diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C index e9400fbfee6e191fb900a6edf7783a414a165431..5a4a26285f8e3ebc8e5ba2a93b228b66df5a8409 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - Abstract base class for surface interpolation schemes. - \*---------------------------------------------------------------------------*/ #include "fv.H" @@ -85,12 +82,4 @@ Foam::multivariateSurfaceInterpolationScheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -Foam::multivariateSurfaceInterpolationScheme<Type>:: -~multivariateSurfaceInterpolationScheme() -{} - - // ************************************************************************* // diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H index 4669b43d63ce0cca5f22c32c47e52b4e1f6a96cc..a3c20cc7dd8cbf37a251018ba3cacf6c464972c5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H @@ -50,7 +50,7 @@ namespace Foam template<class Type> class multivariateSurfaceInterpolationScheme : - public tmp<multivariateSurfaceInterpolationScheme<Type>>::refCount + public refCount { public: @@ -85,14 +85,14 @@ private: // Private Member Functions - //- Disallow default bitwise copy construct + //- No copy construct multivariateSurfaceInterpolationScheme ( const multivariateSurfaceInterpolationScheme& - ); + ) = delete; - //- Disallow default bitwise assignment - void operator=(const multivariateSurfaceInterpolationScheme&); + //- No copy assignment + void operator=(const multivariateSurfaceInterpolationScheme&) = delete; public: @@ -143,7 +143,7 @@ public: //- Destructor - virtual ~multivariateSurfaceInterpolationScheme(); + virtual ~multivariateSurfaceInterpolationScheme() = default; // Member Functions diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index b35c82f8a7b7952c550352ec4fac6d163ddcfd78..8e141791011957e2ae86ea54c7e4c6bc08dc3ff5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -123,13 +123,6 @@ Foam::surfaceInterpolationScheme<Type>::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class Type> -Foam::surfaceInterpolationScheme<Type>::~surfaceInterpolationScheme() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> @@ -147,8 +140,7 @@ Foam::surfaceInterpolationScheme<Type>::interpolate << "Interpolating " << vf.type() << " " << vf.name() - << " from cells to faces " - "without explicit correction" + << " from cells to faces without explicit correction" << endl; } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H index bf233ef3f9131aef66855baa8be5e28065772163..871578b62640b06becae35ee92ddc99bbfe3eb80 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H @@ -55,7 +55,7 @@ class fvMesh; template<class Type> class surfaceInterpolationScheme : - public tmp<surfaceInterpolationScheme<Type>>::refCount + public refCount { // Private data @@ -65,11 +65,11 @@ class surfaceInterpolationScheme // Private Member Functions - //- Disallow copy construct - surfaceInterpolationScheme(const surfaceInterpolationScheme&); + //- No copy construct + surfaceInterpolationScheme(const surfaceInterpolationScheme&) = delete; - //- Disallow default bitwise assignment - void operator=(const surfaceInterpolationScheme&); + //- No copy assignment + void operator=(const surfaceInterpolationScheme&) = delete; public: @@ -134,7 +134,7 @@ public: //- Destructor - virtual ~surfaceInterpolationScheme(); + virtual ~surfaceInterpolationScheme() = default; // Member Functions