mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
meshing from surface mesh bug fix
This commit is contained in:
parent
623619a13c
commit
6cdaec8ece
@ -146,7 +146,7 @@ namespace netgen
|
|||||||
public:
|
public:
|
||||||
CSGeometry ();
|
CSGeometry ();
|
||||||
CSGeometry (const string & afilename);
|
CSGeometry (const string & afilename);
|
||||||
~CSGeometry ();
|
virtual ~CSGeometry ();
|
||||||
|
|
||||||
void Clean ();
|
void Clean ();
|
||||||
|
|
||||||
|
@ -25,4 +25,4 @@ libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
|
|||||||
ruler2.cpp ruler3.cpp secondorder.cpp smoothing2.5.cpp \
|
ruler2.cpp ruler3.cpp secondorder.cpp smoothing2.5.cpp \
|
||||||
smoothing2.cpp smoothing3.cpp specials.cpp tetrarls.cpp \
|
smoothing2.cpp smoothing3.cpp specials.cpp tetrarls.cpp \
|
||||||
topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \
|
topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \
|
||||||
parallelmesh.cpp paralleltop.cpp paralleltop.hpp
|
parallelmesh.cpp paralleltop.cpp paralleltop.hpp basegeom.cpp
|
||||||
|
51
libsrc/meshing/basegeom.cpp
Normal file
51
libsrc/meshing/basegeom.cpp
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#include <mystdlib.h>
|
||||||
|
#include "meshing.hpp"
|
||||||
|
|
||||||
|
namespace netgen
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
int NetgenGeometry :: GenerateMesh (Mesh*& mesh,
|
||||||
|
int perfstepsstart, int perfstepsend, char* optstring)
|
||||||
|
{
|
||||||
|
if (!mesh) return 1;
|
||||||
|
|
||||||
|
if (perfstepsstart <= MESHCONST_MESHVOLUME)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (multithread.terminate || perfstepsend <= MESHCONST_MESHVOLUME)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
if (perfstepsstart <= MESHCONST_OPTVOLUME)
|
||||||
|
{
|
||||||
|
multithread.task = "Volume optimization";
|
||||||
|
|
||||||
|
OptimizeVolume (mparam, *mesh);
|
||||||
|
if (multithread.terminate) return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Refinement & NetgenGeometry :: GetRefinement () const
|
||||||
|
{
|
||||||
|
return *new Refinement;;
|
||||||
|
}
|
||||||
|
}
|
@ -14,10 +14,15 @@ public:
|
|||||||
virtual ~NetgenGeometry () { ; }
|
virtual ~NetgenGeometry () { ; }
|
||||||
|
|
||||||
virtual int GenerateMesh (Mesh*& mesh,
|
virtual int GenerateMesh (Mesh*& mesh,
|
||||||
int perfstepsstart, int perfstepsend, char* optstring) = 0;
|
int perfstepsstart, int perfstepsend, char* optstring);
|
||||||
|
|
||||||
virtual const Refinement & GetRefinement () const = 0;
|
virtual const Refinement & GetRefinement () const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -183,7 +183,7 @@ namespace netgen
|
|||||||
OCCGeometry * occgeometry = NULL;
|
OCCGeometry * occgeometry = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NetgenGeometry * ng_geometry;
|
NetgenGeometry * ng_geometry = new NetgenGeometry;
|
||||||
|
|
||||||
Tcl_Interp * tcl_interp;
|
Tcl_Interp * tcl_interp;
|
||||||
|
|
||||||
@ -2149,7 +2149,12 @@ namespace netgen
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int res = ng_geometry -> GenerateMesh (mesh.Ptr(), perfstepsstart, perfstepsend, optstringcsg);
|
int res = ng_geometry -> GenerateMesh (mesh.Ptr(), perfstepsstart, perfstepsend, optstringcsg);
|
||||||
if (res != MESHING3_OK) return 0;
|
if (res != MESHING3_OK)
|
||||||
|
{
|
||||||
|
multithread.task = savetask;
|
||||||
|
multithread.running = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mparam.autozrefine && ( (NetgenGeometry*)geometry.Ptr() == ng_geometry))
|
if (mparam.autozrefine && ( (NetgenGeometry*)geometry.Ptr() == ng_geometry))
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
xxx
|
||||||
8
|
8
|
||||||
0 0 0
|
0 0 0
|
||||||
1 0 0
|
1 0 0
|
||||||
|
Loading…
Reference in New Issue
Block a user