summaryrefslogtreecommitdiff
blob: 766056d5ae51a18b1c8051273ee97c221b025d79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
diff -Naurp xmds-1.6.5-orig/source/xmds_integrate_ark45.cc xmds-1.6.5/source/xmds_integrate_ark45.cc
--- xmds-1.6.5-orig/source/xmds_integrate_ark45.cc	2008-06-28 21:48:21.000000000 +0200
+++ xmds-1.6.5/source/xmds_integrate_ark45.cc	2008-06-28 21:48:57.000000000 +0200
@@ -35,6 +35,7 @@
 #include <xmds_simulation.h>
 #include <xmds_vector.h>
 #include <cstdlib>
+#include <cstring>
 
 // **************************************************************************
 // **************************************************************************
@@ -289,7 +290,7 @@ void xmdsIntegrateARK45::writeTimestepEr
       fprintf(outfile, "for(unsigned long _i0=0; _i0<_%s_size; _i0++){\n", fieldName);
     }
     fprintf(outfile, "   for(unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
-    if (strcmp(typeName, "complex") == 0) {
+    if (std::strcmp(typeName, "complex") == 0) {
       fprintf(outfile, "    _temp_mod=mod2(_%s_main[_%s_main_index_pointer + _i1]);\n", fieldName, fieldName);
     }
     else {
@@ -347,7 +348,7 @@ void xmdsIntegrateARK45::writeTimestepEr
     }
     fprintf(outfile, "   for(unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++)\n", fieldName);
 
-    if (strcmp(typeName, "complex") == 0) {
+    if (std::strcmp(typeName, "complex") == 0) {
       fprintf(outfile, "       if(mod2(_%s_main[_%s_main_index_pointer + _i1])>_peak[_i1]){\n", fieldName, fieldName);
       fprintf(outfile, "            _temp_error=mod(_%s_main[_%s_main_index_pointer + _i1]-_checkfield[_%s_main_index_pointer + _i1])/(mod(_%s_main[_%s_main_index_pointer + _i1])+1e-20);\n", fieldName, fieldName, fieldName, fieldName, fieldName);
     }
@@ -364,7 +365,7 @@ void xmdsIntegrateARK45::writeTimestepEr
   else{ // if ndims==0
     fprintf(outfile, "   for(unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
 
-    if (strcmp(typeName, "complex") == 0) {
+    if (std::strcmp(typeName, "complex") == 0) {
       fprintf(outfile, "       _temp_error=mod(_%s_main[_i1]-_checkfield[_i1])/(mod(_%s_main[_i1])+1e-20);\n", fieldName, fieldName);
     }
     else{
diff -Naurp xmds-1.6.5-orig/source/xmds_integrate_ark89.cc xmds-1.6.5/source/xmds_integrate_ark89.cc
--- xmds-1.6.5-orig/source/xmds_integrate_ark89.cc	2008-06-28 21:48:21.000000000 +0200
+++ xmds-1.6.5/source/xmds_integrate_ark89.cc	2008-06-28 21:48:57.000000000 +0200
@@ -35,6 +35,7 @@
 #include <xmds_simulation.h>
 #include <xmds_vector.h>
 #include <cstdlib>
+#include <cstring>
 
 // **************************************************************************
 // **************************************************************************
@@ -284,7 +285,7 @@ void xmdsIntegrateARK89::writeTimestepEr
       fprintf(outfile, "for (unsigned long _i0=0; _i0<_%s_size; _i0++){\n", fieldName);
     }
     fprintf(outfile, "   for (unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
-    if (strcmp(typeName, "complex") == 0) {
+    if (std::strcmp(typeName, "complex") == 0) {
       fprintf(outfile, "    _temp_mod=mod2(_%s_main[_%s_main_index_pointer + _i1]);\n", fieldName, fieldName);
     }
     else {
@@ -334,7 +335,7 @@ void xmdsIntegrateARK89::writeTimestepEr
     }
     fprintf(outfile, "   for (unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++)\n", fieldName);
 
-    if (strcmp(typeName, "complex") == 0) {
+    if (std::strcmp(typeName, "complex") == 0) {
       fprintf(outfile, "       if (mod2(_%s_main[_%s_main_index_pointer + _i1])>_peak[_i1]){\n", fieldName, fieldName);
       fprintf(outfile, "            _temp_error=mod(_%s_main[_%s_main_index_pointer + _i1]-_checkfield[_%s_main_index_pointer + _i1])/(mod(_%s_main[_%s_main_index_pointer + _i1])+1e-20);\n", fieldName, fieldName, fieldName, fieldName, fieldName);
     }
@@ -352,7 +353,7 @@ void xmdsIntegrateARK89::writeTimestepEr
 
     fprintf(outfile, "   for (unsigned long _i1=0; _i1<_%s_main_ncomponents; _i1++){\n", fieldName);
 
-    if (strcmp(typeName, "complex") == 0){
+    if (std::strcmp(typeName, "complex") == 0){
       fprintf(outfile, "       _temp_error=mod(_%s_main[_i1]-_checkfield[_i1])/(mod(_%s_main[_i1])+1e-20);\n", fieldName, fieldName);
     }
     else{
diff -Naurp xmds-1.6.5-orig/source/xmds_simulation.h xmds-1.6.5/source/xmds_simulation.h
--- xmds-1.6.5-orig/source/xmds_simulation.h	2008-06-28 21:48:21.000000000 +0200
+++ xmds-1.6.5/source/xmds_simulation.h	2008-06-28 21:48:57.000000000 +0200
@@ -40,6 +40,8 @@
 #include <xmds_sequence.h>
 #include <xmds_globals.h>
 
+#include <string>
+
 // *****************************************************************************
 // *****************************************************************************
 //                              xmdsSimulation
diff -Naurp xmds-1.6.5-orig/source/xsil2graphics.cc xmds-1.6.5/source/xsil2graphics.cc
--- xmds-1.6.5-orig/source/xsil2graphics.cc	2008-06-28 21:48:21.000000000 +0200
+++ xmds-1.6.5/source/xsil2graphics.cc	2008-06-28 21:48:57.000000000 +0200
@@ -40,6 +40,7 @@
 #include <xsil_field.h>
 #include <getopt_xmds.h>
 #include <iostream>
+#include <cstring>
 
 // **********************************************************************
 
@@ -306,7 +307,7 @@ int main(
 
     const DOMString *mgName = nextElement->getAttribute("Name");
     int mgNumber = i+1;
-    if (strcmp("breakpoint", mgName->c_str()) == 0) {
+    if (std::strcmp("breakpoint", mgName->c_str()) == 0) {
       mgNumber = 1;
     }
     else {