Some suggested patches of 4.9.12 ...

Erwan ADAM
2010-05-18
2013-05-27
  • Erwan ADAM

    Erwan ADAM - 2010-05-18

    Hi netgen developers,

    Here are the patches I've done for integration of netgen 4.9.12 in salome
    platform (linux and windows) :

    diff -Naur netgen-4.9.12.orig/libsrc/general/template.hpp netgen-4.9.12/libsrc/general/template.hpp
    -- netgen-4.9.12.orig/libsrc/general/template.hpp 2009-08-10 11:40:52.000000000 +0000
    +++ netgen-4.9.12/libsrc/general/template.hpp 2010-05-07 12:34:09.000000000 +0000
    @@ -33,7 +33,7 @@

    /** Error messages display.
       Error messages are displayed by this function */
    -extern void MyError (const char * ch);
    +DLL_HEADER extern void MyError (const char * ch);

    diff -Naur netgen-4.9.12.orig/libsrc/meshing/global.hpp netgen-4.9.12/libsrc/meshing/global.hpp
    -- netgen-4.9.12.orig/libsrc/meshing/global.hpp 2009-08-10 11:40:51.000000000 +0000
    +++ netgen-4.9.12/libsrc/meshing/global.hpp 2010-05-07 12:46:08.000000000 +0000
    @@ -13,7 +13,7 @@
    */

    ///
    -extern double GetTime ();
    +DLL_HEADER extern double GetTime ();

    diff -Naur netgen-4.9.12.orig/nglib/nglib.cpp netgen-4.9.12/nglib/nglib.cpp
    -- netgen-4.9.12.orig/nglib/nglib.cpp 2009-11-01 12:01:34.000000000 +0000
    +++ netgen-4.9.12/nglib/nglib.cpp 2010-05-07 12:44:16.000000000 +0000
    @@ -949,18 +949,18 @@

        char geomfilename;

    -   void MyError (const char * ch)
    +   DLL_HEADER void MyError (const char * ch)
        {
           cerr << ch;
        }

        //Destination for messages, errors, …
    -   void Ng_PrintDest(const char * s)
    +   DLL_HEADER void Ng_PrintDest(const char * s)
        {
           (*mycout) << s << flush;
        }

    -   double GetTime ()
    +   DLL_HEADER double GetTime ()
        {
           return 0;
        }
    diff -Naur netgen-4.9.12.orig/nglib/nglib.h netgen-4.9.12/nglib/nglib.h
    -- netgen-4.9.12.orig/nglib/nglib.h 2009-11-01 12:01:03.000000000 +0000
    +++ netgen-4.9.12/nglib/nglib.h 2010-05-07 08:19:09.000000000 +0000
    @@ -24,7 +24,7 @@
    // Philippose - 14.02.2009
    // Modifications for creating a DLL in Windows
    #ifdef WIN32
    -   #ifdef NGLIB_EXPORTS
    +   #if defined NGLIB_EXPORTS || defined nglib_EXPORTS
           #define DLL_HEADER   __declspec(dllexport)
        #else
           #define DLL_HEADER   __declspec(dllimport)

    The last one (nglib_EXPORTS) is for compilation
    with cmake on windows.

    For an obscure reason, the key "general" seems
    to be reserved in cmake so I've modified the name
    of libgeneral in libgen. The patches are :

    diff -Naur netgen-4.9.12.orig/libsrc/general/Makefile.am netgen-4.9.12/libsrc/general/Makefile.am
    -- netgen-4.9.12.orig/libsrc/general/Makefile.am 2009-08-25 13:56:53.000000000 +0000
    +++ netgen-4.9.12/libsrc/general/Makefile.am 2010-05-07 07:28:10.000000000 +0000
    @@ -6,8 +6,8 @@

    AM_CPPFLAGS =  $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
    METASOURCES = AUTO
    -noinst_LTLIBRARIES = libgeneral.la
    -libgeneral_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \
    +noinst_LTLIBRARIES = libgen.la
    +libgen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \
    hashtabl.cpp mystring.cpp ngexception.cpp optmem.cpp parthreads.cpp \
    profiler.cpp seti.cpp sort.cpp spbita2d.cpp symbolta.cpp table.cpp

    diff -Naur netgen-4.9.12.orig/nglib/Makefile.am netgen-4.9.12/nglib/Makefile.am
    -- netgen-4.9.12.orig/nglib/Makefile.am 2009-11-18 20:14:25.000000000 +0000
    +++ netgen-4.9.12/nglib/Makefile.am 2010-05-07 07:27:51.000000000 +0000
    @@ -16,7 +16,7 @@
    $(top_builddir)/libsrc/meshing/libmesh.la \
    $(top_builddir)/libsrc/gprim/libgprim.la \
    $(top_builddir)/libsrc/linalg/libla.la \
    - $(top_builddir)/libsrc/general/libgeneral.la \
    + $(top_builddir)/libsrc/general/libgen.la \
    $(OCCLIBS) $(MPI_LIBS)

    Once again, thanks for this great software.

    Regards,

                              E.A.

     
  • Joachim Schoeberl

    thanks for the feedback, everything is included in the SVN
    Joachim

     
  • Erwan ADAM

    Erwan ADAM - 2010-05-18

    Hi Joachim,
    Thanks for the integrations … I wanted to test the svn repo.
    but it seems that the file ng_occ.cpp is missing.
    Regards, E.A.

     
  • Erwan ADAM

    Erwan ADAM - 2010-05-31

    Thanks for the integration of ng_occ.cpp …
    I have tested 4.9.13 compilation on windows with cmake
    and I have replaced :

    #ifdef NGLIB_EXPORTS || nglib_EXPORTS

    by

    #if defined NGLIB_EXPORTS || defined nglib_EXPORTS

    Regards,

                    E.A.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks