netgen/libsrc/meshing/global.cpp

94 lines
1.5 KiB
C++
Raw Normal View History

2009-01-13 04:40:13 +05:00
#include <mystdlib.h>
#include "meshing.hpp"
2009-01-18 22:36:38 +05:00
2009-01-13 04:40:13 +05:00
namespace netgen
{
2009-01-18 22:36:38 +05:00
// stringstream emptystr;
// ostream * testout = &emptystr;
// testout -> clear(ios::failbit);
// ostream * testout = &cout;
ostream * testout = new ostream(0);
// NetgenOutStream * testout = new NetgenOutStream;
2009-01-13 04:40:13 +05:00
ostream * mycout = &cout;
ostream * myerr = &cerr;
2014-10-06 15:57:44 +06:00
// some functions (visualization) still need a global mesh
2015-10-19 13:08:30 +05:00
DLL_HEADER shared_ptr<Mesh> mesh;
DLL_HEADER shared_ptr<NetgenGeometry> ng_geometry;
2009-01-13 04:40:13 +05:00
2015-01-09 02:18:33 +05:00
weak_ptr<Mesh> global_mesh;
2011-01-11 01:18:01 +05:00
// Flags parameters;
2009-01-13 04:40:13 +05:00
int silentflag = 0;
int testmode = 0;
volatile multithreadt multithread;
string ngdir = ".";
2014-08-30 06:15:59 +06:00
// parallel netgen
int id = 0, ntasks = 1;
void Ng_PrintDest(const char * s)
{
if (id == 0)
(*mycout) << s << flush;
}
DLL_HEADER void MyError(const char * ch)
{
cout << ch;
(*testout) << "Error !!! " << ch << endl << flush;
}
static clock_t starttimea;
void ResetTime ()
{
starttimea = clock();
}
double GetTime ()
{
return double(clock() - starttimea) / CLOCKS_PER_SEC;
}
2009-01-25 17:35:25 +05:00
Array<int> tets_in_qualclass;
2009-01-13 04:40:13 +05:00
2012-07-06 13:49:05 +06:00
int h_argc = 0;
char ** h_argv = NULL;
2009-01-13 04:40:13 +05:00
multithreadt :: multithreadt()
{
pause =0;
testmode = 0;
redraw = 0;
drawing = 0;
terminate = 0;
running = 0;
percent = 0;
task = "";
}
DebugParameters debugparam;
bool verbose = 0;
int timestamp = 0;
int GetTimeStamp()
{
return timestamp;
}
int NextTimeStamp()
{
timestamp++;
return timestamp;
}
}