mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
move testout to ngcore
This commit is contained in:
parent
a9db1f60c1
commit
0a08450bfa
@ -13,6 +13,7 @@
|
||||
|
||||
namespace ngcore
|
||||
{
|
||||
std::ostream* testout = new std::ostream(nullptr); // NOLINT
|
||||
|
||||
void Logger::log(level::level_enum level, std::string && s)
|
||||
{
|
||||
|
@ -31,6 +31,8 @@ namespace spdlog
|
||||
|
||||
namespace ngcore
|
||||
{
|
||||
NGCORE_API extern std::ostream* testout; // NOLINT
|
||||
|
||||
namespace level
|
||||
{
|
||||
enum level_enum
|
||||
|
@ -23,7 +23,6 @@ namespace netgen
|
||||
// #include <iostream>
|
||||
/** output stream for testing.
|
||||
testout is opened by main */
|
||||
DLL_HEADER extern ostream * testout;
|
||||
|
||||
/** use instead of cout */
|
||||
DLL_HEADER extern ostream * mycout;
|
||||
|
@ -483,7 +483,6 @@ extern "C" {
|
||||
#include <iostream>
|
||||
namespace netgen
|
||||
{
|
||||
DLL_HEADER extern std::ostream * testout;
|
||||
DLL_HEADER extern int printmessage_importance;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@ namespace netgen
|
||||
// testout -> clear(ios::failbit);
|
||||
|
||||
// ostream * testout = &cout;
|
||||
ostream * testout = new ostream(0);
|
||||
|
||||
// NetgenOutStream * testout = new NetgenOutStream;
|
||||
|
||||
|
@ -147,7 +147,10 @@ int main(int argc, char ** argv)
|
||||
if ( netgen::id == 0 )
|
||||
{
|
||||
if (parameters.StringFlagDefined ("testout"))
|
||||
netgen::testout = new ofstream (parameters.GetStringFlag ("testout", "test.out"));
|
||||
{
|
||||
delete ngcore::testout;
|
||||
ngcore::testout = new ofstream (parameters.GetStringFlag ("testout", "test.out"));
|
||||
}
|
||||
|
||||
|
||||
#ifdef SOCKETS
|
||||
|
@ -72,7 +72,10 @@ void ParallelRun()
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &id);
|
||||
|
||||
if (parameters.StringFlagDefined ("testout"))
|
||||
{
|
||||
delete testout;
|
||||
testout = new ofstream (string("testout_proc") + id );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace nglib
|
||||
mycout = &cout;
|
||||
myerr = &cerr;
|
||||
// netgen::testout->SetOutStream (new ofstream ("test.out"));
|
||||
testout = new ofstream ("test.out");
|
||||
// testout = new ofstream ("test.out");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user