1 diff -N -r -u netgen43/libsrc/general/array.hpp netgen-4.3/libsrc/general/array.hpp
2 --- netgen43/libsrc/general/array.hpp 2003-05-07 18:01:43.000000000 +0400
3 +++ netgen-4.3/libsrc/general/array.hpp 2005-05-31 16:43:28.000000000 +0400
5 explicit ARRAY (const ARRAY<T> & a2)
6 : FlatArray<T> (a2.Size(), a2.Size() ? new T[a2.Size()] : 0)
9 + allocsize = this->size;
11 - for (int i = 0; i < size; i++)
12 + for (int i = 0; i < this->size; i++)
21 + delete [] this->data;
24 /// Change logical size. If necessary, do reallocation. Keeps contents.
27 if (nsize > allocsize)
33 /// Change physical size. Keeps logical size. Keeps contents.
35 /// Add element at end of array. reallocation if necessary.
36 int Append (const T & el)
38 - if (size == allocsize)
43 + if (this->size == allocsize)
44 + ReSize (this->size+1);
45 + this->data[this->size] = el;
55 - data[i-1] = data[size-1];
57 + this->data[i-1] = this->data[this->size-1];
61 /// Delete last element.
74 - size = allocsize = 0;
75 + delete [] this->data;
77 + this->size = allocsize = 0;
80 /// Fill array with val
82 ARRAY & operator= (const ARRAY & a2)
85 - for (int i = 0; i < size; i++)
86 + for (int i = 0; i < this->size; i++)
91 int nsize = 2 * allocsize;
92 if (nsize < minsize) nsize = minsize;
99 - int mins = (nsize < size) ? nsize : size;
100 - memcpy (p, data, mins * sizeof(T));
101 + int mins = (nsize < this->size) ? nsize : this->size;
102 + memcpy (p, this->data, mins * sizeof(T));
106 + delete [] this->data;
113 - data = new T[nsize];
114 + this->data = new T[nsize];
119 explicit ArrayMem(int asize = 0)
123 + this->SetSize (asize);
126 ArrayMem & operator= (const T & val)
127 diff -N -r -u netgen43/libsrc/gprim/geomobjects.hpp netgen-4.3/libsrc/gprim/geomobjects.hpp
128 --- netgen43/libsrc/gprim/geomobjects.hpp 2003-05-07 18:01:43.000000000 +0400
129 +++ netgen-4.3/libsrc/gprim/geomobjects.hpp 2005-05-31 16:45:53.000000000 +0400
130 @@ -296,11 +296,11 @@
134 - sbox.pmax(i) = pmax(i);
135 + sbox.pmax(i) = this->pmax(i);
139 - sbox.pmin(i) = pmin(i);
140 + sbox.pmin(i) = this->pmin(i);
143 sbox.c(i) = 0.5 * (sbox.pmin(i) + sbox.pmax(i));
144 @@ -315,12 +315,12 @@
145 void CalcDiamCenter ()
147 c = Box<D>::Center ();
148 - diam = Dist (pmin, pmax);
149 + diam = Dist (this->pmin, this->pmax);
151 - inner = pmax(0) - pmin(0);
152 + inner = this->pmax(0) - this->pmin(0);
153 for (int i = 1; i < D; i++)
154 - if (pmax(i) - pmin(i) < inner)
155 - inner = pmax(i) - pmin(i);
156 + if (this->pmax(i) - this->pmin(i) < inner)
157 + inner = this->pmax(i) - this->pmin(i);
161 diff -N -r -u netgen43/libsrc/include/spline2d.hpp netgen-4.3/libsrc/include/spline2d.hpp
162 --- netgen43/libsrc/include/spline2d.hpp 1970-01-01 03:00:00.000000000 +0300
163 +++ netgen-4.3/libsrc/include/spline2d.hpp 2004-03-30 16:02:24.000000000 +0400
165 +#include "../geom2d/spline2d.hpp"
166 diff -N -r -u netgen43/libsrc/include/splinegeometry2.hpp netgen-4.3/libsrc/include/splinegeometry2.hpp
167 --- netgen43/libsrc/include/splinegeometry2.hpp 1970-01-01 03:00:00.000000000 +0300
168 +++ netgen-4.3/libsrc/include/splinegeometry2.hpp 2004-03-30 16:02:24.000000000 +0400
170 +#include "../geom2d/splinegeometry2.hpp"
171 diff -N -r -u netgen43/libsrc/interface/Makefile netgen-4.3/libsrc/interface/Makefile
172 --- netgen43/libsrc/interface/Makefile 2003-05-07 18:01:43.000000000 +0400
173 +++ netgen-4.3/libsrc/interface/Makefile 2004-03-30 16:02:24.000000000 +0400
175 -src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp
176 +src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp nglib.cpp ngnewdelete.cpp
179 libpath = libsrc/interface
180 diff -N -r -u netgen43/libsrc/interface/nglib.cpp netgen-4.3/libsrc/interface/nglib.cpp
181 --- netgen43/libsrc/interface/nglib.cpp 2003-05-07 18:01:43.000000000 +0400
182 +++ netgen-4.3/libsrc/interface/nglib.cpp 2004-03-30 16:02:24.000000000 +0400
189 + char geomfilename [100];
191 + //Destination for messages, errors, ...
192 + void Ng_PrintDest(const char * s)
194 + (*mycout) << s << flush;
197 +#include <spline2d.hpp>
198 +#include <splinegeometry2.hpp>
201 using namespace netgen;
203 // constants and types:
207 // FlexLexer * lexer;
208 -char geomfilename [100];
211 // 2D Meshing Functions:
214 cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl;
217 - geo->AddEdges(readedges);
219 + ARRAY< Point<3> > readedges1;
221 + for (i = 1; i <= readedges.Size(); i++)
223 + Point3d readedgesData = readedges.Get(i);
224 + Point <3> readedges1Data = Point<3>(readedgesData.X(),readedgesData.Y(),readedgesData.Z());
226 + readedges1.Append(readedges1Data);
229 + geo->AddEdges(readedges1);
232 if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK;
234 n = Vec3d(nv[0],nv[1],nv[2]);
237 - readtrias.Append(STLReadTriangle(apts,n));
239 + apts1[0] = Point<3>(p1[0],p1[1],p1[2]);
240 + apts1[1] = Point<3>(p2[0],p2[1],p2[2]);
241 + apts1[2] = Point<3>(p3[0],p3[1],p3[2]);
243 + Vec<3> n1 = Vec<3>(n.X(),n.Y(),n.Z());
245 + readtrias.Append(STLReadTriangle(apts1,n1));
248 // add (optional) edges:
249 @@ -487,30 +517,29 @@
251 // compatibility functions:
253 -void MyError (const char * ch)
254 +void netgen::MyError (const char * ch)
259 -//Destination for messages, errors, ...
260 -void Ng_PrintDest(const char * s)
262 - (*mycout) << s << flush;
267 +double netgen::GetTime ()
273 +void netgen::ResetTime ()
279 +void netgen::MyBeep (int i)
284 +void MeshFromSpline2D (SplineGeometry2d & geometry,
286 + MeshingParameters & mp)
288 + MeshFromSpline2D (geometry, mesh, mp);
290 diff -N -r -u netgen43/libsrc/makefile.mach.LINUX netgen-4.3/libsrc/makefile.mach.LINUX
291 --- netgen43/libsrc/makefile.mach.LINUX 2003-05-07 18:01:43.000000000 +0400
292 +++ netgen-4.3/libsrc/makefile.mach.LINUX 2004-03-30 16:02:24.000000000 +0400
296 # pg stands for profiling - also in linkflags2
297 -CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
298 +#CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
299 +CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX
300 # -fomit-frame-pointer
303 diff -N -r -u netgen43/libsrc/meshing/improve2.cpp netgen-4.3/libsrc/meshing/improve2.cpp
304 --- netgen43/libsrc/meshing/improve2.cpp 2003-05-07 18:01:43.000000000 +0400
305 +++ netgen-4.3/libsrc/meshing/improve2.cpp 2004-03-30 16:02:24.000000000 +0400
307 #include "meshing.hpp"
310 -#include <visual.hpp>
311 +/*#include <visual.hpp>*/
315 diff -N -r -u netgen43/libsrc/meshing/meshing2.cpp netgen-4.3/libsrc/meshing/meshing2.cpp
316 --- netgen43/libsrc/meshing/meshing2.cpp 2003-05-07 18:01:43.000000000 +0400
317 +++ netgen-4.3/libsrc/meshing/meshing2.cpp 2004-03-30 16:02:24.000000000 +0400
318 @@ -1785,7 +1785,7 @@
322 -void glrender (int wait)
323 +void netgen::glrender (int wait)
327 diff -N -r -u netgen43/libsrc/visualization/stlmeshing.cpp netgen-4.3/libsrc/visualization/stlmeshing.cpp
328 --- netgen43/libsrc/visualization/stlmeshing.cpp 2003-05-07 18:01:43.000000000 +0400
329 +++ netgen-4.3/libsrc/visualization/stlmeshing.cpp 2004-03-30 16:02:24.000000000 +0400
331 #include <stlgeom.hpp>
333 #include <meshing.hpp>
334 -#include <visual.hpp>
335 +/*#include <visual.hpp>*/
339 diff -N -r -u netgen43/Makefile netgen-4.3/Makefile
340 --- netgen43/Makefile 2003-05-07 18:01:43.000000000 +0400
341 +++ netgen-4.3/Makefile 2004-03-30 16:02:24.000000000 +0400
346 -CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
347 +#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
348 +CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include
349 LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu
351 CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3)
352 diff -N -r -u netgen43/makeForSalome.sh netgen-4.3/makeForSalome.sh
353 --- netgen43/makeForSalome.sh 1970-01-01 03:00:00.000000000 +0300
354 +++ netgen-4.3/makeForSalome.sh 2004-03-11 16:52:17.000000000 +0300
357 +cp ngtcltk/ngnewdelete.* libsrc/interface/
362 +make -C libsrc/general
363 +make -C libsrc/geom2d
364 +make -C libsrc/gprim
365 +make -C libsrc/interface
366 +make -C libsrc/linalg
367 +make -C libsrc/meshing
369 +make -C libsrc/stlgeom
371 +if [ ! -d install ] ; then
377 +if [ ! -d install/include ] ; then
378 + mkdir install/include
381 +cp libsrc/interface/nglib.h install/include