ENH: base classes for wave algorithms (manage non-templated parts)

ENH: use DynamicList instead of List + size for point wave

- consistent with previous updates for the other algorithms

STYLE: unique_ptr instead of raw pointer in wave algorithms
This commit is contained in:
Mark Olesen
2022-10-13 11:23:35 +02:00
committed by Andrew Heather
parent c33167dc0e
commit 5ec435aca3
32 changed files with 802 additions and 780 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -26,19 +27,12 @@ License
\*---------------------------------------------------------------------------*/
#include "PatchToPatchInterpolation.H"
#include "demandDrivenData.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<class FromPatch, class ToPatch>
const scalar
PatchToPatchInterpolation<FromPatch, ToPatch>::directHitTol = 1e-5;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class FromPatch, class ToPatch>
@ -96,12 +90,12 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceWeights() const
template<class FromPatch, class ToPatch>
void PatchToPatchInterpolation<FromPatch, ToPatch>::clearOut()
{
deleteDemandDrivenData(pointAddressingPtr_);
deleteDemandDrivenData(pointWeightsPtr_);
deleteDemandDrivenData(pointDistancePtr_);
deleteDemandDrivenData(faceAddressingPtr_);
deleteDemandDrivenData(faceWeightsPtr_);
deleteDemandDrivenData(faceDistancePtr_);
pointAddressingPtr_.reset(nullptr);
pointWeightsPtr_.reset(nullptr);
pointDistancePtr_.reset(nullptr);
faceAddressingPtr_.reset(nullptr);
faceWeightsPtr_.reset(nullptr);
faceDistancePtr_.reset(nullptr);
}