Fortran programmer new to c++. Looking for general advice.

This is a discussion on Fortran programmer new to c++. Looking for general advice. within the C++ Programming forums, part of the General Programming Boards category; edit - I now have a specific question below. Please see post #9. Thanks ---------------------------- Hi all, I'm a mathematician ...

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    6

    Fortran programmer new to c++. Looking for general advice.

    edit - I now have a specific question below. Please see post #9. Thanks

    ----------------------------

    Hi all,

    I'm a mathematician who is by now fairly used to using fortran (I wrote a ~25,000 line F90 program for my PhD). Anyway, I'm doing a 3 year post-doc project in a similar area, and we found out today that the computer scientist that we thought would be on our team is no longer going to be here (funding for the position was removed). So, it falls to me to cover his workload as well.

    Anyway... I will (eventually) need to write a GUI to take a series of 3D scattered data points (of size ranging from tens of thousands to the low millions of points), and then form a tetrahedral mesh. This tetrahedral mesh will need to be visualised and have user-selectable components (such as the various boundaries etc). I'll also need to have a standard 2D window-like interface to allow creation of a parameter file, which will be passed to the main numerical simulation code. The numerical simulation code itself I am very comfortable with writing, since this is my area of expertise.

    The truth is, I really don't know where to start with the rest of it. I've only really used F90 in a fairly procedural way (though I do take advantage of the pseudo-OO features it offers). I was hoping that someone might be able to point me in the right direction? I have visual studio 2008 and the intel C++ compiler - I'm assuming this would be okay to get going with?

    I was thinking to start with the 2D GUI, as this seems the most straightforward of the tasks. I will need to create a window with a series of text- and drop-down boxes, the contents of which will change depending on the options selected in other boxes. The eventual output will be a simple text file (or maybe an .xml file). Is there any literature specifically related to this kind of thing that I could start with?

    Regarding the 3D triangularisation, I could probably write my own algorithm based on Delaunay triangularisation, but does anyone know of any existing code to do this efficiently? I had a bit of a google but couldn't really find very much, which surprised me given that it must be a very standard procedure. As for the 3D visualisation of the mesh... Well I know that I need to walk before I crawl, but it won't hurt to have some idea of how I will need to proceed. What are the advantages of OpenGL vs DirectX (or vice-versa)? Anything else I should be reading up on in preparation?

    Finally, if anyone knows any other good resources for ex-fortran programmers migrating to C++ then I would be interested to read them.


    Thanks for reading, I know it was a bit of an epic post. I also know that I'm asking a lot, but unfortunately I now need to learn and implement this stuff on top of my original workload, so I need to make a start on learning it all now. Any links, tips or other comments would be very much appreciated. This is my first post here, but I hope to stick around and also (as I begin to learn) help out others in the community. This place seems like an excellent resource and I would like to be able to contribute someday. Thanks in advance!
    Last edited by Duff-Man; 10-09-2009 at 09:50 AM.

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    I also recommend LabView, it has a lot of VI's that will help with the GUI stuff and it interfaces nicely with Fortran and C/C++. It does 3D meshes and a whole host of other visualization styles. It's a bit pricey, I think the entry level package is around 4000 USD, and there are upgrades. It is very helpful for rapid application development though. I used it for about a year doing commercial AI research.

    http://www.ni.com/labview/
    Last edited by abachler; 10-08-2009 at 02:02 PM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    6
    Thanks for the reply abachler, I appreciate your interest in my problem

    Unfortunately we don't have anywhere near $4000 in the budget for software, so buying LabView or similar commercial packages isn't an option Also, since I will need to submit a fully self-contained piece of software at the end of the project, I will need to write everything from scratch. Relying on third party visualisation isn't an option.

    I would love to make use of existing software to do the visualisation and just focus on development of the numerical simulation algorithms (as I thought I would be when I took the position) but unfortunately I can't. Thanks again for the reply!

  4. #4

  5. #5
    Registered User
    Join Date
    Oct 2009
    Posts
    6

    Red face

    Thanks Codeplug... I really should have found that I guess. I was searching for stuff related to delaunay triangularisation expecting a function or something, not a complete piece of open-source software like that. It looks like it could be ideal...

    Thanks a lot!

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by Duff-Man View Post
    Thanks for the reply abachler, I appreciate your interest in my problem

    Unfortunately we don't have anywhere near $4000 in the budget for software, so buying LabView or similar commercial packages isn't an option Also, since I will need to submit a fully self-contained piece of software at the end of the project, I will need to write everything from scratch. Relying on third party visualisation isn't an option.

    I would love to make use of existing software to do the visualisation and just focus on development of the numerical simulation algorithms (as I thought I would be when I took the position) but unfortunately I can't. Thanks again for the reply!
    The developer package generates stand alone executables. I empathize with you, as I said its a bit pricey, I can't afford it for my research either unless I get an SBIR contract. So far I haven't been selected for any of the ones I applied for, I'm seriously thinking of taking my research and moving to a more stable economy, I just don't think the U.S. can support as much R&D with the current economy, and I can't eat beans and weenies for 5 years while it recovers.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  7. #7
    Registered User
    Join Date
    Oct 2009
    Posts
    6
    Quote Originally Posted by abachler View Post
    I'm seriously thinking of taking my research and moving to a more stable economy, I just don't think the U.S. can support as much R&D with the current economy
    Well, don't bother coming to the UK in that case! I think we're one of the very few nations that has been hit harder than you guys by the economic downturn

    Best of luck finding funding - it isn't easy I know.

  8. #8
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by Duff-Man View Post
    Well, don't bother coming to the UK in that case! I think we're one of the very few nations that has been hit harder than you guys by the economic downturn

    Best of luck finding funding - it isn't easy I know.
    That's a shame, I've always wanted to repatriate to Wales
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  9. #9
    Registered User
    Join Date
    Oct 2009
    Posts
    6
    Hi,

    I'm trying to compile the tetgen c++ code provided here, using visual studio 2008 and MS visual C++. There are two source files and a header file, and the instructions state that I should simply make a win32 console application, add the source and header files, and compile.

    When I try to do this I get error messages relating to stdafx.h, which I see is a precompiled header (used to save on compile time?). Anyway, I've added: #include <stdafx.h> to the very beginning of each of the two source files, and rebuilt the project. It says that the build was successful, however no .exe file is created As such, I can't run the program with the included examples.

    Could somebody point out to me where I'm going wrong?! Thanks...

  10. #10
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,646
    Instead of modifying their source file, you can right-click the file -> properties -> C/C++ -> Precompiled Headers -> "Not Using Precompiled Headers".

    If the build window says and exe was built, then it should be in the Project\Release\ or Project\Debug\ folder.

    gg

  11. #11
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    dont' launch exes for debugguing through windows explorer, launch them through visual studio so the debugger is attached. you can do it at least 3 ways: r-click on the proj in solution explorer or choose Test from the main menu, then choose Debug->start new instance. or just press F5

  12. #12
    Registered User
    Join Date
    Oct 2009
    Posts
    6
    Thanks guys - without the precompiled headers it builds and runs just fine.

    As for the location of the .exe file... they're generated in a different place to their location when building fortran code, which kind of threw me. There are two sets of folders called 'debug' and 'release' and the .exes are in the project folder versions, rather than the subfolder versions.

    Thanks again for the help. Sometimes the small things can be the most annoying when you're just getting started.

  13. #13
    Registered User
    Join Date
    Oct 2009
    Posts
    1
    TetGen: A Quality Tetrahedral Mesh Generator

    Duff-Man,

    Can you please send me compiled TetGen.

    I do not use C++ but I need this utility.

    TIA

    MiSt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. real-world apps in C++ (preferably simple)?
    By Aisthesis in forum C++ Programming
    Replies: 13
    Last Post: 06-12-2009, 01:03 PM
  2. What game programmer should I be? need some advice.
    By m3rk in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 04-20-2009, 11:12 PM
  3. Advice on C Programming with MSVC++ 2008
    By IT_Guy in forum Windows Programming
    Replies: 1
    Last Post: 03-06-2009, 03:23 AM
  4. girl friend advice (prob. the wrong place)
    By B0bDole in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 10-22-2004, 06:38 PM
  5. Linking Fortran procedures with C program
    By gest in forum C Programming
    Replies: 5
    Last Post: 07-14-2003, 12:35 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21