mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use ListOps::appendEqOp instead of local version
BUG: bad buffer size in globalMeshData::sharedPoints()
- introduced by vector::zero -> Zero replacement (commit 683cfb9d97)
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -543,7 +543,7 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
||||
globalSrcCells.inplaceToGlobal(addressing);
|
||||
}
|
||||
|
||||
// set up as a reverse distribute
|
||||
// Set up as a reverse distribute
|
||||
mapDistributeBase::distribute
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
@ -554,12 +554,12 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
||||
map.subMap(),
|
||||
false,
|
||||
tgtToSrcCellAddr_,
|
||||
ListPlusEqOp<label>(),
|
||||
ListOps::appendEqOp<label>(),
|
||||
flipOp(),
|
||||
labelList()
|
||||
);
|
||||
|
||||
// set up as a reverse distribute
|
||||
// Set up as a reverse distribute
|
||||
mapDistributeBase::distribute
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
@ -570,7 +570,7 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
||||
map.subMap(),
|
||||
false,
|
||||
tgtToSrcCellWght_,
|
||||
ListPlusEqOp<scalar>(),
|
||||
ListOps::appendEqOp<scalar>(),
|
||||
flipOp(),
|
||||
scalarList()
|
||||
);
|
||||
|
||||
@ -33,38 +33,6 @@ License
|
||||
#include "fvcGrad.H"
|
||||
#include "distributedWeightedFvPatchFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
//- Helper class for list
|
||||
template<class Type>
|
||||
class ListPlusEqOp
|
||||
{
|
||||
public:
|
||||
void operator()(List<Type>& x, const List<Type> y) const
|
||||
{
|
||||
if (y.size())
|
||||
{
|
||||
if (x.size())
|
||||
{
|
||||
label sz = x.size();
|
||||
x.setSize(sz + y.size());
|
||||
forAll(y, i)
|
||||
{
|
||||
x[sz++] = y[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
|
||||
Reference in New Issue
Block a user