From 1340bc50bd0f46e1e99ba99e33dfd8fbc55b52e0 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 9 Aug 2023 18:38:55 +0200 Subject: [PATCH] STYLE: qualify zero/one dispatch tags with Foam:: prefix - use Foam::zero{} instead of Zero with tagged re-dispatch --- src/OpenFOAM/containers/Buffers/CircularBufferI.H | 4 ++-- .../CompactLists/CompactListList/CompactListListI.H | 2 +- .../containers/Lists/DynamicList/DynamicListI.H | 4 ++-- src/OpenFOAM/containers/Lists/FixedList/FixedListI.H | 4 ++-- src/OpenFOAM/containers/Lists/List/ListI.H | 2 +- src/OpenFOAM/containers/Lists/List/SubListI.H | 2 +- .../containers/Lists/SortableList/SortableList.C | 10 +--------- .../containers/Lists/SortableList/SortableList.H | 2 +- .../fields/Fields/DynamicField/DynamicFieldI.H | 4 ++-- src/OpenFOAM/fields/Fields/Field/FieldI.H | 6 +++--- src/OpenFOAM/fields/Fields/Field/SubFieldI.H | 2 +- .../matrices/DiagonalMatrix/DiagonalMatrix.C | 2 +- src/OpenFOAM/matrices/Matrix/MatrixI.H | 2 +- .../matrices/RectangularMatrix/RectangularMatrixI.H | 8 ++++---- src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C | 2 +- src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H | 12 ++++++------ .../SymmetricSquareMatrix/SymmetricSquareMatrix.C | 2 +- .../SymmetricSquareMatrix/SymmetricSquareMatrixI.H | 6 +++--- src/OpenFOAM/meshes/ijkMesh/IjkFieldI.H | 4 ++-- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 7 ++++++- src/OpenFOAM/meshes/polyMesh/polyMesh.H | 2 +- src/finiteArea/faMatrices/faMatrix/faMatrix.C | 10 ---------- src/finiteArea/faMatrices/faMatrix/faMatrix.H | 4 ++-- src/finiteVolume/finiteVolume/fvc/fvcDdt.C | 4 ++-- src/finiteVolume/finiteVolume/fvc/fvcDdt.H | 8 ++++---- src/finiteVolume/finiteVolume/fvm/fvmDdt.C | 10 +++++----- src/finiteVolume/finiteVolume/fvm/fvmDdt.H | 10 +++++----- src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C | 8 ++++---- src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H | 8 ++++---- src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C | 10 ---------- src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H | 4 ++-- 31 files changed, 71 insertions(+), 94 deletions(-) diff --git a/src/OpenFOAM/containers/Buffers/CircularBufferI.H b/src/OpenFOAM/containers/Buffers/CircularBufferI.H index d6ffa2ec81..950d6a504b 100644 --- a/src/OpenFOAM/containers/Buffers/CircularBufferI.H +++ b/src/OpenFOAM/containers/Buffers/CircularBufferI.H @@ -530,8 +530,8 @@ inline void Foam::CircularBuffer::operator=(const T& val) template inline void Foam::CircularBuffer::operator=(const Foam::zero) { - this->array_one() = Zero; - this->array_two() = Zero; + this->array_one() = Foam::zero{}; + this->array_two() = Foam::zero{}; } diff --git a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H index 3325fe37b8..03a353cd14 100644 --- a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H +++ b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H @@ -507,7 +507,7 @@ inline void Foam::CompactListList::operator=(const T& val) template inline void Foam::CompactListList::operator=(const Foam::zero) { - values_ = Zero; + values_ = Foam::zero{}; } diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H index 595ef3b828..c44f9f8697 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H @@ -171,7 +171,7 @@ inline Foam::DynamicList::DynamicList const Foam::zero ) : - List(len, Zero), + List(len, Foam::zero{}), capacity_(List::size()) {} @@ -815,7 +815,7 @@ inline void Foam::DynamicList::operator= const Foam::zero ) { - UList::operator=(Zero); + UList::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H index 68144b2df5..abc9228b45 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H @@ -51,7 +51,7 @@ inline Foam::FixedList::FixedList(const T& val) template inline Foam::FixedList::FixedList(const Foam::zero) { - this->fill(Zero); + this->fill(Foam::zero{}); } @@ -500,7 +500,7 @@ inline void Foam::FixedList::operator=(const T& val) template inline void Foam::FixedList::operator=(const Foam::zero) { - this->fill(Zero); + this->fill(Foam::zero{}); } diff --git a/src/OpenFOAM/containers/Lists/List/ListI.H b/src/OpenFOAM/containers/Lists/List/ListI.H index 6c8aec1f3e..85b20a6424 100644 --- a/src/OpenFOAM/containers/Lists/List/ListI.H +++ b/src/OpenFOAM/containers/Lists/List/ListI.H @@ -300,7 +300,7 @@ inline void Foam::List::operator=(const T& val) template inline void Foam::List::operator=(const Foam::zero) { - UList::operator=(Zero); + UList::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/containers/Lists/List/SubListI.H b/src/OpenFOAM/containers/Lists/List/SubListI.H index 18718c66f8..29422f1bd4 100644 --- a/src/OpenFOAM/containers/Lists/List/SubListI.H +++ b/src/OpenFOAM/containers/Lists/List/SubListI.H @@ -160,7 +160,7 @@ inline void Foam::SubList::operator=(const T& val) template inline void Foam::SubList::operator=(const Foam::zero) { - UList::operator=(Zero); + UList::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C index ed2aa47fab..6e8ea3f1d6 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C @@ -30,14 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline constexpr Foam::SortableList::SortableList() noexcept -: - List(), - indices_() -{} - - template inline Foam::SortableList::SortableList(const label size) : @@ -48,7 +40,7 @@ inline Foam::SortableList::SortableList(const label size) template inline Foam::SortableList::SortableList(const label size, const Foam::zero) : - List(size, Zero) + List(size, Foam::zero{}) {} diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H index 3009fbeeef..3139408d26 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H @@ -73,7 +73,7 @@ public: // Constructors //- Default construct - inline constexpr SortableList() noexcept; + SortableList() noexcept = default; //- Construct given size, sort later. // The indices remain empty until the list is sorted diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H index a2c15434fb..e5571d4b6e 100644 --- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H @@ -165,7 +165,7 @@ inline Foam::DynamicField::DynamicField const Foam::zero ) : - Field(len, Zero), + Field(len, Foam::zero{}), capacity_(Field::size()) {} @@ -696,7 +696,7 @@ inline void Foam::DynamicField::operator= const Foam::zero ) { - UList::operator=(Zero); + UList::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/fields/Fields/Field/FieldI.H b/src/OpenFOAM/fields/Fields/Field/FieldI.H index 08eb5de948..f2f4b5d7d4 100644 --- a/src/OpenFOAM/fields/Fields/Field/FieldI.H +++ b/src/OpenFOAM/fields/Fields/Field/FieldI.H @@ -60,7 +60,7 @@ inline Foam::Field::Field(const label len, const Type& val) template inline Foam::Field::Field(const label len, const Foam::zero) : - List(len, Zero) + List(len, Foam::zero{}) {} @@ -81,7 +81,7 @@ inline Foam::Field::Field(const Foam::one, Type&& val) template inline Foam::Field::Field(const Foam::one, const Foam::zero) : - List(Foam::one{}, Zero) + List(Foam::one{}, Foam::zero{}) {} @@ -224,7 +224,7 @@ inline void Foam::Field::operator=(const Type& val) template inline void Foam::Field::operator=(const Foam::zero) { - List::operator=(Zero); + List::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H index 6b42e8d91f..184f4b8650 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H +++ b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H @@ -165,7 +165,7 @@ inline void Foam::SubField::operator=(const Type& val) template inline void Foam::SubField::operator=(const Foam::zero) { - SubList::operator=(Zero); + SubList::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C index 681c82c07d..4160fc00d7 100644 --- a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C +++ b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C @@ -40,7 +40,7 @@ Foam::DiagonalMatrix::DiagonalMatrix(const label n) template Foam::DiagonalMatrix::DiagonalMatrix(const label n, const Foam::zero) : - List(n, Zero) + List(n, Foam::zero{}) {} diff --git a/src/OpenFOAM/matrices/Matrix/MatrixI.H b/src/OpenFOAM/matrices/Matrix/MatrixI.H index 707965a4c3..a5ded753c5 100644 --- a/src/OpenFOAM/matrices/Matrix/MatrixI.H +++ b/src/OpenFOAM/matrices/Matrix/MatrixI.H @@ -64,7 +64,7 @@ inline Foam::Matrix::Matrix(const labelPair& dims) template inline Foam::Matrix::Matrix(const labelPair& dims, const Foam::zero) : - Matrix(dims.first(), dims.second(), Zero) + Matrix(dims.first(), dims.second(), Foam::zero{}) {} diff --git a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H index e4f67dbbb7..3033c1dc4d 100644 --- a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H +++ b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H @@ -57,7 +57,7 @@ inline Foam::RectangularMatrix::RectangularMatrix const Foam::zero ) : - Matrix, Type>(m, n, Zero) + Matrix, Type>(m, n, Foam::zero{}) {} @@ -81,7 +81,7 @@ inline Foam::RectangularMatrix::RectangularMatrix const Identity ) : - Matrix, Type>(dims.first(), dims.second(), Zero) + RectangularMatrix(dims.first(), dims.second(), Foam::zero{}) { for (label i = 0; i < min(dims.first(), dims.second()); ++i) { @@ -107,7 +107,7 @@ inline Foam::RectangularMatrix::RectangularMatrix const Foam::zero ) : - RectangularMatrix(dims.first(), dims.second(), Zero) + RectangularMatrix(dims.first(), dims.second(), Foam::zero{}) {} @@ -184,7 +184,7 @@ inline void Foam::RectangularMatrix::operator= template inline void Foam::RectangularMatrix::operator=(const Foam::zero) { - Matrix, Type>::operator=(Zero); + Matrix, Type>::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C index 1506cb9972..8831ed6f59 100644 --- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C @@ -85,7 +85,7 @@ template template void Foam::SquareMatrix::operator=(const Identity) { - Matrix, Type>::operator=(Zero); + Matrix, Type>::operator=(Foam::zero{}); for (label i = 0; i < this->n(); ++i) { diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H index 42cd6666ea..d289e9869f 100644 --- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H @@ -51,7 +51,7 @@ inline Foam::SquareMatrix::SquareMatrix const Foam::zero ) : - Matrix, Type>(n, n, Zero) + Matrix, Type>(n, n, Foam::zero{}) {} @@ -74,7 +74,7 @@ inline Foam::SquareMatrix::SquareMatrix const Identity ) : - Matrix, Type>(n, n, Zero) + SquareMatrix(n, Foam::zero{}) { for (label i = 0; i < n; ++i) { @@ -91,7 +91,7 @@ inline Foam::SquareMatrix::SquareMatrix const Identity ) : - Matrix, Type>(dims, Zero) + Matrix, Type>(dims, Foam::zero{}) { CHECK_MATRIX_IS_SQUARE(dims.first(), dims.second()); @@ -121,7 +121,7 @@ inline Foam::SquareMatrix::SquareMatrix const Foam::zero ) : - Matrix, Type>(dims, Zero) + Matrix, Type>(dims, Foam::zero{}) { CHECK_MATRIX_IS_SQUARE(dims.first(), dims.second()); } @@ -148,7 +148,7 @@ inline Foam::SquareMatrix::SquareMatrix const Foam::zero ) : - Matrix, Type>(m, n, Zero) + Matrix, Type>(m, n, Foam::zero{}) { CHECK_MATRIX_IS_SQUARE(m, n); } @@ -300,7 +300,7 @@ inline void Foam::SquareMatrix::operator=(SquareMatrix&& mat) template inline void Foam::SquareMatrix::operator=(const Foam::zero) { - Matrix, Type>::operator=(Zero); + Matrix, Type>::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C index b50a96e7b1..be0457bfbf 100644 --- a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C +++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C @@ -117,7 +117,7 @@ template template void Foam::SymmetricSquareMatrix::operator=(const Identity) { - Matrix, Type>::operator=(Zero); + Matrix, Type>::operator=(Foam::zero{}); for (label i=0; i < this->n(); ++i) { diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H index f040dbdf19..008db20346 100644 --- a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H +++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H @@ -51,7 +51,7 @@ inline Foam::SymmetricSquareMatrix::SymmetricSquareMatrix const Foam::zero ) : - Matrix, Type>(n, n, Zero) + Matrix, Type>(n, n, Foam::zero{}) {} @@ -74,7 +74,7 @@ inline Foam::SymmetricSquareMatrix::SymmetricSquareMatrix const Identity ) : - Matrix, Type>(n, n, Zero) + SymmetricSquareMatrix(n, Foam::zero{}) { for (label i=0; i < n; ++i) { @@ -105,7 +105,7 @@ Foam::SymmetricSquareMatrix::clone() const template inline void Foam::SymmetricSquareMatrix::operator=(const Foam::zero) { - Matrix, Type>::operator=(Zero); + Matrix, Type>::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/meshes/ijkMesh/IjkFieldI.H b/src/OpenFOAM/meshes/ijkMesh/IjkFieldI.H index 5cb9e48047..67a6fcc5d4 100644 --- a/src/OpenFOAM/meshes/ijkMesh/IjkFieldI.H +++ b/src/OpenFOAM/meshes/ijkMesh/IjkFieldI.H @@ -78,7 +78,7 @@ inline Foam::IjkField::IjkField const Foam::zero ) : - Field(cmptProduct(ijk), Zero), + Field(cmptProduct(ijk), Foam::zero{}), ijk_(ijk) {} @@ -247,7 +247,7 @@ inline void Foam::IjkField::operator=(const Type& val) template inline void Foam::IjkField::operator=(const Foam::zero) { - Field::operator=(Zero); + Field::operator=(Foam::zero{}); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index b24c973db2..6c7e7cd79f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -707,7 +707,12 @@ Foam::polyMesh::polyMesh } -Foam::polyMesh::polyMesh(const IOobject& io, const zero, const bool syncPar) +Foam::polyMesh::polyMesh +( + const IOobject& io, + const Foam::zero, + const bool syncPar +) : polyMesh(io, pointField(), faceList(), labelList(), labelList(), syncPar) {} diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index 1d5a9ed081..1f0a015adb 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -332,7 +332,7 @@ public: //- Construct from IOobject or as zero-sized mesh // Boundary is added using addPatches() member function - polyMesh(const IOobject& io, const zero, const bool syncPar=true); + polyMesh(const IOobject& io, const Foam::zero, const bool syncPar=true); //- Construct from IOobject and components. // Boundary is added using addPatches() member function diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.C b/src/finiteArea/faMatrices/faMatrix/faMatrix.C index d4b8576638..8241455c35 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrix.C +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.C @@ -952,16 +952,6 @@ void Foam::faMatrix::operator-= } -template -void Foam::faMatrix::operator+=(const Foam::zero) -{} - - -template -void Foam::faMatrix::operator-=(const Foam::zero) -{} - - template void Foam::faMatrix::operator*= ( diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.H b/src/finiteArea/faMatrices/faMatrix/faMatrix.H index 1d778a964d..d8bc359f13 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrix.H +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.H @@ -499,8 +499,8 @@ public: void operator+=(const dimensioned&); void operator-=(const dimensioned&); - void operator+=(const Foam::zero); - void operator-=(const Foam::zero); + void operator+=(const Foam::zero) {} + void operator-=(const Foam::zero) {} void operator*=(const areaScalarField::Internal&); void operator*=(const tmp&); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDdt.C b/src/finiteVolume/finiteVolume/fvc/fvcDdt.C index 2b1c28390b..2ae8cc422a 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcDdt.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcDdt.C @@ -146,7 +146,7 @@ template tmp> ddt ( - const one&, + const Foam::one, const GeometricField& vf ) { @@ -159,7 +159,7 @@ tmp> ddt ( const GeometricField& vf, - const one& + const Foam::one ) { return ddt(vf); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDdt.H b/src/finiteVolume/finiteVolume/fvc/fvcDdt.H index 6d12b192f4..6e658caa30 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcDdt.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcDdt.H @@ -99,7 +99,7 @@ namespace fvc template tmp> ddt ( - const one&, + const Foam::one, const GeometricField& ); @@ -107,13 +107,13 @@ namespace fvc tmp> ddt ( const GeometricField&, - const one& + const Foam::one ); inline geometricZeroField ddt ( - const one&, - const one& + const Foam::one, + const Foam::one ) { return geometricZeroField(); diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C index 76923637e1..2c76dca9d0 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C @@ -61,7 +61,7 @@ template tmp> ddt ( - const one&, + const Foam::one, const GeometricField& vf ) { @@ -128,8 +128,8 @@ template tmp> ddt ( - const one&, - const one&, + const Foam::one, + const Foam::one, const GeometricField& vf ) { @@ -141,7 +141,7 @@ template tmp> ddt ( - const one&, + const Foam::one, const volScalarField& rho, const GeometricField& vf ) @@ -155,7 +155,7 @@ tmp> ddt ( const volScalarField& alpha, - const one&, + const Foam::one, const GeometricField& vf ) { diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H index f0276cd13b..f0eb30219d 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H @@ -61,7 +61,7 @@ namespace fvm template tmp> ddt ( - const one&, + const Foam::one, const GeometricField& ); @@ -90,15 +90,15 @@ namespace fvm template tmp> ddt ( - const one&, - const one&, + const Foam::one, + const Foam::one, const GeometricField& ); template tmp> ddt ( - const one&, + const Foam::one, const volScalarField&, const GeometricField& ); @@ -107,7 +107,7 @@ namespace fvm tmp> ddt ( const volScalarField&, - const one&, + const Foam::one, const GeometricField& ); } diff --git a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C index 3294d6b10b..d1729c417d 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C @@ -100,7 +100,7 @@ template tmp> laplacian ( - const zero&, + const Foam::zero, const GeometricField& vf, const word& name ) @@ -116,7 +116,7 @@ template tmp> laplacian ( - const zero&, + const Foam::zero, const GeometricField& vf ) { @@ -131,7 +131,7 @@ template tmp> laplacian ( - const one&, + const Foam::one, const GeometricField& vf, const word& name ) @@ -144,7 +144,7 @@ template tmp> laplacian ( - const one&, + const Foam::one, const GeometricField& vf ) { diff --git a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H index d50feb2455..de341cc614 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H @@ -70,7 +70,7 @@ namespace fvm template tmp> laplacian ( - const zero&, + const Foam::zero, const GeometricField&, const word& ); @@ -78,7 +78,7 @@ namespace fvm template tmp> laplacian ( - const zero&, + const Foam::zero, const GeometricField& ); @@ -86,7 +86,7 @@ namespace fvm template tmp> laplacian ( - const one&, + const Foam::one, const GeometricField&, const word& ); @@ -94,7 +94,7 @@ namespace fvm template tmp> laplacian ( - const one&, + const Foam::one, const GeometricField& ); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 14bacc7f0e..d570187911 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -1763,16 +1763,6 @@ void Foam::fvMatrix::operator-= } -template -void Foam::fvMatrix::operator+=(const Foam::zero) -{} - - -template -void Foam::fvMatrix::operator-=(const Foam::zero) -{} - - template void Foam::fvMatrix::operator*= ( diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index 9f4b4b3448..b6d2528aef 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -676,8 +676,8 @@ public: void operator+=(const dimensioned&); void operator-=(const dimensioned&); - void operator+=(const Foam::zero); - void operator-=(const Foam::zero); + void operator+=(const Foam::zero) {} + void operator-=(const Foam::zero) {} void operator*=(const volScalarField::Internal&); void operator*=(const tmp&);