2010-03-23 17:52:07 +05:00
|
|
|
#include <mystdlib.h>
|
|
|
|
#include "meshing.hpp"
|
|
|
|
|
|
|
|
namespace netgen
|
|
|
|
{
|
|
|
|
|
2013-02-06 18:55:20 +06:00
|
|
|
DLL_HEADER GeometryRegisterArray geometryregister;
|
|
|
|
//DLL_HEADER Array<GeometryRegister*> geometryregister;
|
2011-01-11 01:18:01 +05:00
|
|
|
|
|
|
|
GeometryRegister :: ~GeometryRegister()
|
|
|
|
{ ; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-23 17:52:07 +05:00
|
|
|
|
2016-12-05 17:50:21 +05:00
|
|
|
int NetgenGeometry :: GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam)
|
2010-03-23 17:52:07 +05:00
|
|
|
{
|
|
|
|
if (!mesh) return 1;
|
|
|
|
|
2016-12-05 17:50:21 +05:00
|
|
|
if (mparam.perfstepsstart <= MESHCONST_MESHVOLUME)
|
2010-03-23 17:52:07 +05:00
|
|
|
{
|
|
|
|
multithread.task = "Volume meshing";
|
|
|
|
|
|
|
|
MESHING3_RESULT res =
|
|
|
|
MeshVolume (mparam, *mesh);
|
|
|
|
|
|
|
|
if (res != MESHING3_OK) return 1;
|
|
|
|
|
|
|
|
if (multithread.terminate) return 0;
|
|
|
|
|
|
|
|
RemoveIllegalElements (*mesh);
|
|
|
|
if (multithread.terminate) return 0;
|
|
|
|
|
|
|
|
MeshQuality3d (*mesh);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-12-05 17:50:21 +05:00
|
|
|
if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHVOLUME)
|
2010-03-23 17:52:07 +05:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
2016-12-05 17:50:21 +05:00
|
|
|
if (mparam.perfstepsstart <= MESHCONST_OPTVOLUME)
|
2010-03-23 17:52:07 +05:00
|
|
|
{
|
|
|
|
multithread.task = "Volume optimization";
|
|
|
|
|
|
|
|
OptimizeVolume (mparam, *mesh);
|
|
|
|
if (multithread.terminate) return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const Refinement & NetgenGeometry :: GetRefinement () const
|
|
|
|
{
|
|
|
|
return *new Refinement;;
|
|
|
|
}
|
2011-01-11 01:18:01 +05:00
|
|
|
|
|
|
|
|
|
|
|
void NetgenGeometry :: Save (string filename) const
|
|
|
|
{
|
|
|
|
throw NgException("Cannot save geometry - no geometry available");
|
|
|
|
}
|
|
|
|
|
2010-03-23 17:52:07 +05:00
|
|
|
}
|