mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
parallel evaluation of localh in ImproveMesh()
This commit is contained in:
parent
b677ef5e22
commit
80d648c005
@ -1459,6 +1459,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
|
||||
static Timer tcalcbadmax("Calc badmax");
|
||||
static Timer topt("optimize");
|
||||
static Timer trange("range");
|
||||
static Timer tloch("loch");
|
||||
|
||||
// return ImproveMeshSequential(mp, goal);
|
||||
BuildBoundaryEdges(false);
|
||||
@ -1502,12 +1503,16 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
|
||||
|
||||
(*testout) << setprecision(8);
|
||||
|
||||
NgArray<double, PointIndex::BASE> pointh (points.Size());
|
||||
Array<double, PointIndex> pointh (points.Size());
|
||||
|
||||
if(lochfunc)
|
||||
{
|
||||
for (PointIndex pi : points.Range())
|
||||
pointh[pi] = GetH(points[pi]);
|
||||
RegionTimer rt(tloch);
|
||||
ParallelForRange(points.Range(), [&] (auto myrange)
|
||||
{
|
||||
for(auto pi : myrange)
|
||||
pointh[pi] = GetH(points[pi]);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user