1 --- netgen_ref/libsrc/general/array.hpp
2 +++ netgen/libsrc/general/array.hpp
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;
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;
23 return ((T*)data)[i-1];
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;
34 return ((const T*)data)[i-1];
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;
47 inline ostream & operator<< (ostream & s, const FlatArray<T,BASE,TIND> & a)
49 for (TIND i = a.Begin(); i < a.End(); i++)
50 - s << i << ": " << a[i] << endl;
51 + s << i << ": " << a[i] << std::endl;
56 inline ostream & operator<< (ostream & s, const IndirectArray<T1,T2> & ia)
58 for (int i = ia.Begin(); i < ia.End(); i++)
59 - s << i << ": " << ia[i] << endl;
60 + s << i << ": " << ia[i] << std::endl;
65 void PrintMemInfo (ostream & ost) const
67 ost << Size() << " elements of size " << sizeof(T) << " = "
68 - << Size() * sizeof(T) << endl;
69 + << Size() * sizeof(T) << std::endl;
72 MoveableArray & operator= (const T & el)
74 inline ostream & operator<< (ostream & ost, MoveableArray<T> & a)
76 for (int i = 0; i < a.Size(); i++)
77 - ost << i << ": " << a[i] << endl;
78 + ost << i << ": " << a[i] << std::endl;
82 --- netgen_ref/libsrc/gprim/spline.hpp
83 +++ netgen/libsrc/gprim/spline.hpp
85 /// returns a (not necessarily unit-length) tangent vector for 0 <= t <= 1
86 virtual Vec<D> GetTangent (const double t) const
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;
94 virtual string GetType(void) const {return "splinebase";}
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;}
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;}
108 for ( int i=0; i<6; i++)
115 @@ -430,11 +430,11 @@
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;
122 double cosalpha = v1*v2/(l1*l2);
124 - (*testout) << "cosalpha " << cosalpha << endl;
125 + (*testout) << "cosalpha " << cosalpha << std::endl;
127 return sqrt(cosalpha + 1.)/(min2(l1,l2)*(1.-cosalpha));
129 --- netgen_ref/libsrc/occ/occgenmesh.cpp
130 +++ netgen/libsrc/occ/occgenmesh.cpp
132 prop->SetParameters (parmid.X(), parmid.Y());
133 if (!prop->IsCurvatureDefined())
135 - (*testout) << "curvature not defined!" << endl;
136 + (*testout) << "curvature not defined!" << std::endl;
139 curvature = max(fabs(prop->MinCurvature()),
141 prop->SetParameters (par0.X(), par0.Y());
142 if (!prop->IsCurvatureDefined())
144 - (*testout) << "curvature not defined!" << endl;
145 + (*testout) << "curvature not defined!" << std::endl;
148 curvature = max(curvature,max(fabs(prop->MinCurvature()),
150 prop->SetParameters (par1.X(), par1.Y());
151 if (!prop->IsCurvatureDefined())
153 - (*testout) << "curvature not defined!" << endl;
154 + (*testout) << "curvature not defined!" << std::endl;
157 curvature = max(curvature,max(fabs(prop->MinCurvature()),
158 @@ -149,17 +149,17 @@
159 prop->SetParameters (par2.X(), par2.Y());
160 if (!prop->IsCurvatureDefined())
162 - (*testout) << "curvature not defined!" << endl;
163 + (*testout) << "curvature not defined!" << std::endl;
166 curvature = max(curvature,max(fabs(prop->MinCurvature()),
167 fabs(prop->MaxCurvature())));
169 - //(*testout) << "curvature " << curvature << endl;
170 + //(*testout) << "curvature " << curvature << std::endl;
172 if (curvature < 1e-3)
174 - //(*testout) << "curvature too small (" << curvature << ")!" << endl;
175 + //(*testout) << "curvature too small (" << curvature << ")!" << std::endl;
177 // return war bis 10.2.05 auskommentiert
179 @@ -177,13 +177,13 @@
181 if (h < maxside && depth < 10)
183 - //cout << "\r h " << h << flush;
184 + //std::cout << "\r h " << h << flush;
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;
198 p3d = Point3d(pnt2.X(), pnt2.Y(), pnt2.Z());
199 mesh.RestrictLocalH (p3d, h);
201 - //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl;
202 + //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << std::endl;
207 pnt.Distance(oldpnt));
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;
213 //olddist = dist; -- useless variables
214 //dist = pnt.Distance(oldpnt);
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;
222 } while (i < nsubedges);
226 if (params[nsubedges] <= params[nsubedges-1])
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";
237 - (*testout) << "edge meshing" << endl;
238 + (*testout) << "edge meshing" << std::endl;
240 int nvertices = geom.vmap.Extent();
241 int nedges = geom.emap.Extent();
243 - (*testout) << "nvertices = " << nvertices << endl;
244 - (*testout) << "nedges = " << nedges << endl;
245 + (*testout) << "nvertices = " << nvertices << std::endl;
246 + (*testout) << "nedges = " << nedges << std::endl;
248 double eps = 1e-6 * geom.GetBoundingBox().Diam();
249 const double eps2 = eps * eps; // -- small optimization
254 - (*testout) << "different vertices = " << mesh.GetNP() << endl;
255 + (*testout) << "different vertices = " << mesh.GetNP() << std::endl;
258 int first_ep = mesh.GetNP()+1;
261 edgenr = mesh.GetNSeg(); // to support SALOME sub-meshes
263 - (*testout) << "faces = " << geom.fmap.Extent() << endl;
264 + (*testout) << "faces = " << geom.fmap.Extent() << std::endl;
267 for (int i3 = 1; i3 <= geom.fmap.Extent(); i3++)
269 for (TopExp_Explorer exp3 (wire, TopAbs_EDGE); exp3.More(); exp3.Next())
272 - (*testout) << "edge nr " << curr << endl;
273 + (*testout) << "edge nr " << curr << std::endl;
275 multithread.percent = 100 * curr / double (total);
276 if (multithread.terminate) return;
278 TopoDS_Edge edge = TopoDS::Edge (exp3.Current());
279 if (BRep_Tool::Degenerated(edge))
281 - //(*testout) << "ignoring degenerated edge" << endl;
282 + //(*testout) << "ignoring degenerated edge" << std::endl;
285 if ( geom.emap.FindIndex(edge) < 1 ) continue; // to support SALOME sub-meshes
288 if (system.Mass() < eps)
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;
297 @@ -612,13 +612,13 @@
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();
306 - (*testout) << "NP = " << mesh.GetNP() << endl;
307 + (*testout) << "NP = " << mesh.GetNP() << std::endl;
309 - //(*testout) << pnums[pnums.Size()-1] << endl;
310 + //(*testout) << pnums[pnums.Size()-1] << std::endl;
312 for (int i = 1; i <= mp.Size()+1; i++)
316 if (occface->IsUPeriodic())
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())))
325 if (occface->IsVPeriodic())
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())))
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;
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 @@
343 if(1==0 && !geom.fvispar[k-1].IsDrawable())
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;
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;
361 - cout << "skipped" << endl;
362 + std::cout << "skipped" << std::endl;
366 @@ -768,12 +768,12 @@
367 PrintMessage (2, "Face ", k, " / ", mesh.GetNFD(), " (parameter space projection)");
370 - cout << "Surface meshing error occured before (in " << surfmesherror << " faces)" << endl;
371 + std::cout << "Surface meshing error occured before (in " << surfmesherror << " faces)" << std::endl;
373 // Meshing2OCCSurfaces meshing(f2, bb);
374 meshing.SetStartTime (starttime);
376 - //(*testout) << "Face " << k << endl << endl;
377 + //(*testout) << "Face " << k << std::endl << std::endl;
380 if (meshing.GetProjectionType() == PLANESPACE)
382 gi1.v = seg.epgeominfo[1].v;
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;
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;
403 @@ -899,13 +899,13 @@
405 catch (SingularMatrixException)
407 - (*myerr) << "Singular Matrix" << endl;
408 + (*myerr) << "Singular Matrix" << std::endl;
409 res = MESHING2_GIVEUP;
412 catch (UVBoundsException)
414 - (*myerr) << "UV bounds exceeded" << endl;
415 + (*myerr) << "UV bounds exceeded" << std::endl;
416 res = MESHING2_GIVEUP;
423 - cout << "retry Surface " << k << endl;
424 + std::cout << "retry Surface " << k << std::endl;
428 @@ -949,18 +949,18 @@
430 // ofstream problemfile("occmesh.rep");
432 -// problemfile << "SURFACEMESHING" << endl << endl;
433 +// problemfile << "SURFACEMESHING" << std::endl << std::endl;
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)
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() )
453 @@ -972,21 +972,21 @@
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;
462 -// problemfile << endl;
463 +// problemfile << std::endl;
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");
475 -// problemfile << "OK" << endl << endl;
476 +// problemfile << "OK" << std::endl << std::endl;
477 // problemfile.close();
480 @@ -1006,7 +1006,7 @@
481 // if (k != 42) continue;
482 // if (k != 36) continue;
484 - // (*testout) << "optimize face " << k << endl;
485 + // (*testout) << "optimize face " << k << std::endl;
486 multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL);
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++)
493 - // (*testout) << "optstep " << i << endl;
494 + // (*testout) << "optstep " << i << std::endl;
495 if (multithread.terminate) return;
498 @@ -1025,7 +1025,7 @@
499 //meshopt.SetMetricWeight (0.2);
500 meshopt.SetWriteStatus (0);
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));
507 @@ -1038,7 +1038,7 @@
508 meshopt.SetMetricWeight (mparam.elsizeweight);
509 meshopt.SetWriteStatus (0);
511 - // (*testout) << "ImproveMesh (mesh)" << endl;
512 + // (*testout) << "ImproveMesh (mesh)" << std::endl;
513 meshopt.ImproveMesh (mesh, mparam);
516 @@ -1050,7 +1050,7 @@
517 meshopt.SetMetricWeight (mparam.elsizeweight);
518 meshopt.SetWriteStatus (0);
520 - // (*testout) << "CombineImprove (mesh)" << endl;
521 + // (*testout) << "CombineImprove (mesh)" << std::endl;
522 meshopt.CombineImprove (mesh);
525 @@ -1063,7 +1063,7 @@
526 meshopt.SetMetricWeight (mparam.elsizeweight);
527 meshopt.SetWriteStatus (0);
529 - // (*testout) << "ImproveMesh (mesh)" << endl;
530 + // (*testout) << "ImproveMesh (mesh)" << std::endl;
531 meshopt.ImproveMesh (mesh, mparam);
534 @@ -1132,7 +1132,7 @@
536 if (len < mincurvelength)
538 - (*testout) << "ignored" << endl;
539 + (*testout) << "ignored" << std::endl;
543 @@ -1212,7 +1212,7 @@
545 mesh.RestrictLocalH (Point3d(pnt.X(), pnt.Y(), pnt.Z()), ComputeH (fabs(curvature)));
547 - // (*testout) << "edge " << i << " max. curvature: " << maxcur << endl;
548 + // (*testout) << "edge " << i << " max. curvature: " << maxcur << std::endl;
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;
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;
565 @@ -1347,8 +1347,8 @@
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;
576 @@ -1398,7 +1398,7 @@
577 OCCFindEdges (geom, *mesh);
580 - cout << "Removing redundant points" << endl;
581 + std::cout << "Removing redundant points" << std::endl;
584 int np = mesh->GetNP();
585 @@ -1419,7 +1419,7 @@
586 for (i = 1; i <= np; i++)
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++)
593 Segment & seg = mesh->LineSegment(j);
594 @@ -1428,14 +1428,14 @@
598 - cout << "Removing degenerated segments" << endl;
599 + std::cout << "Removing degenerated segments" << std::endl;
600 for (j = 1; j <= mesh->GetNSeg(); j++)
602 Segment & seg = mesh->LineSegment(j);
603 if (seg[0] == seg[1])
605 mesh->DeleteSegment(j);
606 - cout << "Deleting Segment " << j << endl;
607 + std::cout << "Deleting Segment " << j << std::endl;
611 @@ -1451,15 +1451,15 @@
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;
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;
631 @@ -1472,15 +1472,15 @@
632 if (multithread.terminate) return TCL_OK;
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;
644 (*statout) << mesh->GetNSeg() << " & "
645 << mesh->GetNSE() << " & - &"
646 - << GetTime() << " & " << endl;
647 + << GetTime() << " & " << std::endl;
650 // MeshQuality2d (*mesh);
651 @@ -1499,12 +1499,12 @@
653 ofstream problemfile("occmesh.rep",ios_base::app);
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;
661 - problemfile << "OK" << endl
662 - << mesh->GetNE() << " elements" << endl << endl;
663 + problemfile << "OK" << std::endl
664 + << mesh->GetNE() << " elements" << std::endl << std::endl;
668 @@ -1523,9 +1523,9 @@
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;
681 @@ -1542,26 +1542,26 @@
683 (*statout) << GetTime() << " & "
684 << mesh->GetNE() << " & "
685 - << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << endl;
686 + << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << std::endl;
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;
698 - // cout << "Optimization complete" << endl;
699 + // std::cout << "Optimization complete" << std::endl;
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;
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;
717 --- netgen_ref/libsrc/occ/occgeom.cpp
718 +++ netgen/libsrc/occ/occgeom.cpp
722 for (e.Init(shape, TopAbs_COMPSOLID); e.More(); e.Next()) count++;
723 - cout << "CompSolids: " << count << endl;
724 + std::cout << "CompSolids: " << count << std::endl;
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;
741 cont.Perform(geom->shape);
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;
762 for (e.Init(geom->shape, TopAbs_COMPOUND); e.More(); e.Next())
764 - (*testout) << "Compounds: " << count << endl;
765 + (*testout) << "Compounds: " << count << std::endl;
768 for (e.Init(geom->shape, TopAbs_COMPSOLID); e.More(); e.Next())
770 - (*testout) << "CompSolids: " << count << endl;
771 + (*testout) << "CompSolids: " << count << std::endl;
773 - (*testout) << endl;
774 + (*testout) << std::endl;
776 - cout << "Highest entry in topology hierarchy: " << endl;
777 + std::cout << "Highest entry in topology hierarchy: " << std::endl;
779 - cout << count << " composite solid(s)" << endl;
780 + std::cout << count << " composite solid(s)" << std::endl;
782 if (geom->somap.Extent())
783 - cout << geom->somap.Extent() << " solid(s)" << endl;
784 + std::cout << geom->somap.Extent() << " solid(s)" << std::endl;
786 if (geom->shmap.Extent())
787 - cout << geom->shmap.Extent() << " shells(s)" << endl;
788 + std::cout << geom->shmap.Extent() << " shells(s)" << std::endl;
790 if (geom->fmap.Extent())
791 - cout << geom->fmap.Extent() << " face(s)" << endl;
792 + std::cout << geom->fmap.Extent() << " face(s)" << std::endl;
794 if (geom->wmap.Extent())
795 - cout << geom->wmap.Extent() << " wire(s)" << endl;
796 + std::cout << geom->wmap.Extent() << " wire(s)" << std::endl;
798 if (geom->emap.Extent())
799 - cout << geom->emap.Extent() << " edge(s)" << endl;
800 + std::cout << geom->emap.Extent() << " edge(s)" << std::endl;
802 if (geom->vmap.Extent())
803 - cout << geom->vmap.Extent() << " vertices(s)" << endl;
804 + std::cout << geom->vmap.Extent() << " vertices(s)" << std::endl;
806 - cout << "no entities" << endl;
807 + std::cout << "no entities" << std::endl;
811 @@ -145,11 +145,11 @@
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;
821 - cout << endl << "- repairing faces" << endl;
822 + std::cout << std::endl << "- repairing faces" << std::endl;
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))
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();
849 rebuild->Replace(face, newface);
854 - cout << endl << "- fixing small edges" << endl;
855 + std::cout << std::endl << "- fixing small edges" << std::endl;
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)))
863 - cout << "Fixed small edge in wire " << wmap.FindIndex (oldwire) << endl;
864 + std::cout << "Fixed small edge in wire " << wmap.FindIndex (oldwire) << std::endl;
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;
884 replace = sfw->FixEdgeCurves() || replace;
887 BRepGProp::LinearProperties(edge, system);
888 if (system.Mass() < tolerance)
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);
898 @@ -344,12 +344,12 @@
900 if (sfwf->FixWireGaps())
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;
916 sfwf->SetPrecision(tolerance);
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;
926 @@ -368,10 +368,10 @@
928 if (sfwf->FixSmallEdges())
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;
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;
951 if (fixspotstripfaces)
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);
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;
972 - cout << endl << "- sewing faces" << endl;
973 + std::cout << std::endl << "- sewing faces" << std::endl;
975 BRepOffsetAPI_Sewing sewedObj(tolerance);
978 if (!sewedObj.SewedShape().IsNull())
979 shape = sewedObj.SewedShape();
981 - cout << " not possible";
982 + std::cout << " not possible";
990 - cout << endl << "- making solids" << endl;
991 + std::cout << std::endl << "- making solids" << std::endl;
993 BRepBuilderAPI_MakeSolid ms;
999 - cout << " not possible (no shells)" << endl;
1000 + std::cout << " not possible (no shells)" << std::endl;
1005 //delete sfs; sfs = NULL;
1008 - cout << " not possible" << endl;
1009 + std::cout << " not possible" << std::endl;
1015 if (splitpartitions)
1017 - cout << "- running SALOME partition splitter" << endl;
1018 + std::cout << "- running SALOME partition splitter" << std::endl;
1021 Partition_Spliter ps;
1022 @@ -527,13 +527,13 @@
1026 - cout << " before: " << count << " solids" << endl;
1027 + std::cout << " before: " << count << " solids" << std::endl;
1030 for (e2.Init (shape, TopAbs_SOLID);
1031 e2.More(); e2.Next()) count++;
1033 - cout << " after : " << count << " solids" << endl;
1034 + std::cout << " after : " << count << " solids" << std::endl;
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;
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++;
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;
1061 - cout << "Totol surface area : " << newsurfacecont << " (" << surfacecont << ")" << 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;
1078 @@ -605,12 +605,12 @@
1079 exp0.More(); exp0.Next())
1081 TopoDS_Compound compound = TopoDS::Compound (exp0.Current());
1082 - (*testout) << "compound" << endl;
1083 + (*testout) << "compound" << std::endl;
1085 for (exp1.Init(compound, TopAbs_SHELL);
1086 exp1.More(); exp1.Next())
1088 - (*testout) << "shell " << ++i << endl;
1089 + (*testout) << "shell " << ++i << std::endl;
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())
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;
1109 for (exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next())
1113 void OCCGeometry :: SewFaces ()
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;
1120 BRepOffsetAPI_Sewing sewedObj(1);
1122 @@ -866,10 +866,10 @@
1123 if (!sewedObj.SewedShape().IsNull())
1125 shape = sewedObj.SewedShape();
1126 - cout << " done" << endl;
1127 + std::cout << " done" << std::endl;
1130 - cout << " not possible";
1131 + std::cout << " not possible";
1137 TopExp_Explorer exp0;
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;
1144 BRepBuilderAPI_MakeSolid ms;
1150 - cout << " not possible (no shells)" << endl;
1151 + std::cout << " not possible (no shells)" << std::endl;
1155 @@ -922,10 +922,10 @@
1159 - cout << " done" << endl;
1160 + std::cout << " done" << std::endl;
1163 - cout << " not possible" << endl;
1164 + std::cout << " not possible" << std::endl;
1168 @@ -933,12 +933,12 @@
1170 void OCCGeometry :: BuildVisualizationMesh (double deflection)
1172 - cout << "Preparing visualization (deflection = " << deflection << ") ... " << flush;
1173 + std::cout << "Preparing visualization (deflection = " << deflection << ") ... " << flush;
1175 BRepTools::Clean (shape);
1176 // BRepMesh_IncrementalMesh::
1177 BRepMesh_IncrementalMesh (shape, deflection, true);
1178 - cout << "done" << endl;
1179 + std::cout << "done" << std::endl;
1184 Point<3> p1 = Point<3> (x1,y1,z1);
1185 Point<3> p2 = Point<3> (x2,y2,z2);
1187 - (*testout) << "Bounding Box = [" << p1 << " - " << p2 << "]" << endl;
1188 + (*testout) << "Bounding Box = [" << p1 << " - " << p2 << "]" << std::endl;
1189 boundingbox = Box<3> (p1,p2);
1193 bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const
1196 - if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;
1197 + if (++cnt % 1000 == 0) std::cout << "Project cnt = " << cnt << std::endl;
1199 gp_Pnt pnt(p(0), p(1), p(2));
1201 @@ -1065,7 +1065,7 @@
1203 // } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
1205 - // // (*testout) << "FastProject count: " << count << endl;
1206 + // // (*testout) << "FastProject count: " << count << std::endl;
1208 // if (count == 50) return false;
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)
1214 - //cout << "Projection fails" << endl;
1215 + //std::cout << "Projection fails" << std::endl;
1219 @@ -1093,14 +1093,14 @@
1221 void OCCGeometry :: WriteOCC_STL(char * filename)
1223 - cout << "writing stl..."; cout.flush();
1224 + std::cout << "writing stl..."; std::cout.flush();
1225 StlAPI_Writer writer;
1226 //writer.RelativeMode() = Standard_False;
1228 //writer.SetDeflection(0.02);
1229 writer.Write(shape,filename);
1231 - cout << "done" << endl;
1232 + std::cout << "done" << std::endl;
1236 @@ -1379,7 +1379,7 @@
1238 count2 = vmap.FindIndex(TopoDS::Vertex(e.Current())); break;
1240 - cout << "RecursiveTopologyTree: Case " << e.Current().ShapeType() << " not handeled" << endl;
1241 + std::cout << "RecursiveTopologyTree: Case " << e.Current().ShapeType() << " not handeled" << std::endl;
1244 int nrsubshapes = 0;
1245 @@ -1414,7 +1414,7 @@
1247 void OCCGeometry :: GetTopologyTree (stringstream & str)
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");
1258 - // cout << "done" << endl;
1259 + // std::cout << "done" << std::endl;
1263 @@ -1449,7 +1449,7 @@
1264 int twistedfaces = 0;
1265 // int edgessamebutnotidentified = 0;
1267 - cout << "checking faces ... " << flush;
1268 + std::cout << "checking faces ... " << flush;
1271 for (i = 1; i <= fmap.Extent(); i++)
1272 @@ -1462,7 +1462,7 @@
1274 str << "SpotFace {Spot face} ";
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 << " } ";
1281 @@ -1472,7 +1472,7 @@
1282 if (!stripsupportfaces++)
1283 str << "StripSupportFace {Strip support face} ";
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 << " } ";
1290 @@ -1483,7 +1483,7 @@
1291 str << "SingleStripFace {Single strip face} ";
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 @@
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} ";
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)} ";
1317 @@ -1521,7 +1521,7 @@
1318 if (!smoothpinfaces++)
1319 str << "SmoothPinFace {Smooth pin face} ";
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 << " } ";
1326 @@ -1530,7 +1530,7 @@
1327 if (!stretchedpinfaces++)
1328 str << "StretchedPinFace {Stretched pin face} ";
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 << " } ";
1335 @@ -1542,14 +1542,14 @@
1336 if (!twistedfaces++)
1337 str << "TwistedFace {Twisted face} ";
1339 - (*testout) << "Face " << i << " is twisted" << endl;
1340 + (*testout) << "Face " << i << " is twisted" << std::endl;
1341 str << "TwistedFace/Face" << i << " ";
1342 str << "{Face " << i << " } ";
1346 - cout << "done" << endl;
1347 - cout << "checking edges ... " << flush;
1348 + std::cout << "done" << std::endl;
1349 + std::cout << "checking edges ... " << flush;
1353 @@ -1577,7 +1577,7 @@
1357 - cout << "done" << endl;
1358 + std::cout << "done" << std::endl;
1362 @@ -1651,11 +1651,11 @@
1364 void OCCParameters :: Print(ostream & ost) const
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;
1377 --- netgen_ref/libsrc/occ/occgeom.hpp
1378 +++ netgen/libsrc/occ/occgeom.hpp
1381 OCCSurface GetSurface (int surfi)
1383 - cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
1384 + std::cout << "OCCGeometry::GetSurface using PLANESPACE" << std::endl;
1385 return OCCSurface (TopoDS::Face(fmap(surfi)), PLANESPACE);
1388 --- netgen_ref/libsrc/occ/occmeshsurf.cpp
1389 +++ netgen/libsrc/occ/occmeshsurf.cpp
1390 @@ -111,13 +111,13 @@
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;
1400 if (orient == TopAbs_REVERSED) n = -1*n;
1401 - // (*testout) << "GetNormalVector" << endl;
1402 + // (*testout) << "GetNormalVector" << std::endl;
1410 - //cout << "p1 = " << p1 << endl;
1411 - //cout << "p2 = " << p2 << endl;
1412 + //std::cout << "p1 = " << p1 << std::endl;
1413 + //std::cout << "p2 = " << p2 << std::endl;
1415 GetNormalVector (p1, geominfo1, ez);
1419 ey = Cross (ez, ex);
1421 - //cout << "ex " << ex << " ey " << ey << " ez " << ez << endl;
1422 + //std::cout << "ex " << ex << " ey " << ey << " ez " << ez << std::endl;
1427 D1(0,1) = dv.X(); D1(1,1) = dv.Y(); D1(2,1) = dv.Z();
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;
1438 Transpose (D1, D1T);
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;
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 @@
1459 if (projecttype == PLANESPACE)
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;
1467 - // cout << "proj : " << p3d << endl;
1468 + // std::cout << "proj : " << p3d << std::endl;
1472 @@ -325,11 +325,11 @@
1473 void OCCSurface :: Project (Point<3> & p, PointGeomInfo & gi)
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;
1479 gp_Pnt pnt(p(0), p(1), p(2));
1481 - //(*testout) << "pnt = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << endl;
1482 + //(*testout) << "pnt = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << std::endl;
1488 if (!proj.NbPoints())
1490 - cout << "Project Point on Surface FAIL" << endl;
1491 + std::cout << "Project Point on Surface FAIL" << std::endl;
1492 throw UVBoundsException();
1495 @@ -347,13 +347,13 @@
1499 - cout << "NP = " << proj.NbPoints() << endl;
1500 + std::cout << "NP = " << proj.NbPoints() << std::endl;
1502 for (int i = 1; i <= proj.NbPoints(); i++)
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;
1513 pnt = occface->Value( u, v );
1515 - //(*testout) << "pnt(proj) = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << endl;
1516 + //(*testout) << "pnt(proj) = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << std::endl;
1521 GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const
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;
1528 gp_Pnt pnt(p(0), p(1), p(2));
1531 if (proj.NbPoints() < 1)
1533 - cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1535 - cout << p << endl;
1536 + std::cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1538 + std::cout << p << std::endl;
1545 if (!occface->IsCNu (1) || !occface->IsCNv (1))
1546 - (*testout) << "SurfOpt: Differentiation FAIL" << endl;
1547 + (*testout) << "SurfOpt: Differentiation FAIL" << std::endl;
1550 n = Cross (Vec3d(du.X(), du.Y(), du.Z()),
1553 if (proj.NbPoints() < 1)
1555 - cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1557 - cout << p << endl;
1558 + std::cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
1560 + std::cout << p << std::endl;
1566 if (!geometry.FastProject (surfi, hnewp, u, v))
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);
1575 if (!geometry.FastProject (surfi, p, gi.u, gi.v))
1577 - cout << "Fast projection to surface fails! Using OCC projection" << endl;
1578 + std::cout << "Fast projection to surface fails! Using OCC projection" << std::endl;
1580 geometry.Project (surfi, p, u, v);
1582 --- netgen_ref/nglib/nglib.cpp
1583 +++ netgen/nglib/nglib.cpp
1585 // initialize, deconstruct Netgen library:
1586 DLL_HEADER void Ng_Init ()
1590 + mycout = &std::cout;
1591 + myerr = &std::cerr;
1592 // netgen::testout->SetOutStream (new ofstream ("test.out"));
1593 testout = new ofstream ("test.out");
1597 MeshFromSpline2D (*(SplineGeometry2d*)geom, m, mparam);
1599 - cout << m->GetNSE() << " elements, " << m->GetNP() << " points" << endl;
1600 + std::cout << m->GetNSE() << " elements, " << m->GetNP() << " points" << std::endl;
1602 *mesh = (Ng_Mesh*)m;
1606 for (int i = 1; i <= readedges.Size(); i+=2)
1608 - cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl;
1609 + std::cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << std::endl;
1612 geo->AddEdges(readedges);
1613 @@ -707,22 +707,22 @@
1614 int retval = STLSurfaceMeshing (*stlgeometry, *me);
1615 if (retval == MESHING3_OK)
1617 - (*mycout) << "Success !!!!" << endl;
1618 + (*mycout) << "Success !!!!" << std::endl;
1619 stlgeometry->surfacemeshed = 1;
1620 stlgeometry->surfaceoptimized = 0;
1621 stlgeometry->volumemeshed = 0;
1623 else if (retval == MESHING3_OUTERSTEPSEXCEEDED)
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;
1628 else if (retval == MESHING3_TERMINATE)
1630 - (*mycout) << "Meshing Stopped!" << endl;
1631 + (*mycout) << "Meshing Stopped!" << std::endl;
1635 - (*mycout) << "ERROR: Surface meshing not successful. Meshing aborted!" << endl;
1636 + (*mycout) << "ERROR: Surface meshing not successful. Meshing aborted!" << std::endl;
1640 @@ -1179,7 +1179,7 @@
1642 DLL_HEADER void MyError (const char * ch)