summaryrefslogtreecommitdiff
path: root/cad/netgen/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2007-05-30 19:21:11 +0000
committerThierry Thomas <thierry@FreeBSD.org>2007-05-30 19:21:11 +0000
commitdb06906eac989a21750d18ce27c5893746338ae2 (patch)
tree102d84da11c449666d75b924fd3a9e76cca6f80e /cad/netgen/files
parentFix build with gcc4 (diff)
- Unbreak with gcc-4.2 (some patches from the author, some inspired from
Debian); - Add IGES and STEP support with OpenCascade.
Diffstat (limited to 'cad/netgen/files')
-rw-r--r--cad/netgen/files/patch-Makefile10
-rw-r--r--cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD10
-rw-r--r--cad/netgen/files/patch-libsrc_csg_csg.hpp11
-rw-r--r--cad/netgen/files/patch-libsrc_linalg_densemat.hpp10
-rw-r--r--cad/netgen/files/patch-libsrc_meshing_meshing.hpp11
-rw-r--r--cad/netgen/files/patch-libsrc_meshing_meshtype.hpp11
-rw-r--r--cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp10
-rw-r--r--cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp13
-rw-r--r--cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp11
-rw-r--r--cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp70
-rw-r--r--cad/netgen/files/patch-ngsolve_comp_postproc.cpp21
-rw-r--r--cad/netgen/files/patch-ngsolve_linalg_order.cpp11
-rw-r--r--cad/netgen/files/patch-ngsolve_linalg_order.hpp11
13 files changed, 203 insertions, 7 deletions
diff --git a/cad/netgen/files/patch-Makefile b/cad/netgen/files/patch-Makefile
index 1c7b286f9e42..09311a5c64d5 100644
--- a/cad/netgen/files/patch-Makefile
+++ b/cad/netgen/files/patch-Makefile
@@ -1,5 +1,5 @@
--- Makefile.orig Tue Nov 16 15:29:39 2004
-+++ Makefile Thu Nov 18 00:05:27 2004
++++ Makefile Mon May 28 22:20:53 2007
@@ -21,7 +21,7 @@
# system libraries:
#
@@ -18,7 +18,7 @@
# (maybe you have to remove -ldl)
#
#
-@@ -43,9 +43,9 @@
+@@ -43,12 +43,12 @@
# OCCINC_DIR=$(OCC_DIR)/inc
# OCCLIB_DIR=$(OCC_DIR)/lib
#
@@ -30,7 +30,11 @@
+#OCCLIB_DIR=$(OCC_DIR)/ros/lin/lib
# add libs in makefile.mach.$(MACHINE)
- # occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL
+-# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL
++# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -pthread
+ #
+ include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
+ #
@@ -58,7 +58,7 @@
#
#
diff --git a/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD b/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD
index c2f72da916e3..5632330da7a2 100644
--- a/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD
+++ b/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD
@@ -1,12 +1,12 @@
---- libsrc/makefile.mach.FREEBSD.orig Wed May 5 23:24:29 2004
-+++ libsrc/makefile.mach.FREEBSD Tue Jul 4 22:56:34 2006
-@@ -18,9 +18,15 @@
+--- ./libsrc/makefile.mach.FREEBSD.orig Wed May 5 23:24:29 2004
++++ ./libsrc/makefile.mach.FREEBSD Mon May 28 22:11:10 2007
+@@ -18,9 +18,17 @@
tcltklib = `echo $(TIX_BUILD_LIB_SPEC)` `echo $(TK_LIB_SPEC)` `echo $(TCL_LIB_FLAG)`
CFLAGS2 =
-CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I$(X11BASE)/include -DLINUX -DOPENGL
-CPLUSPLUSFLAGS3 = -I$(LIBSRC_DIR)/step `echo $(TCL_INCLUDE_SPEC)` `echo -I$(TK_PREFIX)`/include/tk`echo $(TK_VERSION)`
-+CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I$(X11BASE)/include -DLINUX -DOPENGL -DNGSOLVE \
++CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I$(X11BASE)/include -DFREEBSD -DOPENGL -DNGSOLVE \
+ -ftemplate-depth-99 -finline-limit=20000 \
+ -funroll-loops
+
@@ -18,3 +18,5 @@
+
+appngs = lib/$(MACHINE)/*.o -lngsolvebasic
+goalngs = goalngs
++
++# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -pthread
diff --git a/cad/netgen/files/patch-libsrc_csg_csg.hpp b/cad/netgen/files/patch-libsrc_csg_csg.hpp
new file mode 100644
index 000000000000..a190167a5388
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_csg_csg.hpp
@@ -0,0 +1,11 @@
+--- ./libsrc/csg/csg.hpp.orig Thu Oct 7 00:10:13 2004
++++ ./libsrc/csg/csg.hpp Tue May 29 22:54:13 2007
+@@ -22,7 +22,7 @@
+ #ifndef SMALLLIB
+ #define _INCLUDE_MORE
+ #endif
+-#ifdef LINUX
++#if defined(LINUX ) || defined(FREEBSD)
+ #define _INCLUDE_MORE
+ #endif
+
diff --git a/cad/netgen/files/patch-libsrc_linalg_densemat.hpp b/cad/netgen/files/patch-libsrc_linalg_densemat.hpp
new file mode 100644
index 000000000000..ec3d7c0b9d2e
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_linalg_densemat.hpp
@@ -0,0 +1,10 @@
+--- libsrc/linalg/densemat.hpp.orig Wed Nov 10 14:22:43 2004
++++ libsrc/linalg/densemat.hpp Tue May 29 18:45:09 2007
+@@ -255,6 +255,6 @@
+
+
+
+-
++extern void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2);
+
+ #endif
diff --git a/cad/netgen/files/patch-libsrc_meshing_meshing.hpp b/cad/netgen/files/patch-libsrc_meshing_meshing.hpp
new file mode 100644
index 000000000000..22f742e085b3
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_meshing_meshing.hpp
@@ -0,0 +1,11 @@
+--- ./libsrc/meshing/meshing.hpp.orig Thu Oct 7 00:23:46 2004
++++ ./libsrc/meshing/meshing.hpp Tue May 29 22:55:52 2007
+@@ -34,7 +34,7 @@
+ #ifndef SMALLLIB
+ #define _INCLUDE_MORE
+ #endif
+-#ifdef LINUX
++#if defined(LINUX ) || defined(FREEBSD)
+ #define _INCLUDE_MORE
+ #endif
+
diff --git a/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp b/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp
new file mode 100644
index 000000000000..8d28315775bd
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp
@@ -0,0 +1,11 @@
+--- libsrc/meshing/meshtype.hpp.orig Sun Nov 7 17:12:10 2004
++++ libsrc/meshing/meshtype.hpp Tue May 29 18:43:39 2007
+@@ -962,7 +962,7 @@
+ class Identifications
+ {
+ private:
+- Mesh & mesh;
++ class Mesh & mesh;
+
+ /// identify points (thin layers, periodic b.c.)
+ INDEX_2_HASHTABLE<int> * identifiedpoints;
diff --git a/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp b/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp
new file mode 100644
index 000000000000..828ed76ff080
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp
@@ -0,0 +1,10 @@
+--- libsrc/visualization/mvdraw.hpp.orig
++++ libsrc/visualization/mvdraw.hpp
+@@ -250,6 +250,7 @@
+ int seltria;
+ };
+
++extern VisualSceneSTLMeshing vsstlmeshing;
+
+
+
diff --git a/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp b/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp
new file mode 100644
index 000000000000..c61dc641e7ca
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp
@@ -0,0 +1,13 @@
+--- libsrc/visualization/stlmeshing.cpp.orig
++++ libsrc/visualization/stlmeshing.cpp
+@@ -1062,9 +1062,9 @@
+ }
+
+
++VisualSceneSTLMeshing vsstlmeshing;
+
+
+-VisualSceneSTLMeshing vsstlmeshing;
+
+ #endif
+
diff --git a/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp b/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp
new file mode 100644
index 000000000000..0e2ac09956b8
--- /dev/null
+++ b/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp
@@ -0,0 +1,11 @@
+--- ngsolve/basiclinalg/calcinverse.cpp.orig Tue Nov 16 09:38:35 2004
++++ ngsolve/basiclinalg/calcinverse.cpp Tue May 29 19:27:48 2007
+@@ -10,7 +10,7 @@
+ {
+ double sum = 0;
+ for (int i = 0; i < N; i++)
+- sum += abs(m(i,i));
++ sum += std::abs(m(i,i));
+ return sum;
+ }
+
diff --git a/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp b/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp
new file mode 100644
index 000000000000..74d85379a040
--- /dev/null
+++ b/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp
@@ -0,0 +1,70 @@
+--- ngsolve/basiclinalg/expr3.hpp.orig Sat Oct 2 10:26:56 2004
++++ ngsolve/basiclinalg/expr3.hpp Tue May 29 19:33:11 2007
+@@ -851,6 +851,16 @@
+ /**
+ Inner product
+ */
++inline double InnerProduct ( const double& a, const double& b )
++{
++ return a * b;
++}
++
++inline Complex InnerProduct ( const Complex& a, const Complex b)
++{
++ return a * b;
++}
++
+ template <class TA, class TB>
+ inline typename TA::TSCAL
+ InnerProduct (const MatExpr<TA> & a, const MatExpr<TB> & b)
+@@ -862,16 +872,6 @@
+ return sum;
+ }
+
+-inline double InnerProduct (double a, double b)
+-{
+- return a * b;
+-}
+-
+-inline Complex InnerProduct (Complex a, Complex b)
+-{
+- return a * b;
+-}
+-
+
+ /* **************************** Trace **************************** */
+
+@@ -889,16 +889,6 @@
+ /* **************************** L2Norm **************************** */
+
+ /// Euklidean norm squared
+-template <class TA>
+-inline double L2Norm2 (const MatExpr<TA> & v)
+-{
+- typedef typename TA::TSCAL TSCAL;
+- double sum = 0;
+- for (int i = 0; i < v.Height(); i++)
+- sum += L2Norm2 (v.Spec()(i)); // REval
+- return sum;
+-}
+-
+
+ inline double L2Norm2 (double v)
+ {
+@@ -908,6 +898,16 @@
+ inline double L2Norm2 (Complex v)
+ {
+ return v.real()*v.real()+v.imag()*v.imag();
++}
++
++template <class TA>
++inline double L2Norm2 (const MatExpr<TA> & v)
++{
++ typedef typename TA::TSCAL TSCAL;
++ double sum = 0;
++ for (int i = 0; i < v.Height(); i++)
++ sum += L2Norm2 (v.Spec()(i)); // REval
++ return sum;
+ }
+
+ template <class TA>
diff --git a/cad/netgen/files/patch-ngsolve_comp_postproc.cpp b/cad/netgen/files/patch-ngsolve_comp_postproc.cpp
new file mode 100644
index 000000000000..551ae710c376
--- /dev/null
+++ b/cad/netgen/files/patch-ngsolve_comp_postproc.cpp
@@ -0,0 +1,21 @@
+--- ngsolve/comp/postproc.cpp.orig
++++ ngsolve/comp/postproc.cpp
+@@ -9,6 +9,7 @@
+ */
+
+ #include <comp.hpp>
++#include <fem.hpp>
+
+ namespace ngcomp
+ {
+@@ -274,8 +275,8 @@
+ if (dimflux > 1)
+ {
+ FlatMatrix<SCAL> elmat(dnumsflux.Size(), lh);
+- dynamic_cast<const BlockBilinearFormIntegrator&> (fluxbli)
+- . Block() . AssembleElementMatrix (felflux, eltrans, elmat, lh);
++ BlockBilinearFormIntegrator const& fluxbli_ref = dynamic_cast<const BlockBilinearFormIntegrator&> (fluxbli);
++ fluxbli_ref . Block() . AssembleElementMatrix (felflux, eltrans, elmat, lh);
+ CholeskyFactors<SCAL> invelmat(elmat);
+
+ FlatVector<SCAL> hv1(dnumsflux.Size(), lh);
diff --git a/cad/netgen/files/patch-ngsolve_linalg_order.cpp b/cad/netgen/files/patch-ngsolve_linalg_order.cpp
new file mode 100644
index 000000000000..1ef838fbae60
--- /dev/null
+++ b/cad/netgen/files/patch-ngsolve_linalg_order.cpp
@@ -0,0 +1,11 @@
+--- ngsolve/linalg/order.cpp.orig
++++ ngsolve/linalg/order.cpp
+@@ -54,7 +54,7 @@
+ return ball.Alloc();
+ }
+
+- void CliqueEl :: operator delete (void * p, size_t)
++ void CliqueEl :: operator delete (void * p)
+ {
+ ball.Free (p);
+ }
diff --git a/cad/netgen/files/patch-ngsolve_linalg_order.hpp b/cad/netgen/files/patch-ngsolve_linalg_order.hpp
new file mode 100644
index 000000000000..ba1ad8341acb
--- /dev/null
+++ b/cad/netgen/files/patch-ngsolve_linalg_order.hpp
@@ -0,0 +1,11 @@
+--- ngsolve/linalg/order.hpp.orig
++++ ngsolve/linalg/order.hpp
+@@ -118,7 +118,7 @@
+ ///
+ void * operator new(size_t);
+ ///
+- void operator delete (void *, size_t);
++ void operator delete (void *);
+ };
+
+