expose Ng_SetTerminate for nglib

This commit is contained in:
Bryn Lloyd 2019-05-29 16:35:39 +02:00
parent f242926f72
commit ba5b3a07dd
2 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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