diff --git a/FDTD/operator_sse_compressed.cpp b/FDTD/operator_sse_compressed.cpp
index 559a01f..88fed2d 100644
--- a/FDTD/operator_sse_compressed.cpp
+++ b/FDTD/operator_sse_compressed.cpp
@@ -108,8 +108,13 @@ void Operator_SSE_Compressed::ShowStat() const
INLINE int equal(f4vector v1, f4vector v2)
{
#if defined(__SSE__)
- v4sf compare = __builtin_ia32_cmpeqps( v1.v, v2.v ); // hmm should return v4si...
- return __builtin_ia32_movmskps( compare ) == 0x0f;
+ #if (__GNUC__ == 4) && (__GNUC_PATCHLEVEL__ < 4)
+ v4si compare = __builtin_ia32_cmpeqps( v1.v, v2.v );
+ return __builtin_ia32_movmskps( (v4sf)compare ) == 0x0f;
+ #else
+ v4sf compare = __builtin_ia32_cmpeqps( v1.v, v2.v );
+ return __builtin_ia32_movmskps( compare ) == 0x0f;
+ #endif
#else
return (
v1.f[0] == v2.f[0] &&
diff --git a/FDTD/process_efield.cpp b/FDTD/process_efield.cpp
index 1fb6b56..464c5e3 100644
--- a/FDTD/process_efield.cpp
+++ b/FDTD/process_efield.cpp
@@ -15,7 +15,6 @@
* along with this program. If not, see .
*/
-#include
#include
#include "time.h"
#include "process_efield.h"
@@ -33,7 +32,7 @@ void ProcessEField::InitProcess()
{
OpenFile(m_Name);
for (int n=0; n<3; n++)
- FD_Values[n].assign(m_FD_Samples.size(),0);
+ FD_Values[n].assign(m_FD_Samples.size(),double_complex(0.0,0.0));
file << "% time-domain E-field probe by openEMS " GIT_VERSION << endl;
file << "% coords: (" << Op->GetDiscLine(0,start[0])*Op->GetGridDelta() << ","
@@ -48,7 +47,7 @@ void ProcessEField::FlushData()
Dump_FD_Data(FD_Values,1.0/(double)m_FD_SampleCount,m_filename + "_FD");
}
-void ProcessEField::Dump_FD_Data(vector value[3], double factor, string filename)
+void ProcessEField::Dump_FD_Data(vector value[3], double factor, string filename)
{
if (value[0].size()==0)
return;
@@ -68,9 +67,9 @@ void ProcessEField::Dump_FD_Data(vector value[3], double factor,
for (size_t n=0;n value[3], double factor, string filename);
+ void Dump_FD_Data(vector value[3], double factor, string filename);
virtual int Process();
protected:
- vector FD_Values[3];
+ vector FD_Values[3];
};
#endif // PROCESS_EFIELD_H
diff --git a/FDTD/process_hfield.cpp b/FDTD/process_hfield.cpp
index ee82c89..c0b5d55 100644
--- a/FDTD/process_hfield.cpp
+++ b/FDTD/process_hfield.cpp
@@ -15,7 +15,6 @@
* along with this program. If not, see .
*/
-#include
#include
#include "tools/global.h"
#include "process_hfield.h"
@@ -32,7 +31,7 @@ void ProcessHField::InitProcess()
{
OpenFile(m_Name);
for (int n=0; n<3; n++)
- FD_Values[n].assign(m_FD_Samples.size(),0);
+ FD_Values[n].assign(m_FD_Samples.size(),double_complex(0.0,0.0));
file << "% time-domain H-field probe by openEMS " GIT_VERSION << endl;
file << "% coords: (" << Op->GetDiscLine(0,start[0],true)*Op->GetGridDelta() << ","
@@ -96,7 +95,7 @@ int ProcessHField::Process()
field *= m_weight;
for (size_t n=0;n
-#include
ProcessCurrent::ProcessCurrent(Operator* op, Engine* eng) : ProcessIntegral(op, eng)
{
diff --git a/FDTD/processing.cpp b/FDTD/processing.cpp
index 6284718..804f04d 100644
--- a/FDTD/processing.cpp
+++ b/FDTD/processing.cpp
@@ -19,7 +19,6 @@
#include "tools/useful.h"
#include "processing.h"
#include "time.h"
-#include
#include
Processing::Processing(Operator* op, Engine* eng)
@@ -276,7 +275,7 @@ void Processing::DumpBox2File( string vtkfilenameprefix, bool dualMesh ) const
file.close();
}
-void Processing::Dump_FD_Data(vector<_Complex double> value, double factor, string filename)
+void Processing::Dump_FD_Data(vector value, double factor, string filename)
{
if (value.size()==0)
return;
@@ -295,7 +294,7 @@ void Processing::Dump_FD_Data(vector<_Complex double> value, double factor, stri
file << "%dump by openEMS @" << ctime(&rawTime) << "%frequency\treal\timag\n";
for (size_t n=0;n
+typedef std::complex double_complex;
+#define II double_complex(0.0,1.0)
+
#include
#include
#include
@@ -101,7 +105,7 @@ protected:
//! Sampling interval needed for the FD_Samples
unsigned int m_FD_Interval;
- void Dump_FD_Data(vector<_Complex double> value, double factor, string filename);
+ void Dump_FD_Data(vector value, double factor, string filename);
//! define if given coords are on main or dualMesh (default is false)
bool m_dualMesh;
diff --git a/FDTD/processintegral.cpp b/FDTD/processintegral.cpp
index c4478b5..a690b65 100644
--- a/FDTD/processintegral.cpp
+++ b/FDTD/processintegral.cpp
@@ -16,7 +16,6 @@
*/
#include "processintegral.h"
-#include
#include
ProcessIntegral::ProcessIntegral(Operator* op, Engine* eng) : Processing(op, eng)
@@ -78,7 +77,7 @@ int ProcessIntegral::Process()
double T = time;
for (size_t n=0;n TD_Values;
- vector<_Complex double> FD_Values;
+ vector FD_Values;
double *m_Results;
};
diff --git a/FDTD/processvoltage.cpp b/FDTD/processvoltage.cpp
index 4959c18..187a5be 100644
--- a/FDTD/processvoltage.cpp
+++ b/FDTD/processvoltage.cpp
@@ -16,7 +16,6 @@
*/
#include "processvoltage.h"
-#include
#include
ProcessVoltage::ProcessVoltage(Operator* op, Engine* eng) : ProcessIntegral(op, eng)
diff --git a/openEMS.pro b/openEMS.pro
index e26b3a1..4d40758 100644
--- a/openEMS.pro
+++ b/openEMS.pro
@@ -172,9 +172,9 @@ bits64 {
}
bits32 {
QMAKE_CXXFLAGS_RELEASE += -m32 \
- -march=i686
+ -march=pentium3
QMAKE_LFLAGS_RELEASE += -m32 \
- -march=i686
+ -march=pentium3
OBJECTS_DIR = ABI2-32
LIBS = ../CSXCAD/ABI2-32/libCSXCAD.so
LIBS += ../fparser/ABI2-32/libfparser.so