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