diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp index 4e189c86..b692ce46 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -44,7 +44,6 @@ namespace netgen } #endif - /* namespace netgen { @@ -101,6 +100,19 @@ namespace nglib } + DLL_HEADER void Ng_GetStatus(char ** str, double & percent) + { + ::netgen::MyStr s; + ::netgen::GetStatus(s, percent); + *str = new char[s.Length() + 1]; + strcpy(*str, s.c_str()); + } + + + DLL_HEADER void Ng_SetTerminate(bool abort) + { + ::netgen::multithread.terminate = abort ? 1 : 0; + } // Clean-up functions before ending usage of nglib diff --git a/nglib/nglib.h b/nglib/nglib.h index eb8c312d..913b66a5 100644 --- a/nglib/nglib.h +++ b/nglib/nglib.h @@ -250,6 +250,16 @@ DLL_HEADER void Ng_Init (bool cout_to_null = false, bool cerr_to_null = false, b DLL_HEADER void Ng_Exit (); +/*! \brief Get current status, e.g. info string and percent +*/ +DLL_HEADER void Ng_GetStatus(char ** str, double & percent); + + +/*! \brief Set abort flag +*/ +DLL_HEADER void Ng_SetTerminate(bool abort); + + /*! \brief Create a new (and empty) Netgen Mesh Structure This function creates a new Netgen Mesh, initialises