remove using namespace std from header files

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
Thorsten Liebig 2015-06-18 21:45:22 +02:00
parent 7062bbda30
commit f06cc293dc
37 changed files with 116 additions and 92 deletions

View File

@ -17,6 +17,8 @@
#include "operator_base.h" #include "operator_base.h"
using namespace std;
Operator_Base::Operator_Base() Operator_Base::Operator_Base()
{ {
Init(); Init();

View File

@ -25,8 +25,8 @@
typedef struct typedef struct
{ {
vector<unsigned int> posPath[3]; std::vector<unsigned int> posPath[3];
vector<unsigned short> dir; std::vector<unsigned short> dir;
} Grid_Path; } Grid_Path;
//! Abstract base-class for a common operator //! Abstract base-class for a common operator
@ -114,7 +114,7 @@ public:
//! Get the cell center coordinate usable for material averaging (Warning, may not be the yee cell center) //! Get the cell center coordinate usable for material averaging (Warning, may not be the yee cell center)
virtual bool GetCellCenterMaterialAvgCoord(const int pos[3], double coord[3]) const = 0; virtual bool GetCellCenterMaterialAvgCoord(const int pos[3], double coord[3]) const = 0;
virtual vector<CSPrimitives*> GetPrimitivesBoundBox(int posX, int posY, int posZ, CSProperties::PropertyType type=CSProperties::ANY) const = 0; virtual std::vector<CSPrimitives*> GetPrimitivesBoundBox(int posX, int posY, int posZ, CSProperties::PropertyType type=CSProperties::ANY) const = 0;
//! Set the background material (default is vacuum) //! Set the background material (default is vacuum)
virtual void SetBackgroundMaterial(double epsR=0, double mueR=0, double kappa=0, double sigma=0, double density=0); virtual void SetBackgroundMaterial(double epsR=0, double mueR=0, double kappa=0, double sigma=0, double density=0);

View File

@ -26,9 +26,9 @@ public:
ProcessCurrent(Engine_Interface_Base* eng_if); ProcessCurrent(Engine_Interface_Base* eng_if);
virtual ~ProcessCurrent(); virtual ~ProcessCurrent();
virtual string GetProcessingName() const {return "current integration";} virtual std::string GetProcessingName() const {return "current integration";}
virtual string GetIntegralName(int row) const; virtual std::string GetIntegralName(int row) const;
virtual void DefineStartStopCoord(double* dstart, double* dstop); virtual void DefineStartStopCoord(double* dstart, double* dstop);

View File

@ -17,6 +17,8 @@
#include "processfieldprobe.h" #include "processfieldprobe.h"
using namespace std;
ProcessFieldProbe::ProcessFieldProbe(Engine_Interface_Base* eng_if, int type) : ProcessIntegral(eng_if) ProcessFieldProbe::ProcessFieldProbe(Engine_Interface_Base* eng_if, int type) : ProcessIntegral(eng_if)
{ {
SetFieldType(type); SetFieldType(type);

View File

@ -26,9 +26,9 @@ public:
ProcessFieldProbe(Engine_Interface_Base* eng_if, int type=0); ProcessFieldProbe(Engine_Interface_Base* eng_if, int type=0);
virtual ~ProcessFieldProbe(); virtual ~ProcessFieldProbe();
virtual string GetProcessingName() const; virtual std::string GetProcessingName() const;
virtual string GetIntegralName(int row) const; virtual std::string GetIntegralName(int row) const;
//! Set the field type (0 electric field, 1 magnetic field) //! Set the field type (0 electric field, 1 magnetic field)
void SetFieldType(int type); void SetFieldType(int type);

View File

@ -42,7 +42,7 @@ public:
*/ */
enum DumpType { E_FIELD_DUMP=0, H_FIELD_DUMP=1, J_FIELD_DUMP=2, ROTH_FIELD_DUMP=3, SAR_LOCAL_DUMP=20, SAR_1G_DUMP=21, SAR_10G_DUMP=22, SAR_RAW_DATA=29}; enum DumpType { E_FIELD_DUMP=0, H_FIELD_DUMP=1, J_FIELD_DUMP=2, ROTH_FIELD_DUMP=3, SAR_LOCAL_DUMP=20, SAR_1G_DUMP=21, SAR_10G_DUMP=22, SAR_RAW_DATA=29};
virtual string GetProcessingName() const {return "common field processing";} virtual std::string GetProcessingName() const {return "common field processing";}
virtual void InitProcess(); virtual void InitProcess();
@ -55,8 +55,8 @@ public:
virtual void SetOptResolution(double optRes, int dir=-1); virtual void SetOptResolution(double optRes, int dir=-1);
//! Set the filename for a hdf5 data group file (HDF5 FileType only) \sa SetFileType() //! Set the filename for a hdf5 data group file (HDF5 FileType only) \sa SetFileType()
void SetFileName(string fn) {m_filename=fn;} void SetFileName(std::string fn) {m_filename=fn;}
string SetFileName() const {return m_filename;} std::string SetFileName() const {return m_filename;}
//! Define the Dump-Mode //! Define the Dump-Mode
void SetDumpMode(Engine_Interface_Base::InterpolationType mode); void SetDumpMode(Engine_Interface_Base::InterpolationType mode);
@ -72,7 +72,7 @@ public:
void SetFileType(FileType fileType) {m_fileType=fileType;} void SetFileType(FileType fileType) {m_fileType=fileType;}
static string GetFieldNameByType(DumpType type); static std::string GetFieldNameByType(DumpType type);
virtual bool NeedConductivity() const; virtual bool NeedConductivity() const;

View File

@ -23,6 +23,8 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
using namespace std;
ProcessFieldsFD::ProcessFieldsFD(Engine_Interface_Base* eng_if) : ProcessFields(eng_if) ProcessFieldsFD::ProcessFieldsFD(Engine_Interface_Base* eng_if) : ProcessFields(eng_if)
{ {
} }

View File

@ -26,7 +26,7 @@ public:
ProcessFieldsFD(Engine_Interface_Base* eng_if); ProcessFieldsFD(Engine_Interface_Base* eng_if);
virtual ~ProcessFieldsFD(); virtual ~ProcessFieldsFD();
virtual string GetProcessingName() const {return "frequency domain field dump";} virtual std::string GetProcessingName() const {return "frequency domain field dump";}
virtual void InitProcess(); virtual void InitProcess();
@ -37,7 +37,7 @@ protected:
virtual void DumpFDData(); virtual void DumpFDData();
//! frequency domain field storage //! frequency domain field storage
vector<std::complex<float>****> m_FD_Fields; std::vector<std::complex<float>****> m_FD_Fields;
}; };
#endif // PROCESSFIELDS_FD_H #endif // PROCESSFIELDS_FD_H

View File

@ -23,6 +23,8 @@
#include "CSPropMaterial.h" #include "CSPropMaterial.h"
using namespace std;
ProcessFieldsSAR::ProcessFieldsSAR(Engine_Interface_Base* eng_if) : ProcessFieldsFD(eng_if) ProcessFieldsSAR::ProcessFieldsSAR(Engine_Interface_Base* eng_if) : ProcessFieldsFD(eng_if)
{ {
m_UseCellKappa = true; m_UseCellKappa = true;

View File

@ -30,7 +30,7 @@ public:
virtual bool NeedConductivity() const; virtual bool NeedConductivity() const;
virtual string GetProcessingName() const {return "SAR dump";} virtual std::string GetProcessingName() const {return "SAR dump";}
virtual void InitProcess(); virtual void InitProcess();
@ -43,19 +43,19 @@ public:
//! Set to true for using the conductivity found at the center of a cell, or false for E*J instead //! Set to true for using the conductivity found at the center of a cell, or false for E*J instead
virtual void SetUseCellConductivity(bool val) {m_UseCellKappa=val;} virtual void SetUseCellConductivity(bool val) {m_UseCellKappa=val;}
virtual void SetSARAveragingMethod(string method) {m_SAR_method=method;} virtual void SetSARAveragingMethod(std::string method) {m_SAR_method=method;}
protected: protected:
virtual void DumpFDData(); virtual void DumpFDData();
bool m_UseCellKappa; bool m_UseCellKappa;
string m_SAR_method; std::string m_SAR_method;
//! frequency domain electric field storage //! frequency domain electric field storage
vector<std::complex<float>****> m_E_FD_Fields; std::vector<std::complex<float>****> m_E_FD_Fields;
//! frequency domain current density storage //! frequency domain current density storage
vector<std::complex<float>****> m_J_FD_Fields; std::vector<std::complex<float>****> m_J_FD_Fields;
}; };
#endif // PROCESSFIELDS_SAR_H #endif // PROCESSFIELDS_SAR_H

View File

@ -23,6 +23,8 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
using namespace std;
ProcessFieldsTD::ProcessFieldsTD(Engine_Interface_Base* eng_if) : ProcessFields(eng_if) ProcessFieldsTD::ProcessFieldsTD(Engine_Interface_Base* eng_if) : ProcessFields(eng_if)
{ {
pad_length = 8; pad_length = 8;

View File

@ -26,7 +26,7 @@ public:
ProcessFieldsTD(Engine_Interface_Base* eng_if); ProcessFieldsTD(Engine_Interface_Base* eng_if);
virtual ~ProcessFieldsTD(); virtual ~ProcessFieldsTD();
virtual string GetProcessingName() const {return "time domain field dump";} virtual std::string GetProcessingName() const {return "time domain field dump";}
virtual void InitProcess(); virtual void InitProcess();

View File

@ -22,6 +22,8 @@
#include "processing.h" #include "processing.h"
#include <climits> #include <climits>
using namespace std;
Processing::Processing(Engine_Interface_Base* eng_if) Processing::Processing(Engine_Interface_Base* eng_if)
{ {
m_Eng_Interface = NULL; m_Eng_Interface = NULL;

View File

@ -35,8 +35,6 @@ typedef std::complex<double> double_complex;
class Operator_Base; class Operator_Base;
using namespace std;
class Processing class Processing
{ {
public: public:
@ -47,12 +45,12 @@ public:
//! Set the interface to the engine. Each processing needs its own engine interface. This class will take ownership and cleanup the interface on deletion! //! Set the interface to the engine. Each processing needs its own engine interface. This class will take ownership and cleanup the interface on deletion!
void SetEngineInterface(Engine_Interface_Base* eng_if); void SetEngineInterface(Engine_Interface_Base* eng_if);
virtual void SetName(string val) {m_Name=val;} virtual void SetName(std::string val) {m_Name=val;}
virtual void SetName(string val, int number); virtual void SetName(std::string val, int number);
virtual string GetName() const {return m_Name;} virtual std::string GetName() const {return m_Name;}
//! Get the name for this processing, will be used in file description. //! Get the name for this processing, will be used in file description.
virtual string GetProcessingName() const = 0; virtual std::string GetProcessingName() const = 0;
virtual void InitProcess() {}; virtual void InitProcess() {};
virtual void Reset(); virtual void Reset();
@ -61,14 +59,14 @@ public:
virtual void ShowSnappedCoords(); virtual void ShowSnappedCoords();
void SetProcessInterval(unsigned int interval) {ProcessInterval=max((unsigned int)1,interval);} void SetProcessInterval(unsigned int interval) {ProcessInterval=std::max((unsigned int)1,interval);}
void SetProcessStartStopTime(double start, double stop); void SetProcessStartStopTime(double start, double stop);
void AddStep(unsigned int step); void AddStep(unsigned int step);
void AddSteps(vector<unsigned int> steps); void AddSteps(std::vector<unsigned int> steps);
void AddFrequency(double freq); void AddFrequency(double freq);
void AddFrequency(vector<double> *freqs); void AddFrequency(std::vector<double> *freqs);
bool CheckTimestep(); bool CheckTimestep();
@ -99,10 +97,10 @@ public:
void SetPrecision(unsigned int val) {m_precision = val;} void SetPrecision(unsigned int val) {m_precision = val;}
//! Dump probe geometry to file (will obay main or dual mesh property) //! Dump probe geometry to file (will obay main or dual mesh property)
virtual void DumpBox2File( string vtkfilenameprefix) const {DumpBox2File(vtkfilenameprefix,m_dualMesh);} virtual void DumpBox2File(std::string vtkfilenameprefix) const {DumpBox2File(vtkfilenameprefix,m_dualMesh);}
//! Dump probe geometry to file //! Dump probe geometry to file
virtual void DumpBox2File( string vtkfilenameprefix, bool dualMesh) const; virtual void DumpBox2File(std::string vtkfilenameprefix, bool dualMesh) const;
virtual void SetDualMesh(bool val) {m_dualMesh=val;} virtual void SetDualMesh(bool val) {m_dualMesh=val;}
virtual void SetDualTime(bool val) {m_dualTime=val;} virtual void SetDualTime(bool val) {m_dualTime=val;}
@ -115,7 +113,7 @@ protected:
unsigned int m_precision; unsigned int m_precision;
string m_Name; std::string m_Name;
bool m_Flush; bool m_Flush;
@ -127,10 +125,10 @@ protected:
unsigned int ProcessInterval; unsigned int ProcessInterval;
size_t m_PS_pos; //! current position in list of processing steps size_t m_PS_pos; //! current position in list of processing steps
vector<unsigned int> m_ProcessSteps; //! list of processing steps std::vector<unsigned int> m_ProcessSteps; //! list of processing steps
//! Vector of frequency samples //! Vector of frequency samples
vector<double> m_FD_Samples; std::vector<double> m_FD_Samples;
//! Number of samples already processed //! Number of samples already processed
unsigned int m_FD_SampleCount; unsigned int m_FD_SampleCount;
//! Sampling interval needed for the FD_Samples //! Sampling interval needed for the FD_Samples
@ -159,10 +157,10 @@ protected:
bool m_start_inside[3]; bool m_start_inside[3];
bool m_stop_inside[3]; bool m_stop_inside[3];
ofstream file; std::ofstream file;
string m_filename; std::string m_filename;
virtual void OpenFile(string outfile); virtual void OpenFile(std::string outfile);
}; };
class ProcessingArray class ProcessingArray
@ -192,7 +190,7 @@ public:
//! Invoke PostProcess() on all Processings. //! Invoke PostProcess() on all Processings.
void PostProcess(); void PostProcess();
void DumpBoxes2File( string vtkfilenameprefix ) const; void DumpBoxes2File(std::string vtkfilenameprefix ) const;
size_t GetNumberOfProcessings() const {return ProcessArray.size();} size_t GetNumberOfProcessings() const {return ProcessArray.size();}
@ -200,7 +198,7 @@ public:
protected: protected:
unsigned int maxInterval; unsigned int maxInterval;
vector<Processing*> ProcessArray; std::vector<Processing*> ProcessArray;
}; };
#endif // PROCESSING_H #endif // PROCESSING_H

View File

@ -20,6 +20,8 @@
#include "time.h" #include "time.h"
#include <iomanip> #include <iomanip>
using namespace std;
ProcessIntegral::ProcessIntegral(Engine_Interface_Base* eng_if) : Processing(eng_if) ProcessIntegral::ProcessIntegral(Engine_Interface_Base* eng_if) : Processing(eng_if)
{ {
m_Results=NULL; m_Results=NULL;

View File

@ -31,7 +31,7 @@ public:
virtual void InitProcess(); virtual void InitProcess();
virtual string GetProcessingName() const = 0; virtual std::string GetProcessingName() const = 0;
virtual void GetNormalDir(int nd) {m_normDir=nd;} virtual void GetNormalDir(int nd) {m_normDir=nd;}
@ -46,7 +46,7 @@ public:
virtual double* CalcMultipleIntegrals(); virtual double* CalcMultipleIntegrals();
//! Get the name of the integral for the given row. The names will be used in the file header. //! Get the name of the integral for the given row. The names will be used in the file header.
virtual string GetIntegralName(int row) const = 0; virtual std::string GetIntegralName(int row) const = 0;
//! Number of calculated results produced by this integral processing. \sa CalcMultipleIntegrals //! Number of calculated results produced by this integral processing. \sa CalcMultipleIntegrals
virtual int GetNumberOfIntegrals() const {return 1;} virtual int GetNumberOfIntegrals() const {return 1;}
@ -60,9 +60,9 @@ public:
protected: protected:
ProcessIntegral(Engine_Interface_Base* eng_if); ProcessIntegral(Engine_Interface_Base* eng_if);
void Dump_FD_Data(double factor, string filename); void Dump_FD_Data(double factor, std::string filename);
vector<double_complex> *m_FD_Results; std::vector<double_complex> *m_FD_Results;
double *m_Results; double *m_Results;
int m_normDir; // normal direction as required by some integral processings int m_normDir; // normal direction as required by some integral processings

View File

@ -20,6 +20,8 @@
#include "Common/operator_base.h" #include "Common/operator_base.h"
#include "tools/array_ops.h" #include "tools/array_ops.h"
using namespace std;
ProcessModeMatch::ProcessModeMatch(Engine_Interface_Base* eng_if) : ProcessIntegral(eng_if) ProcessModeMatch::ProcessModeMatch(Engine_Interface_Base* eng_if) : ProcessIntegral(eng_if)
{ {
for (int n=0; n<2; ++n) for (int n=0; n<2; ++n)

View File

@ -33,9 +33,9 @@ public:
ProcessModeMatch(Engine_Interface_Base* eng_if); ProcessModeMatch(Engine_Interface_Base* eng_if);
virtual ~ProcessModeMatch(); virtual ~ProcessModeMatch();
virtual string GetProcessingName() const; virtual std::string GetProcessingName() const;
virtual string GetIntegralName(int row) const; virtual std::string GetIntegralName(int row) const;
virtual void InitProcess(); virtual void InitProcess();
virtual void Reset(); virtual void Reset();
@ -43,7 +43,7 @@ public:
//! Set the field type (0 electric field, 1 magnetic field) //! Set the field type (0 electric field, 1 magnetic field)
void SetFieldType(int type); void SetFieldType(int type);
//! Set the mode function in the given direction ny. For example: SetModeFunction(0,"cos(pi/1000*x)*sin(pi/500*y)"); //! Set the mode function in the given direction ny. For example: SetModeFunction(0,"cos(pi/1000*x)*sin(pi/500*y)");
void SetModeFunction(int ny, string function); void SetModeFunction(int ny, std::string function);
virtual int GetNumberOfIntegrals() const {return 2;} virtual int GetNumberOfIntegrals() const {return 2;}
virtual double* CalcMultipleIntegrals(); virtual double* CalcMultipleIntegrals();
@ -58,7 +58,7 @@ protected:
double GetEField(int ny, const unsigned int pos[3]); double GetEField(int ny, const unsigned int pos[3]);
double GetHField(int ny, const unsigned int pos[3]); double GetHField(int ny, const unsigned int pos[3]);
string m_ModeFunction[3]; std::string m_ModeFunction[3];
CSFunctionParser* m_ModeParser[2]; CSFunctionParser* m_ModeParser[2];
unsigned int m_numLines[2]; unsigned int m_numLines[2];

View File

@ -26,7 +26,7 @@ ProcessVoltage::~ProcessVoltage()
{ {
} }
string ProcessVoltage::GetIntegralName(int row) const std::string ProcessVoltage::GetIntegralName(int row) const
{ {
if (row==0) if (row==0)
return "voltage"; return "voltage";

View File

@ -27,9 +27,9 @@ public:
ProcessVoltage(Engine_Interface_Base* eng_if); ProcessVoltage(Engine_Interface_Base* eng_if);
virtual ~ProcessVoltage(); virtual ~ProcessVoltage();
virtual string GetProcessingName() const {return "voltage integration";} virtual std::string GetProcessingName() const {return "voltage integration";}
virtual string GetIntegralName(int row) const; virtual std::string GetIntegralName(int row) const;
virtual double CalcIntegral(); virtual double CalcIntegral();

View File

@ -23,6 +23,8 @@
#include "tinyxml.h" #include "tinyxml.h"
#include "excitation.h" #include "excitation.h"
using namespace std;
Excitation::Excitation() Excitation::Excitation()
{ {
Signal_volt = 0; Signal_volt = 0;

View File

@ -42,10 +42,10 @@ public:
unsigned int GetNyquistNum() const {return m_nyquistTS;} unsigned int GetNyquistNum() const {return m_nyquistTS;}
//! Dump voltage excitation signal to ASCII file //! Dump voltage excitation signal to ASCII file
void DumpVoltageExcite(string filename); void DumpVoltageExcite(std::string filename);
//! Dump current excitation signal to ASCII file //! Dump current excitation signal to ASCII file
void DumpCurrentExcite(string filename); void DumpCurrentExcite(std::string filename);
//! Get the used timestep //! Get the used timestep
double GetTimestep() const {return dT;} double GetTimestep() const {return dT;}
@ -87,7 +87,7 @@ protected:
double m_foi; double m_foi;
//! Calculate a custom signal //! Calculate a custom signal
virtual void CalcCustomExcitation(double f0, int nTS, string signal); virtual void CalcCustomExcitation(double f0, int nTS, std::string signal);
//! Calculate an excitation with center of \a f0 and the half bandwidth \a fc //! Calculate an excitation with center of \a f0 and the half bandwidth \a fc
virtual void CalcGaussianPulsExcitation(double f0, double fc, int nTS); virtual void CalcGaussianPulsExcitation(double f0, double fc, int nTS);
//! Calculate a sinusoidal excitation with frequency \a f0 and a duration of \a nTS number of timesteps //! Calculate a sinusoidal excitation with frequency \a f0 and a duration of \a nTS number of timesteps

View File

@ -19,6 +19,8 @@
#include "tools/array_ops.h" #include "tools/array_ops.h"
using namespace std;
Operator_Ext_Dispersive::Operator_Ext_Dispersive(Operator* op) : Operator_Extension(op) Operator_Ext_Dispersive::Operator_Ext_Dispersive(Operator* op) : Operator_Extension(op)
{ {
m_curr_ADE_On = NULL; m_curr_ADE_On = NULL;

View File

@ -31,9 +31,9 @@ public:
virtual int GetDispersionOrder() {return m_Order;} virtual int GetDispersionOrder() {return m_Order;}
virtual string GetExtensionName() const {return string("Dispersive Material Abstract Base class");} virtual std::string GetExtensionName() const {return std::string("Dispersive Material Abstract Base class");}
virtual void ShowStat(ostream &ostr) const; virtual void ShowStat(std::ostream &ostr) const;
protected: protected:
Operator_Ext_Dispersive(Operator* op); Operator_Ext_Dispersive(Operator* op);
@ -44,7 +44,7 @@ protected:
int m_Order; int m_Order;
//! Dispersive material count //! Dispersive material count
vector<unsigned int> m_LM_Count; std::vector<unsigned int> m_LM_Count;
//! Index with dispersive material //! Index with dispersive material
// Array setup: m_LM_pos[N_order][direction][mesh_pos] // Array setup: m_LM_pos[N_order][direction][mesh_pos]
unsigned int ***m_LM_pos; unsigned int ***m_LM_pos;

View File

@ -21,6 +21,8 @@
#include "tools/array_ops.h" #include "tools/array_ops.h"
#include "fparser.hh" #include "fparser.hh"
using namespace std;
Operator_Ext_UPML::Operator_Ext_UPML(Operator* op) : Operator_Extension(op) Operator_Ext_UPML::Operator_Ext_UPML(Operator* op) : Operator_Extension(op)
{ {
m_GradingFunction = new FunctionParser(); m_GradingFunction = new FunctionParser();

View File

@ -19,6 +19,8 @@
#include "FDTD/operator.h" #include "FDTD/operator.h"
#include "FDTD/operator_cylinder.h" #include "FDTD/operator_cylinder.h"
using namespace std;
Operator_Extension::Operator_Extension(Operator* op) Operator_Extension::Operator_Extension(Operator* op)
{ {
m_Op = op; m_Op = op;

View File

@ -26,8 +26,6 @@
#include "tools/global.h" #include "tools/global.h"
using namespace std;
class Operator; class Operator;
class Operator_Cylinder; class Operator_Cylinder;
class Engine_Extension; class Engine_Extension;
@ -60,9 +58,9 @@ public:
//! The MPI operator (if enabled) will check whether the extension is compatible with MPI. Default is false. Derive this method to override. //! The MPI operator (if enabled) will check whether the extension is compatible with MPI. Default is false. Derive this method to override.
virtual bool IsMPISave() const {return false;} virtual bool IsMPISave() const {return false;}
virtual string GetExtensionName() const {return string("Abstract Operator Extension Base Class");} virtual std::string GetExtensionName() const {return std::string("Abstract Operator Extension Base Class");}
virtual void ShowStat(ostream &ostr) const; virtual void ShowStat(std::ostream &ostr) const;
virtual bool IsActive() const {return m_Active;} virtual bool IsActive() const {return m_Active;}
virtual void SetActive(bool active=true) {m_Active=active;} virtual void SetActive(bool active=true) {m_Active=active;}

View File

@ -34,6 +34,8 @@
//external libs //external libs
#include "tinyxml.h" #include "tinyxml.h"
using namespace std;
nf2ff::nf2ff(vector<float> freq, vector<float> theta, vector<float> phi, vector<float> center, unsigned int numThreads) nf2ff::nf2ff(vector<float> freq, vector<float> theta, vector<float> phi, vector<float> center, unsigned int numThreads)
{ {
m_freq = freq; m_freq = freq;

View File

@ -27,6 +27,8 @@
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
using namespace std;
nf2ff_calc_thread::nf2ff_calc_thread(nf2ff_calc* nfc, unsigned int start, unsigned int stop, unsigned int threadID, nf2ff_data &data) nf2ff_calc_thread::nf2ff_calc_thread(nf2ff_calc* nfc, unsigned int start, unsigned int stop, unsigned int threadID, nf2ff_data &data)
{ {
m_nf_calc = nfc; m_nf_calc = nfc;

View File

@ -25,8 +25,6 @@
#include <complex> #include <complex>
#include <boost/thread.hpp> #include <boost/thread.hpp>
using namespace std;
class nf2ff_calc; class nf2ff_calc;
#define MIRROR_OFF 0 #define MIRROR_OFF 0
@ -45,16 +43,16 @@ typedef struct
float* edge_length_P; float* edge_length_P;
float* edge_length_PP; float* edge_length_PP;
complex<float>**** E_field; std::complex<float>**** E_field;
complex<float>**** H_field; std::complex<float>**** H_field;
complex<float>**** Js; std::complex<float>**** Js;
complex<float>**** Ms; std::complex<float>**** Ms;
//local working data OUT //local working data OUT
complex<double>** m_Nt; std::complex<double>** m_Nt;
complex<double>** m_Np; std::complex<double>** m_Np;
complex<double>** m_Lt; std::complex<double>** m_Lt;
complex<double>** m_Lp; std::complex<double>** m_Lp;
} nf2ff_data; } nf2ff_data;
@ -76,7 +74,7 @@ class nf2ff_calc
// allow full data access to nf2ff_calc_thread class // allow full data access to nf2ff_calc_thread class
friend class nf2ff_calc_thread; friend class nf2ff_calc_thread;
public: public:
nf2ff_calc(float freq, vector<float> theta, vector<float> phi, vector<float> center); nf2ff_calc(float freq, std::vector<float> theta, std::vector<float> phi, std::vector<float> center);
~nf2ff_calc(); ~nf2ff_calc();
void SetRadius(float radius) {m_radius=radius;} void SetRadius(float radius) {m_radius=radius;}
@ -86,8 +84,8 @@ public:
double GetTotalRadPower() const {return m_radPower;} double GetTotalRadPower() const {return m_radPower;}
double GetMaxDirectivity() const {return m_maxDir;} double GetMaxDirectivity() const {return m_maxDir;}
complex<double>** GetETheta() const {return m_E_theta;} std::complex<double>** GetETheta() const {return m_E_theta;}
complex<double>** GetEPhi() const {return m_E_phi;} std::complex<double>** GetEPhi() const {return m_E_phi;}
double** GetRadPower() const {return m_P_rad;} double** GetRadPower() const {return m_P_rad;}
unsigned int GetNumThreads() const {return m_numThreads;} unsigned int GetNumThreads() const {return m_numThreads;}
@ -95,7 +93,7 @@ public:
void SetMirror(int type, int dir, float pos); void SetMirror(int type, int dir, float pos);
bool AddPlane(float **lines, unsigned int* numLines, complex<float>**** E_field, complex<float>**** H_field, int MeshType=0); bool AddPlane(float **lines, unsigned int* numLines, std::complex<float>**** E_field, std::complex<float>**** H_field, int MeshType=0);
protected: protected:
float m_freq; float m_freq;
@ -107,10 +105,10 @@ protected:
double m_radPower; double m_radPower;
double m_maxDir; double m_maxDir;
complex<double>** m_E_theta; std::complex<double>** m_E_theta;
complex<double>** m_E_phi; std::complex<double>** m_E_phi;
complex<double>** m_H_theta; std::complex<double>** m_H_theta;
complex<double>** m_H_phi; std::complex<double>** m_H_phi;
double** m_P_rad; double** m_P_rad;
float m_centerCoord[3]; float m_centerCoord[3];
@ -125,8 +123,8 @@ protected:
float m_MirrorPos[3]; float m_MirrorPos[3];
int GetNormalDir(unsigned int* numLines); int GetNormalDir(unsigned int* numLines);
bool AddSinglePlane(float **lines, unsigned int* numLines, complex<float>**** E_field, complex<float>**** H_field, int MeshType=0); bool AddSinglePlane(float **lines, unsigned int* numLines, std::complex<float>**** E_field, std::complex<float>**** H_field, int MeshType=0);
bool AddMirrorPlane(int n, float **lines, unsigned int* numLines, complex<float>**** E_field, complex<float>**** H_field, int MeshType=0); bool AddMirrorPlane(int n, float **lines, unsigned int* numLines, std::complex<float>**** E_field, std::complex<float>**** H_field, int MeshType=0);
//boost multi-threading //boost multi-threading
unsigned int m_numThreads; unsigned int m_numThreads;

View File

@ -52,6 +52,8 @@
#include "CSPropProbeBox.h" #include "CSPropProbeBox.h"
#include "CSPropDumpBox.h" #include "CSPropDumpBox.h"
using namespace std;
double CalcDiffTime(timeval t1, timeval t2) double CalcDiffTime(timeval t1, timeval t2)
{ {
double s_diff = t1.tv_sec - t2.tv_sec; double s_diff = t1.tv_sec - t2.tv_sec;

View File

@ -25,8 +25,6 @@
#define __OPENEMS_STAT_FILE__ "openEMS_stats.txt" #define __OPENEMS_STAT_FILE__ "openEMS_stats.txt"
#define __OPENEMS_RUN_STAT_FILE__ "openEMS_run_stats.txt" #define __OPENEMS_RUN_STAT_FILE__ "openEMS_run_stats.txt"
using namespace std;
class Operator; class Operator;
class Engine; class Engine;
class Engine_Interface_FDTD; class Engine_Interface_FDTD;
@ -38,7 +36,7 @@ class Excitation;
class Engine_Ext_SteadyState; class Engine_Ext_SteadyState;
double CalcDiffTime(timeval t1, timeval t2); double CalcDiffTime(timeval t1, timeval t2);
string FormatTime(int sec); std::string FormatTime(int sec);
class openEMS class openEMS
{ {
@ -62,7 +60,7 @@ public:
void DebugBox() {m_debugBox=true;} void DebugBox() {m_debugBox=true;}
//! Get informations about external libs used by openEMS //! Get informations about external libs used by openEMS
static string GetExtLibsInfo(); static std::string GetExtLibsInfo();
//! Set this to about FDTD iteration process //! Set this to about FDTD iteration process
void SetAbort(bool val) {m_Abort=val;} void SetAbort(bool val) {m_Abort=val;}
@ -120,11 +118,11 @@ protected:
virtual bool SetupProcessing(); virtual bool SetupProcessing();
//! Dump statistics to file //! Dump statistics to file
virtual bool DumpStatistics(const string& filename, double time); virtual bool DumpStatistics(const std::string& filename, double time);
//! Dump run statistivs to file //! Dump run statistivs to file
virtual bool InitRunStatistics(const string& filename); virtual bool InitRunStatistics(const std::string& filename);
virtual bool DumpRunStatistics(const string& filename, double time, unsigned int ts, double speed, double energy); virtual bool DumpRunStatistics(const std::string& filename, double time, unsigned int ts, double speed, double energy);
}; };
#endif // OPENEMS_H #endif // OPENEMS_H

View File

@ -17,6 +17,8 @@
#include "AdrOp.h" #include "AdrOp.h"
using namespace std;
AdrOp::AdrOp(unsigned int muiImax, unsigned int muiJmax, unsigned int muiKmax, unsigned int muiLmax) AdrOp::AdrOp(unsigned int muiImax, unsigned int muiJmax, unsigned int muiKmax, unsigned int muiLmax)
{ {
//error-handling... //error-handling...

View File

@ -32,8 +32,6 @@
#include "ExpenseLog.h" #include "ExpenseLog.h"
#include "ErrorMsg.h" #include "ErrorMsg.h"
using namespace std;
class AdrOp class AdrOp
{ {
public: public:

View File

@ -18,6 +18,8 @@
#include "array_ops.h" #include "array_ops.h"
#include <ostream> #include <ostream>
using namespace std;
#ifdef WIN32 #ifdef WIN32
#define __MSVCRT_VERSION__ 0x0700 #define __MSVCRT_VERSION__ 0x0700
#include <malloc.h> #include <malloc.h>

View File

@ -31,8 +31,6 @@
#include <math.h> #include <math.h>
#include "constants.h" #include "constants.h"
using namespace std;
typedef float v4sf __attribute__ ((vector_size (16))); // vector of four single floats typedef float v4sf __attribute__ ((vector_size (16))); // vector of four single floats
typedef int v4si __attribute__ ((vector_size (4*sizeof(int)))); // vector of four single ints typedef int v4si __attribute__ ((vector_size (4*sizeof(int)))); // vector of four single ints
@ -177,7 +175,7 @@ void Delete_N_3DArray(T**** array, const unsigned int* numLines)
} }
template <typename T> template <typename T>
void Dump_N_3DArray2File(ostream &file, T**** array, const unsigned int* numLines) void Dump_N_3DArray2File(std::ostream &file, T**** array, const unsigned int* numLines)
{ {
unsigned int pos[3]; unsigned int pos[3];
for (pos[0]=0; pos[0]<numLines[0]; ++pos[0]) for (pos[0]=0; pos[0]<numLines[0]; ++pos[0])
@ -189,7 +187,7 @@ void Dump_N_3DArray2File(ostream &file, T**** array, const unsigned int* numLine
file << pos[0] << "\t" << pos[1] << "\t" << pos[2]; file << pos[0] << "\t" << pos[1] << "\t" << pos[2];
for (int n=0; n<3; ++n) for (int n=0; n<3; ++n)
file << "\t" << (float)array[n][pos[0]][pos[1]][pos[2]]; file << "\t" << (float)array[n][pos[0]][pos[1]][pos[2]];
file << endl; file << std::endl;
} }
} }
} }

View File

@ -21,6 +21,8 @@
#include "array_ops.h" #include "array_ops.h"
#include "global.h" #include "global.h"
using namespace std;
SAR_Calculation::SAR_Calculation() SAR_Calculation::SAR_Calculation()
{ {
m_Vx_Used = NULL; m_Vx_Used = NULL;