thread save geometry check

This commit is contained in:
Joachim Schoeberl 2012-10-19 08:46:46 +00:00
parent 052ef5db85
commit 9c151ce274
2 changed files with 11 additions and 5 deletions

View File

@ -6,6 +6,7 @@
namespace netgen
{
int
IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line)
{
@ -14,8 +15,10 @@ IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line)
Vec3d vt2(*tri[0], *tri[2]);
Vec3d vrs(*tri[0], *line[0]);
static DenseMatrix a(3), ainv(3);
static Vector rs(3), lami(3);
// static DenseMatrix a(3), ainv(3);
// static Vector rs(3), lami(3);
Mat<3,3> a, ainv;
Vec<3> rs, lami;
int i;
/*
@ -31,7 +34,8 @@ IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line)
rs(i) = vrs.X(i+1);
}
double det = a.Det();
// double det = a.Det();
double det = Det(a);
double arel = vl.Length() * vt1.Length() * vt2.Length();
/*
@ -64,7 +68,8 @@ IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line)
}
CalcInverse (a, ainv);
ainv.Mult (rs, lami);
// ainv.Mult (rs, lami);
lami = ainv * rs;
// (*testout) << "lami = " << lami << endl;

View File

@ -151,7 +151,8 @@ void PopStatus()
if (msgstatus_stack.Size())
{
if (msgstatus_stack.Size() > 1)
SetStatMsg (*msgstatus_stack.Last());
// SetStatMsg (*msgstatus_stack.Last());
SetStatMsg (*msgstatus_stack[msgstatus_stack.Size()-2]);
else
SetStatMsg ("");
delete msgstatus_stack.Last();