mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
modern timers, remove vector allocation
This commit is contained in:
parent
ae45a7abf0
commit
a73594b738
@ -277,10 +277,8 @@ namespace netgen
|
||||
NgArray<INDEX> & lindex,
|
||||
double xh)
|
||||
{
|
||||
static int timer = NgProfiler::CreateTimer ("adfront2::GetLocals");
|
||||
NgProfiler::RegionTimer reg (timer);
|
||||
|
||||
|
||||
// static Timer timer("adfront2::GetLocals"); RegionTimer reg (timer);
|
||||
|
||||
int pstind;
|
||||
Point<3> midp, p0;
|
||||
|
||||
|
@ -362,7 +362,7 @@ namespace netgen
|
||||
NgProfiler::StopTimer (ts3);
|
||||
|
||||
static Timer tloop("surfacemeshing mainloop");
|
||||
static Timer tgetlocals("surfacemeshing getlocals");
|
||||
// static Timer tgetlocals("surfacemeshing getlocals");
|
||||
{
|
||||
RegionTimer rloop(tloop);
|
||||
while (!adfront.Empty() && !multithread.terminate)
|
||||
@ -441,10 +441,10 @@ namespace netgen
|
||||
|
||||
double hinner = (3 + qualclass) * max2 (his, hshould);
|
||||
|
||||
tgetlocals.Start();
|
||||
// tgetlocals.Start();
|
||||
adfront.GetLocals (baselineindex, locpoints, mpgeominfo, loclines,
|
||||
pindex, lindex, 2*hinner);
|
||||
tgetlocals.Stop();
|
||||
// tgetlocals.Stop();
|
||||
|
||||
NgProfiler::RegionTimer reg2 (timer2);
|
||||
|
||||
@ -790,8 +790,8 @@ namespace netgen
|
||||
|
||||
if (found)
|
||||
{
|
||||
static Timer t("ApplyRules");
|
||||
RegionTimer r(t);
|
||||
// static Timer t("ApplyRules");
|
||||
// RegionTimer r(t);
|
||||
rulenr = ApplyRules (plainpoints, legalpoints, maxlegalpoint,
|
||||
loclines, maxlegalline, locelements,
|
||||
dellines, qualclass, mp);
|
||||
|
@ -54,9 +54,7 @@ namespace netgen
|
||||
NgArray<INDEX> & dellines, int tolerance,
|
||||
const MeshingParameters & mp)
|
||||
{
|
||||
static int timer = NgProfiler::CreateTimer ("meshing2::ApplyRules");
|
||||
NgProfiler::RegionTimer reg (timer);
|
||||
|
||||
// static Timer timer ("meshing2::ApplyRules"); RegionTimer reg (timer);
|
||||
|
||||
|
||||
double maxerr = 0.5 + 0.3 * tolerance;
|
||||
@ -76,6 +74,9 @@ namespace netgen
|
||||
NgArrayMem<int,100> tempdellines;
|
||||
NgArrayMem<Element2d,100> tempelements;
|
||||
|
||||
// a least 2 * maximal number of old points in rules,
|
||||
// what is actually 4 now
|
||||
double oldumem[20];
|
||||
|
||||
elements.SetSize (0);
|
||||
dellines.SetSize (0);
|
||||
@ -457,7 +458,8 @@ namespace netgen
|
||||
|
||||
if (!ok) continue;
|
||||
|
||||
Vector oldu (2 * rule->GetNOldP());
|
||||
// Vector oldu (2 * rule->GetNOldP());
|
||||
Vector oldu (2 * rule->GetNOldP(), &oldumem[0]);
|
||||
|
||||
for (int i = 1; i <= rule->GetNOldP(); i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user