Salome HOME
merge from master
[tools/sat_salome.git] / products / patches / netgen53ForSalomeVisualStudio2017.patch
1 --- netgen_ref/libsrc/general/array.hpp
2 +++ netgen/libsrc/general/array.hpp
3 @@ -50,7 +50,7 @@
4      {
5  #ifdef DEBUG
6        if (i-BASE < 0 || i-BASE >= size)
7 -       cout << "array<" << typeid(T).name() << "> out of range, i = " << i << ", s = " << size << endl;
8 +       std::cout << "array<" << typeid(T).name() << "> out of range, i = " << i << ", s = " << size << std::endl;
9  #endif
10  
11        return data[i-BASE]; 
12 @@ -69,9 +69,9 @@
13      {
14  #ifdef DEBUG
15        if (i < 1 || i > size)
16 -       cout << "Array<" << typeid(T).name() 
17 +       std::cout << "Array<" << typeid(T).name() 
18              << ">::Elem out of range, i = " << i
19 -            << ", s = " << size << endl;
20 +            << ", s = " << size << std::endl;
21  #endif
22  
23        return ((T*)data)[i-1]; 
24 @@ -82,8 +82,8 @@
25      {
26  #ifdef DEBUG
27        if (i < 1 || i > size)
28 -       cout << "Array<" << typeid(T).name() << ">::Get out of range, i = " << i
29 -            << ", s = " << size << endl;
30 +       std::cout << "Array<" << typeid(T).name() << ">::Get out of range, i = " << i
31 +            << ", s = " << size << std::endl;
32  #endif
33  
34        return ((const T*)data)[i-1]; 
35 @@ -94,8 +94,8 @@
36      { 
37  #ifdef DEBUG
38        if (i < 1 || i > size)
39 -       cout << "Array<" << typeid(T).name() << ">::Set out of range, i = " << i
40 -            << ", s = " << size << endl;
41 +       std::cout << "Array<" << typeid(T).name() << ">::Set out of range, i = " << i
42 +            << ", s = " << size << std::endl;
43  #endif
44  
45        ((T*)data)[i-1] = el; 
46 @@ -151,7 +151,7 @@
47    inline ostream & operator<< (ostream & s, const FlatArray<T,BASE,TIND> & a)
48    {
49      for (TIND i = a.Begin(); i < a.End(); i++)
50 -      s << i << ": " << a[i] << endl;
51 +      s << i << ": " << a[i] << std::endl;
52      return s;
53    }
54  
55 @@ -435,7 +435,7 @@
56    inline ostream & operator<< (ostream & s, const IndirectArray<T1,T2> & ia)
57    {
58      for (int i = ia.Begin(); i < ia.End(); i++)
59 -      s << i << ": " << ia[i] << endl;
60 +      s << i << ": " << ia[i] << std::endl;
61      return s;
62    }
63    
64 @@ -551,7 +551,7 @@
65      void PrintMemInfo (ostream & ost) const
66      {
67        ost << Size() << " elements of size " << sizeof(T) << " = " 
68 -         << Size() * sizeof(T) << endl;
69 +         << Size() * sizeof(T) << std::endl;
70      }
71  
72      MoveableArray & operator= (const T & el)
73 @@ -593,7 +593,7 @@
74    inline ostream & operator<< (ostream & ost, MoveableArray<T> & a)
75    {
76      for (int i = 0; i < a.Size(); i++)
77 -      ost << i << ": " << a[i] << endl;
78 +      ost << i << ": " << a[i] << std::endl;
79      return ost;
80    }
81    */
82 --- netgen_ref/libsrc/gprim/spline.hpp
83 +++ netgen/libsrc/gprim/spline.hpp
84 @@ -55,7 +55,7 @@
85      /// returns a (not necessarily unit-length) tangent vector for 0 <= t <= 1
86      virtual Vec<D> GetTangent (const double t) const
87      { 
88 -      cerr << "GetTangent not implemented for spline base-class"  << endl; 
89 +      std::cerr << "GetTangent not implemented for spline base-class"  << std::endl; 
90        Vec<D> dummy; return dummy;
91      }
92  
93 @@ -100,10 +100,10 @@
94      virtual string GetType(void) const {return "splinebase";}
95  
96      virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const
97 -    { cerr << "Project not implemented for spline base-class" << endl;}
98 +    { std::cerr << "Project not implemented for spline base-class" << std::endl;}
99  
100      virtual void GetRawData (Array<double> & data) const
101 -    { cerr << "GetRawData not implemented for spline base-class" << endl;}
102 +    { std::cerr << "GetRawData not implemented for spline base-class" << std::endl;}
103  
104    };
105  
106 @@ -308,7 +308,7 @@
107  
108      for ( int i=0; i<6; i++)
109        ost << u[i] << "  ";
110 -    ost << endl;
111 +    ost << std::endl;
112    }
113  
114  
115 @@ -430,11 +430,11 @@
116      Vec<D> v2 = p3-p2;
117      double l1 = v1.Length();
118      double l2 = v2.Length();
119 -    (*testout) << "v1 " << v1 << " v2 " << v2 << endl;
120 +    (*testout) << "v1 " << v1 << " v2 " << v2 << std::endl;
121  
122      double cosalpha = v1*v2/(l1*l2);
123  
124 -    (*testout) << "cosalpha " << cosalpha << endl;
125 +    (*testout) << "cosalpha " << cosalpha << std::endl;
126  
127      return sqrt(cosalpha + 1.)/(min2(l1,l2)*(1.-cosalpha));
128      }
129 --- netgen_ref/libsrc/occ/occgenmesh.cpp
130 +++ netgen/libsrc/occ/occgenmesh.cpp
131 @@ -122,7 +122,7 @@
132           prop->SetParameters (parmid.X(), parmid.Y());
133           if (!prop->IsCurvatureDefined())
134           {
135 -            (*testout) << "curvature not defined!" << endl;
136 +            (*testout) << "curvature not defined!" << std::endl;
137              return;
138           }
139           curvature = max(fabs(prop->MinCurvature()),
140 @@ -131,7 +131,7 @@
141           prop->SetParameters (par0.X(), par0.Y());
142           if (!prop->IsCurvatureDefined())
143           {
144 -            (*testout) << "curvature not defined!" << endl;
145 +            (*testout) << "curvature not defined!" << std::endl;
146              return;
147           }
148           curvature = max(curvature,max(fabs(prop->MinCurvature()),
149 @@ -140,7 +140,7 @@
150           prop->SetParameters (par1.X(), par1.Y());
151           if (!prop->IsCurvatureDefined())
152           {
153 -            (*testout) << "curvature not defined!" << endl;
154 +            (*testout) << "curvature not defined!" << std::endl;
155              return;
156           }
157           curvature = max(curvature,max(fabs(prop->MinCurvature()),
158 @@ -149,17 +149,17 @@
159           prop->SetParameters (par2.X(), par2.Y());
160           if (!prop->IsCurvatureDefined())
161           {
162 -            (*testout) << "curvature not defined!" << endl;
163 +            (*testout) << "curvature not defined!" << std::endl;
164              return;
165           }
166           curvature = max(curvature,max(fabs(prop->MinCurvature()),
167              fabs(prop->MaxCurvature())));
168  
169 -         //(*testout) << "curvature " << curvature << endl;
170 +         //(*testout) << "curvature " << curvature << std::endl;
171  
172           if (curvature < 1e-3)
173           {
174 -            //(*testout) << "curvature too small (" << curvature << ")!" << endl;
175 +            //(*testout) << "curvature too small (" << curvature << ")!" << std::endl;
176              return;
177              // return war bis 10.2.05 auskommentiert
178           }
179 @@ -177,13 +177,13 @@
180  
181        if (h < maxside && depth < 10)
182        {
183 -         //cout << "\r h " << h << flush;
184 +         //std::cout << "\r h " << h << flush;
185           gp_Pnt2d pm;
186  
187 -         //cout << "h " << h << " maxside " << maxside << " depth " << depth << endl;
188 -         //cout << "par0 " << par0.X() << " " << par0.Y()
189 +         //std::cout << "h " << h << " maxside " << maxside << " depth " << depth << std::endl;
190 +         //std::cout << "par0 " << par0.X() << " " << par0.Y()
191           //<< " par1 " << par1.X() << " " << par1.Y()
192 -         //   << " par2 " << par2.X() << " " << par2.Y()<< endl;
193 +         //   << " par2 " << par2.X() << " " << par2.Y()<< std::endl;
194  
195           if(ls == 0)
196           {
197 @@ -224,7 +224,7 @@
198           p3d = Point3d(pnt2.X(), pnt2.Y(), pnt2.Z());
199           mesh.RestrictLocalH (p3d, h);
200  
201 -         //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl;
202 +         //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << std::endl;
203  
204        }
205     }
206 @@ -268,7 +268,7 @@
207                  pnt.Distance(oldpnt));
208  
209           //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))
210 -         //       <<  " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl;
211 +         //       <<  " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << std::endl;
212  
213           //olddist = dist; -- useless variables
214           //dist = pnt.Distance(oldpnt);
215 @@ -300,7 +300,7 @@
216              nsubedges = i;
217              ps.SetSize(nsubedges-1);
218              params.SetSize(nsubedges+1);
219 -            cout << "divide edge: local h too small" << endl;
220 +            std::cout << "divide edge: local h too small" << std::endl;
221           }
222        } while (i < nsubedges);
223  
224 @@ -309,7 +309,7 @@
225  
226        if (params[nsubedges] <= params[nsubedges-1])
227        {
228 -         cout << "CORRECTED" << endl;
229 +         std::cout << "CORRECTED" << std::endl;
230           ps.SetSize (nsubedges-2);
231           params.SetSize (nsubedges);
232           params[nsubedges] = s1;
233 @@ -324,13 +324,13 @@
234        const char * savetask = multithread.task;
235        multithread.task = "Edge meshing";
236  
237 -      (*testout) << "edge meshing" << endl;
238 +      (*testout) << "edge meshing" << std::endl;
239  
240        int nvertices = geom.vmap.Extent();
241        int nedges = geom.emap.Extent();
242  
243 -      (*testout) << "nvertices = " << nvertices << endl;
244 -      (*testout) << "nedges = " << nedges << endl;
245 +      (*testout) << "nvertices = " << nvertices << std::endl;
246 +      (*testout) << "nedges = " << nedges << std::endl;
247  
248        double eps = 1e-6 * geom.GetBoundingBox().Diam();
249        const double eps2 = eps * eps; // -- small optimization
250 @@ -356,7 +356,7 @@
251                    mesh.AddPoint (mp);
252        }
253  
254 -      (*testout) << "different vertices = " << mesh.GetNP() << endl;
255 +      (*testout) << "different vertices = " << mesh.GetNP() << std::endl;
256  
257  
258        int first_ep = mesh.GetNP()+1;
259 @@ -398,7 +398,7 @@
260  
261        edgenr = mesh.GetNSeg(); // to support SALOME sub-meshes
262  
263 -      (*testout) << "faces = " << geom.fmap.Extent() << endl;
264 +      (*testout) << "faces = " << geom.fmap.Extent() << std::endl;
265        int curr = 0;
266  
267        for (int i3 = 1; i3 <= geom.fmap.Extent(); i3++)
268 @@ -447,7 +447,7 @@
269              for (TopExp_Explorer exp3 (wire, TopAbs_EDGE); exp3.More(); exp3.Next())
270              {
271                 curr++;
272 -               (*testout) << "edge nr " << curr << endl;
273 +               (*testout) << "edge nr " << curr << std::endl;
274  
275                 multithread.percent = 100 * curr / double (total);
276                 if (multithread.terminate) return;
277 @@ -455,7 +455,7 @@
278                 TopoDS_Edge edge = TopoDS::Edge (exp3.Current());
279                 if (BRep_Tool::Degenerated(edge))
280                 {
281 -                  //(*testout) << "ignoring degenerated edge" << endl;
282 +                  //(*testout) << "ignoring degenerated edge" << std::endl;
283                    continue;
284                 }
285                 if ( geom.emap.FindIndex(edge) < 1 ) continue; // to support SALOME sub-meshes
286 @@ -468,8 +468,8 @@
287  
288                    if (system.Mass() < eps)
289                    {
290 -                     cout << "ignoring edge " << geom.emap.FindIndex (edge)
291 -                        << ". closed edge with length < " << eps << endl;
292 +                     std::cout << "ignoring edge " << geom.emap.FindIndex (edge)
293 +                        << ". closed edge with length < " << eps << std::endl;
294                       continue;
295                    }
296                 }
297 @@ -612,13 +612,13 @@
298                       else
299                       {
300                          mesh.AddPoint (mp[i-1], geomedgenr); // to support SALOME fuse edges
301 -                        (*testout) << "add meshpoint " << mp[i-1] << endl;
302 +                        (*testout) << "add meshpoint " << mp[i-1] << std::endl;
303                          pnums[i] = mesh.GetNP();
304                       }
305                 }
306 -               (*testout) << "NP = " << mesh.GetNP() << endl;
307 +               (*testout) << "NP = " << mesh.GetNP() << std::endl;
308  
309 -               //(*testout) << pnums[pnums.Size()-1] << endl;
310 +               //(*testout) << pnums[pnums.Size()-1] << std::endl;
311  
312                 for (int i = 1; i <= mp.Size()+1; i++)
313                 {
314 @@ -647,7 +647,7 @@
315                    /*
316                    if (occface->IsUPeriodic())
317                    {
318 -                  cout << "U Periodic" << endl;
319 +                  std::cout << "U Periodic" << std::endl;
320                    if (fabs(seg.epgeominfo[1].u-seg.epgeominfo[0].u) >
321                    fabs(seg.epgeominfo[1].u-
322                    (seg.epgeominfo[0].u-occface->UPeriod())))
323 @@ -661,7 +661,7 @@
324  
325                    if (occface->IsVPeriodic())
326                    {
327 -                  cout << "V Periodic" << endl;
328 +                  std::cout << "V Periodic" << std::endl;
329                    if (fabs(seg.epgeominfo[1].v-seg.epgeominfo[0].v) >
330                    fabs(seg.epgeominfo[1].v-
331                    (seg.epgeominfo[0].v-occface->VPeriod())))
332 @@ -693,7 +693,7 @@
333  
334        //       for(i=1; i<=mesh.GetNSeg(); i++)
335        //               (*testout) << "edge " << mesh.LineSegment(i).edgenr << " face " << mesh.LineSegment(i).si
336 -      //                               << " p1 " << mesh.LineSegment(i)[0] << " p2 " << mesh.LineSegment(i)[1] << endl;
337 +      //                               << " p1 " << mesh.LineSegment(i)[0] << " p2 " << mesh.LineSegment(i)[1] << std::endl;
338        //       exit(10);
339        for (int j = 1; j <= mesh.GetNP(); j++) // to support SALOME fuse edges: set level to zero
340          mesh.Point(j) = MeshPoint( (Point<3>&) mesh.Point(j) );
341 @@ -733,12 +733,12 @@
342        {
343           if(1==0 && !geom.fvispar[k-1].IsDrawable())
344           {
345 -            (*testout) << "ignoring face " << k << endl;
346 -            cout << "ignoring face " << k << endl;
347 +            (*testout) << "ignoring face " << k << std::endl;
348 +            std::cout << "ignoring face " << k << std::endl;
349              continue;
350           }
351  
352 -         (*testout) << "mesh face " << k << endl;
353 +         (*testout) << "mesh face " << k << std::endl;
354           multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL);
355           geom.facemeshstatus[k-1] = -1;
356  
357 @@ -746,7 +746,7 @@
358           /*
359           if (k != 42)
360           {
361 -         cout << "skipped" << endl;
362 +         std::cout << "skipped" << std::endl;
363           continue;
364           }
365           */
366 @@ -768,12 +768,12 @@
367              PrintMessage (2, "Face ", k, " / ", mesh.GetNFD(), " (parameter space projection)");
368  
369           if (surfmesherror)
370 -            cout << "Surface meshing error occured before (in " << surfmesherror << " faces)" << endl;
371 +            std::cout << "Surface meshing error occured before (in " << surfmesherror << " faces)" << std::endl;
372  
373           //      Meshing2OCCSurfaces meshing(f2, bb);
374           meshing.SetStartTime (starttime);
375  
376 -         //(*testout) << "Face " << k << endl << endl;
377 +         //(*testout) << "Face " << k << std::endl << std::endl;
378  
379  
380           if (meshing.GetProjectionType() == PLANESPACE)
381 @@ -811,8 +811,8 @@
382                    gi1.v = seg.epgeominfo[1].v;
383  
384                    meshing.AddBoundaryElement (glob2loc.Get(seg[0]), glob2loc.Get(seg[1]), gi0, gi1);
385 -                  //(*testout) << gi0.u << " " << gi0.v << endl;
386 -                  //(*testout) << gi1.u << " " << gi1.v << endl;
387 +                  //(*testout) << gi0.u << " " << gi0.v << std::endl;
388 +                  //(*testout) << gi1.u << " " << gi1.v << std::endl;
389                 }
390              }
391           }
392 @@ -869,8 +869,8 @@
393                    }
394  
395                    meshing.AddBoundaryElement (locpnum[0], locpnum[1], gi0, gi1);
396 -                  //(*testout) << gi0.u << " " << gi0.v << endl;
397 -                  //(*testout) << gi1.u << " " << gi1.v << endl;
398 +                  //(*testout) << gi0.u << " " << gi0.v << std::endl;
399 +                  //(*testout) << gi1.u << " " << gi1.v << std::endl;
400  
401                 }
402              }
403 @@ -899,13 +899,13 @@
404  
405           catch (SingularMatrixException)
406           {
407 -            (*myerr) << "Singular Matrix" << endl;
408 +            (*myerr) << "Singular Matrix" << std::endl;
409              res = MESHING2_GIVEUP;
410           }
411  
412           catch (UVBoundsException)
413           {
414 -            (*myerr) << "UV bounds exceeded" << endl;
415 +            (*myerr) << "UV bounds exceeded" << std::endl;
416              res = MESHING2_GIVEUP;
417           }
418  
419 @@ -920,7 +920,7 @@
420  
421                 mesh.Compress();
422  
423 -               cout << "retry Surface " << k << endl;
424 +               std::cout << "retry Surface " << k << std::endl;
425  
426                 k--;
427                 projecttype*=-1;
428 @@ -949,18 +949,18 @@
429  
430  //      ofstream problemfile("occmesh.rep");
431  
432 -//      problemfile << "SURFACEMESHING" << endl << endl;
433 +//      problemfile << "SURFACEMESHING" << std::endl << std::endl;
434  
435        if (surfmesherror)
436        {
437 -         cout << "WARNING! NOT ALL FACES HAVE BEEN MESHED" << endl;
438 -         cout << "SURFACE MESHING ERROR OCCURED IN " << surfmesherror << " FACES:" << endl;
439 +         std::cout << "WARNING! NOT ALL FACES HAVE BEEN MESHED" << std::endl;
440 +         std::cout << "SURFACE MESHING ERROR OCCURED IN " << surfmesherror << " FACES:" << std::endl;
441           for (int i = 1; i <= geom.fmap.Extent(); i++)
442              if (geom.facemeshstatus[i-1] == -1)
443              {
444 -               cout << "Face " << i << endl;
445 -//               problemfile << "problem with face " << i << endl;
446 -//               problemfile << "vertices: " << endl;
447 +               std::cout << "Face " << i << std::endl;
448 +//               problemfile << "problem with face " << i << std::endl;
449 +//               problemfile << "vertices: " << std::endl;
450                 TopExp_Explorer exp0,exp1,exp2;
451                 for ( exp0.Init(TopoDS::Face (geom.fmap(i)), TopAbs_WIRE); exp0.More(); exp0.Next() )
452                 {
453 @@ -972,21 +972,21 @@
454                       {
455                          TopoDS_Vertex vertex = TopoDS::Vertex(exp2.Current());
456                          gp_Pnt point = BRep_Tool::Pnt(vertex);
457 -//                        problemfile << point.X() << " " << point.Y() << " " << point.Z() << endl;
458 +//                        problemfile << point.X() << " " << point.Y() << " " << point.Z() << std::endl;
459                       }
460                    }
461                 }
462 -//               problemfile << endl;
463 +//               problemfile << std::endl;
464  
465              }
466 -            cout << endl << endl;
467 -            cout << "for more information open IGES/STEP Topology Explorer" << endl;
468 +            std::cout << std::endl << std::endl;
469 +            std::cout << "for more information open IGES/STEP Topology Explorer" << std::endl;
470  //            problemfile.close();
471              throw NgException ("Problem in Surface mesh generation");
472        }
473        else
474        {
475 -//         problemfile << "OK" << endl << endl;
476 +//         problemfile << "OK" << std::endl << std::endl;
477  //         problemfile.close();
478        }
479  
480 @@ -1006,7 +1006,7 @@
481           //      if (k != 42) continue;
482           //      if (k != 36) continue;
483  
484 -         //      (*testout) << "optimize face " << k << endl;
485 +         //      (*testout) << "optimize face " << k << std::endl;
486           multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL);
487  
488           FaceDescriptor & fd = mesh.GetFaceDescriptor(k);
489 @@ -1014,7 +1014,7 @@
490           PrintMessage (1, "Optimize Surface ", k);
491           for (i = 1; i <= mparam.optsteps2d; i++)
492           {
493 -            //   (*testout) << "optstep " << i << endl;
494 +            //   (*testout) << "optstep " << i << std::endl;
495              if (multithread.terminate) return;
496  
497              {
498 @@ -1025,7 +1025,7 @@
499                 //meshopt.SetMetricWeight (0.2);
500                 meshopt.SetWriteStatus (0);
501  
502 -               //          (*testout) << "EdgeSwapping (mesh, (i > mparam.optsteps2d/2))" << endl;
503 +               //          (*testout) << "EdgeSwapping (mesh, (i > mparam.optsteps2d/2))" << std::endl;
504                 meshopt.EdgeSwapping (mesh, (i > mparam.optsteps2d/2));
505              }
506  
507 @@ -1038,7 +1038,7 @@
508                 meshopt.SetMetricWeight (mparam.elsizeweight);
509                 meshopt.SetWriteStatus (0);
510  
511 -               //          (*testout) << "ImproveMesh (mesh)" << endl;
512 +               //          (*testout) << "ImproveMesh (mesh)" << std::endl;
513                 meshopt.ImproveMesh (mesh, mparam);
514              }
515  
516 @@ -1050,7 +1050,7 @@
517                 meshopt.SetMetricWeight (mparam.elsizeweight);
518                 meshopt.SetWriteStatus (0);
519  
520 -               //          (*testout) << "CombineImprove (mesh)" << endl;
521 +               //          (*testout) << "CombineImprove (mesh)" << std::endl;
522                 meshopt.CombineImprove (mesh);
523              }
524  
525 @@ -1063,7 +1063,7 @@
526                 meshopt.SetMetricWeight (mparam.elsizeweight);
527                 meshopt.SetWriteStatus (0);
528  
529 -               //          (*testout) << "ImproveMesh (mesh)" << endl;
530 +               //          (*testout) << "ImproveMesh (mesh)" << std::endl;
531                 meshopt.ImproveMesh (mesh, mparam);
532              }
533           }
534 @@ -1132,7 +1132,7 @@
535  
536              if (len < mincurvelength)
537              {
538 -               (*testout) << "ignored" << endl;
539 +               (*testout) << "ignored" << std::endl;
540                 continue;
541              }
542  
543 @@ -1212,7 +1212,7 @@
544  
545                 mesh.RestrictLocalH (Point3d(pnt.X(), pnt.Y(), pnt.Z()), ComputeH (fabs(curvature)));
546              }
547 -            // (*testout) << "edge " << i << " max. curvature: " << maxcur << endl;
548 +            // (*testout) << "edge " << i << " max. curvature: " << maxcur << std::endl;
549           }
550  
551           multithread.task = "Setting local mesh size (face curvature)";
552 @@ -1251,10 +1251,10 @@
553                 //maxside = max (maxside, p[0].Distance(p[1]));
554                 //maxside = max (maxside, p[0].Distance(p[2]));
555                 //maxside = max (maxside, p[1].Distance(p[2]));
556 -               //cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush;
557 +               //std::cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush;
558  
559                 RestrictHTriangle (par[0], par[1], par[2], &prop, mesh, 0);
560 -               //cout << "\rFace " << i << " pos12 ntriangles " << ntriangles << flush;
561 +               //std::cout << "\rFace " << i << " pos12 ntriangles " << ntriangles << flush;
562              }
563           }
564  
565 @@ -1347,8 +1347,8 @@
566                 if (mindist < 1e-3)
567                 {
568                    (*testout) << "extremely small local h: " << mindist
569 -                     << " --> setting to 1e-3" << endl;
570 -                  (*testout) << "somewhere near " << line.p0 << " - " << line.p1 << endl;
571 +                     << " --> setting to 1e-3" << std::endl;
572 +                  (*testout) << "somewhere near " << line.p0 << " - " << line.p1 << std::endl;
573                    mindist = 1e-3;
574                 }
575  
576 @@ -1398,7 +1398,7 @@
577           OCCFindEdges (geom, *mesh);
578  
579           /*
580 -         cout << "Removing redundant points" << endl;
581 +         std::cout << "Removing redundant points" << std::endl;
582  
583           int i, j;
584           int np = mesh->GetNP();
585 @@ -1419,7 +1419,7 @@
586           for (i = 1; i <= np; i++)
587           if (equalto[i-1])
588           {
589 -         cout << "Point " << i << " is equal to Point " << equalto[i-1] << endl;
590 +         std::cout << "Point " << i << " is equal to Point " << equalto[i-1] << std::endl;
591           for (j = 1; j <= mesh->GetNSeg(); j++)
592           {
593           Segment & seg = mesh->LineSegment(j);
594 @@ -1428,14 +1428,14 @@
595           }
596           }
597  
598 -         cout << "Removing degenerated segments" << endl;
599 +         std::cout << "Removing degenerated segments" << std::endl;
600           for (j = 1; j <= mesh->GetNSeg(); j++)
601           {
602           Segment & seg = mesh->LineSegment(j);
603           if (seg[0] == seg[1])
604           {
605           mesh->DeleteSegment(j);
606 -         cout << "Deleting Segment " << j << endl;
607 +         std::cout << "Deleting Segment " << j << std::endl;
608           }
609           }
610  
611 @@ -1451,15 +1451,15 @@
612           {
613           Handle(Geom_Surface) hf2 =
614           BRep_Tool::Surface(TopoDS::Face(geom.fmap(j)));
615 -         if (hf1 == hf2) cout << "face " << i << " and face " << j << " lie on same surface" << endl;
616 +         if (hf1 == hf2) std::cout << "face " << i << " and face " << j << " lie on same surface" << std::endl;
617           }
618           }
619           */
620  
621  #ifdef LOG_STREAM
622 -         (*logout) << "Edges meshed" << endl
623 -            << "time = " << GetTime() << " sec" << endl
624 -            << "points: " << mesh->GetNP() << endl;
625 +         (*logout) << "Edges meshed" << std::endl
626 +            << "time = " << GetTime() << " sec" << std::endl
627 +            << "points: " << mesh->GetNP() << std::endl;
628  #endif
629        }
630  
631 @@ -1472,15 +1472,15 @@
632           if (multithread.terminate) return TCL_OK;
633  
634  #ifdef LOG_STREAM
635 -         (*logout) << "Surfaces meshed" << endl
636 -            << "time = " << GetTime() << " sec" << endl
637 -            << "points: " << mesh->GetNP() << endl;
638 +         (*logout) << "Surfaces meshed" << std::endl
639 +            << "time = " << GetTime() << " sec" << std::endl
640 +            << "points: " << mesh->GetNP() << std::endl;
641  #endif
642  
643  #ifdef STAT_STREAM
644           (*statout) << mesh->GetNSeg() << " & "
645              << mesh->GetNSE() << " & - &"
646 -            << GetTime() << " & " << endl;
647 +            << GetTime() << " & " << std::endl;
648  #endif
649  
650           //      MeshQuality2d (*mesh);
651 @@ -1499,12 +1499,12 @@
652  /*
653           ofstream problemfile("occmesh.rep",ios_base::app);
654  
655 -         problemfile << "VOLUMEMESHING" << endl << endl;
656 +         problemfile << "VOLUMEMESHING" << std::endl << std::endl;
657           if(res != MESHING3_OK)
658 -            problemfile << "ERROR" << endl << endl;
659 +            problemfile << "ERROR" << std::endl << std::endl;
660           else
661 -            problemfile << "OK" << endl
662 -            << mesh->GetNE() << " elements" << endl << endl;
663 +            problemfile << "OK" << std::endl
664 +            << mesh->GetNE() << " elements" << std::endl << std::endl;
665  
666           problemfile.close();
667  */
668 @@ -1523,9 +1523,9 @@
669  #endif
670  
671  #ifdef LOG_STREAM
672 -         (*logout) << "Volume meshed" << endl
673 -            << "time = " << GetTime() << " sec" << endl
674 -            << "points: " << mesh->GetNP() << endl;
675 +         (*logout) << "Volume meshed" << std::endl
676 +            << "time = " << GetTime() << " sec" << std::endl
677 +            << "points: " << mesh->GetNP() << std::endl;
678  #endif
679        }
680  
681 @@ -1542,26 +1542,26 @@
682  #ifdef STAT_STREAM
683           (*statout) << GetTime() << " & "
684              << mesh->GetNE() << " & "
685 -            << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << endl;
686 +            << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << std::endl;
687  #endif
688  
689  #ifdef LOG_STREAM
690 -         (*logout) << "Volume optimized" << endl
691 -            << "time = " << GetTime() << " sec" << endl
692 -            << "points: " << mesh->GetNP() << endl;
693 +         (*logout) << "Volume optimized" << std::endl
694 +            << "time = " << GetTime() << " sec" << std::endl
695 +            << "points: " << mesh->GetNP() << std::endl;
696  #endif
697  
698 -         // cout << "Optimization complete" << endl;
699 +         // std::cout << "Optimization complete" << std::endl;
700  
701        }
702  
703 -      (*testout) << "NP: " << mesh->GetNP() << endl;
704 +      (*testout) << "NP: " << mesh->GetNP() << std::endl;
705        for (int i = 1; i <= mesh->GetNP(); i++)
706 -         (*testout) << mesh->Point(i) << endl;
707 +         (*testout) << mesh->Point(i) << std::endl;
708  
709 -      (*testout) << endl << "NSegments: " << mesh->GetNSeg() << endl;
710 +      (*testout) << std::endl << "NSegments: " << mesh->GetNSeg() << std::endl;
711        for (int i = 1; i <= mesh->GetNSeg(); i++)
712 -         (*testout) << mesh->LineSegment(i) << endl;
713 +         (*testout) << mesh->LineSegment(i) << std::endl;
714  
715        return TCL_OK;
716     }
717 --- netgen_ref/libsrc/occ/occgeom.cpp
718 +++ netgen/libsrc/occ/occgeom.cpp
719 @@ -33,13 +33,13 @@
720        TopExp_Explorer e;
721        int count = 0;
722        for (e.Init(shape, TopAbs_COMPSOLID); e.More(); e.Next()) count++;
723 -      cout << "CompSolids: " << count << endl;
724 +      std::cout << "CompSolids: " << count << std::endl;
725  
726 -      cout << "Solids    : " << somap.Extent() << endl;
727 -      cout << "Shells    : " << shmap.Extent() << endl;
728 -      cout << "Faces     : " << fmap.Extent() << endl;
729 -      cout << "Edges     : " << emap.Extent() << endl;
730 -      cout << "Vertices  : " << vmap.Extent() << endl;
731 +      std::cout << "Solids    : " << somap.Extent() << std::endl;
732 +      std::cout << "Shells    : " << shmap.Extent() << std::endl;
733 +      std::cout << "Faces     : " << fmap.Extent() << std::endl;
734 +      std::cout << "Edges     : " << emap.Extent() << std::endl;
735 +      std::cout << "Vertices  : " << vmap.Extent() << std::endl;
736     }
737  
738  
739 @@ -51,51 +51,51 @@
740        cont.Clear();
741        cont.Perform(geom->shape);
742  
743 -      (*testout) << "OCC CONTENTS" << endl;
744 -      (*testout) << "============" << endl;
745 -      (*testout) << "SOLIDS   : " << cont.NbSolids() << endl;
746 -      (*testout) << "SHELLS   : " << cont.NbShells() << endl;
747 -      (*testout) << "FACES    : " << cont.NbFaces() << endl;
748 -      (*testout) << "WIRES    : " << cont.NbWires() << endl;
749 -      (*testout) << "EDGES    : " << cont.NbEdges() << endl;
750 -      (*testout) << "VERTICES : " << cont.NbVertices() << endl;
751 +      (*testout) << "OCC CONTENTS" << std::endl;
752 +      (*testout) << "============" << std::endl;
753 +      (*testout) << "SOLIDS   : " << cont.NbSolids() << std::endl;
754 +      (*testout) << "SHELLS   : " << cont.NbShells() << std::endl;
755 +      (*testout) << "FACES    : " << cont.NbFaces() << std::endl;
756 +      (*testout) << "WIRES    : " << cont.NbWires() << std::endl;
757 +      (*testout) << "EDGES    : " << cont.NbEdges() << std::endl;
758 +      (*testout) << "VERTICES : " << cont.NbVertices() << std::endl;
759  
760        TopExp_Explorer e;
761        int count = 0;
762        for (e.Init(geom->shape, TopAbs_COMPOUND); e.More(); e.Next())
763           count++;
764 -      (*testout) << "Compounds: " << count << endl;
765 +      (*testout) << "Compounds: " << count << std::endl;
766  
767        count = 0;
768        for (e.Init(geom->shape, TopAbs_COMPSOLID); e.More(); e.Next())
769           count++;
770 -      (*testout) << "CompSolids: " << count << endl;
771 +      (*testout) << "CompSolids: " << count << std::endl;
772  
773 -      (*testout) << endl;
774 +      (*testout) << std::endl;
775  
776 -      cout << "Highest entry in topology hierarchy: " << endl;
777 +      std::cout << "Highest entry in topology hierarchy: " << std::endl;
778        if (count)
779 -         cout << count << " composite solid(s)" << endl;
780 +         std::cout << count << " composite solid(s)" << std::endl;
781        else
782           if (geom->somap.Extent())
783 -            cout << geom->somap.Extent() << " solid(s)" << endl;
784 +            std::cout << geom->somap.Extent() << " solid(s)" << std::endl;
785           else
786              if (geom->shmap.Extent())
787 -               cout << geom->shmap.Extent() << " shells(s)" << endl;
788 +               std::cout << geom->shmap.Extent() << " shells(s)" << std::endl;
789              else
790                 if (geom->fmap.Extent())
791 -                  cout << geom->fmap.Extent() << " face(s)" << endl;
792 +                  std::cout << geom->fmap.Extent() << " face(s)" << std::endl;
793                 else
794                    if (geom->wmap.Extent())
795 -                     cout << geom->wmap.Extent() << " wire(s)" << endl;
796 +                     std::cout << geom->wmap.Extent() << " wire(s)" << std::endl;
797                    else
798                       if (geom->emap.Extent())
799 -                        cout << geom->emap.Extent() << " edge(s)" << endl;
800 +                        std::cout << geom->emap.Extent() << " edge(s)" << std::endl;
801                       else
802                          if (geom->vmap.Extent())
803 -                           cout << geom->vmap.Extent() << " vertices(s)" << endl;
804 +                           std::cout << geom->vmap.Extent() << " vertices(s)" << std::endl;
805                          else
806 -                           cout << "no entities" << endl;
807 +                           std::cout << "no entities" << std::endl;
808  
809     }
810  
811 @@ -145,11 +145,11 @@
812        }
813  
814  
815 -      cout << "Starting geometry healing procedure (tolerance: " << tolerance << ")" << endl
816 -         << "-----------------------------------" << endl;
817 +      std::cout << "Starting geometry healing procedure (tolerance: " << tolerance << ")" << std::endl
818 +         << "-----------------------------------" << std::endl;
819  
820        {
821 -         cout << endl << "- repairing faces" << endl;
822 +         std::cout << std::endl << "- repairing faces" << std::endl;
823  
824           Handle(ShapeFix_Face) sff;
825           Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
826 @@ -183,17 +183,17 @@
827                 sff->Status(ShapeExtend_DONE4) ||
828                 sff->Status(ShapeExtend_DONE5))
829              {
830 -               cout << "repaired face " << fmap.FindIndex(face) << " ";
831 +               std::cout << "repaired face " << fmap.FindIndex(face) << " ";
832                 if(sff->Status(ShapeExtend_DONE1))
833 -                  cout << "(some wires are fixed)" <<endl;
834 +                  std::cout << "(some wires are fixed)" <<std::endl;
835                 else if(sff->Status(ShapeExtend_DONE2))
836 -                  cout << "(orientation of wires fixed)" <<endl;
837 +                  std::cout << "(orientation of wires fixed)" <<std::endl;
838                 else if(sff->Status(ShapeExtend_DONE3))
839 -                  cout << "(missing seam added)" <<endl;
840 +                  std::cout << "(missing seam added)" <<std::endl;
841                 else if(sff->Status(ShapeExtend_DONE4))
842 -                  cout << "(small area wire removed)" <<endl;
843 +                  std::cout << "(small area wire removed)" <<std::endl;
844                 else if(sff->Status(ShapeExtend_DONE5))
845 -                  cout << "(natural bounds added)" <<endl;
846 +                  std::cout << "(natural bounds added)" <<std::endl;
847                 TopoDS_Face newface = sff->Face();
848  
849                 rebuild->Replace(face, newface);
850 @@ -223,7 +223,7 @@
851  
852        if (fixsmalledges)
853        {
854 -         cout << endl << "- fixing small edges" << endl;
855 +         std::cout << std::endl << "- fixing small edges" << std::endl;
856  
857           Handle(ShapeFix_Wire) sfw;
858           Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
859 @@ -254,19 +254,19 @@
860                    sfw->StatusSmall(ShapeExtend_FAIL2) ||
861                    sfw->StatusSmall(ShapeExtend_FAIL3)))
862                 {
863 -                  cout << "Fixed small edge in wire " << wmap.FindIndex (oldwire) << endl;
864 +                  std::cout << "Fixed small edge in wire " << wmap.FindIndex (oldwire) << std::endl;
865                    replace = true;
866  
867                 }
868                 else if (sfw->StatusSmall(ShapeExtend_FAIL1))
869 -                  cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire)
870 -                  << ", edge cannot be checked (no 3d curve and no pcurve)" << endl;
871 +                  std::cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire)
872 +                  << ", edge cannot be checked (no 3d curve and no pcurve)" << std::endl;
873                 else if (sfw->StatusSmall(ShapeExtend_FAIL2))
874 -                  cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire)
875 -                  << ", edge is null-length and has different vertives at begin and end, and lockvtx is True or ModifiyTopologyMode is False" << endl;
876 +                  std::cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire)
877 +                  << ", edge is null-length and has different vertives at begin and end, and lockvtx is True or ModifiyTopologyMode is False" << std::endl;
878                 else if (sfw->StatusSmall(ShapeExtend_FAIL3))
879 -                  cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire)
880 -                  << ", CheckConnected has failed" << endl;
881 +                  std::cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire)
882 +                  << ", CheckConnected has failed" << std::endl;
883  
884                 replace = sfw->FixEdgeCurves() || replace;
885  
886 @@ -306,9 +306,9 @@
887                    BRepGProp::LinearProperties(edge, system);
888                    if (system.Mass() < tolerance)
889                    {
890 -                     cout << "removing degenerated edge " << emap.FindIndex(edge)
891 +                     std::cout << "removing degenerated edge " << emap.FindIndex(edge)
892                          << " from vertex " << vmap.FindIndex(TopExp::FirstVertex (edge))
893 -                        << " to vertex " << vmap.FindIndex(TopExp::LastVertex (edge)) << endl;
894 +                        << " to vertex " << vmap.FindIndex(TopExp::LastVertex (edge)) << std::endl;
895                       rebuild->Remove(edge);
896                    }
897                 }
898 @@ -344,12 +344,12 @@
899  
900           if (sfwf->FixWireGaps())
901           {
902 -            cout << endl << "- fixing wire gaps" << endl;
903 -            if (sfwf->StatusWireGaps(ShapeExtend_OK)) cout << "no gaps found" << endl;
904 -            if (sfwf->StatusWireGaps(ShapeExtend_DONE1)) cout << "some 2D gaps fixed" << endl;
905 -            if (sfwf->StatusWireGaps(ShapeExtend_DONE2)) cout << "some 3D gaps fixed" << endl;
906 -            if (sfwf->StatusWireGaps(ShapeExtend_FAIL1)) cout << "failed to fix some 2D gaps" << endl;
907 -            if (sfwf->StatusWireGaps(ShapeExtend_FAIL2)) cout << "failed to fix some 3D gaps" << endl;
908 +            std::cout << std::endl << "- fixing wire gaps" << std::endl;
909 +            if (sfwf->StatusWireGaps(ShapeExtend_OK)) std::cout << "no gaps found" << std::endl;
910 +            if (sfwf->StatusWireGaps(ShapeExtend_DONE1)) std::cout << "some 2D gaps fixed" << std::endl;
911 +            if (sfwf->StatusWireGaps(ShapeExtend_DONE2)) std::cout << "some 3D gaps fixed" << std::endl;
912 +            if (sfwf->StatusWireGaps(ShapeExtend_FAIL1)) std::cout << "failed to fix some 2D gaps" << std::endl;
913 +            if (sfwf->StatusWireGaps(ShapeExtend_FAIL2)) std::cout << "failed to fix some 3D gaps" << std::endl;
914           }
915  
916           sfwf->SetPrecision(tolerance);
917 @@ -360,7 +360,7 @@
918              {
919                 TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
920                 if ( BRep_Tool::Degenerated(edge) )
921 -                  cout << "degenerated edge at position 4" << endl;
922 +                  std::cout << "degenerated edge at position 4" << std::endl;
923              }
924           }
925  
926 @@ -368,10 +368,10 @@
927  
928           if (sfwf->FixSmallEdges())
929           {
930 -            cout << endl << "- fixing wire frames" << endl;
931 -            if (sfwf->StatusSmallEdges(ShapeExtend_OK)) cout << "no small edges found" << endl;
932 -            if (sfwf->StatusSmallEdges(ShapeExtend_DONE1)) cout << "some small edges fixed" << endl;
933 -            if (sfwf->StatusSmallEdges(ShapeExtend_FAIL1)) cout << "failed to fix some small edges" << endl;
934 +            std::cout << std::endl << "- fixing wire frames" << std::endl;
935 +            if (sfwf->StatusSmallEdges(ShapeExtend_OK)) std::cout << "no small edges found" << std::endl;
936 +            if (sfwf->StatusSmallEdges(ShapeExtend_DONE1)) std::cout << "some small edges fixed" << std::endl;
937 +            if (sfwf->StatusSmallEdges(ShapeExtend_FAIL1)) std::cout << "failed to fix some small edges" << std::endl;
938           }
939  
940  
941 @@ -392,7 +392,7 @@
942           {
943              TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
944              if ( BRep_Tool::Degenerated(edge) )
945 -               cout << "degenerated edge at position 5" << endl;
946 +               std::cout << "degenerated edge at position 5" << std::endl;
947           }
948        }
949  
950 @@ -402,7 +402,7 @@
951        if (fixspotstripfaces)
952        {
953  
954 -         cout << endl << "- fixing spot and strip faces" << endl;
955 +         std::cout << std::endl << "- fixing spot and strip faces" << std::endl;
956           Handle(ShapeFix_FixSmallFace) sffsm = new ShapeFix_FixSmallFace();
957           sffsm -> Init (shape);
958           sffsm -> SetPrecision (tolerance);
959 @@ -418,7 +418,7 @@
960           {
961              TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
962              if ( BRep_Tool::Degenerated(edge) )
963 -               cout << "degenerated edge at position 6" << endl;
964 +               std::cout << "degenerated edge at position 6" << std::endl;
965           }
966        }
967  
968 @@ -426,7 +426,7 @@
969  
970        if (sewfaces)
971        {
972 -         cout << endl << "- sewing faces" << endl;
973 +         std::cout << std::endl << "- sewing faces" << std::endl;
974  
975           BRepOffsetAPI_Sewing sewedObj(tolerance);
976  
977 @@ -441,7 +441,7 @@
978           if (!sewedObj.SewedShape().IsNull())
979              shape = sewedObj.SewedShape();
980           else
981 -            cout << " not possible";
982 +            std::cout << " not possible";
983        }
984  
985  
986 @@ -461,7 +461,7 @@
987  
988        if (makesolids)
989        {
990 -         cout << endl << "- making solids" << endl;
991 +         std::cout << std::endl << "- making solids" << std::endl;
992  
993           BRepBuilderAPI_MakeSolid ms;
994           int count = 0;
995 @@ -473,7 +473,7 @@
996  
997           if (!count)
998           {
999 -            cout << " not possible (no shells)" << endl;
1000 +            std::cout << " not possible (no shells)" << std::endl;
1001           }
1002           else
1003           {
1004 @@ -503,7 +503,7 @@
1005                 //delete sfs; sfs = NULL;
1006              }
1007              else
1008 -               cout << " not possible" << endl;
1009 +               std::cout << " not possible" << std::endl;
1010           }
1011        }
1012  
1013 @@ -511,7 +511,7 @@
1014  
1015        if (splitpartitions)
1016        {
1017 -         cout << "- running SALOME partition splitter" << endl;
1018 +         std::cout << "- running SALOME partition splitter" << std::endl;
1019  
1020           TopExp_Explorer e2;
1021           Partition_Spliter ps;
1022 @@ -527,13 +527,13 @@
1023           ps.Compute();
1024           shape = ps.Shape();
1025  
1026 -         cout << " before: " << count << " solids" << endl;
1027 +         std::cout << " before: " << count << " solids" << std::endl;
1028  
1029           count = 0;
1030           for (e2.Init (shape, TopAbs_SOLID);
1031              e2.More(); e2.Next()) count++;
1032  
1033 -            cout << " after : " << count << " solids" << endl;
1034 +            std::cout << " after : " << count << " solids" << std::endl;
1035        }
1036  
1037        BuildFMap();
1038 @@ -545,7 +545,7 @@
1039           {
1040              TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
1041              if ( BRep_Tool::Degenerated(edge) )
1042 -               cout << "degenerated edge at position 8" << endl;
1043 +               std::cout << "degenerated edge at position 8" << std::endl;
1044           }
1045        }
1046  
1047 @@ -573,18 +573,18 @@
1048        for (exp0.Init(shape, TopAbs_COMPOUND); exp0.More(); exp0.Next()) nnrc++;
1049        for (exp0.Init(shape, TopAbs_COMPSOLID); exp0.More(); exp0.Next()) nnrcs++;
1050  
1051 -      cout << "-----------------------------------" << endl;
1052 -      cout << "Compounds       : " << nnrc << " (" << nrc << ")" << endl;
1053 -      cout << "Composite solids: " << nnrcs << " (" << nrcs << ")" << endl;
1054 -      cout << "Solids          : " << nnrso << " (" << nrso << ")" << endl;
1055 -      cout << "Shells          : " << nnrsh << " (" << nrsh << ")" << endl;
1056 -      cout << "Wires           : " << nnrw << " (" << nrw << ")" << endl;
1057 -      cout << "Faces           : " << nnrf << " (" << nrf << ")" << endl;
1058 -      cout << "Edges           : " << nnre << " (" << nre << ")" << endl;
1059 -      cout << "Vertices        : " << nnrv << " (" << nrv << ")" << endl;
1060 -      cout << endl;
1061 -      cout << "Totol surface area : " << newsurfacecont << " (" << surfacecont << ")" << endl;
1062 -      cout << endl;
1063 +      std::cout << "-----------------------------------" << std::endl;
1064 +      std::cout << "Compounds       : " << nnrc << " (" << nrc << ")" << std::endl;
1065 +      std::cout << "Composite solids: " << nnrcs << " (" << nrcs << ")" << std::endl;
1066 +      std::cout << "Solids          : " << nnrso << " (" << nrso << ")" << std::endl;
1067 +      std::cout << "Shells          : " << nnrsh << " (" << nrsh << ")" << std::endl;
1068 +      std::cout << "Wires           : " << nnrw << " (" << nrw << ")" << std::endl;
1069 +      std::cout << "Faces           : " << nnrf << " (" << nrf << ")" << std::endl;
1070 +      std::cout << "Edges           : " << nnre << " (" << nre << ")" << std::endl;
1071 +      std::cout << "Vertices        : " << nnrv << " (" << nrv << ")" << std::endl;
1072 +      std::cout << std::endl;
1073 +      std::cout << "Totol surface area : " << newsurfacecont << " (" << surfacecont << ")" << std::endl;
1074 +      std::cout << std::endl;
1075     }
1076  
1077  
1078 @@ -605,12 +605,12 @@
1079           exp0.More(); exp0.Next())
1080        {
1081           TopoDS_Compound compound = TopoDS::Compound (exp0.Current());
1082 -         (*testout) << "compound" << endl;
1083 +         (*testout) << "compound" << std::endl;
1084           int i = 0;
1085           for (exp1.Init(compound, TopAbs_SHELL);
1086              exp1.More(); exp1.Next())
1087           {
1088 -            (*testout) << "shell " << ++i << endl;
1089 +            (*testout) << "shell " << ++i << std::endl;
1090           }
1091        }
1092  
1093 @@ -640,7 +640,7 @@
1094                          fmap.Add (face);
1095                          (*testout) << "face " << fmap.FindIndex(face) << " ";
1096                          (*testout) << ((face.Orientation() == TopAbs_REVERSED) ? "-" : "+") << ", ";
1097 -                        (*testout) << ((exp2.Current().Orientation() == TopAbs_REVERSED) ? "-" : "+") << endl;
1098 +                        (*testout) << ((exp2.Current().Orientation() == TopAbs_REVERSED) ? "-" : "+") << std::endl;
1099                          for (exp3.Init(exp2.Current(), TopAbs_WIRE);
1100                             exp3.More(); exp3.Next())
1101                          {
1102 @@ -684,7 +684,7 @@
1103  
1104              (*testout) << "shell " << shmap.FindIndex(shell) << " ";
1105              (*testout) << ((shell.Orientation() == TopAbs_REVERSED) ? "-" : "+") << ", ";
1106 -            (*testout) << ((exp1.Current().Orientation() == TopAbs_REVERSED) ? "-" : "+") << endl;
1107 +            (*testout) << ((exp1.Current().Orientation() == TopAbs_REVERSED) ? "-" : "+") << std::endl;
1108  
1109              for (exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next())
1110              {
1111 @@ -850,8 +850,8 @@
1112  
1113     void OCCGeometry :: SewFaces ()
1114     {
1115 -      (*testout) << "Trying to sew faces ..." << endl;
1116 -      cout << "Trying to sew faces ..." << flush;
1117 +      (*testout) << "Trying to sew faces ..." << std::endl;
1118 +      std::cout << "Trying to sew faces ..." << flush;
1119  
1120        BRepOffsetAPI_Sewing sewedObj(1);
1121   
1122 @@ -866,10 +866,10 @@
1123        if (!sewedObj.SewedShape().IsNull())
1124        {
1125           shape = sewedObj.SewedShape();
1126 -         cout << " done" << endl;
1127 +         std::cout << " done" << std::endl;
1128        }
1129        else
1130 -         cout << " not possible";
1131 +         std::cout << " not possible";
1132     }
1133  
1134  
1135 @@ -880,8 +880,8 @@
1136     {
1137        TopExp_Explorer exp0;
1138  
1139 -      (*testout) << "Trying to build solids ..." << endl;
1140 -      cout << "Trying to build solids ..." << flush;
1141 +      (*testout) << "Trying to build solids ..." << std::endl;
1142 +      std::cout << "Trying to build solids ..." << flush;
1143  
1144        BRepBuilderAPI_MakeSolid ms;
1145        int count = 0;
1146 @@ -893,7 +893,7 @@
1147  
1148        if (!count)
1149        {
1150 -         cout << " not possible (no shells)" << endl;
1151 +         std::cout << " not possible (no shells)" << std::endl;
1152           return;
1153        }
1154  
1155 @@ -922,10 +922,10 @@
1156              shape = newshape;
1157           }
1158  
1159 -         cout << " done" << endl;
1160 +         std::cout << " done" << std::endl;
1161        }
1162        else
1163 -         cout << " not possible" << endl;
1164 +         std::cout << " not possible" << std::endl;
1165     }
1166  
1167  
1168 @@ -933,12 +933,12 @@
1169  
1170     void OCCGeometry :: BuildVisualizationMesh (double deflection)
1171     {
1172 -      cout << "Preparing visualization (deflection = " << deflection << ") ... " << flush;
1173 +      std::cout << "Preparing visualization (deflection = " << deflection << ") ... " << flush;
1174  
1175        BRepTools::Clean (shape);
1176        // BRepMesh_IncrementalMesh::
1177        BRepMesh_IncrementalMesh (shape, deflection, true);
1178 -      cout << "done" << endl;
1179 +      std::cout << "done" << std::endl;
1180     }
1181  
1182  
1183 @@ -954,7 +954,7 @@
1184        Point<3> p1 = Point<3> (x1,y1,z1);
1185        Point<3> p2 = Point<3> (x2,y2,z2);
1186  
1187 -      (*testout) << "Bounding Box = [" << p1 << " - " << p2 << "]" << endl;
1188 +      (*testout) << "Bounding Box = [" << p1 << " - " << p2 << "]" << std::endl;
1189        boundingbox = Box<3> (p1,p2);
1190        SetCenter();
1191     }
1192 @@ -985,7 +985,7 @@
1193     bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const
1194     {
1195        static int cnt = 0;
1196 -      if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;
1197 +      if (++cnt % 1000 == 0) std::cout << "Project cnt = " << cnt << std::endl;
1198  
1199        gp_Pnt pnt(p(0), p(1), p(2));
1200  
1201 @@ -1065,7 +1065,7 @@
1202        // 
1203        // } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
1204        // 
1205 -      // //    (*testout) << "FastProject count: " << count << endl;
1206 +      // //    (*testout) << "FastProject count: " << count << std::endl;
1207        // 
1208        // if (count == 50) return false;
1209        // 
1210 @@ -1077,7 +1077,7 @@
1211        gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());
1212        if (cls->Perform(p2d) == TopAbs_OUT)
1213        {
1214 -        //cout << "Projection fails" << endl;
1215 +        //std::cout << "Projection fails" << std::endl;
1216          return false;
1217        }
1218  
1219 @@ -1093,14 +1093,14 @@
1220  
1221     void OCCGeometry :: WriteOCC_STL(char * filename)
1222     {
1223 -      cout << "writing stl..."; cout.flush();
1224 +      std::cout << "writing stl..."; std::cout.flush();
1225        StlAPI_Writer writer;
1226        //writer.RelativeMode() = Standard_False;
1227  
1228        //writer.SetDeflection(0.02);
1229        writer.Write(shape,filename);
1230  
1231 -      cout << "done" << endl;
1232 +      std::cout << "done" << std::endl;
1233     }
1234  
1235  
1236 @@ -1379,7 +1379,7 @@
1237            case TopAbs_VERTEX:
1238              count2 = vmap.FindIndex(TopoDS::Vertex(e.Current())); break;
1239            default:
1240 -            cout << "RecursiveTopologyTree: Case " << e.Current().ShapeType() << " not handeled" << endl;
1241 +            std::cout << "RecursiveTopologyTree: Case " << e.Current().ShapeType() << " not handeled" << std::endl;
1242           }
1243  
1244           int nrsubshapes = 0;
1245 @@ -1414,7 +1414,7 @@
1246  
1247     void OCCGeometry :: GetTopologyTree (stringstream & str)
1248     {
1249 -      cout << "Building topology tree ... " << flush;
1250 +      std::cout << "Building topology tree ... " << flush;
1251        RecursiveTopologyTree (shape, str, TopAbs_COMPSOLID, false, "CompSolids");
1252        RecursiveTopologyTree (shape, str, TopAbs_SOLID, true, "FreeSolids");
1253        RecursiveTopologyTree (shape, str, TopAbs_SHELL, true, "FreeShells");
1254 @@ -1423,7 +1423,7 @@
1255        RecursiveTopologyTree (shape, str, TopAbs_EDGE, true, "FreeEdges");
1256        RecursiveTopologyTree (shape, str, TopAbs_VERTEX, true, "FreeVertices");
1257        str << flush;
1258 -      //  cout << "done" << endl;
1259 +      //  std::cout << "done" << std::endl;
1260     }
1261  
1262  
1263 @@ -1449,7 +1449,7 @@
1264        int twistedfaces = 0;
1265        // int edgessamebutnotidentified = 0;
1266  
1267 -      cout << "checking faces ... " << flush;
1268 +      std::cout << "checking faces ... " << flush;
1269  
1270        int i;
1271        for (i = 1; i <= fmap.Extent(); i++)
1272 @@ -1462,7 +1462,7 @@
1273              if (!spotfaces++)
1274                 str << "SpotFace {Spot face} ";
1275  
1276 -            (*testout) << "Face " << i << " is a spot face" << endl;
1277 +            (*testout) << "Face " << i << " is a spot face" << std::endl;
1278              str << "SpotFace/Face" << i << " ";
1279              str << "{Face " << i << " } ";
1280           }
1281 @@ -1472,7 +1472,7 @@
1282              if (!stripsupportfaces++)
1283                 str << "StripSupportFace {Strip support face} ";
1284  
1285 -            (*testout) << "Face " << i << " has strip support" << endl;
1286 +            (*testout) << "Face " << i << " has strip support" << std::endl;
1287              str << "StripSupportFace/Face" << i << " ";
1288              str << "{Face " << i << " } ";
1289           }
1290 @@ -1483,7 +1483,7 @@
1291                 str << "SingleStripFace {Single strip face} ";
1292  
1293              (*testout) << "Face " << i << " is a single strip (edge " << emap.FindIndex(e1)
1294 -               << " and edge " << emap.FindIndex(e2) << " are identical)" << endl;
1295 +               << " and edge " << emap.FindIndex(e2) << " are identical)" << std::endl;
1296              str << "SingleStripFace/Face" << i << " ";
1297              str << "{Face " << i << " (edge " << emap.FindIndex(e1)
1298                 << " and edge " << emap.FindIndex(e2) << " are identical)} ";
1299 @@ -1496,7 +1496,7 @@
1300  
1301              (*testout) << "Face " << i << " is a strip (edge " << emap.FindIndex(e1)
1302                 << " and edge " << emap.FindIndex(e2)
1303 -               << " are identical)" << endl;
1304 +               << " are identical)" << std::endl;
1305              str << "StripFace/Face" << i << " ";
1306              str << "{Face " << i << " (edge " << emap.FindIndex(e1)
1307                 << " and edge " << emap.FindIndex(e2) << " are identical)} ";
1308 @@ -1508,7 +1508,7 @@
1309                 str << "FaceSplitByVertices {Face split by vertices} ";
1310  
1311              (*testout) << "Face " << i << " is split by " << count
1312 -               << " vertex/vertices " << endl;
1313 +               << " vertex/vertices " << std::endl;
1314              str << "FaceSplitByVertices/Face" << i << " ";
1315              str << "{Face " << i << " (split by " << count << "vertex/vertices)} ";
1316           }
1317 @@ -1521,7 +1521,7 @@
1318                 if (!smoothpinfaces++)
1319                    str << "SmoothPinFace {Smooth pin face} ";
1320  
1321 -               (*testout) << "Face " << i << " is a smooth pin" << endl;
1322 +               (*testout) << "Face " << i << " is a smooth pin" << std::endl;
1323                 str << "SmoothPinFace/Face" << i << " ";
1324                 str << "{Face " << i << " } ";
1325              }
1326 @@ -1530,7 +1530,7 @@
1327                 if (!stretchedpinfaces++)
1328                    str << "StretchedPinFace {Stretched pin face} ";
1329  
1330 -               (*testout) << "Face " << i << " is a streched pin" << endl;
1331 +               (*testout) << "Face " << i << " is a streched pin" << std::endl;
1332                 str << "StretchedPinFace/Face" << i << " ";
1333                 str << "{Face " << i << " } ";
1334              }
1335 @@ -1542,14 +1542,14 @@
1336              if (!twistedfaces++)
1337                 str << "TwistedFace {Twisted face} ";
1338  
1339 -            (*testout) << "Face " << i << " is twisted" << endl;
1340 +            (*testout) << "Face " << i << " is twisted" << std::endl;
1341              str << "TwistedFace/Face" << i << " ";
1342              str << "{Face " << i << " } ";
1343           }
1344        }
1345  
1346 -      cout << "done" << endl;
1347 -      cout << "checking edges ... " << flush;
1348 +      std::cout << "done" << std::endl;
1349 +      std::cout << "checking edges ... " << flush;
1350  
1351        // double dmax;
1352        // int cnt = 0;
1353 @@ -1577,7 +1577,7 @@
1354  
1355        str << flush;
1356  
1357 -      cout << "done" << endl;
1358 +      std::cout << "done" << std::endl;
1359     }
1360  
1361  
1362 @@ -1651,11 +1651,11 @@
1363  
1364     void OCCParameters :: Print(ostream & ost) const
1365     {
1366 -      ost << "OCC Parameters:" << endl
1367 +      ost << "OCC Parameters:" << std::endl
1368           << "close edges: " << resthcloseedgeenable
1369 -         << ", fac = " << resthcloseedgefac << endl
1370 +         << ", fac = " << resthcloseedgefac << std::endl
1371                  << "minimum edge length: " << resthminedgelenenable
1372 -                << ", min len = " << resthminedgelen << endl;
1373 +                << ", min len = " << resthminedgelen << std::endl;
1374     }
1375  
1376  
1377 --- netgen_ref/libsrc/occ/occgeom.hpp
1378 +++ netgen/libsrc/occ/occgeom.hpp
1379 @@ -291,7 +291,7 @@
1380  
1381        OCCSurface GetSurface (int surfi)
1382        {
1383 -         cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
1384 +         std::cout << "OCCGeometry::GetSurface using PLANESPACE" << std::endl;
1385           return OCCSurface (TopoDS::Face(fmap(surfi)), PLANESPACE);
1386        }
1387  
1388 --- netgen_ref/libsrc/occ/occmeshsurf.cpp
1389 +++ netgen/libsrc/occ/occmeshsurf.cpp
1390 @@ -111,13 +111,13 @@
1391        {
1392         (*testout) << "u " << geominfo.u << " v " << geominfo.v 
1393                    << " du " << lprop.D1U().X() << " "<< lprop.D1U().Y() << " "<< lprop.D1U().Z()
1394 -                  << " dv " << lprop.D1V().X() << " "<< lprop.D1V().Y() << " "<< lprop.D1V().Z() << endl;
1395 +                  << " dv " << lprop.D1V().X() << " "<< lprop.D1V().Y() << " "<< lprop.D1V().Z() << std::endl;
1396        }
1397  
1398  
1399  
1400      if (orient == TopAbs_REVERSED) n = -1*n;
1401 -    //  (*testout) << "GetNormalVector" << endl;
1402 +    //  (*testout) << "GetNormalVector" << std::endl;
1403    }
1404  
1405  
1406 @@ -130,8 +130,8 @@
1407        {
1408         p1 = ap1; p2 = ap2;
1409  
1410 -       //cout << "p1 = " << p1 << endl;
1411 -       //cout << "p2 = " << p2 << endl;
1412 +       //std::cout << "p1 = " << p1 << std::endl;
1413 +       //std::cout << "p2 = " << p2 << std::endl;
1414        
1415         GetNormalVector (p1, geominfo1, ez);
1416        
1417 @@ -152,7 +152,7 @@
1418         ez.Normalize();
1419         ey = Cross (ez, ex);
1420         nmid = ez;
1421 -       //cout << "ex " << ex << " ey " << ey << " ez " << ez << endl;
1422 +       //std::cout << "ex " << ex << " ey " << ey << " ez " << ez << std::endl;
1423        }
1424      else
1425        {
1426 @@ -182,9 +182,9 @@
1427         D1(0,1) = dv.X(); D1(1,1) = dv.Y(); D1(2,1) = dv.Z();
1428  
1429         /*
1430 -         (*testout) << "DefineTangentialPlane" << endl
1431 -         << "---------------------" << endl;
1432 -         (*testout) << "D1 = " << endl << D1 << endl;
1433 +         (*testout) << "DefineTangentialPlane" << std::endl
1434 +         << "---------------------" << std::endl;
1435 +         (*testout) << "D1 = " << std::endl << D1 << std::endl;
1436         */
1437  
1438         Transpose (D1, D1T);
1439 @@ -274,7 +274,7 @@
1440         /*
1441           if(zone == -1)
1442           {
1443 -         (*testout) << "zone = -1 for " << p3d << " 2D: " << pplane << " n " << n << " nmid " << nmid << endl;
1444 +         (*testout) << "zone = -1 for " << p3d << " 2D: " << pplane << " n " << n << " nmid " << nmid << std::endl;
1445           glob_testout = true;
1446           GetNormalVector (p3d, geominfo, n);
1447           glob_testout = false;
1448 @@ -284,7 +284,7 @@
1449      else
1450        {
1451         pplane = Point<2>(geominfo.u, geominfo.v);
1452 -       //      (*testout) << "(u,v) = " << geominfo.u << ", " << geominfo.v << endl;
1453 +       //      (*testout) << "(u,v) = " << geominfo.u << ", " << geominfo.v << std::endl;
1454         pplane = Point<2> (1/h * (Amatinv * (pplane-psp1)));
1455         //      pplane = Point<2> (h * (Amatinv * (pplane-psp1)));
1456         //      pplane = Point<2> (1/h * ((pplane-psp1)));
1457 @@ -301,11 +301,11 @@
1458    { 
1459      if (projecttype == PLANESPACE)
1460        {
1461 -       //      cout << "2d   : " << pplane << endl;
1462 +       //      std::cout << "2d   : " << pplane << std::endl;
1463         p3d = p1 + (h * pplane(0)) * ex + (h * pplane(1)) * ey;
1464 -       //      cout << "3d   : " << p3d << endl;
1465 +       //      std::cout << "3d   : " << p3d << std::endl;
1466         Project (p3d, gi);  
1467 -       //      cout << "proj : " << p3d << endl;
1468 +       //      std::cout << "proj : " << p3d << std::endl;
1469        }
1470      else
1471        {
1472 @@ -325,11 +325,11 @@
1473    void OCCSurface :: Project (Point<3> & p, PointGeomInfo & gi)
1474    {
1475      //   static int cnt = 0;
1476 -    //  if (cnt++ % 1000 == 0) cout << "********************************************** OCCSurfce :: Project, cnt = " << cnt << endl;
1477 +    //  if (cnt++ % 1000 == 0) std::cout << "********************************************** OCCSurfce :: Project, cnt = " << cnt << std::endl;
1478    
1479      gp_Pnt pnt(p(0), p(1), p(2));
1480  
1481 -    //(*testout) << "pnt = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << endl;
1482 +    //(*testout) << "pnt = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << std::endl;
1483  
1484  
1485      /*
1486 @@ -337,7 +337,7 @@
1487  
1488      if (!proj.NbPoints())
1489        {
1490 -       cout << "Project Point on Surface FAIL" << endl;
1491 +       std::cout << "Project Point on Surface FAIL" << std::endl;
1492         throw UVBoundsException();
1493        }
1494      */
1495 @@ -347,13 +347,13 @@
1496  
1497  
1498      /*
1499 -      cout << "NP = " << proj.NbPoints() << endl;
1500 +      std::cout << "NP = " << proj.NbPoints() << std::endl;
1501  
1502        for (int i = 1; i <= proj.NbPoints(); i++)
1503        {
1504        gp_Pnt pnt2 = proj.Point(i);
1505        Point<3> p2 = Point<3> (pnt2.X(), pnt2.Y(), pnt2.Z());
1506 -      cout << i << ". p = " << p2 << ", dist = " << (p2-p).Length() << endl;
1507 +      std::cout << i << ". p = " << p2 << ", dist = " << (p2-p).Length() << std::endl;
1508        }
1509      */
1510  
1511 @@ -368,7 +368,7 @@
1512      suval.Coord( u, v);
1513      pnt = occface->Value( u, v );
1514      
1515 -    //(*testout) << "pnt(proj) = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << endl;
1516 +    //(*testout) << "pnt(proj) = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << std::endl;
1517      gi.u = u;
1518      gi.v = v;
1519      
1520 @@ -520,7 +520,7 @@
1521    GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const
1522    {
1523      //  static int cnt = 0;
1524 -    //  if (cnt++ % 1000 == 0) cout << "GetNV cnt = " << cnt << endl;
1525 +    //  if (cnt++ % 1000 == 0) std::cout << "GetNV cnt = " << cnt << std::endl;
1526      Standard_Real u,v;
1527  
1528      gp_Pnt pnt(p(0), p(1), p(2));
1529 @@ -533,9 +533,9 @@
1530  
1531      if (proj.NbPoints() < 1)
1532        {
1533 -       cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1534 -            << endl;
1535 -       cout << p << endl;
1536 +       std::cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1537 +            << std::endl;
1538 +       std::cout << p << std::endl;
1539         return;
1540        }
1541   
1542 @@ -554,7 +554,7 @@
1543  
1544      /*
1545        if (!occface->IsCNu (1) || !occface->IsCNv (1))
1546 -      (*testout) << "SurfOpt: Differentiation FAIL" << endl;
1547 +      (*testout) << "SurfOpt: Differentiation FAIL" << std::endl;
1548      */
1549  
1550      n = Cross (Vec3d(du.X(), du.Y(), du.Z()),
1551 @@ -580,9 +580,9 @@
1552  
1553      if (proj.NbPoints() < 1)
1554        {
1555 -       cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1556 -            << endl;
1557 -       cout << p << endl;
1558 +       std::cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1559 +            << std::endl;
1560 +       std::cout << p << std::endl;
1561         return 0;
1562        }
1563   
1564 @@ -693,7 +693,7 @@
1565   
1566         if (!geometry.FastProject (surfi, hnewp, u, v))
1567           {
1568 -         //  cout << "Fast projection to surface fails! Using OCC projection" << endl;
1569 +         //  std::cout << "Fast projection to surface fails! Using OCC projection" << std::endl;
1570             // geometry.Project (surfi, hnewp); -- Project() changed for optimization
1571             geometry.Project (surfi, hnewp, u, v);
1572           }
1573 @@ -741,7 +741,7 @@
1574      if (surfi > 0)
1575        if (!geometry.FastProject (surfi, p, gi.u, gi.v))
1576         {
1577 -         cout << "Fast projection to surface fails! Using OCC projection" << endl;
1578 +         std::cout << "Fast projection to surface fails! Using OCC projection" << std::endl;
1579            double u, v;
1580           geometry.Project (surfi, p, u, v);
1581         }
1582 --- netgen_ref/nglib/nglib.cpp
1583 +++ netgen/nglib/nglib.cpp
1584 @@ -75,8 +75,8 @@
1585     // initialize, deconstruct Netgen library:
1586     DLL_HEADER void Ng_Init ()
1587     {
1588 -      mycout = &cout;
1589 -      myerr = &cerr;
1590 +      mycout = &std::cout;
1591 +      myerr = &std::cerr;
1592        // netgen::testout->SetOutStream (new ofstream ("test.out"));
1593        testout = new ofstream ("test.out");
1594     }
1595 @@ -515,7 +515,7 @@
1596        Mesh * m;
1597        MeshFromSpline2D (*(SplineGeometry2d*)geom, m, mparam);
1598  
1599 -      cout << m->GetNSE() << " elements, " << m->GetNP() << " points" << endl;
1600 +      std::cout << m->GetNSE() << " elements, " << m->GetNP() << " points" << std::endl;
1601  
1602        *mesh = (Ng_Mesh*)m;
1603        return NG_OK;
1604 @@ -620,7 +620,7 @@
1605           /*
1606           for (int i = 1; i <= readedges.Size(); i+=2)
1607           {
1608 -         cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl;
1609 +         std::cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << std::endl;
1610           }
1611           */
1612           geo->AddEdges(readedges);
1613 @@ -707,22 +707,22 @@
1614        int retval = STLSurfaceMeshing (*stlgeometry, *me);
1615        if (retval == MESHING3_OK)
1616        {
1617 -         (*mycout) << "Success !!!!" << endl;
1618 +         (*mycout) << "Success !!!!" << std::endl;
1619           stlgeometry->surfacemeshed = 1;
1620           stlgeometry->surfaceoptimized = 0;
1621           stlgeometry->volumemeshed = 0;
1622        } 
1623        else if (retval == MESHING3_OUTERSTEPSEXCEEDED)
1624        {
1625 -         (*mycout) << "ERROR: Give up because of too many trials. Meshing aborted!" << endl;
1626 +         (*mycout) << "ERROR: Give up because of too many trials. Meshing aborted!" << std::endl;
1627        }
1628        else if (retval == MESHING3_TERMINATE)
1629        {
1630 -         (*mycout) << "Meshing Stopped!" << endl;
1631 +         (*mycout) << "Meshing Stopped!" << std::endl;
1632        }
1633        else
1634        {
1635 -         (*mycout) << "ERROR: Surface meshing not successful. Meshing aborted!" << endl;
1636 +         (*mycout) << "ERROR: Surface meshing not successful. Meshing aborted!" << std::endl;
1637        }
1638  
1639  
1640 @@ -1179,7 +1179,7 @@
1641  
1642     DLL_HEADER void MyError (const char * ch)
1643     {
1644 -      cerr << ch;
1645 +      std::cerr << ch;
1646     }
1647  
1648