everything in one big dll on Windows

This commit is contained in:
Matthias Hochsteger 2015-10-19 10:08:30 +02:00
parent 2ea47dc455
commit 8ac965d707
42 changed files with 262 additions and 338 deletions

View File

@ -19,7 +19,7 @@ endif(NOT WIN32)
if(USE_GUI)
add_library(csgvis ${NG_LIB_TYPE} vscsg.cpp csgpkg.cpp)
add_library(csgvis ${NG_LIB_TYPE} vscsg.cpp )
if(NOT WIN32)
target_link_libraries(csgvis csg visual)
if(APPLE)

View File

@ -23,7 +23,7 @@ namespace netgen
A top level object is an entity to be meshed.
I can be either a solid, or one surface patch of a solid.
*/
class TopLevelObject
class DLL_HEADER TopLevelObject
{
Solid * solid;
Surface * surface;
@ -91,7 +91,7 @@ namespace netgen
/**
CSGeometry has the whole geometric information
*/
class CSGeometry : public NetgenGeometry
class DLL_HEADER CSGeometry : public NetgenGeometry
{
private:
/// all surfaces

View File

@ -107,7 +107,7 @@ namespace netgen
int Ng_CreatePrimitive (ClientData clientData,
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
{/*
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry.get());
if (!geometry)
{
@ -134,7 +134,7 @@ namespace netgen
}
geometry->SetSolid (name, nsol);
*/
return TCL_OK;
}
@ -180,7 +180,7 @@ namespace netgen
int Ng_SetSolidData (ClientData clientData,
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
{/*
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry.get());
if (!geometry)
{
@ -199,7 +199,7 @@ namespace netgen
Solid * nsol = Solid::CreateSolid (vst, geometry->GetSolids());
geometry->SetSolid (name, nsol);
*/
return TCL_OK;
}
@ -245,7 +245,7 @@ namespace netgen
int Ng_GetSolidData (ClientData clientData,
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
{/*
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry.get());
if (!geometry)
{
@ -264,7 +264,7 @@ namespace netgen
cout << "GetSolidData, name = " << name << ", data = " << vst.str() << endl;
Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0);
*/
return TCL_OK;
}

View File

@ -23,7 +23,7 @@ namespace netgen
All elements in subdomain domnr will get a boundary layer
on faces sharing the solid sol
*/
class SingularFace
class DLL_HEADER SingularFace
{
public:
int domnr;
@ -40,7 +40,7 @@ namespace netgen
///
class SingularEdge
class DLL_HEADER SingularEdge
{
public:
double beta;
@ -63,7 +63,7 @@ namespace netgen
///
class SingularPoint
class DLL_HEADER SingularPoint
{
public:
double beta;

View File

@ -10,7 +10,7 @@
namespace netgen
{
class VisualSceneGeometry : public VisualScene
class DLL_HEADER VisualSceneGeometry : public VisualScene
{
class CSGeometry * geometry;
Array<int> trilists;

View File

@ -26,9 +26,11 @@
// Standard C++ Library".
// ============================================================================
#include "gzstream.h"
#include <iostream>
#include <string.h> // for memcpy
#include <mystdlib.h>
#include <myadt.hpp>
//#include "gzstream.h"
//#include <iostream>
//#include <string.h> // for memcpy
#ifdef GZSTREAM_NAMESPACE
namespace GZSTREAM_NAMESPACE {

View File

@ -89,7 +89,7 @@ public:
// function interface of the zlib. Files are compatible with gzip compression.
// ----------------------------------------------------------------------------
class igzstream : public gzstreambase, public std::istream {
class DLL_HEADER igzstream : public gzstreambase, public std::istream {
public:
igzstream() : std::istream( &buf) {}
igzstream( const char* name, int open_mode = std::ios::in)
@ -100,7 +100,7 @@ public:
}
};
class ogzstream : public gzstreambase, public std::ostream {
class DLL_HEADER ogzstream : public gzstreambase, public std::ostream {
public:
ogzstream() : std::ostream( &buf) {}
ogzstream( const char* name, int mode = std::ios::out)

View File

@ -15,7 +15,7 @@ namespace netgen
Base class for the generic SYMBOLTABLE.
An array of identifiers is maintained.
*/
class BASE_SYMBOLTABLE
class DLL_HEADER BASE_SYMBOLTABLE
{
protected:
/// identifiers

View File

@ -26,10 +26,10 @@ namespace netgen
DLL_HEADER extern ostream * testout;
/** use instead of cout */
extern ostream * mycout;
DLL_HEADER extern ostream * mycout;
/** error output stream */
extern ostream * myerr;
DLL_HEADER extern ostream * myerr;
/** Error messages display.
Error messages are displayed by this function */
@ -38,7 +38,7 @@ DLL_HEADER extern void MyError (const char * ch);
/** Rings the bell.
Produces nr beeps. */
extern void MyBeep (int nr = 1);
DLL_HEADER extern void MyBeep (int nr = 1);
template <class T>

View File

@ -10,7 +10,7 @@ if(NOT WIN32)
endif(NOT WIN32)
if(USE_GUI)
add_library(geom2dvis ${NG_LIB_TYPE} geom2dpkg.cpp vsgeom2d.cpp)
add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp)
if(NOT WIN32)
target_link_libraries(geom2dvis geom2d)
install( TARGETS geom2dvis DESTINATION lib COMPONENT netgen)

View File

@ -10,7 +10,7 @@
namespace netgen
{
class VisualSceneGeometry2d : public VisualScene
class DLL_HEADER VisualSceneGeometry2d : public VisualScene
{
const class SplineGeometry2d * geometry2d;
public:

View File

@ -21,7 +21,7 @@
// #include <pthread.h>
namespace netgen
{
MeshingParameters mparam;
DLL_HEADER MeshingParameters mparam;
}
static pthread_t meshingthread;

View File

@ -8,7 +8,7 @@
/**************************************************************************/
extern
DLL_HEADER extern
void WriteFile (int typ,
const Mesh & mesh,
const NetgenGeometry & geom,
@ -18,7 +18,7 @@ void WriteFile (int typ,
extern
DLL_HEADER extern
void ReadFile (Mesh & mesh,
const string & filename);
@ -153,11 +153,11 @@ void WriteDolfinFormat (const Mesh & mesh,
const string & filename);
extern void RegisterUserFormats (Array<const char*> & names,
extern void DLL_HEADER RegisterUserFormats (Array<const char*> & names,
Array<const char*> & extensions);
extern bool WriteUserFormat (const string & format,
extern bool DLL_HEADER WriteUserFormat (const string & format,
const Mesh & mesh,
const NetgenGeometry & geom,
const string & filename);

View File

@ -12,22 +12,22 @@ public:
int usemarkedelements;
bool refine_hp;
bool refine_p;
BisectionOptions ();
DLL_HEADER BisectionOptions ();
};
class ZRefinementOptions
{
public:
int minref;
ZRefinementOptions();
DLL_HEADER ZRefinementOptions();
};
extern void BisectTetsCopyMesh (Mesh &, const NetgenGeometry *,
DLL_HEADER extern void BisectTetsCopyMesh (Mesh &, const NetgenGeometry *,
BisectionOptions & opt);
extern void ZRefinement (Mesh &, const class NetgenGeometry *,
DLL_HEADER extern void ZRefinement (Mesh &, const class NetgenGeometry *,
ZRefinementOptions & opt);

View File

@ -3,7 +3,7 @@
///
extern void InsertVirtualBoundaryLayer (Mesh & mesh);
DLL_HEADER extern void InsertVirtualBoundaryLayer (Mesh & mesh);
/// Create a typical prismatic boundary layer on the given
/// surfaces
@ -23,7 +23,7 @@ public:
bool optimize = true;
};
extern void GenerateBoundaryLayer (Mesh & mesh, BoundaryLayerParameters & blp);
DLL_HEADER extern void GenerateBoundaryLayer (Mesh & mesh, BoundaryLayerParameters & blp);
#endif

View File

@ -35,8 +35,8 @@ class CurvedElements
bool ishighorder;
public:
CurvedElements (const Mesh & amesh);
~CurvedElements();
DLL_HEADER CurvedElements (const Mesh & amesh);
DLL_HEADER ~CurvedElements();
// bool IsHighOrder() const { return order > 1; }
bool IsHighOrder() const { return ishighorder; }
@ -44,7 +44,7 @@ public:
// void SetHighOrder (int aorder) { order=aorder; }
void SetIsHighOrder (bool ho) { ishighorder = ho; }
void BuildCurvedElements(const Refinement * ref, int aorder, bool arational = false);
DLL_HEADER void BuildCurvedElements(const Refinement * ref, int aorder, bool arational = false);
int GetOrder () { return order; }

View File

@ -17,8 +17,8 @@ namespace netgen
ostream * myerr = &cerr;
// some functions (visualization) still need a global mesh
shared_ptr<Mesh> mesh;
shared_ptr<NetgenGeometry> ng_geometry;
DLL_HEADER shared_ptr<Mesh> mesh;
DLL_HEADER shared_ptr<NetgenGeometry> ng_geometry;
weak_ptr<Mesh> global_mesh;

View File

@ -17,17 +17,17 @@ namespace netgen
///
DLL_HEADER extern double GetTime ();
extern void ResetTime ();
DLL_HEADER extern void ResetTime ();
///
extern int testmode;
DLL_HEADER extern int testmode;
/// calling parameters
// extern Flags parameters;
// extern DLL_HEADER MeshingParameters mparam;
extern Array<int> tets_in_qualclass;
DLL_HEADER extern Array<int> tets_in_qualclass;
class multithreadt
{
@ -45,17 +45,17 @@ namespace netgen
multithreadt();
};
extern volatile multithreadt multithread;
DLL_HEADER extern volatile multithreadt multithread;
DLL_HEADER extern string ngdir;
extern DebugParameters debugparam;
extern bool verbose;
DLL_HEADER extern DebugParameters debugparam;
DLL_HEADER extern bool verbose;
extern int h_argc;
extern char ** h_argv;
DLL_HEADER extern int h_argc;
DLL_HEADER extern char ** h_argv;
extern weak_ptr<Mesh> global_mesh;
DLL_HEADER extern weak_ptr<Mesh> global_mesh;
inline void SetGlobalMesh (shared_ptr<Mesh> m)
{
cout << "set global mesh" << endl;

View File

@ -311,7 +311,7 @@ public:
extern void HPRefinement (Mesh & mesh, Refinement * ref, int levels,
DLL_HEADER extern void HPRefinement (Mesh & mesh, Refinement * ref, int levels,
double fac1=0.125, bool setorders=true, bool ref_level = false);

View File

@ -189,14 +189,14 @@ namespace netgen
void ClearSurfaceElements();
///
void ClearVolumeElements()
DLL_HEADER void ClearVolumeElements()
{
volelements.SetSize(0);
timestamp = NextTimeStamp();
}
///
void ClearSegments()
DLL_HEADER void ClearSegments()
{
segments.SetSize(0);
timestamp = NextTimeStamp();
@ -398,11 +398,11 @@ namespace netgen
///
DLL_HEADER void SetGlobalH (double h);
///
void SetMinimalH (double h);
DLL_HEADER void SetMinimalH (double h);
///
double MaxHDomain (int dom) const;
DLL_HEADER double MaxHDomain (int dom) const;
///
void SetMaxHDomain (const Array<double> & mhd);
DLL_HEADER void SetMaxHDomain (const Array<double> & mhd);
///
double GetH (const Point3d & p) const;
///
@ -430,10 +430,10 @@ namespace netgen
bool HasOpenQuads () const;
/// split into connected pieces
void SplitIntoParts ();
DLL_HEADER void SplitIntoParts ();
///
void SplitSeparatedFaces ();
DLL_HEADER void SplitSeparatedFaces ();
/// Refines mesh and projects points to true surface
// void Refine (int levels, const CSGeometry * geom);
@ -470,21 +470,21 @@ namespace netgen
DLL_HEADER void Compress ();
///
void Save (ostream & outfile) const;
DLL_HEADER void Save (ostream & outfile) const;
///
void Load (istream & infile);
DLL_HEADER void Load (istream & infile);
///
void Merge (istream & infile, const int surfindex_offset = 0);
DLL_HEADER void Merge (istream & infile, const int surfindex_offset = 0);
///
void Save (const string & filename) const;
DLL_HEADER void Save (const string & filename) const;
///
void Load (const string & filename);
DLL_HEADER void Load (const string & filename);
///
void Merge (const string & filename, const int surfindex_offset = 0);
DLL_HEADER void Merge (const string & filename, const int surfindex_offset = 0);
///
void ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY);
DLL_HEADER void ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY);
///
void ImproveMeshJacobian (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY, const BitArray * usepoint = NULL);
@ -518,19 +518,19 @@ namespace netgen
triangle angles min/max, tetangles min/max
if null, output results on cout
*/
void CalcMinMaxAngle (double badellimit, double * retvalues = NULL);
DLL_HEADER void CalcMinMaxAngle (double badellimit, double * retvalues = NULL);
/*
Marks elements which are dangerous to refine
return: number of illegal elements
*/
int MarkIllegalElements ();
DLL_HEADER int MarkIllegalElements ();
/// orient surface mesh, for one sub-domain only
void SurfaceMeshOrientation ();
DLL_HEADER void SurfaceMeshOrientation ();
/// convert mixed element mesh to tet-mesh
void Split2Tets();
DLL_HEADER void Split2Tets();
/// build box-search tree
@ -656,19 +656,19 @@ namespace netgen
bool PureTrigMesh (int faceindex = 0) const;
bool PureTetMesh () const;
DLL_HEADER bool PureTrigMesh (int faceindex = 0) const;
DLL_HEADER bool PureTetMesh () const;
const class MeshTopology & GetTopology () const
{ return *topology; }
void UpdateTopology();
DLL_HEADER void UpdateTopology();
class CurvedElements & GetCurvedElements () const
{ return *curvedelems; }
void BuildCurvedElements (const class Refinement * ref, int aorder, bool arational = false);
DLL_HEADER void BuildCurvedElements (const class Refinement * ref, int aorder, bool arational = false);
const class AnisotropicClusters & GetClusters () const
{ return *clusters; }

View File

@ -961,7 +961,7 @@ namespace netgen
// Philippose - 06/07/2009
// Get Surface colour
Vec3d SurfColour () const { return surfcolour; }
const string & GetBCName () const;
DLL_HEADER const string & GetBCName () const;
// string * BCNamePtr () { return bcname; }
// const string * BCNamePtr () const { return bcname; }
void SetSurfNr (int sn) { surfnr = sn; }

View File

@ -9,8 +9,8 @@
///
extern void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh);
DLL_HEADER extern void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh);
extern void HelmholtzMesh (Mesh & mesh);
DLL_HEADER extern void HelmholtzMesh (Mesh & mesh);
#endif

View File

@ -11,7 +11,7 @@ endif(NOT WIN32)
if(USE_GUI)
add_library(stlvis ${NG_LIB_TYPE}
stlpkg.cpp vsstl.cpp
vsstl.cpp
)
if(NOT WIN32)
target_link_libraries( stlvis stl )

View File

@ -188,19 +188,19 @@ namespace netgen
virtual void Save (string filename) const;
void STLInfo(double* data);
DLL_HEADER void STLInfo(double* data);
//stldoctor:
void SmoothNormals();
void MarkNonSmoothNormals();
DLL_HEADER void SmoothNormals();
DLL_HEADER void MarkNonSmoothNormals();
void CalcEdgeData();
void CalcEdgeDataAngles();
DLL_HEADER void CalcEdgeData();
DLL_HEADER void CalcEdgeDataAngles();
const STLEdgeDataList& EdgeDataList() const {return *edgedata;}
void UndoEdgeChange();
void StoreEdgeData();
void RestoreEdgeData();
DLL_HEADER void UndoEdgeChange();
DLL_HEADER void StoreEdgeData();
DLL_HEADER void RestoreEdgeData();
//void ClearSelectedMultiEdge() {selectedmultiedge.SetSize(0);}
//void AddSelectedMultiEdge(twoint ep) {selectedmultiedge.Append(ep);}
@ -211,63 +211,63 @@ namespace netgen
void BuildSelectedEdge(twoint ep);
void BuildSelectedCluster(twoint ep);
void ImportEdges();
void AddEdges(const Array<Point<3> >& eps);
void ExportEdges();
void LoadEdgeData(const char* file);
void SaveEdgeData(const char* file);
DLL_HEADER void ImportEdges();
DLL_HEADER void AddEdges(const Array<Point<3> >& eps);
DLL_HEADER void ExportEdges();
DLL_HEADER void LoadEdgeData(const char* file);
DLL_HEADER void SaveEdgeData(const char* file);
// void SetEdgeAtSelected(int mode);
void STLDoctorConfirmEdge();
void STLDoctorCandidateEdge();
void STLDoctorExcludeEdge();
void STLDoctorUndefinedEdge();
DLL_HEADER void STLDoctorConfirmEdge();
DLL_HEADER void STLDoctorCandidateEdge();
DLL_HEADER void STLDoctorExcludeEdge();
DLL_HEADER void STLDoctorUndefinedEdge();
void STLDoctorSetAllUndefinedEdges();
void STLDoctorEraseCandidateEdges();
void STLDoctorConfirmCandidateEdges();
void STLDoctorConfirmedToCandidateEdges();
DLL_HEADER void STLDoctorSetAllUndefinedEdges();
DLL_HEADER void STLDoctorEraseCandidateEdges();
DLL_HEADER void STLDoctorConfirmCandidateEdges();
DLL_HEADER void STLDoctorConfirmedToCandidateEdges();
void STLDoctorDirtyEdgesToCandidates();
void STLDoctorLongLinesToCandidates();
DLL_HEADER void STLDoctorDirtyEdgesToCandidates();
DLL_HEADER void STLDoctorLongLinesToCandidates();
void UndoExternalEdges();
void StoreExternalEdges();
void RestoreExternalEdges();
DLL_HEADER void UndoExternalEdges();
DLL_HEADER void StoreExternalEdges();
DLL_HEADER void RestoreExternalEdges();
void ImportExternalEdges(const char * filename); // Flame edges, JS
DLL_HEADER void ImportExternalEdges(const char * filename); // Flame edges, JS
// void LoadExternalEdges();
void BuildExternalEdgesFromEdges();
void SaveExternalEdges();
void AddExternalEdgeAtSelected();
void AddClosedLinesToExternalEdges();
void AddLongLinesToExternalEdges();
void AddAllNotSingleLinesToExternalEdges();
void STLDoctorBuildEdges();
void AddExternalEdgesFromGeomLine();
void DeleteDirtyExternalEdges();
void DeleteExternalEdgeAtSelected();
void DeleteExternalEdgeInVicinity();
DLL_HEADER void BuildExternalEdgesFromEdges();
DLL_HEADER void SaveExternalEdges();
DLL_HEADER void AddExternalEdgeAtSelected();
DLL_HEADER void AddClosedLinesToExternalEdges();
DLL_HEADER void AddLongLinesToExternalEdges();
DLL_HEADER void AddAllNotSingleLinesToExternalEdges();
DLL_HEADER void STLDoctorBuildEdges();
DLL_HEADER void AddExternalEdgesFromGeomLine();
DLL_HEADER void DeleteDirtyExternalEdges();
DLL_HEADER void DeleteExternalEdgeAtSelected();
DLL_HEADER void DeleteExternalEdgeInVicinity();
void AddExternalEdge(int p1, int p2);
void DeleteExternalEdge(int p1, int p2);
int IsExternalEdge(int p1, int p2);
int NOExternalEdges() const {return externaledges.Size();}
twoint GetExternalEdge(int i) const {return externaledges.Get(i);}
void DestroyDirtyTrigs();
void CalcNormalsFromGeometry();
void MoveSelectedPointToMiddle();
void NeighbourAnglesOfSelectedTrig();
void PrintSelectInfo();
void ShowSelectedTrigChartnum();
void ShowSelectedTrigCoords();
void SmoothGeometry ();
DLL_HEADER void DestroyDirtyTrigs();
DLL_HEADER void CalcNormalsFromGeometry();
DLL_HEADER void MoveSelectedPointToMiddle();
DLL_HEADER void NeighbourAnglesOfSelectedTrig();
DLL_HEADER void PrintSelectInfo();
DLL_HEADER void ShowSelectedTrigChartnum();
DLL_HEADER void ShowSelectedTrigCoords();
DLL_HEADER void SmoothGeometry ();
void LoadMarkedTrigs();
void SaveMarkedTrigs();
DLL_HEADER void LoadMarkedTrigs();
DLL_HEADER void SaveMarkedTrigs();
void ClearMarkedSegs() {markedsegs.SetSize(0);}
void AddMarkedSeg(const Point<3> & ap1, const Point<3> & ap2)
{
@ -280,26 +280,26 @@ namespace netgen
ap2=markedsegs.Get(i*2);
}
int GetNMarkedSegs() {return markedsegs.Size()/2;}
void CalcVicinity(int starttrig);
void GetVicinity(int starttrig, int size, Array<int>& vic);
DLL_HEADER void CalcVicinity(int starttrig);
DLL_HEADER void GetVicinity(int starttrig, int size, Array<int>& vic);
int Vicinity(int trig) const;
DLL_HEADER int Vicinity(int trig) const;
void InitMarkedTrigs();
void MarkDirtyTrigs();
void SmoothDirtyTrigs();
void GeomSmoothRevertedTrigs();
void MarkRevertedTrigs();
double CalcTrigBadness(int i);
int IsMarkedTrig(int trig) const;
void SetMarkedTrig(int trig, int num);
void MarkTopErrorTrigs ();
DLL_HEADER void InitMarkedTrigs();
DLL_HEADER void MarkDirtyTrigs();
DLL_HEADER void SmoothDirtyTrigs();
DLL_HEADER void GeomSmoothRevertedTrigs();
DLL_HEADER void MarkRevertedTrigs();
DLL_HEADER double CalcTrigBadness(int i);
DLL_HEADER int IsMarkedTrig(int trig) const;
DLL_HEADER void SetMarkedTrig(int trig, int num);
DLL_HEADER void MarkTopErrorTrigs ();
//Selected triangle
void SetSelectTrig(int trig);
int GetSelectTrig() const;
void SetNodeOfSelTrig(int n);
int GetNodeOfSelTrig() const;
DLL_HEADER void SetSelectTrig(int trig);
DLL_HEADER int GetSelectTrig() const;
DLL_HEADER void SetNodeOfSelTrig(int n);
DLL_HEADER int GetNodeOfSelTrig() const;
int AddNormal(const Vec3d& n) {return normals.Append(n);}
@ -444,7 +444,7 @@ namespace netgen
int LineEndPointsSet() const {return lineendpoints.Size() == GetNP();}
void ClearLineEndPoints();
void RestrictLocalH(class Mesh & mesh, double gh);
DLL_HEADER void RestrictLocalH(class Mesh & mesh, double gh);
void RestrictLocalHCurv(class Mesh & mesh, double gh);
void RestrictHChartDistOneChart(int chartnum, Array<int>& acttrigs, class Mesh & mesh,
double gh, double fact, double minh);

View File

@ -19,8 +19,8 @@ extern "C" int Ng_STL_Init (Tcl_Interp * interp);
namespace netgen
{
extern shared_ptr<NetgenGeometry> ng_geometry;
extern shared_ptr<Mesh> mesh;
DLL_HEADER extern shared_ptr<NetgenGeometry> ng_geometry;
DLL_HEADER extern shared_ptr<Mesh> mesh;
static VisualSceneSTLGeometry vsstlgeom;
static VisualSceneSTLMeshing vsstlmeshing;

View File

@ -218,7 +218,7 @@ public:
void Print (ostream & ost) const;
};
extern STLDoctorParams stldoctor;
DLL_HEADER extern STLDoctorParams stldoctor;
@ -267,7 +267,7 @@ public:
void Print (ostream & ost) const;
};
extern STLParameters stlparam;
DLL_HEADER extern STLParameters stlparam;
void STLMeshing (STLGeometry & geom,

View File

@ -334,9 +334,9 @@ public:
STL_GEOM_STATUS GetStatus () const { return status; }
const string & GetStatusText () const { return statustext; }
void InvertTrig (int trig);
void DeleteTrig (int trig);
void OrientAfterTrig (int trig);
DLL_HEADER void InvertTrig (int trig);
DLL_HEADER void DeleteTrig (int trig);
DLL_HEADER void OrientAfterTrig (int trig);
// Table will be constructed, if topology is not ok

View File

@ -16,12 +16,12 @@ namespace netgen
class STLGeometry * stlgeometry;
public:
VisualSceneSTLGeometry ();
virtual ~VisualSceneSTLGeometry ();
void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; }
DLL_HEADER VisualSceneSTLGeometry ();
DLL_HEADER virtual ~VisualSceneSTLGeometry ();
DLL_HEADER void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; }
virtual void BuildScene (int zoomall = 0);
virtual void DrawScene ();
DLL_HEADER virtual void BuildScene (int zoomall = 0);
DLL_HEADER virtual void DrawScene ();
};
@ -32,8 +32,8 @@ namespace netgen
class STLGeometry * stlgeometry;
public:
VisualSceneSTLMeshing ();
virtual ~VisualSceneSTLMeshing ();
DLL_HEADER VisualSceneSTLMeshing ();
DLL_HEADER virtual ~VisualSceneSTLMeshing ();
void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; }

View File

@ -4,7 +4,7 @@ install(FILES soldata.hpp DESTINATION include COMPONENT netgen_devel )
# AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES)
if(USE_GUI)
set( LIB_VISUAL_SOURCES meshdoc.cpp mvdraw.cpp vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp visualpkg.cpp )
set( LIB_VISUAL_SOURCES meshdoc.cpp mvdraw.cpp vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp )
else(USE_GUI)
set( LIB_VISUAL_SOURCES visual_dummy.cpp )
endif(USE_GUI)

View File

@ -18,7 +18,7 @@ namespace netgen
extern shared_ptr<Mesh> mesh;
void ImportSolution (const char * filename)
DLL_HEADER void ImportSolution2 (const char * filename)
{
ifstream inf (filename);
char buf[100], name[1000];

View File

@ -16,50 +16,8 @@ namespace netgen
MeshDoctorParameters meshdoctor;
VisualSceneMeshDoctor vsmeshdoc;
extern shared_ptr<Mesh> mesh;
int Ng_MeshDoctor (ClientData clientData,
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
cout << "Mesh Doctor:" << endl;
int i;
for (i = 0; i < argc; i++)
cout << argv[i] << " ";
cout << endl;
meshdoctor.active =
atoi (Tcl_GetVar (interp, "::meshdoctor.active", 0));
if (argc >= 2)
{
if (strcmp (argv[1], "markedgedist") == 0)
{
vsmeshdoc.SetMarkEdgeDist (atoi (argv[2]));
}
if (strcmp (argv[1], "deletemarkedsegments") == 0)
{
for (i = 1; i <= mesh->GetNSeg(); i++)
if (vsmeshdoc.IsSegmentMarked (i))
mesh->DeleteSegment (i);
// for (i = 1; i <= mesh->GetNSE(); i++)
// mesh->SurfaceElement(i).SetIndex (1);
mesh->Compress();
}
}
vsmeshdoc.UpdateTables ();
vsmeshdoc.BuildScene();
return TCL_OK;
}
DLL_HEADER extern shared_ptr<Mesh> mesh;

View File

@ -17,17 +17,17 @@ class VisualSceneMeshDoctor : public VisualScene
public:
VisualSceneMeshDoctor ();
virtual ~VisualSceneMeshDoctor ();
DLL_HEADER VisualSceneMeshDoctor ();
DLL_HEADER virtual ~VisualSceneMeshDoctor ();
virtual void BuildScene (int zoomall = 0);
virtual void DrawScene ();
virtual void MouseDblClick (int px, int py);
DLL_HEADER virtual void BuildScene (int zoomall = 0);
DLL_HEADER virtual void DrawScene ();
DLL_HEADER virtual void MouseDblClick (int px, int py);
void SetMarkEdgeDist (int dist);
void ClickElement (int elnr);
void UpdateTables ();
int IsSegmentMarked (int segnr) const;
DLL_HEADER void SetMarkEdgeDist (int dist);
DLL_HEADER void ClickElement (int elnr);
DLL_HEADER void UpdateTables ();
DLL_HEADER int IsSegmentMarked (int segnr) const;
};
class MeshDoctorParameters
@ -37,6 +37,6 @@ public:
};
extern MeshDoctorParameters meshdoctor;
DLL_HEADER extern MeshDoctorParameters meshdoctor;
}

View File

@ -159,12 +159,12 @@ namespace netgen
// weak_ptr<Mesh> wp_mesh;
public:
VisualSceneMesh ();
virtual ~VisualSceneMesh ();
DLL_HEADER VisualSceneMesh ();
DLL_HEADER virtual ~VisualSceneMesh ();
virtual void BuildScene (int zoomall = 0);
virtual void DrawScene ();
virtual void MouseDblClick (int px, int py);
DLL_HEADER virtual void BuildScene (int zoomall = 0);
DLL_HEADER virtual void DrawScene ();
DLL_HEADER virtual void MouseDblClick (int px, int py);
// void SetMesh (shared_ptr<Mesh> mesh) { wp_mesh = mesh; }
// shared_ptr<Mesh> GetMesh () { return shared_ptr<Mesh>(wp_mesh); }
@ -174,16 +174,16 @@ namespace netgen
{ user_me_handler = handler; }
int SelectedFace () const
DLL_HEADER int SelectedFace () const
{ return selface; }
void SetSelectedFace (int asf);
DLL_HEADER void SetSelectedFace (int asf);
// { selface = asf; selecttimestamp = GetTimeStamp(); }
int SelectedEdge () const
DLL_HEADER int SelectedEdge () const
{ return seledge; }
int SelectedElement () const
DLL_HEADER int SelectedElement () const
{ return selelement; }
int SelectedPoint () const
DLL_HEADER int SelectedPoint () const
{ return selpoint; }
void BuildFilledList (bool names);
// private:
@ -201,10 +201,10 @@ namespace netgen
void BuildDomainSurfList();
};
extern VisualSceneMesh vsmesh;
DLL_HEADER extern VisualSceneMesh vsmesh;
class VisualSceneSpecPoints : public VisualScene
class DLL_HEADER VisualSceneSpecPoints : public VisualScene
{
public:
VisualSceneSpecPoints ();

View File

@ -120,7 +120,7 @@ public:
public:
VisualizationParameters();
};
extern VisualizationParameters vispar;
DLL_HEADER extern VisualizationParameters vispar;
}
#endif

View File

@ -374,6 +374,48 @@ namespace netgen
return TCL_OK;
}
VisualSceneMeshDoctor vsmeshdoc;
DLL_HEADER extern shared_ptr<Mesh> mesh;
int Ng_MeshDoctor(ClientData clientData,
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
cout << "Mesh Doctor:" << endl;
int i;
for (i = 0; i < argc; i++)
cout << argv[i] << " ";
cout << endl;
meshdoctor.active =
atoi(Tcl_GetVar(interp, "::meshdoctor.active", 0));
if (argc >= 2)
{
if (strcmp(argv[1], "markedgedist") == 0)
{
vsmeshdoc.SetMarkEdgeDist(atoi(argv[2]));
}
if (strcmp(argv[1], "deletemarkedsegments") == 0)
{
for (i = 1; i <= mesh->GetNSeg(); i++)
if (vsmeshdoc.IsSegmentMarked(i))
mesh->DeleteSegment(i);
// for (i = 1; i <= mesh->GetNSE(); i++)
// mesh->SurfaceElement(i).SetIndex (1);
mesh->Compress();
}
}
vsmeshdoc.UpdateTables();
vsmeshdoc.BuildScene();
return TCL_OK;
}
extern "C" int Ng_Vis_Init (Tcl_Interp * interp);

View File

@ -9,8 +9,7 @@ struct Tcl_Interp;
namespace netgen
{
extern
void ImportSolution (const char * filename);
DLL_HEADER extern void ImportSolution (const char * filename);
class FieldLineCalc;
@ -21,7 +20,7 @@ class FieldLineCalc;
class VisualSceneSolution : public VisualScene
class DLL_HEADER VisualSceneSolution : public VisualScene
{
friend class FieldLineCalc;
@ -437,7 +436,7 @@ public:
extern VisualSceneSolution vssolution;
DLL_HEADER extern VisualSceneSolution vssolution;
}

View File

@ -1,44 +1,13 @@
add_definitions(-DNGINTERFACE_EXPORTS)
set(netgen_sources main.cpp )
set(netgenlib_sources demoview.cpp ngappinit.cpp onetcl.cpp parallelfunc.cpp ngpkg.cpp )
set(netgen_sources demoview.cpp ngappinit.cpp onetcl.cpp parallelfunc.cpp ngpkg.cpp ../libsrc/stlgeom/stlpkg.cpp ../libsrc/visualization/visualpkg.cpp ../libsrc/csg/csgpkg.cpp ../libsrc/geom2d/geom2dpkg.cpp)
if(USE_GUI)
if(WIN32)
set(netgenlib_objects
$<TARGET_OBJECTS:mesh>
$<TARGET_OBJECTS:stlvis>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:geom2dvis>
$<TARGET_OBJECTS:interface>
$<TARGET_OBJECTS:geom2d>
$<TARGET_OBJECTS:csg>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:gen>
$<TARGET_OBJECTS:la>
$<TARGET_OBJECTS:gprim>
$<TARGET_OBJECTS:visual>
$<TARGET_OBJECTS:csgvis>
# $<TARGET_OBJECTS:occ>
# $<TARGET_OBJECTS:occvis>
)
endif(WIN32)
add_executable(netgen ${netgen_sources})
add_library(netgenlib SHARED ${netgenlib_sources} ${netgenlib_objects})
target_link_libraries( netgen nglib ${ZLIB_LIBRARIES} ${LIBTOGL} ${TK_LIBRARY} ${TCL_LIBRARY} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES})
if(NOT WIN32)
target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis )
endif(NOT WIN32)
if(WIN32)
set_target_properties( netgenlib PROPERTIES OUTPUT_NAME interface )
else(WIN32)
target_link_libraries( netgenlib visual csgvis csg interface mesh occ occvis togl)
endif(WIN32)
target_link_libraries( netgenlib ${LIBPTHREAD} ${OCC_LIBRARIES} ${LIBTOGL} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${PYTHON_LIBS} ${FFMPEG_LIBRARIES})
target_link_libraries( netgen netgenlib )
install(TARGETS netgenlib ${ng_install_dir})
install(TARGETS netgen ${ng_install_dir})
endif(USE_GUI)

View File

@ -1,17 +0,0 @@
#ifdef WIN32
// a wrapper to load netgen-dll into the executable
#include <mydefs.hpp>
DLL_HEADER int NG_main(int argc, char ** argv);
int main(int argc, char ** argv)
{
return NG_main(argc, argv);
}
#endif

View File

@ -33,7 +33,7 @@ namespace netgen
namespace netgen
{
#include "../libsrc/interface/writeuser.hpp"
extern string ngdir;
//extern string ngdir;
Flags parameters;
}
@ -69,11 +69,7 @@ bool shellmode = false;
*
*/
#ifdef WIN32
int DLL_HEADER NG_main(int argc, char ** argv)
#else
int main(int argc, char ** argv)
#endif
{
#ifdef PARALLEL

View File

@ -35,7 +35,8 @@ extern bool nodisplay;
namespace netgen
{
extern MeshingParameters mparam;
DLL_HEADER extern MeshingParameters mparam;
DLL_HEADER extern void ImportSolution2(const char * filename);
#include "../libsrc/interface/writeuser.hpp"
#include "demoview.hpp"
}
@ -92,8 +93,8 @@ namespace netgen
}
*/
extern std::shared_ptr<NetgenGeometry> ng_geometry;
extern std::shared_ptr<Mesh> mesh;
DLL_HEADER extern std::shared_ptr<NetgenGeometry> ng_geometry;
DLL_HEADER extern std::shared_ptr<Mesh> mesh;
Tcl_Interp * tcl_interp;
@ -110,8 +111,8 @@ namespace netgen
// visualization scenes, pointer vs selects which one is drawn:
static VisualScene vscross;
extern VisualSceneSurfaceMeshing vssurfacemeshing;
extern VisualSceneMeshDoctor vsmeshdoc;
DLL_HEADER extern VisualSceneSurfaceMeshing vssurfacemeshing;
DLL_HEADER extern VisualSceneMeshDoctor vsmeshdoc;
static VisualSceneSpecPoints vsspecpoints;
@ -154,7 +155,7 @@ namespace netgen
*/
}
#endif
DLL_HEADER void MyError2(const char * ch)
void MyError2(const char * ch)
{
cout << ch;
(*testout) << "Error !!! " << ch << endl << flush;
@ -168,7 +169,7 @@ namespace netgen
}
#ifndef SMALLLIB
DLL_HEADER double GetTime2 ()
double GetTime2 ()
{
return double(clock() - starttimea) / CLOCKS_PER_SEC;
}
@ -418,7 +419,7 @@ namespace netgen
const char * filename = argv[1];
PrintMessage (1, "Import solution from file ", filename);
ImportSolution (filename);
ImportSolution2 (filename);
return TCL_OK;
}
@ -721,7 +722,7 @@ namespace netgen
int Ng_MemInfo (ClientData clientData,
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
{/*
if (argc < 2) return TCL_ERROR;
if (strcmp (argv[1], "usedmb") == 0)
@ -736,7 +737,7 @@ namespace netgen
Tcl_SetResult (interp, usedmb, TCL_STATIC);
return TCL_OK;
}
*/
return TCL_ERROR;
}
@ -3157,8 +3158,8 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
extern "C" int Ng_Init (Tcl_Interp * interp);
extern "C" int Ng_CSG_Init (Tcl_Interp * interp);
#ifdef _MSC_VER
extern "C" int Ng_stl_Init (Tcl_Interp * interp);
#ifdef _MSC_VER
extern "C" int Ng_geom2d_Init (Tcl_Interp * interp);
#ifdef OCCGEOMETRY
extern "C" int Ng_occ_Init (Tcl_Interp * interp);
@ -3181,8 +3182,8 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
#endif
Ng_CSG_Init(interp);
#ifdef _MSC_VER
Ng_stl_Init(interp);
#ifdef _MSC_VER
Ng_geom2d_Init (interp);
#ifdef OCCGEOMETRY
Ng_occ_Init (interp);

View File

@ -1,31 +1,25 @@
# dist_pkgdata_DATA = cube.surf
add_definitions(-DNGLIB_EXPORTS)
# ADD_LIBRARY(nglib SHARED nglib.cpp)
# TARGET_LINK_LIBRARIES( nglib interface geom2d csg stl occ mesh ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} )
set(nglib_sources nglib.cpp)
if(WIN32)
set(nglib_objects
$<TARGET_OBJECTS:mesh>
$<TARGET_OBJECTS:stlvis>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:geom2dvis>
$<TARGET_OBJECTS:interface>
$<TARGET_OBJECTS:geom2d>
$<TARGET_OBJECTS:csg>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:occ>
$<TARGET_OBJECTS:mesh>
$<TARGET_OBJECTS:gen>
$<TARGET_OBJECTS:la>
$<TARGET_OBJECTS:gprim>
$<TARGET_OBJECTS:visual>
$<TARGET_OBJECTS:csgvis>
# $<TARGET_OBJECTS:geom2dvis>
# $<TARGET_OBJECTS:occvis>
# $<TARGET_OBJECTS:stlvis>
)
endif(WIN32)
add_library(nglib SHARED ${nglib_sources} ${nglib_objects})
add_library(nglib SHARED nglib.cpp ${nglib_objects})
target_link_libraries( nglib ${LIBPTHREAD} ${OCC_LIBRARIES} ${LIBTOGL} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} )

View File

@ -1244,23 +1244,3 @@ void Ng_SetSolutionData (Ng_SolutionData * soldata)
void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; }
*/
#ifdef WIN32
#ifdef NG_PYTHON
#include <boost/python.hpp>
void ExportNetgenMeshing();
void ExportMeshVis();
void ExportCSG();
void ExportCSGVis();
void ExportGeom2d();
BOOST_PYTHON_MODULE(nglib) {
ExportCSG();
ExportCSGVis();
ExportNetgenMeshing();
ExportMeshVis();
ExportGeom2d();
}
#endif
#endif