STYLE: use default destructor for ldu interfaces
This commit is contained in:
parent
dcff32ea65
commit
ba8f237b21
@ -1,35 +1 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::LduInterfaceField<Type>::~LduInterfaceField()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
#warning File removed - left for old dependency check only
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -85,7 +85,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~LduInterfaceField();
|
||||
virtual ~LduInterfaceField() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -127,12 +127,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "LduInterfaceField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
@ -31,14 +31,8 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(lduInterface, 0);
|
||||
defineTypeNameAndDebug(lduInterface, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::lduInterface::~lduInterface()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
@ -47,23 +47,12 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class lduInterface Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class lduInterface
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
lduInterface(const lduInterface&) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const lduInterface&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -73,12 +62,11 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
lduInterface()
|
||||
{}
|
||||
lduInterface() = default;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~lduInterface();
|
||||
virtual ~lduInterface() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
@ -31,38 +31,19 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(processorLduInterface, 0);
|
||||
defineTypeNameAndDebug(processorLduInterface, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::processorLduInterface::resizeBuf
|
||||
(
|
||||
List<char>& buf,
|
||||
const label size
|
||||
) const
|
||||
void Foam::processorLduInterface::resizeBuf(List<char>& buf, const label size)
|
||||
{
|
||||
if (buf.size() < size)
|
||||
{
|
||||
buf.setSize(size);
|
||||
buf.resize(size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::processorLduInterface::processorLduInterface()
|
||||
:
|
||||
sendBuf_(0),
|
||||
receiveBuf_(0)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::processorLduInterface::~processorLduInterface()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -52,7 +52,7 @@ namespace Foam
|
||||
|
||||
class processorLduInterface
|
||||
{
|
||||
// Private data
|
||||
// Private Data
|
||||
|
||||
//- Send buffer.
|
||||
// Only sized and used when compressed or non-blocking comms used.
|
||||
@ -62,8 +62,11 @@ class processorLduInterface
|
||||
// Only sized and used when compressed or non-blocking comms used.
|
||||
mutable List<char> receiveBuf_;
|
||||
|
||||
//- Resize the buffer if required
|
||||
void resizeBuf(List<char>& buf, const label size) const;
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Increase buffer size if required
|
||||
static void resizeBuf(List<char>& buf, const label size);
|
||||
|
||||
|
||||
public:
|
||||
@ -75,11 +78,11 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
processorLduInterface();
|
||||
processorLduInterface() = default;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~processorLduInterface();
|
||||
virtual ~processorLduInterface() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -101,25 +104,26 @@ public:
|
||||
//- Return message tag used for sending
|
||||
virtual int tag() const = 0;
|
||||
|
||||
// Transfer functions
|
||||
|
||||
// Transfer Functions
|
||||
|
||||
//- Raw send function
|
||||
template<class Type>
|
||||
void send
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const UList<Type>&
|
||||
const UList<Type>& f
|
||||
) const;
|
||||
|
||||
//- Raw field receive function
|
||||
//- Raw receive function
|
||||
template<class Type>
|
||||
void receive
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
UList<Type>&
|
||||
UList<Type>& f
|
||||
) const;
|
||||
|
||||
//- Raw field receive function returning field
|
||||
//- Raw receive function returning field
|
||||
template<class Type>
|
||||
tmp<Field<Type>> receive
|
||||
(
|
||||
@ -128,23 +132,23 @@ public:
|
||||
) const;
|
||||
|
||||
|
||||
//- Raw field send function with data compression
|
||||
//- Raw send function with data compression
|
||||
template<class Type>
|
||||
void compressedSend
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const UList<Type>&
|
||||
const UList<Type>& f
|
||||
) const;
|
||||
|
||||
//- Raw field receive function with data compression
|
||||
//- Raw receive function with data compression
|
||||
template<class Type>
|
||||
void compressedReceive
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
UList<Type>&
|
||||
UList<Type>& f
|
||||
) const;
|
||||
|
||||
//- Raw field receive function with data compression returning field
|
||||
//- Raw receive function with data compression returning field
|
||||
template<class Type>
|
||||
tmp<Field<Type>> compressedReceive
|
||||
(
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
@ -135,9 +135,9 @@ Foam::tmp<Foam::Field<Type>> Foam::processorLduInterface::receive
|
||||
const label size
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tf(new Field<Type>(size));
|
||||
receive(commsType, tf.ref());
|
||||
return tf;
|
||||
auto tfld = tmp<Field<Type>>::New(size);
|
||||
receive(commsType, tfld.ref());
|
||||
return tfld;
|
||||
}
|
||||
|
||||
|
||||
@ -221,6 +221,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::processorLduInterface::compressedReceive
|
||||
(
|
||||
@ -278,6 +279,7 @@ void Foam::processorLduInterface::compressedReceive
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::processorLduInterface::compressedReceive
|
||||
(
|
||||
@ -285,9 +287,9 @@ Foam::tmp<Foam::Field<Type>> Foam::processorLduInterface::compressedReceive
|
||||
const label size
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tf(new Field<Type>(size));
|
||||
compressedReceive(commsType, tf.ref());
|
||||
return tf;
|
||||
auto tfld = tmp<Field<Type>>::New(size);
|
||||
compressedReceive(commsType, tfld.ref());
|
||||
return tfld;
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,8 +133,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//- Initialise neighbour matrix update. Add
|
||||
// or subtract coupled contributions to matrix
|
||||
//- Initialise neighbour matrix update.
|
||||
//- Add/subtract coupled contributions to matrix
|
||||
virtual void initInterfaceMatrixUpdate
|
||||
(
|
||||
solveScalarField& result,
|
||||
@ -146,8 +146,8 @@ public:
|
||||
) const
|
||||
{}
|
||||
|
||||
//- Update result field based on interface functionality. Add
|
||||
// or subtract coupled contributions to matrix
|
||||
//- Update result field based on interface functionality.
|
||||
//- Add/subtract coupled contributions to matrix
|
||||
virtual void updateInterfaceMatrix
|
||||
(
|
||||
solveScalarField& result,
|
||||
@ -158,8 +158,7 @@ public:
|
||||
const Pstream::commsTypes commsType
|
||||
) const = 0;
|
||||
|
||||
//- Helper: add (or subtract) weighted contributions to internal
|
||||
// field
|
||||
//- Add/subtract weighted contributions to internal field
|
||||
template<class Type>
|
||||
void addToInternalField
|
||||
(
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -205,10 +205,6 @@ protected:
|
||||
);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
GAMGAgglomeration(const GAMGAgglomeration&) = delete;
|
||||
|
||||
|
@ -100,12 +100,6 @@ Foam::cyclicGAMGInterfaceField::cyclicGAMGInterfaceField
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::cyclicGAMGInterfaceField::~cyclicGAMGInterfaceField()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::cyclicGAMGInterfaceField::updateInterfaceMatrix
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cyclicGAMGInterfaceField();
|
||||
virtual ~cyclicGAMGInterfaceField() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -84,12 +84,6 @@ Foam::processorGAMGInterfaceField::processorGAMGInterfaceField
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::processorGAMGInterfaceField::~processorGAMGInterfaceField()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~processorGAMGInterfaceField();
|
||||
virtual ~processorGAMGInterfaceField() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -161,12 +161,6 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::cyclicGAMGInterface::~cyclicGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
@ -109,7 +109,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cyclicGAMGInterface();
|
||||
virtual ~cyclicGAMGInterface() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -178,12 +178,6 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::processorGAMGInterface::~processorGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::processorGAMGInterface::initInternalFieldTransfer
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
@ -125,7 +125,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~processorGAMGInterface();
|
||||
virtual ~processorGAMGInterface() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -176,12 +176,6 @@ Foam::calculatedProcessorGAMGInterface::calculatedProcessorGAMGInterface
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::calculatedProcessorGAMGInterface::~calculatedProcessorGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::calculatedProcessorGAMGInterface::initInternalFieldTransfer
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~calculatedProcessorGAMGInterface();
|
||||
virtual ~calculatedProcessorGAMGInterface() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
@ -146,7 +146,7 @@ public:
|
||||
) const;
|
||||
|
||||
|
||||
//- Processor interface functions
|
||||
// Processor interface functions
|
||||
|
||||
//- Return communicator used for sending
|
||||
virtual label comm() const
|
||||
|
Loading…
Reference in New Issue
Block a user