From dac76d680ce15b1c21c5f4aaa5657a8f879df300 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 28 Feb 2016 22:50:24 +0000 Subject: [PATCH] tmp: encapsulate refCount to enable the option for tmp to use a specific version --- src/OpenFOAM/db/IOstreams/token/token.C | 12 +- src/OpenFOAM/db/IOstreams/token/tokenI.H | 148 ++++++++---------- src/OpenFOAM/db/IOstreams/token/tokenList.H | 6 +- .../DimensionedField/SubDimensionedFieldI.H | 2 +- .../FieldFields/FieldField/FieldField.C | 3 +- .../FieldFields/FieldField/FieldField.H | 2 +- src/OpenFOAM/fields/Fields/Field/Field.C | 2 +- src/OpenFOAM/fields/Fields/Field/Field.H | 2 +- src/OpenFOAM/fields/Fields/Field/SubField.H | 2 +- src/OpenFOAM/fields/Fields/Field/SubFieldI.H | 2 +- src/OpenFOAM/memory/tmp/tmp.H | 3 + .../meshes/polyMesh/mapPolyMesh/mapPolyMesh.H | 2 - .../mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H | 3 - .../functions/Function1/Function1/Function1.C | 7 +- .../functions/Function1/Function1/Function1.H | 2 +- .../convectionScheme/convectionScheme.C | 2 +- .../convectionScheme/convectionScheme.H | 2 +- .../d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H | 2 +- .../ddtSchemes/ddtScheme/ddtScheme.H | 2 +- .../divSchemes/divScheme/divScheme.H | 2 +- .../gradSchemes/gradScheme/gradScheme.H | 2 +- .../laplacianScheme/laplacianScheme.H | 2 +- .../snGradSchemes/snGradScheme/snGradScheme.H | 5 +- .../fvMatrices/fvMatrix/fvMatrix.C | 3 +- .../fvMatrices/fvMatrix/fvMatrix.H | 2 +- .../multivariateSurfaceInterpolationScheme.H | 2 +- .../surfaceInterpolationScheme.H | 2 +- 27 files changed, 104 insertions(+), 122 deletions(-) diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 857d4f6b48..59c551b6f8 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,12 +29,12 @@ License namespace Foam { -const char* const token::typeName = "token"; -token token::undefinedToken; + const char* const token::typeName = "token"; + token token::undefinedToken; -typedef token::compound tokenCompound; -defineTypeNameAndDebug(tokenCompound, 0); -defineRunTimeSelectionTable(tokenCompound, Istream); + typedef token::compound tokenCompound; + defineTypeNameAndDebug(tokenCompound, 0); + defineRunTimeSelectionTable(tokenCompound, Istream); } diff --git a/src/OpenFOAM/db/IOstreams/token/tokenI.H b/src/OpenFOAM/db/IOstreams/token/tokenI.H index d2d9a39d7e..2f0383c9b2 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenI.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenI.H @@ -25,15 +25,9 @@ License #include -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Clear any allocated storage (word or string) -inline void token::clear() +inline void Foam::token::clear() { if (type_ == WORD) { @@ -61,15 +55,14 @@ inline void token::clear() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct null -inline token::token() +inline Foam::token::token() : type_(UNDEFINED), lineNumber_(0) {} -// Construct as copy -inline token::token(const token& t) + +inline Foam::token::token(const token& t) : type_(t.type_), lineNumber_(t.lineNumber_) @@ -115,48 +108,48 @@ inline token::token(const token& t) } } -// Construct punctuation character token -inline token::token(punctuationToken p, label lineNumber) + +inline Foam::token::token(punctuationToken p, label lineNumber) : type_(PUNCTUATION), punctuationToken_(p), lineNumber_(lineNumber) {} -// Construct word token -inline token::token(const word& w, label lineNumber) + +inline Foam::token::token(const word& w, label lineNumber) : type_(WORD), wordTokenPtr_(new word(w)), lineNumber_(lineNumber) {} -// Construct string token -inline token::token(const string& s, label lineNumber) + +inline Foam::token::token(const string& s, label lineNumber) : type_(STRING), stringTokenPtr_(new string(s)), lineNumber_(lineNumber) {} -// Construct label token -inline token::token(const label l, label lineNumber) + +inline Foam::token::token(const label l, label lineNumber) : type_(LABEL), labelToken_(l), lineNumber_(lineNumber) {} -// Construct floatScalar token -inline token::token(const floatScalar s, label lineNumber) + +inline Foam::token::token(const floatScalar s, label lineNumber) : type_(FLOAT_SCALAR), floatScalarToken_(s), lineNumber_(lineNumber) {} -// Construct doubleScalar token -inline token::token(const doubleScalar s, label lineNumber) + +inline Foam::token::token(const doubleScalar s, label lineNumber) : type_(DOUBLE_SCALAR), doubleScalarToken_(s), @@ -166,8 +159,7 @@ inline token::token(const doubleScalar s, label lineNumber) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -// Delete token clearing the storage used by word or string -inline token::~token() +inline Foam::token::~token() { clear(); } @@ -175,37 +167,37 @@ inline token::~token() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline token::tokenType token::type() const +inline Foam::token::tokenType Foam::token::type() const { return type_; } -inline token::tokenType& token::type() +inline Foam::token::tokenType& Foam::token::type() { return type_; } -inline bool token::good() const +inline bool Foam::token::good() const { return (type_ != ERROR && type_ != UNDEFINED); } -inline bool token::undefined() const +inline bool Foam::token::undefined() const { return (type_ == UNDEFINED); } -inline bool token::error() const +inline bool Foam::token::error() const { return (type_ == ERROR); } -inline bool token::isPunctuation() const +inline bool Foam::token::isPunctuation() const { return (type_ == PUNCTUATION); } -inline token::punctuationToken token::pToken() const +inline Foam::token::punctuationToken Foam::token::pToken() const { if (type_ == PUNCTUATION) { @@ -218,12 +210,12 @@ inline token::punctuationToken token::pToken() const } } -inline bool token::isWord() const +inline bool Foam::token::isWord() const { return (type_ == WORD); } -inline const word& token::wordToken() const +inline const Foam::word& Foam::token::wordToken() const { if (type_ == WORD) { @@ -236,17 +228,17 @@ inline const word& token::wordToken() const } } -inline bool token::isVariable() const +inline bool Foam::token::isVariable() const { return (type_ == VARIABLE); } -inline bool token::isString() const +inline bool Foam::token::isString() const { return (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING); } -inline const string& token::stringToken() const +inline const Foam::string& Foam::token::stringToken() const { if (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING) { @@ -259,12 +251,12 @@ inline const string& token::stringToken() const } } -inline bool token::isLabel() const +inline bool Foam::token::isLabel() const { return (type_ == LABEL); } -inline label token::labelToken() const +inline Foam::label Foam::token::labelToken() const { if (type_ == LABEL) { @@ -277,12 +269,12 @@ inline label token::labelToken() const } } -inline bool token::isFloatScalar() const +inline bool Foam::token::isFloatScalar() const { return (type_ == FLOAT_SCALAR); } -inline floatScalar token::floatScalarToken() const +inline Foam::floatScalar Foam::token::floatScalarToken() const { if (type_ == FLOAT_SCALAR) { @@ -296,12 +288,12 @@ inline floatScalar token::floatScalarToken() const } -inline bool token::isDoubleScalar() const +inline bool Foam::token::isDoubleScalar() const { return (type_ == DOUBLE_SCALAR); } -inline doubleScalar token::doubleScalarToken() const +inline Foam::doubleScalar Foam::token::doubleScalarToken() const { if (type_ == DOUBLE_SCALAR) { @@ -315,12 +307,12 @@ inline doubleScalar token::doubleScalarToken() const } -inline bool token::isScalar() const +inline bool Foam::token::isScalar() const { return (type_ == FLOAT_SCALAR || type_ == DOUBLE_SCALAR); } -inline scalar token::scalarToken() const +inline Foam::scalar Foam::token::scalarToken() const { if (type_ == FLOAT_SCALAR) { @@ -337,12 +329,12 @@ inline scalar token::scalarToken() const } } -inline bool token::isNumber() const +inline bool Foam::token::isNumber() const { return (type_ == LABEL || isScalar()); } -inline scalar token::number() const +inline Foam::scalar Foam::token::number() const { if (type_ == LABEL) { @@ -359,12 +351,12 @@ inline scalar token::number() const } } -inline bool token::isCompound() const +inline bool Foam::token::isCompound() const { return (type_ == COMPOUND); } -inline const token::compound& token::compoundToken() const +inline const Foam::token::compound& Foam::token::compoundToken() const { if (type_ == COMPOUND) { @@ -378,18 +370,18 @@ inline const token::compound& token::compoundToken() const } -inline label token::lineNumber() const +inline Foam::label Foam::token::lineNumber() const { return lineNumber_; } -inline label& token::lineNumber() +inline Foam::label& Foam::token::lineNumber() { return lineNumber_; } -inline void token::setBad() +inline void Foam::token::setBad() { clear(); type_ = ERROR; @@ -398,7 +390,7 @@ inline void token::setBad() // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void token::operator=(const token& t) +inline void Foam::token::operator=(const token& t) { clear(); type_ = t.type_; @@ -446,59 +438,59 @@ inline void token::operator=(const token& t) lineNumber_ = t.lineNumber_; } -inline void token::operator=(const punctuationToken p) +inline void Foam::token::operator=(const punctuationToken p) { clear(); type_ = PUNCTUATION; punctuationToken_ = p; } -inline void token::operator=(word* wPtr) +inline void Foam::token::operator=(word* wPtr) { clear(); type_ = WORD; wordTokenPtr_ = wPtr; } -inline void token::operator=(const word& w) +inline void Foam::token::operator=(const word& w) { operator=(new word(w)); } -inline void token::operator=(string* sPtr) +inline void Foam::token::operator=(string* sPtr) { clear(); type_ = STRING; stringTokenPtr_ = sPtr; } -inline void token::operator=(const string& s) +inline void Foam::token::operator=(const string& s) { operator=(new string(s)); } -inline void token::operator=(const label l) +inline void Foam::token::operator=(const label l) { clear(); type_ = LABEL; labelToken_ = l; } -inline void token::operator=(const floatScalar s) +inline void Foam::token::operator=(const floatScalar s) { clear(); type_ = FLOAT_SCALAR; floatScalarToken_ = s; } -inline void token::operator=(const doubleScalar s) +inline void Foam::token::operator=(const doubleScalar s) { clear(); type_ = DOUBLE_SCALAR; doubleScalarToken_ = s; } -inline void token::operator=(token::compound* cPtr) +inline void Foam::token::operator=(Foam::token::compound* cPtr) { clear(); type_ = COMPOUND; @@ -506,7 +498,7 @@ inline void token::operator=(token::compound* cPtr) } -inline bool token::operator==(const token& t) const +inline bool Foam::token::operator==(const token& t) const { if (type_ != t.type_) { @@ -548,17 +540,17 @@ inline bool token::operator==(const token& t) const return false; } -inline bool token::operator==(const punctuationToken p) const +inline bool Foam::token::operator==(const punctuationToken p) const { return (type_ == PUNCTUATION && punctuationToken_ == p); } -inline bool token::operator==(const word& w) const +inline bool Foam::token::operator==(const word& w) const { return (type_ == WORD && wordToken() == w); } -inline bool token::operator==(const string& s) const +inline bool Foam::token::operator==(const string& s) const { return ( @@ -567,59 +559,55 @@ inline bool token::operator==(const string& s) const ); } -inline bool token::operator==(const label l) const +inline bool Foam::token::operator==(const label l) const { return (type_ == LABEL && labelToken_ == l); } -inline bool token::operator==(const floatScalar s) const +inline bool Foam::token::operator==(const floatScalar s) const { return (type_ == FLOAT_SCALAR && equal(floatScalarToken_, s)); } -inline bool token::operator==(const doubleScalar s) const +inline bool Foam::token::operator==(const doubleScalar s) const { return (type_ == DOUBLE_SCALAR && equal(doubleScalarToken_, s)); } -inline bool token::operator!=(const token& t) const +inline bool Foam::token::operator!=(const token& t) const { return !operator==(t); } -inline bool token::operator!=(const punctuationToken p) const +inline bool Foam::token::operator!=(const punctuationToken p) const { return !operator==(p); } -inline bool token::operator!=(const word& w) const +inline bool Foam::token::operator!=(const word& w) const { return !operator==(w); } -inline bool token::operator!=(const string& s) const +inline bool Foam::token::operator!=(const string& s) const { return !operator==(s); } -inline bool token::operator!=(const floatScalar s) const +inline bool Foam::token::operator!=(const floatScalar s) const { return !operator==(s); } -inline bool token::operator!=(const doubleScalar s) const +inline bool Foam::token::operator!=(const doubleScalar s) const { return !operator==(s); } -inline bool token::operator!=(const label l) const +inline bool Foam::token::operator!=(const label l) const { return !operator==(l); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/db/IOstreams/token/tokenList.H b/src/OpenFOAM/db/IOstreams/token/tokenList.H index a6f165cbbb..5ee815ea78 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenList.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,11 +39,9 @@ Description namespace Foam { - typedef List tokenList; typedef List tokenTypeList; - -} // End namespace Foam +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H index 215a525421..93147ece1d 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H @@ -63,7 +63,7 @@ inline Foam::SubDimensionedField::SubDimensionedField const SubDimensionedField& sfield ) : - refCount(), + tmp>::refCount(), SubField(sfield) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C index c26bdd03ac..2324b86e12 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C @@ -137,7 +137,7 @@ FieldField::FieldField template class Field, class Type> FieldField::FieldField(const FieldField& f) : - refCount(), + tmp>::refCount(), PtrList>(f) {} @@ -145,7 +145,6 @@ FieldField::FieldField(const FieldField& f) template class Field, class Type> FieldField::FieldField(FieldField& f, bool reuse) : - refCount(), PtrList>(f, reuse) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H index e63201e5b8..40e3f2c24a 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H @@ -73,7 +73,7 @@ Ostream& operator<< template class Field, class Type> class FieldField : - public refCount, + public tmp>::refCount, public PtrList> { diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index e7e7479c15..4739e3fa3c 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -196,7 +196,7 @@ Foam::Field::Field template Foam::Field::Field(const Field& f) : - refCount(), + tmp>::refCount(), List(f) {} diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H index fd8a849c1d..1d69ef80da 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.H +++ b/src/OpenFOAM/fields/Fields/Field/Field.H @@ -77,7 +77,7 @@ class dictionary; template class Field : - public refCount, + public tmp>::refCount, public List { diff --git a/src/OpenFOAM/fields/Fields/Field/SubField.H b/src/OpenFOAM/fields/Fields/Field/SubField.H index 4ebacc1feb..ec3d150295 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubField.H +++ b/src/OpenFOAM/fields/Fields/Field/SubField.H @@ -58,7 +58,7 @@ template class SubField; template class SubField : - public refCount, + public tmp>::refCount, public SubList { diff --git a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H index e5ed14146d..796b2995c2 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H +++ b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H @@ -74,7 +74,7 @@ inline Foam::SubField::SubField const SubField& sfield ) : - refCount(), + tmp>::refCount(), SubList(sfield) {} diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index 72a49def8f..bfa2e4abcf 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -77,6 +77,9 @@ class tmp public: + typedef Foam::refCount refCount; + + // Constructors //- Store object pointer diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H index 33ef923403..f369944c69 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H @@ -157,8 +157,6 @@ class polyMesh; \*---------------------------------------------------------------------------*/ class mapPolyMesh -: - public refCount { // Private data diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H index ff8ea1f265..c8dcd8154b 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H @@ -34,7 +34,6 @@ SourceFiles #ifndef mapSubsetMesh_H #define mapSubsetMesh_H -#include "refCount.H" #include "labelList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,8 +46,6 @@ namespace Foam \*---------------------------------------------------------------------------*/ class mapSubsetMesh -: - public refCount { // Private data diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C index 5b7cdafc0f..3654a7563e 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C @@ -31,7 +31,6 @@ License template Foam::Function1::Function1(const word& entryName) : - refCount(), name_(entryName) {} @@ -39,7 +38,7 @@ Foam::Function1::Function1(const word& entryName) template Foam::Function1::Function1(const Function1& de) : - refCount(), + tmp>::refCount(), name_(de.name_) {} @@ -62,9 +61,7 @@ const Foam::word& Foam::Function1::name() const template void Foam::Function1::convertTimeBase(const Time&) -{ - // do nothing -} +{} template diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H index a5c77c2527..0e22404a44 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H @@ -61,7 +61,7 @@ template Ostream& operator<<(Ostream&, const Function1&); template class Function1 : - public refCount + public tmp>::refCount { // Private Member Functions diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C index d3e257b0c2..a3ba465414 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C @@ -46,7 +46,7 @@ namespace fv template convectionScheme::convectionScheme(const convectionScheme& cs) : - refCount(), + tmp>::refCount(), mesh_(cs.mesh_) {} diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H index cab9dfdabd..e0320fe74e 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H @@ -64,7 +64,7 @@ namespace fv template class convectionScheme : - public refCount + public tmp>::refCount { // Private data diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H index afb1046833..6d527df771 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H @@ -64,7 +64,7 @@ namespace fv template class d2dt2Scheme : - public refCount + public tmp>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H index 3b42fef134..125ef04f61 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H @@ -64,7 +64,7 @@ namespace fv template class ddtScheme : - public refCount + public tmp>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H index 9ed6164477..639d5c334f 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H @@ -64,7 +64,7 @@ namespace fv template class divScheme : - public refCount + public tmp>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H index 26522ce52f..8abb81d520 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 gradScheme : - public refCount + public tmp>::refCount { // Private data diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H index a2c8431731..a1c47c211c 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H @@ -65,7 +65,7 @@ namespace fv template class laplacianScheme : - public refCount + public tmp>::refCount { protected: diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H index ae4dea3a1d..a2a52e9a4d 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H @@ -60,7 +60,7 @@ namespace fv template class snGradScheme : - public refCount + public tmp>::refCount { // Private data @@ -70,6 +70,9 @@ class snGradScheme // Private Member Functions + //- Disallow copy construct + snGradScheme(const snGradScheme&); + //- Disallow default bitwise assignment void operator=(const snGradScheme&); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 799b5d2198..41b7fae8a7 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -321,7 +321,7 @@ Foam::fvMatrix::fvMatrix template Foam::fvMatrix::fvMatrix(const fvMatrix& fvm) : - refCount(), + tmp>::refCount(), lduMatrix(fvm), psi_(fvm.psi_), dimensions_(fvm.dimensions_), @@ -351,7 +351,6 @@ Foam::fvMatrix::fvMatrix(const fvMatrix& fvm) template Foam::fvMatrix::fvMatrix(const tmp>& tfvm) : - refCount(), lduMatrix ( const_cast&>(tfvm()), diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index 6565f3a9b7..b06251fed5 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -114,7 +114,7 @@ template class UIndirectList; template class fvMatrix : - public refCount, + public tmp>::refCount, public lduMatrix { // Private data diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H index 2279b55e1a..780fde611f 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 multivariateSurfaceInterpolationScheme : - public refCount + public tmp>::refCount { public: diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H index 5f1e59f716..4b1d0838a2 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 surfaceInterpolationScheme : - public refCount + public tmp>::refCount { // Private data