netgen+ngsolve on ubuntu 8.04

  • osman buyukisik

    osman buyukisik - 2009-01-21

    Hi Joachim,
    I have downloaded both netgen and ngsolve from sf.  I have expanded them in my home directory. I first  built netgen. I had to change the Makefiles to include /usr/include/tcl which was somehow not included. Had the same problem with ngsolve. I used --prefix=/opt  to install in /opt directory. Now when I execute netgen, it cannot find ng.opt and cannot locate ngsolve. What should be in ng.opt so they work?

    Thanks in advance

    • Nobody/Anonymous

      Hi Osman,

      If Tcl/Tk is installed as it is thought to be, then

      configure --with-tcl=/usr/include/tcl  --with-tk=/usr/include/tcl

      should set the header and library search pathes.

      To find the shared library '' you have to set the LD_LIBRARY_PATH to the according directory. I have to admit that ngsolve configuration is not very smooth, yet.

      'optfile ng.opt does not exist - using default values' is just a message telling that Netgen uses default options. With 'File -> Save Options' you save the current options into ./ng.opt


    • osman buyukisik

      osman buyukisik - 2009-01-21

      Thanks Joachim  it worked.  LD_LIBRAY_PATH was also mentioned in the wiki. Should have payed more attention.
      I realized that the old tutorials for ngsolve are not in the sourceforge version. Those were very helpful. I'll just copy from the old directory.

    • Pawel Sosnowski

      Pawel Sosnowski - 2009-02-11

      hello everyone!

      I belive I am missing something in the installation process. I downloaded Netgen form SF, unpacked it. After that I run "./configure", "./make", "./make install". There were some problems with tcl but I managed to get through. Finally everything seemed to go smoothly. After the process, as told in the manual, I tried to "check" Netgen by simply typing "ng" in my console. I received a message that there is no program like that. On the other hand, console version (started by "netgen" command works).

      Am I missing someting?

      Thanks in advance for any tips.


    • schruste

      schruste - 2009-02-11

      Hello Pawel,

      If netgen runs everything is fine. The executable's name changed from "ng" to "netgen" since 4.9.5. I think the manual is - concerning this detail - not up to date.


      • Pawel Sosnowski

        Pawel Sosnowski - 2009-02-11

        uff, that takes a lot of trouble out of my head, thanks Chrisoph!

        but still I can only run Netgen in console mode. I can not get access to GUI. I found somewhere on the web, that to get access to GUI I have to set variable DISPLAY during configuration/compiling/installing process (but am not sure if this is the problem). Could you give a hint how to set Netgen to gain access to GUI?


    • Philippose Rajan

      Hello Pawel,

      Could you let me know where you read the documentation regarding testing Netgen with "ng" ? I guess that would have to be updated as Christoph pointed out.....

      As for the GUI.... does Netgen give you any errror while starting up regarding OpenGL or something similar? Its quite unusual that Netgen (without giving it specific instructions to start in console mode) starts up in console mode without throwing up any form of information which indicates what might be wrong.

      Have a nice day!


      • Pawel Sosnowski

        Pawel Sosnowski - 2009-02-11

        Hi Philippose,

        about the "ng": I read it in the first sentence of chapter 1.4.4 Testing Netgen in file "ng4.pdf":
        "Please start Netgen by entering “ng” or clicking the “ng.exe” icon."
        Maybe I`ve treaten it too literally, but...

        and about GUI,
        this seems funny that sometimes one can not see things that are just in front of them. I had some old version installed (1.3.7 I guess), and the link to bash command "netgen" pointed to this old program.

        I through the old stuff out, and now am installing version 4.9.6
        I downloaded files from SF, installed Tcl, Tk, Tix, Togl.
        Now am trygin to compile netgen (./configure -> make). And am stuck on "make".
        The error message I get is as follows:

        /usr/bin/ld: cannot find -lTogl1.7
        collect2: ld returned 1 exit status
        make[2]: *** [netgen] Error 1
        make[2]: Leaving directory `/home/pawel/netgen/netgen-4.9.6/ng'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/home/pawel/netgen/netgen-4.9.6'
        make: *** [all] Error 2

        I get a bit confused, since Togl1.7 installed with no problem. I belive I have to make some soft link, but simply do not know which and how. Could you give me a hand?


    • Philippose Rajan

      Hello Pawel,

      Firstly... thanks for the pointer to the location of the erroneous line in the documentation :-)!

      I assume you are trying to install Netgen in Linux?

      Normally, you should be able to find a "libTogl...." in your "/usr/lib/" folder.... in your case, maybe Togl, though it is version 1.7, may not be called "".... it may just be "" or something... in which case a symbolic link would be required....

      If none of these files are existent, then the installation of Togl may have put it into some non-standard location.... /usr/local/lib perhaps?


    • Philippose Rajan

      Hello again,

      One more thing.... you could probably have a look at the Wiki (on this Sourceforge website) for a little more detailed explanation of how to compile Netgen in Linux....


    • Pawel Sosnowski

      Pawel Sosnowski - 2009-02-12

      Hello Philippose,

      I found in /usr/local/Togl1.7/
      copying the file to /usr/lib/ did the trick.

      The compilation and installation went smoothly, and now I can enjoy Netgen with nice GUI :-)
      Thank you for your help!


  • joojo

    joojo - 2012-08-14

    i want to create surface mesh using other elements. how can i do that

  • Chumbawumba

    Chumbawumba - 2012-08-27

    Hello japana. You should really start a new thread for a new question.

    What do you mean by other element? You can use 2nd order triangles (6 nodes), or have it quad-dominated either linear (4 nodes) or 2nd order (8 nodes) with a few triangles where it can't put quads.

    Are you using nglib or the GUI?
    For nglib call Ng_OCC_Generate_SecondOrder after generating the surface mesh to get 2nd order elements, and set the meshing parameter quad_dominated to get a quad dominated mesh.

    For the GUI I don't know how.


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks