mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: noexcept size_bytes() method for lists
- for use when the is_contiguous check has already been done outside the loop. Naming as per std::span. STYLE: use data/cdata instead of begin ENH: replace random_shuffle with shuffle, fix OSX int64 ambiguity
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -33,6 +34,8 @@ License
|
||||
#include "scalarIOField.H"
|
||||
#include "labelIOField.H"
|
||||
#include "pointConversion.H"
|
||||
#include <algorithm>
|
||||
#include <random>
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -304,7 +307,7 @@ Foam::Map<Foam::label> Foam::DelaunayMesh<Triangulation>::rangeInsertWithInfo
|
||||
);
|
||||
}
|
||||
|
||||
std::random_shuffle(points.begin(), points.end());
|
||||
std::shuffle(points.begin(), points.end(), std::default_random_engine());
|
||||
|
||||
spatial_sort
|
||||
(
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -33,6 +33,8 @@ License
|
||||
#include "pointConversion.H"
|
||||
#include "indexedVertexEnum.H"
|
||||
#include "IOmanip.H"
|
||||
#include <algorithm>
|
||||
#include <random>
|
||||
|
||||
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
@ -880,7 +882,12 @@ Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
|
||||
);
|
||||
}
|
||||
|
||||
std::random_shuffle(pointsBbDistSqr.begin(), pointsBbDistSqr.end());
|
||||
std::shuffle
|
||||
(
|
||||
pointsBbDistSqr.begin(),
|
||||
pointsBbDistSqr.end(),
|
||||
std::default_random_engine()
|
||||
);
|
||||
|
||||
// Sort in ascending order by the distance of the point from the centre
|
||||
// of the processor bounding box
|
||||
|
||||
Reference in New Issue
Block a user