mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: identityOp as equivalent to std::identity (C++20)
- similar to how noOp was defined, but with perfect forwarding STYLE: combine Swap into stdFoam STYLE: capitalize FileOp, NegateOp template parameters
This commit is contained in:
@ -33,7 +33,7 @@ License
|
||||
#include "IOstreams.H"
|
||||
#include "StringStream.H"
|
||||
#include "ListOps.H"
|
||||
#include "flipOp.H"
|
||||
#include "StringListOps.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -216,7 +216,7 @@ int main()
|
||||
(
|
||||
table1.keys().begin(),
|
||||
table1.keys().end(),
|
||||
noOp{}
|
||||
identityOp{}
|
||||
)
|
||||
);
|
||||
sort(sortKeys);
|
||||
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "argList.H"
|
||||
#include "ITstream.H"
|
||||
#include "ListOps.H"
|
||||
#include "flipOp.H"
|
||||
#include "StringListOps.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
stringInput.cbegin(),
|
||||
stringInput.cend(),
|
||||
Foam::noOp{}
|
||||
Foam::identityOp{}
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const mapDistribute& faceMap = map.faceMap();
|
||||
pointField fc(mesh.faceCentres());
|
||||
faceMap.distribute(fc, noOp());
|
||||
faceMap.distribute(fc, identityOp());
|
||||
Pout<< "Construct size:" << faceMap.constructSize() << endl;
|
||||
forAll(distributedMesh.faceCentres(), facei)
|
||||
{
|
||||
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const mapDistribute& cellMap = map.cellMap();
|
||||
pointField cc(mesh.cellCentres());
|
||||
cellMap.distribute(cc, noOp());
|
||||
cellMap.distribute(cc, identityOp());
|
||||
Pout<< "Construct size:" << cellMap.constructSize() << endl;
|
||||
forAll(distributedMesh.cellCentres(), celli)
|
||||
{
|
||||
@ -131,7 +131,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const mapDistribute& pointMap = map.pointMap();
|
||||
pointField pc(mesh.points());
|
||||
pointMap.distribute(pc, noOp());
|
||||
pointMap.distribute(pc, identityOp());
|
||||
Pout<< "Construct size:" << pointMap.constructSize() << endl;
|
||||
forAll(distributedMesh.points(), pointi)
|
||||
{
|
||||
|
||||
@ -614,7 +614,7 @@ void testEdgeFlip2(const polyMesh& mesh, Random& rndGen)
|
||||
edgePointCombineOp(),
|
||||
PointPair(point::max, point::max),
|
||||
edgePointTransformOp(),
|
||||
noOp()
|
||||
identityOp()
|
||||
);
|
||||
|
||||
forAll(fld, edgeI)
|
||||
|
||||
@ -51,7 +51,6 @@ Description
|
||||
#include "wallPolyPatch.H"
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "oldCyclicPolyPatch.H"
|
||||
#include "Swap.H"
|
||||
#include "IFstream.H"
|
||||
#include "readHexLabel.H"
|
||||
|
||||
|
||||
@ -45,7 +45,6 @@ SourceFiles
|
||||
#include "List.H"
|
||||
#include "globalIndex.H"
|
||||
#include "Pstream.H"
|
||||
#include "Swap.H"
|
||||
#include "InfoProxy.H"
|
||||
#include "tetCell.H"
|
||||
#include "typeInfo.H"
|
||||
|
||||
Reference in New Issue
Block a user