Salome HOME
Merge from V5_1_main 14/05/2010
[plugins/netgenplugin.git] / src / NETGEN / ReadMeForNgUsers
1 # ------------------------------------------------------------------
2 # ------------------------------------------------------------------
3 # Notes for Netgen >= 4.9
4 # ------------------------------------------------------------------
5 # ------------------------------------------------------------------
6
7 Netgen can be find at http://www.hpfem.jku.at/netgen/
8
9 1. How to build Netgen for Netgen Plugin
10 ------------------------------
11
12 1.1. Download Netgen archive (here netgen-4.9.12.tar.gz) and unpack it
13
14 1.2. Configure the netgen compilation. The "good" options are
15      ../netgen-4.9.12/configure \ 
16         --prefix=THE_INSTALLATION_PATH \
17         --with-occ=${CASROOT} \
18         CXXFLAGS="-I${TOGL_HOME}/include" \
19         LDFLAGS="-L${TOGL_HOME}/lib/Togl1.7"
20
21 1.3. Compile the netgen product
22      make then make install
23
24 1.4. Patch the installation directory to copy include files
25      needed by NETGEN Plugin. Use the script
26      NETGENPLUGIN_SRC/src/NETGEN/netgen_copy_include_for_salome
27      to achieve that. The first argument is the directory containing
28      the Netgen sources. The second argument is THE_INSTALLATION_PATH
29
30 Erwan ADAM
31 erwan.adam@cea.fr
32
33 # ------------------------------------------------------------------
34 # ------------------------------------------------------------------
35 # Notes for Netgen 4.5
36 # ------------------------------------------------------------------
37 # ------------------------------------------------------------------
38
39 The Netgen 4.5 from the web location : http://www.hpfem.jku.at/netgen/
40 (CVS access) is used in the SMESH Module of Salome3 distribution.
41
42 1. How to build Netgen for Salome
43 ------------------------------
44
45 1.1. Download Netgen 4.5 from the NETGEN home site (see above).
46
47 1.2. Unpack the downloaded Netgen 4.5 archive 
48      (hereafter we assume that this is netgen45 directory)
49
50 1.3. Patch the netgen 4.5 distribution for SALOME:
51
52 $ cd netgen45
53 $ patch -p1 < patch_directory/netgen45ForSalome.patch
54
55 1.4. For 64-bit platform you also need to apply another patch:
56
57 $ cd netgen45
58 $ patch -p1 < patch_directory/netgen45lib64.patch
59
60 1.5. Set CASROOT environment variable to OCCT installation path,
61      since Netgen 4.5 requires Open CASCADE Technology:
62
63 $ setenv CASROOT <occt_installation_path>
64
65 1.6. Compile and install netgen 4.5. To do this, simply run 
66      makeForSalome.sh script (it is created from the patch):
67
68 $ sh makeForSalome.sh
69
70
71 2. Additional information for maintainers
72 --------------------------------------
73
74 The file check_NETGEN.m4 assumes that Netgen is installed in 
75 the directory <netgen_installation_path> as follow:
76
77 prompt> ls <netgen_installation_path>
78
79 include/  lib/
80
81 prompt> ls <netgen_installation_path>/include
82
83 adfront2.hpp         explicitcurve2d.hpp  hpref_quad.hpp      myadt.hpp        spbita2d.hpp
84 adfront3.hpp         extrusion.hpp        hpref_segm.hpp      mydefs.hpp       specials.hpp
85 adtree.hpp           findip.hpp           hpref_tet.hpp       mystdlib.h       specpoin.hpp
86 algprim.hpp          findip2.hpp          hpref_trig.hpp      mystring.hpp     spline.hpp
87 array.hpp            flags.hpp            hprefinement.hpp    ngexception.hpp  spline2d.hpp
88 autoptr.hpp          gencyl.hpp           identify.hpp        nglib.h          spline3d.hpp
89 basemat.hpp          geom2d.hpp           improve2.hpp        occgeom.hpp      splinegeometry.hpp
90 bisect.hpp           geom2dmesh.hpp       improve3.hpp        occmeshsurf.hpp  splinegeometry2.hpp
91 bitarray.hpp         geom3d.hpp           linalg.hpp          opti.hpp         stack.hpp
92 boundarylayer.hpp    geometry2d.hpp       localh.hpp          optmem.hpp       stlgeom.hpp
93 brick.hpp            geomfuncs.hpp        manifold.hpp        parthreads.hpp   stlline.hpp
94 classifyhpel.hpp     geoml.hpp            meshclass.hpp       polyhedra.hpp    stltool.hpp
95 clusters.hpp         geomobjects.hpp      meshfunc.hpp        polynomial.hpp   stltopology.hpp
96 csg.hpp              geomops.hpp          meshing.hpp         profiler.hpp     surface.hpp
97 csgeom.hpp           geomsearch.hpp       meshing2.hpp        revolution.hpp   symbolta.hpp
98 csgparser.hpp        geomtest3d.hpp       meshing3.hpp        ruler2.hpp       table.hpp
99 curve2d.hpp          global.hpp           meshstlsurface.hpp  ruler3.hpp       template.hpp
100 curvedelems.hpp      gprim.hpp            meshsurf.hpp        seti.hpp         topology.hpp
101 curvedelems_new.hpp  hashtabl.hpp         meshtool.hpp        singularref.hpp  transform3d.hpp
102 densemat.hpp         hpref_hex.hpp        meshtype.hpp        solid.hpp        triapprox.hpp
103 dynamicmem.hpp       hpref_prism.hpp      moveablemem.hpp     sort.hpp         vector.hpp
104 edgeflw.hpp          hpref_pyramid.hpp    msghandler.hpp      sparsmat.hpp
105
106 prompt> ls <netgen_installation_path>/lib
107
108 libcsg.a  libgeom2d.a  libla.a    libnginterface.a  libopti.a
109 libgen.a  libgprim.a   libmesh.a  libocc.a          libstlgeom.a
110
111 The library files can be also installed in the LINUX or LINUX64
112 subfolder of the lib directory.
113
114 All the libraries *.a should be compiled without the option -DOPENGL.
115 netgen45 is assumed to be the directory downloaded from the above web
116 location archive of Netgen. The library 
117 <netgen_installation_path>/lib/libnginterface.a should contain the objects
118 nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o
119 (from netgen45/ngtcltk/ngnewdelete.cpp).
120
121 To have that kind of distribution from the version in the above web location you
122 need not to compile Netgen as suggested in the netgen45/README.INSTALL file.
123 Simply modify the Makefiles to remove -DOPENGL from compiler flags
124 list and to add OCC include dir and flags to compiler flags, add the objects
125 nglib.o and ngnewdelete.o to the library libnginterface.a and
126 recompile the libraries only.
127 All this job is done by applying the patch and running the script makeForSalome.sh.
128
129 The suggested patch alters some Netgen sources to compile them.
130
131 Michael SAZONOV
132 m-sazonov@opencascade.com
133
134 # ------------------------------------------------------------------
135 # ------------------------------------------------------------------
136 # ------------------------------------------------------------------
137 # ------------------------------------------------------------------