Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[plugins/netgenplugin.git] / src / NETGEN / ReadMeForNgUsers
1 The Netgen 4.5 from the web location : http://www.hpfem.jku.at/netgen/
2 (CVS access) is used in the SMESH Module of Salome3 distribution.
3
4 1. How to build Netgen for Salome
5 ------------------------------
6
7 1.1. Download Netgen 4.5 from the NETGEN home site (see above).
8
9 1.2. Unpack the downloaded Netgen 4.5 archive 
10      (hereafter we assume that this is netgen45 directory)
11
12 1.3. Patch the netgen 4.5 distribution for SALOME:
13
14 $ cd netgen45
15 $ patch -p1 < patch_directory/netgen45ForSalome.patch
16
17 1.4. For 64-bit platform you also need to apply another patch:
18
19 $ cd netgen45
20 $ patch -p1 < patch_directory/netgen45lib64.patch
21
22 1.5. Set CASROOT environment variable to OCCT installation path,
23      since Netgen 4.5 requires Open CASCADE Technology:
24
25 $ setenv CASROOT <occt_installation_path>
26
27 1.6. Compile and install netgen 4.5. To do this, simply run 
28      makeForSalome.sh script (it is created from the patch):
29
30 $ sh makeForSalome.sh
31
32
33 2. Additional information for maintainers
34 --------------------------------------
35
36 The file check_NETGEN.m4 assumes that Netgen is installed in 
37 the directory <netgen_installation_path> as follow:
38
39 prompt> ls <netgen_installation_path>
40
41 include/  lib/
42
43 prompt> ls <netgen_installation_path>/include
44
45 adfront2.hpp         explicitcurve2d.hpp  hpref_quad.hpp      myadt.hpp        spbita2d.hpp
46 adfront3.hpp         extrusion.hpp        hpref_segm.hpp      mydefs.hpp       specials.hpp
47 adtree.hpp           findip.hpp           hpref_tet.hpp       mystdlib.h       specpoin.hpp
48 algprim.hpp          findip2.hpp          hpref_trig.hpp      mystring.hpp     spline.hpp
49 array.hpp            flags.hpp            hprefinement.hpp    ngexception.hpp  spline2d.hpp
50 autoptr.hpp          gencyl.hpp           identify.hpp        nglib.h          spline3d.hpp
51 basemat.hpp          geom2d.hpp           improve2.hpp        occgeom.hpp      splinegeometry.hpp
52 bisect.hpp           geom2dmesh.hpp       improve3.hpp        occmeshsurf.hpp  splinegeometry2.hpp
53 bitarray.hpp         geom3d.hpp           linalg.hpp          opti.hpp         stack.hpp
54 boundarylayer.hpp    geometry2d.hpp       localh.hpp          optmem.hpp       stlgeom.hpp
55 brick.hpp            geomfuncs.hpp        manifold.hpp        parthreads.hpp   stlline.hpp
56 classifyhpel.hpp     geoml.hpp            meshclass.hpp       polyhedra.hpp    stltool.hpp
57 clusters.hpp         geomobjects.hpp      meshfunc.hpp        polynomial.hpp   stltopology.hpp
58 csg.hpp              geomops.hpp          meshing.hpp         profiler.hpp     surface.hpp
59 csgeom.hpp           geomsearch.hpp       meshing2.hpp        revolution.hpp   symbolta.hpp
60 csgparser.hpp        geomtest3d.hpp       meshing3.hpp        ruler2.hpp       table.hpp
61 curve2d.hpp          global.hpp           meshstlsurface.hpp  ruler3.hpp       template.hpp
62 curvedelems.hpp      gprim.hpp            meshsurf.hpp        seti.hpp         topology.hpp
63 curvedelems_new.hpp  hashtabl.hpp         meshtool.hpp        singularref.hpp  transform3d.hpp
64 densemat.hpp         hpref_hex.hpp        meshtype.hpp        solid.hpp        triapprox.hpp
65 dynamicmem.hpp       hpref_prism.hpp      moveablemem.hpp     sort.hpp         vector.hpp
66 edgeflw.hpp          hpref_pyramid.hpp    msghandler.hpp      sparsmat.hpp
67
68 prompt> ls <netgen_installation_path>/lib
69
70 libcsg.a  libgeom2d.a  libla.a    libnginterface.a  libopti.a
71 libgen.a  libgprim.a   libmesh.a  libocc.a          libstlgeom.a
72
73 The library files can be also installed in the LINUX or LINUX64
74 subfolder of the lib directory.
75
76 All the libraries *.a should be compiled without the option -DOPENGL.
77 netgen45 is assumed to be the directory downloaded from the above web
78 location archive of Netgen. The library 
79 <netgen_installation_path>/lib/libnginterface.a should contain the objects
80 nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o
81 (from netgen45/ngtcltk/ngnewdelete.cpp).
82
83 To have that kind of distribution from the version in the above web location you
84 need not to compile Netgen as suggested in the netgen45/README.INSTALL file.
85 Simply modify the Makefiles to remove -DOPENGL from compiler flags
86 list and to add OCC include dir and flags to compiler flags, add the objects
87 nglib.o and ngnewdelete.o to the library libnginterface.a and
88 recompile the libraries only.
89 All this job is done by applying the patch and running the script makeForSalome.sh.
90
91 The suggested patch alters some Netgen sources to compile them.
92
93 Michael SAZONOV
94 m-sazonov@opencascade.com