mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +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 tcalcbadmax("Calc badmax");
|
||||||
static Timer topt("optimize");
|
static Timer topt("optimize");
|
||||||
static Timer trange("range");
|
static Timer trange("range");
|
||||||
|
static Timer tloch("loch");
|
||||||
|
|
||||||
// return ImproveMeshSequential(mp, goal);
|
// return ImproveMeshSequential(mp, goal);
|
||||||
BuildBoundaryEdges(false);
|
BuildBoundaryEdges(false);
|
||||||
@ -1502,12 +1503,16 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
|
|||||||
|
|
||||||
(*testout) << setprecision(8);
|
(*testout) << setprecision(8);
|
||||||
|
|
||||||
NgArray<double, PointIndex::BASE> pointh (points.Size());
|
Array<double, PointIndex> pointh (points.Size());
|
||||||
|
|
||||||
if(lochfunc)
|
if(lochfunc)
|
||||||
{
|
{
|
||||||
for (PointIndex pi : points.Range())
|
RegionTimer rt(tloch);
|
||||||
|
ParallelForRange(points.Range(), [&] (auto myrange)
|
||||||
|
{
|
||||||
|
for(auto pi : myrange)
|
||||||
pointh[pi] = GetH(points[pi]);
|
pointh[pi] = GetH(points[pi]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user