mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
only do optimization for occ surface mesh
This commit is contained in:
parent
656b0e0539
commit
5eb2ab470e
@ -601,7 +601,7 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend,
|
||||
void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh,
|
||||
MeshingParameters & mparam)
|
||||
{
|
||||
static Timer t("OCCMeshSurface"); RegionTimer r(t);
|
||||
@ -906,13 +906,16 @@ namespace netgen
|
||||
// problemfile << "OK" << endl << endl;
|
||||
// problemfile.close();
|
||||
}
|
||||
|
||||
for (int i = 0; i < mesh.GetNFD(); i++)
|
||||
mesh.SetBCName (i, mesh.GetFaceDescriptor(i+1).GetBCName());
|
||||
multithread.task = savetask;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (multithread.terminate || perfstepsend < MESHCONST_OPTSURFACE)
|
||||
return;
|
||||
|
||||
void OCCOptimizeSurface(OCCGeometry & geom, Mesh & mesh,
|
||||
MeshingParameters & mparam)
|
||||
{
|
||||
const char * savetask = multithread.task;
|
||||
multithread.task = "Optimizing surface";
|
||||
|
||||
static Timer timer_opt2d("Optimization 2D");
|
||||
@ -981,9 +984,6 @@ namespace netgen
|
||||
timer_opt2d.Stop();
|
||||
|
||||
multithread.task = savetask;
|
||||
|
||||
for (int i = 0; i < mesh.GetNFD(); i++)
|
||||
mesh.SetBCName (i, mesh.GetFaceDescriptor(i+1).GetBCName());
|
||||
}
|
||||
|
||||
|
||||
@ -1368,7 +1368,7 @@ namespace netgen
|
||||
|
||||
if (mparam.perfstepsstart <= MESHCONST_MESHSURFACE)
|
||||
{
|
||||
OCCMeshSurface (geom, *mesh, mparam.perfstepsend, mparam);
|
||||
OCCMeshSurface (geom, *mesh, mparam);
|
||||
if (multithread.terminate) return TCL_OK;
|
||||
|
||||
#ifdef LOG_STREAM
|
||||
@ -1387,6 +1387,14 @@ namespace netgen
|
||||
mesh->CalcSurfacesOfNode();
|
||||
}
|
||||
|
||||
if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHSURFACE)
|
||||
return TCL_OK;
|
||||
|
||||
if (mparam.perfstepsstart <= MESHCONST_OPTSURFACE)
|
||||
{
|
||||
OCCOptimizeSurface(geom, *mesh, mparam);
|
||||
}
|
||||
|
||||
if (multithread.terminate || mparam.perfstepsend <= MESHCONST_OPTSURFACE)
|
||||
return TCL_OK;
|
||||
|
||||
|
@ -441,7 +441,9 @@ namespace netgen
|
||||
DLL_HEADER extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh, const MeshingParameters & mparam,
|
||||
const OCCParameters& occparam);
|
||||
|
||||
DLL_HEADER extern void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend, MeshingParameters & mparam);
|
||||
DLL_HEADER extern void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, MeshingParameters & mparam);
|
||||
|
||||
DLL_HEADER extern void OCCOptimizeSurface (OCCGeometry & geom, Mesh & mesh, MeshingParameters & mparam);
|
||||
|
||||
DLL_HEADER extern void OCCFindEdges (OCCGeometry & geom, Mesh & mesh, const MeshingParameters & mparam);
|
||||
}
|
||||
|
@ -1378,6 +1378,8 @@ namespace netgen
|
||||
}
|
||||
else if (mesh)
|
||||
{
|
||||
if(perfstepsstart > 1 && perfstepsstart < 5)
|
||||
throw Exception("Need geometry for surface mesh operations!");
|
||||
MeshVolume(mparam, *mesh);
|
||||
OptimizeVolume(mparam, *mesh);
|
||||
return 0;
|
||||
|
@ -926,7 +926,8 @@ namespace nglib
|
||||
perfstepsend = MESHCONST_OPTSURFACE;
|
||||
}
|
||||
|
||||
OCCMeshSurface(*occgeom, *me, perfstepsend, mparam);
|
||||
OCCMeshSurface(*occgeom, *me, mparam);
|
||||
OCCOptimizeSurface(*occgeom, *me, mparam);
|
||||
|
||||
me->CalcSurfacesOfNode();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user