mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
fixing performance issue with Plane-Cylinder check
This commit is contained in:
parent
3153bc1f0b
commit
e2cc34780c
@ -32,6 +32,7 @@ namespace netgen
|
|||||||
s1 = s2 = NULL;
|
s1 = s2 = NULL;
|
||||||
maxh = 1e10;
|
maxh = 1e10;
|
||||||
name = NULL;
|
name = NULL;
|
||||||
|
num_surfs = prim->GetNSurfaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
Solid :: Solid (optyp aop, Solid * as1, Solid * as2)
|
Solid :: Solid (optyp aop, Solid * as1, Solid * as2)
|
||||||
@ -42,6 +43,9 @@ namespace netgen
|
|||||||
prim = NULL;
|
prim = NULL;
|
||||||
name = NULL;
|
name = NULL;
|
||||||
maxh = 1e10;
|
maxh = 1e10;
|
||||||
|
num_surfs = 0;
|
||||||
|
if (s1) num_surfs += s1->num_surfs;
|
||||||
|
if (s2) num_surfs += s2->num_surfs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Solid :: ~Solid ()
|
Solid :: ~Solid ()
|
||||||
@ -1231,8 +1235,7 @@ namespace netgen
|
|||||||
|
|
||||||
Solid * Solid :: RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const
|
Solid * Solid :: RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const
|
||||||
{
|
{
|
||||||
|
if (num_surfs <= 2)
|
||||||
|
|
||||||
{
|
{
|
||||||
// checking special case for degenerated plane - cylinder, Dec 2014
|
// checking special case for degenerated plane - cylinder, Dec 2014
|
||||||
int cnt_plane = 0, cnt_cyl = 0;
|
int cnt_plane = 0, cnt_cyl = 0;
|
||||||
|
@ -48,6 +48,7 @@ namespace netgen
|
|||||||
optyp op;
|
optyp op;
|
||||||
bool visited;
|
bool visited;
|
||||||
double maxh;
|
double maxh;
|
||||||
|
int num_surfs;
|
||||||
|
|
||||||
// static int cntnames;
|
// static int cntnames;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user