mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: mark globalMeshData::ListPlusEqOp as deprecated
- can use ListOps::appendEqOp as the more general form.
Note that this uses a different template parameter.
Eg,
`globalMeshData::ListPlusEqOp<labelList>()`
vs. `ListOps::appendEqOp<label>()`
This commit is contained in:
@ -1981,7 +1981,7 @@ Foam::pointField Foam::globalMeshData::geometricSharedPoints() const
|
|||||||
pointField sharedPoints(mesh_.points(), sharedPointLabels());
|
pointField sharedPoints(mesh_.points(), sharedPointLabels());
|
||||||
|
|
||||||
// Append from all processors
|
// Append from all processors
|
||||||
combineReduce(sharedPoints, ListPlusEqOp<pointField>());
|
combineReduce(sharedPoints, ListOps::appendEqOp<point>());
|
||||||
|
|
||||||
// Merge tolerance
|
// Merge tolerance
|
||||||
scalar tolDim = matchTol_ * mesh_.bounds().mag();
|
scalar tolDim = matchTol_ * mesh_.bounds().mag();
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -92,7 +93,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class mapDistribute;
|
class mapDistribute;
|
||||||
template<class T> class EdgeMap;
|
template<class T> class EdgeMap;
|
||||||
@ -108,8 +109,7 @@ class globalMeshData
|
|||||||
:
|
:
|
||||||
public processorTopology
|
public processorTopology
|
||||||
{
|
{
|
||||||
|
// Private Data
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -252,7 +252,7 @@ class globalMeshData
|
|||||||
//- Calculate shared edge addressing
|
//- Calculate shared edge addressing
|
||||||
void calcSharedEdges() const;
|
void calcSharedEdges() const;
|
||||||
|
|
||||||
//- Calculate global point addressing.
|
//- Calculate global point addressing.
|
||||||
void calcGlobalPointSlaves() const;
|
void calcGlobalPointSlaves() const;
|
||||||
|
|
||||||
// Global edge addressing
|
// Global edge addressing
|
||||||
@ -314,29 +314,6 @@ class globalMeshData
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Public class
|
|
||||||
|
|
||||||
// To combineReduce a List. Just appends all lists.
|
|
||||||
template<class T>
|
|
||||||
class ListPlusEqOp
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
void operator()(T& x, const T& y) const
|
|
||||||
{
|
|
||||||
label n = x.size();
|
|
||||||
|
|
||||||
x.setSize(x.size() + y.size());
|
|
||||||
|
|
||||||
forAll(y, i)
|
|
||||||
{
|
|
||||||
x[n++] = y[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
ClassName("globalMeshData");
|
ClassName("globalMeshData");
|
||||||
|
|
||||||
@ -615,6 +592,34 @@ public:
|
|||||||
// full parallel analysis to determine shared points and
|
// full parallel analysis to determine shared points and
|
||||||
// boundaries.
|
// boundaries.
|
||||||
void updateMesh();
|
void updateMesh();
|
||||||
|
|
||||||
|
|
||||||
|
// Housekeeping
|
||||||
|
|
||||||
|
//- Deprecated(2020-09) use ListOps::appendEqOp
|
||||||
|
// Uses a different template parameter
|
||||||
|
// \code
|
||||||
|
// globalMeshData::ListPlusEqOp<labelList>()
|
||||||
|
// ListOps::appendEqOp<label>()
|
||||||
|
// \endcode
|
||||||
|
//
|
||||||
|
// \deprecated(2020-09) - use ListOps::appendEqOp
|
||||||
|
template<class T>
|
||||||
|
struct ListPlusEqOp
|
||||||
|
{
|
||||||
|
FOAM_DEPRECATED_FOR(2020-09, "ListOps::appendEqOp")
|
||||||
|
void operator()(T& x, const T& y) const
|
||||||
|
{
|
||||||
|
label n = x.size();
|
||||||
|
|
||||||
|
x.setSize(x.size() + y.size());
|
||||||
|
|
||||||
|
forAll(y, i)
|
||||||
|
{
|
||||||
|
x[n++] = y[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user