FORTRAN source code for a program that computes all elastic constants when you give it any two independent ones. Continue reading
Tag Archives: FORTRAN
Resource: the "cnv" program
FORTRAN source code for a program that does simple pre-processing tasks, many of which are especially useful for converting fortran source code (e.g., changing all in-line comments to ANSI standard F77 style).
You may download the rest of the document here.
Resource: FORTRAN compared with C++
A table that has FORTRAN coding on one side and the equivalent C++ coding on the other. This is very useful if you know one language well and wish to do a similar task in the other (weak) language.
You may download the rest of the document here.
Tutorial: How to do input/output in FORTRAN
One of these days, you might encounter FORTRAN source code (very common in legacy material models even in modern C++ codes). You might have to “tweak” the FORTRAN even if you aren’t an expert. This program illustrates how to read and write numbers and strings in FORTRAN, which should familiarize you with the syntax. See next entry for further assistance in deciphering Fortran.
You may download the program here.
Tutorial: Emacs and GDB
I remember learning how to use a debugger and Utah State University as an undergraduate. We learned to program in Fortran 90, and used a Microsoft debugger. It seemed cool, but honestly with the types of programs I was writing at the time, using print statement seemed to be effective enough and less of a hassle. Recently I have been working with the Uintah MPM code, which is MUCH larger and more complex than any code I’ve ever written. After several months of wading through the code I finally came across a problem that “cout” just could not help me solve. The code was suddenly crashing with an allocation error and giving no useful backtrace information. A colleague suggested that I use gdb to find out where the problem was occurring. It turned out to be very, very helpful and surprisingly easy to use. I’ve recently become a convert to Emacs, and found that the gdb interface in Emacs is especially nice. So here is goes: