Questions tagged [fortran]
Fortran is a general-purpose, procedural, imperative programming language that is especially suited for numeric computation and scientific computing.
                34 questions
            
            
            
                4
            
            votes
        
        
            
                0
            
            answers
        
        
            
                112
            
            views
        
        
            
            
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                41
            
            views
        
        
            
        Identifies connected elements and faces in FE mesh
                    So I'm conscious that this is a weak appeal for best practices. I'm building a converter that moves generic FE meshes to an inhouse edge format in Fortran and at some point I made a truly diabolical ...
                
            
       
        
            
                6
            
            votes
        
        
            
                1
            
            answer
        
        
            
                448
            
            views
        
        
            
            
            
        FORTRAN90 test suite for Project Euler
                    The intent of this test file is to go through each of my Project Euler solutions and see if they:
return the correct answer, and
do so in under 60 seconds (unless expected otherwise).
I am using ...
                
            
       
        
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                191
            
            views
        
        
            
            
        N-body simulation in coarray Fortran
                    I am new to coarray Fortran and wrote a naive nbody-simulation. It is about 30x slower than an implementation in C + gasnet or C + openSHMEM.
I compiled with gfortran -O3 -march=native -mtune=native -...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                102
            
            views
        
        
            
            
            
        Search through fortran source for a string ignoring comments
                    I am trying to write a python script that can search through Fortran code
ignoring comments. I didn't find a simple way of doing this using grep. So I startwed writing my own.
The rules for comments ...
                
            
       
        
            
                4
            
            votes
        
        
            
                0
            
            answers
        
        
            
                329
            
            views
        
        
        Enum Class in Fortran
                    I tried to implement something like a C++ enum class in Fortran. That means it should be typesafe and scope bound. (No comparison between integers and enum values ...
                
            
       
        
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                82
            
            views
        
        
            
        Rainfall challenge: procedural implementation
                    This evening I have seen the text of the Rainfall Challenge posted seven years ago by Hunter McMillen. I did not look at his solution (besides, I have no clue about perl), but I was intrigued by the ...
                
            
       
        
            
                2
            
            votes
        
        
            
                2
            
            answers
        
        
            
                330
            
            views
        
        
            
            
        A postfix (a.k.a. Reverse-Polish Notation - RPN) calculator
                    As an exercise, I put together a postfix calculator using modern Fortran. Language apart, I am interested in knowing your take on the algorithm. As far as I remember from my freshman year (chemistry - ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                70
            
            views
        
        
            
            
        Command-line parameters
                    Several years ago (must have been 2012 or so) I wrote a module to manage command-line parameters in a unix-like fashion. At the time, the compilers I had access to were still working their way up to ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                182
            
            views
        
        
            
            
            
        Integer to Roman Numeral conversion
                    As a little standard exercise, I wrote an integer to roman numerals converter in F03. The result looks already neat enough, for my standards, but I wonder whether it could be made snappier without ...
                
            
       
        
            
                6
            
            votes
        
        
            
                2
            
            answers
        
        
            
                416
            
            views
        
        
            
            
            
        Simulating the orbits of the Earth, Moon and Sun together in Fortran
                    This has been racking my brain for hours now. I will try to explain as much as I can. I'm aware this code is horrendously ungraceful, but I'm new to Fortran and making things more efficient is not ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                64
            
            views
        
        
            
        Return union and complement of three sets
                    I would be especially happy to hear opinions about complement_union. 
The rest of the code is just there to test the output.
...
                
            
       
        
            
                5
            
            votes
        
        
            
                1
            
            answer
        
        
            
                643
            
            views
        
        
            
            
        Reverse quick sort in Fortran
                    I have written a quick sort routine to inplace sort an array in descending order:
...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                210
            
            views
        
        
            
            
            
        Fortran 90 / openmp heat transfer simulation optimization
                    I'm a newbie playing around with Fortran 90 and openmp and wrote the code below (a simple 2D heat transfer simulation) for testing purposes.
So far I don't see any speedup by using openmp / parallel ...
                
            
       
        
            
                4
            
            votes
        
        
            
                0
            
            answers
        
        
            
                78
            
            views
        
        
            
        Lightweight lock using OMP atomic
                    I am working on a Monte Carlo simulation using OpenMP multithreading. To avoid race conditions when multiple threads work on the same resolution element, I have implemented the following ...
                
            
       
         
         
         
        