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:
@ -1940,7 +1940,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
|
|||||||
(
|
(
|
||||||
Pstream::commsTypes::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
slave,
|
slave,
|
||||||
sharedPoints.size()*sizeof(Zero)
|
sharedPoints.size()*sizeof(Foam::vector) // byteSize()
|
||||||
);
|
);
|
||||||
toSlave << sharedPoints;
|
toSlave << sharedPoints;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2014-2015 OpenFOAM Foundation
|
Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -914,7 +914,7 @@ handleFeatureAngleLayerTerminations
|
|||||||
mesh(),
|
mesh(),
|
||||||
meshEdges,
|
meshEdges,
|
||||||
edgeFaceNormals,
|
edgeFaceNormals,
|
||||||
globalMeshData::ListPlusEqOp<List<point>>(), // combine operator
|
ListOps::appendEqOp<point>(),
|
||||||
List<point>() // null value
|
List<point>() // null value
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -923,7 +923,7 @@ handleFeatureAngleLayerTerminations
|
|||||||
mesh(),
|
mesh(),
|
||||||
meshEdges,
|
meshEdges,
|
||||||
edgeFaceExtrude,
|
edgeFaceExtrude,
|
||||||
globalMeshData::ListPlusEqOp<List<bool>>(), // combine operator
|
ListOps::appendEqOp<bool>(),
|
||||||
List<bool>() // null value
|
List<bool>() // null value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -543,7 +543,7 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
|||||||
globalSrcCells.inplaceToGlobal(addressing);
|
globalSrcCells.inplaceToGlobal(addressing);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up as a reverse distribute
|
// Set up as a reverse distribute
|
||||||
mapDistributeBase::distribute
|
mapDistributeBase::distribute
|
||||||
(
|
(
|
||||||
Pstream::commsTypes::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
@ -554,12 +554,12 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
|||||||
map.subMap(),
|
map.subMap(),
|
||||||
false,
|
false,
|
||||||
tgtToSrcCellAddr_,
|
tgtToSrcCellAddr_,
|
||||||
ListPlusEqOp<label>(),
|
ListOps::appendEqOp<label>(),
|
||||||
flipOp(),
|
flipOp(),
|
||||||
labelList()
|
labelList()
|
||||||
);
|
);
|
||||||
|
|
||||||
// set up as a reverse distribute
|
// Set up as a reverse distribute
|
||||||
mapDistributeBase::distribute
|
mapDistributeBase::distribute
|
||||||
(
|
(
|
||||||
Pstream::commsTypes::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
@ -570,7 +570,7 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
|||||||
map.subMap(),
|
map.subMap(),
|
||||||
false,
|
false,
|
||||||
tgtToSrcCellWght_,
|
tgtToSrcCellWght_,
|
||||||
ListPlusEqOp<scalar>(),
|
ListOps::appendEqOp<scalar>(),
|
||||||
flipOp(),
|
flipOp(),
|
||||||
scalarList()
|
scalarList()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -33,38 +33,6 @@ License
|
|||||||
#include "fvcGrad.H"
|
#include "fvcGrad.H"
|
||||||
#include "distributedWeightedFvPatchFieldMapper.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 * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
Reference in New Issue
Block a user