get arguments

This commit is contained in:
Joachim Schoeberl 2012-07-06 07:49:05 +00:00
parent a7d1c6c657
commit 1d163e69dc
7 changed files with 41 additions and 2 deletions

View File

@ -165,10 +165,30 @@ public:
};
/*
NetgenOutStream operator<< ( ostream & ost, Imp imp );
NetgenOutStream operator<< ( ostream & ost, Proc proc );
NetgenOutStream operator<< ( ostream & ost, Procs & procs );
*/
inline NetgenOutStream operator<< ( ostream & ost, Imp imp )
{
return ( NetgenOutStream ( &ost, imp ) );
}
inline NetgenOutStream operator<< ( ostream & ost, Proc proc )
{
return ( NetgenOutStream ( &ost, proc ) );
}
inline NetgenOutStream operator<< ( ostream & ost, Procs & procs )
{
return ( NetgenOutStream ( &ost, procs ) );
}
// {
// return ( NetgenOutStream ( &ost, imp.GetImp() ) );
// }

View File

@ -386,6 +386,9 @@ extern "C" {
typedef void * Ng_Mesh;
DLL_HEADER Ng_Mesh Ng_SelectMesh (Ng_Mesh mesh);
DLL_HEADER void Ng_GetArgs (int & argc, char ** &argv);
#ifdef __cplusplus
}
#endif

View File

@ -2340,3 +2340,11 @@ int Ng_GetElementClosureNodes (int dim, int elementnr, int nodeset, int * nodes)
}
return 0;
}
void Ng_GetArgs (int & argc, char ** &argv)
{
argc = h_argc;
argv = h_argv;
}

View File

@ -29,6 +29,8 @@ namespace netgen
Array<int> tets_in_qualclass;
int h_argc = 0;
char ** h_argv = NULL;
multithreadt :: multithreadt()
{

View File

@ -49,6 +49,9 @@ namespace netgen
extern string ngdir;
extern DebugParameters debugparam;
extern bool verbose;
extern int h_argc;
extern char ** h_argv;
}
#endif

View File

@ -131,6 +131,8 @@ int main(int argc, char ** argv)
}
netgen::h_argc = argc;
netgen::h_argv = argv;
// command line arguments:
for (int i = 1; i < argc; i++)

View File

@ -75,6 +75,7 @@ namespace netgen
{
extern Flags parameters;
/*
NetgenOutStream operator<< ( ostream & ost, Imp imp )
{
return ( NetgenOutStream ( &ost, imp ) );
@ -90,7 +91,7 @@ namespace netgen
{
return ( NetgenOutStream ( &ost, procs ) );
}
*/
extern NetgenGeometry * ng_geometry;
extern AutoPtr<Mesh> mesh;