mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-10 20:50:48 +05:00
expose Ng_SetTerminate for nglib
This commit is contained in:
parent
f242926f72
commit
ba5b3a07dd
@ -44,7 +44,6 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
namespace netgen
|
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
|
// Clean-up functions before ending usage of nglib
|
||||||
|
@ -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 ();
|
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
|
/*! \brief Create a new (and empty) Netgen Mesh Structure
|
||||||
|
|
||||||
This function creates a new Netgen Mesh, initialises
|
This function creates a new Netgen Mesh, initialises
|
||||||
|
Loading…
x
Reference in New Issue
Block a user