mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40: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:
|
||||
CSGeometry ();
|
||||
CSGeometry (const string & afilename);
|
||||
~CSGeometry ();
|
||||
virtual ~CSGeometry ();
|
||||
|
||||
void Clean ();
|
||||
|
||||
|
@ -9,7 +9,7 @@ validate.hpp classifyhpel.hpp hpref_hex.hpp improve2.hpp meshtool.hpp \
|
||||
clusters.hpp hprefinement.hpp improve3.hpp meshtype.hpp \
|
||||
hpref_prism.hpp localh.hpp msghandler.hpp curvedelems.hpp \
|
||||
hpref_pyramid.hpp meshclass.hpp ruler2.hpp bcfunctions.hpp \
|
||||
basegeom.hpp
|
||||
basegeom.hpp
|
||||
|
||||
|
||||
|
||||
@ -24,5 +24,5 @@ libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
|
||||
pyramid2rls.cpp pyramidrls.cpp quadrls.cpp refine.cpp \
|
||||
ruler2.cpp ruler3.cpp secondorder.cpp smoothing2.5.cpp \
|
||||
smoothing2.cpp smoothing3.cpp specials.cpp tetrarls.cpp \
|
||||
topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \
|
||||
parallelmesh.cpp paralleltop.cpp paralleltop.hpp
|
||||
topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \
|
||||
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 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
|
||||
|
@ -183,7 +183,7 @@ namespace netgen
|
||||
OCCGeometry * occgeometry = NULL;
|
||||
#endif
|
||||
|
||||
NetgenGeometry * ng_geometry;
|
||||
NetgenGeometry * ng_geometry = new NetgenGeometry;
|
||||
|
||||
Tcl_Interp * tcl_interp;
|
||||
|
||||
@ -2149,7 +2149,12 @@ namespace netgen
|
||||
else
|
||||
{
|
||||
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))
|
||||
|
@ -1,3 +1,4 @@
|
||||
xxx
|
||||
8
|
||||
0 0 0
|
||||
1 0 0
|
||||
|
Loading…
Reference in New Issue
Block a user