Skip to content

Commit

Permalink
Avoid to show namespace of Display
Browse files Browse the repository at this point in the history
  • Loading branch information
wenqing committed Feb 4, 2019
1 parent db8fa46 commit 77831ee
Show file tree
Hide file tree
Showing 25 changed files with 637 additions and 596 deletions.
9 changes: 5 additions & 4 deletions FEM/DUMUX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ CReadTextfiles_DuMux::~CReadTextfiles_DuMux(void) {}
using std::cout;
using std::string;
using std::vector;
// using std:"\n";

using namespace Display;

/*-------------------------------------------------------------------------
GeoSys - Function: SplitStrings
Expand Down Expand Up @@ -395,7 +396,7 @@ int CDUMUXData::WriteInputForDuMux(CRFProcess* m_pcs,
DOScommand = "rm " + Folder + "/dataForDumux.dat";

if (system(DOScommand.c_str()))
Display::DisplayMsgLn("Could not delete input file! ");
DisplayMsgLn("Could not delete input file! ");

// Read length of current timestep and recalculate it to days
if (m_pcs->Tim->time_unit == "DAY")
Expand Down Expand Up @@ -1467,7 +1468,7 @@ void CDUMUXData::ExecuteDuMux(CRFProcess* m_pcs, string folder)
cout << tempstring << "\n";
if (system(tempstring.c_str()))
{
Display::DisplayMsgLn("Warnung: DuMux doesn't run properly!!! ");
DisplayMsgLn("Warnung: DuMux doesn't run properly!!! ");
exit(0);
}
}
Expand Down Expand Up @@ -1550,7 +1551,7 @@ int CDUMUXData::RunDuMux(long Timestep, CRFProcess* m_pcs)
DOScommand = "rm " + folder + "dataForGeoSys*.dat";

if (system(DOScommand.c_str()))
Display::DisplayMsgLn("Could not delete input file! ");
DisplayMsgLn("Could not delete input file! ");
}

// check if dumux folder is subfolder of the geosys folder
Expand Down
29 changes: 15 additions & 14 deletions FEM/Eclipse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <sys/stat.h> //for check if files exist

using namespace std;
using namespace Display;

CECLIPSEBlock::CECLIPSEBlock(long Nodelength, long Facelength)
{
Expand Down Expand Up @@ -5448,7 +5449,7 @@ std::string CECLIPSEData::ExecuteEclipse(long Timestep, CRFProcess* m_pcs,
// tempstring << "\n";
if (system(tempstring.c_str()))
{
Display::DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
return 0;
}
}
Expand All @@ -5461,7 +5462,7 @@ std::string CECLIPSEData::ExecuteEclipse(long Timestep, CRFProcess* m_pcs,
// tempstring = EclipseExe + " " + projectname;
if (system(tempstring.c_str()))
{
Display::DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
return 0;
}
}
Expand Down Expand Up @@ -5529,7 +5530,7 @@ std::string CECLIPSEData::ExecuteEclipse(long Timestep, CRFProcess* m_pcs,
// tempstring << "\n";
if (system(tempstring.c_str()))
{
Display::DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
return 0;
}
}
Expand All @@ -5544,7 +5545,7 @@ std::string CECLIPSEData::ExecuteEclipse(long Timestep, CRFProcess* m_pcs,
// tempstring = EclipseExe + " " + projectname; //WTP
if (system(tempstring.c_str()))
{
Display::DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
DisplayMsgLn("Warnung: Eclipse doesn't run properly!!! ");
return 0;
}
}
Expand Down Expand Up @@ -5586,13 +5587,13 @@ bool CECLIPSEData::CleanUpEclipseFiles(std::string folder,
systemcommand = system_delete + folder + "TEMPORARYRESULTS.*";
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not delete temporary result files! ");
DisplayMsgLn("Could not delete temporary result files! ");
// SB why return return 0;
}

/* systemcommand = system_delete + projectname + ".FSAVE" + system_noquery;
if (system(systemcommand.c_str())){
// Display::DisplayMsgLn("Could not delete result .FSAVE files! ");
// DisplayMsgLn("Could not delete result .FSAVE files! ");
//SB ?? why return return 0;
} */

Expand Down Expand Up @@ -5623,52 +5624,52 @@ bool CECLIPSEData::CleanUpEclipseFiles(std::string folder,
}
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not rename the temporary result files .F*! ");
DisplayMsgLn("Could not rename the temporary result files .F*! ");
// return 0;
}
if (this->Windows_System == false)
{
systemcommand = "rm " + projectname + extension;
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn(
DisplayMsgLn(
"Could not delete the temporary result files basename.F*! ");
// return 0;
}
}
// systemcommand = system_delete + projectname + ".F*" + system_noquery;
// if (system(systemcommand.c_str())){
// Display::DisplayMsgLn("Could not delete result files! ");
// DisplayMsgLn("Could not delete result files! ");
// return 0;
//}
systemcommand = system_delete + projectname + ".A*" + system_noquery;
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not delete result files .A*! ");
DisplayMsgLn("Could not delete result files .A*! ");
// return 0;
}
systemcommand = system_delete + projectname + ".P*" + system_noquery;
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not delete result files .P*! ");
DisplayMsgLn("Could not delete result files .P*! ");
// return 0;
}
systemcommand = system_delete + projectname + ".R*" + system_noquery;
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not delete result files .R*! ");
DisplayMsgLn("Could not delete result files .R*! ");
// return 0;
}
systemcommand = system_delete + projectname + ".M*" + system_noquery;
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not delete result files .M*! ");
DisplayMsgLn("Could not delete result files .M*! ");
// return 0;
}
systemcommand = system_delete + projectname + ".DB*" + system_noquery;
if (system(systemcommand.c_str()))
{
Display::DisplayMsgLn("Could not delete result files .DB*! ");
DisplayMsgLn("Could not delete result files .DB*! ");
// return 0;
}

Expand Down
22 changes: 12 additions & 10 deletions FEM/mathlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@

#include "prototyp.h"

using namespace Display;

double pai = 4.0 * atan(1.0);
VoidFuncDXCDX ShapeFunction;
VoidFuncDXCDX ShapeFunctionHQ;
Expand Down Expand Up @@ -682,7 +684,7 @@ double* MMachVec(long g)
zwerg = (double*)Malloc(sizeof(double) * g);
#ifdef ERROR_CONTROL
if (zwerg == NULL)
Display::DisplayErrorMsg("zuwenig Speicher in MMachVec");
DisplayErrorMsg("zuwenig Speicher in MMachVec");
#endif
return zwerg;
} /* MMachVec */
Expand All @@ -708,7 +710,7 @@ void MNullVec(double* zwerg, long g)
zwerg = (double*)Malloc(sizeof(double) * g);
#ifdef ERROR_CONTROL
if (zwerg == NULL)
Display::DisplayErrorMsg("Fehler in MNullVec");
DisplayErrorMsg("Fehler in MNullVec");
#endif
#ifdef SX
#pragma cdir nodep
Expand Down Expand Up @@ -742,7 +744,7 @@ void MKopierVec(double* vecquelle, double* vecziel, long g)
register long i;
#ifdef ERROR_CONTROL
if ((vecquelle == NULL) || (vecziel == NULL))
Display::DisplayErrorMsg("Fehler in MLoeschVec");
DisplayErrorMsg("Fehler in MLoeschVec");
#endif
#ifdef SX
#pragma cdir nodep
Expand Down Expand Up @@ -861,10 +863,10 @@ int MMultVecVec(double* vec1, long gv1, double* vec2, long gv2, double* mato,
if (check_err)
{
if (gv1 != mo)
Display::DisplayErrorMsg(
DisplayErrorMsg(
"MMultVecVec: Groesse von Matrix und Vektor 1 passen nicht");
if (gv2 != no)
Display::DisplayErrorMsg(
DisplayErrorMsg(
"MMultVecVec: Groesse von Matrix und Vektor 2 passen nicht");
}

Expand Down Expand Up @@ -920,10 +922,10 @@ int MMultVecMat(double* vec, long gv, double* mat, long m, long n, double* veco,
if (check_err)
{
if (gv != m)
Display::DisplayErrorMsg(
DisplayErrorMsg(
"MMultVecMat: Groesse von Matrix und Vektor passen nicht");
if (go != n)
Display::DisplayErrorMsg(
DisplayErrorMsg(
"MMultVecMat: Groesse von Ergebnis-Vektor stimmt nicht");
}

Expand Down Expand Up @@ -982,10 +984,10 @@ int MMultMatVec(/* Matrix */
if (check_err)
{
if (g != n)
Display::DisplayErrorMsg(
DisplayErrorMsg(
"MMultMatVec: Groesse von Matrix und Vektor passen nicht");
if (r != m)
Display::DisplayErrorMsg(
DisplayErrorMsg(
"MMultMatVec: Groesse von Ergebnis-Vektor stimmt nicht");
}

Expand Down Expand Up @@ -1058,7 +1060,7 @@ int MMultMatMat(double* mat1, long m1, long n1, double* mat2, long m2, long n2,
#ifdef ERROR_CONTROL
if ((m1 != mo) || (n2 != no) || (n1 != m2))
{
Display::DisplayErrorMsg("MMultMatMat:Die Matrizen passen nicht zueinander !");
DisplayErrorMsg("MMultMatMat:Die Matrizen passen nicht zueinander !");
return 0;
}
#endif
Expand Down
Loading

0 comments on commit 77831ee

Please sign in to comment.