small polish

This commit is contained in:
Joachim Schoeberl 2013-02-03 14:40:27 +00:00
parent f2cb1a75d4
commit affda364a2
3 changed files with 12 additions and 21 deletions

View File

@ -84,16 +84,16 @@ extern void CalcTriangleBadness (double x2, double x3, double y3,
extern double CalcTriangleBadness (const Point3d & p1,
const Point3d & p2,
const Point3d & p3,
extern double CalcTriangleBadness (const Point<3> & p1,
const Point<3> & p2,
const Point<3> & p3,
double metricweight,
double h);
extern double CalcTriangleBadness (const Point3d & p1,
const Point3d & p2,
const Point3d & p3,
const Vec3d & n,
extern double CalcTriangleBadness (const Point<3> & p1,
const Point<3> & p2,
const Point<3> & p3,
const Vec<3> & n,
double metricweight,
double h);

View File

@ -416,14 +416,8 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
if (el[l] == pi2) has2 = 1;
}
if (has1 && has2)
{ // only once
for (l = 0; l < hasbothpoints.Size(); l++)
if (hasbothpoints[l] == elnr)
has1 = 0;
if (has1)
hasbothpoints.Append (elnr);
}
if (!hasbothpoints.Contains (elnr))
hasbothpoints.Append (elnr);
}
bad1 = 0;

View File

@ -6,18 +6,15 @@ namespace netgen
DLL_HEADER void Optimize2d (Mesh & mesh, MeshingParameters & mp)
{
int i;
//double h = mp.maxh;
static int timer = NgProfiler::CreateTimer ("optimize2d");
NgProfiler::RegionTimer reg(timer);
mesh.CalcSurfacesOfNode();
const char * optstr = mp.optimize2d;
int optsteps = mp.optsteps2d;
// cout << "optstr = " << optstr << endl;
for (i = 1; i <= optsteps; i++)
for (int i = 1; i <= optsteps; i++)
for (size_t j = 1; j <= strlen(optstr); j++)
{
if (multithread.terminate) break;