Questions tagged [fortran]
Fortran is a general purpose programming language widely used by the scientific computing community.
18
questions
79
votes
5
answers
20k
views
How much better are Fortran compilers really?
This question is an extension of two discussions that came up recently in the replies to "C++ vs Fortran for HPC". And it is a bit more of a challenge than a question...
One of the most often-heard ...
6
votes
1
answer
1k
views
Meshing options to generate number of the sides of and element (tetgen-triangle)
I wrote a finite element code in fortran 90.
This code is really fast, except the meshing process.
I used triangle and tetgen for meshing in 2D and 3D, respectively, so this process is fast, of ...
65
votes
13
answers
47k
views
C++ vs Fortran for HPC
In my computational science PhD program, we are working almost exclusively in C++ and Fortran. It seems like some professors prefer one over the other. I am wondering which one is 'better' or if one ...
20
votes
6
answers
53k
views
Python vs FORTRAN
Which one is better: FORTRAN or Python? And I guess that in both cases you need Gnuplot, am I right?
I'm working on a Windows machine at the moment.
I'd like to use it to get numerical solutions for ...
11
votes
4
answers
2k
views
Matrix exponential of a skew-Hermitian matrix with fortran 95 and LAPACK
I'm just getting tucked into fortran 95 for some quantum mechanics simulations. Honestly, I've been spoiled by Octave so I've taken matrix exponentiation for granted. Given a (small, $n\leq 36$) skew-...
7
votes
1
answer
4k
views
computing turbulent energy spectrum from isotropic turbulence flow field in a box
I have my 3 dimensional velocity flow-field u, v and w at a given instant of time from DNS using pseudo-spectral method. I need to calculate the energy spectrum ( in Fourier space ) as a function of ...
19
votes
5
answers
3k
views
Parallel Scientific Computation Software Development Language?
I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy ...
15
votes
3
answers
8k
views
Fortran: Best way to time sections of your code?
Sometimes while optimizing code it is required to time certain portions of the code, I have been using the following for years but was wondering if there is a simpler/better way to do it?
...
8
votes
7
answers
7k
views
What is the difference between MATLAB and FORTRAN?
In our university some Ph.D students for computational methods prefer FORTRAN over MATLAB. I can't understand why? What is the difference between them when are used in computational methods like ...
7
votes
4
answers
3k
views
Need Fortran 77 compiler
Does anyone know a compiler for Fortran 77 available as a free download?
I have pre-written 77 code from a source published in the early 90's that I just need to compile, build, and run. But I don't ...
6
votes
1
answer
1k
views
Grid mapping from an unstructured triangular mesh to a regular rectangular mesh
I am modeling fracture propagation using a 2-D dynamic unstructured grid. As the fracture propagates over time, the elements move accordingly. For a given time step, I would like to interpolate the ...
5
votes
0
answers
509
views
Iteratively finding both left and right eigenvectors for non-symmetric complex matrix
I have a complex, non-Hermitian matrix $\mathbf{A}$, for which I need to find a few eigenvalues and eigenvectors in the generalised eigenvalue problem:
$$\mathbf{A}\cdot \mathbf{x} = \lambda \mathbf{...
4
votes
1
answer
1k
views
Effecient CFD programming techniques
I'm trying to make highly efficient CFD programming complex for solving combustion problems. I've finished writing core which realises mathematical model, and now I'm concerned about code performance. ...
4
votes
2
answers
432
views
How to calculate efficiently and accurately the Fourier transform of a radial function in Fortran
As my question states, I want to calculate the Fourier transform $F(q)$ of a radial function $f(r)$ (defined on $[0,\infty)$ and which decays like an exponential $\exp(-Ar+b)$ at large $r$) as ...
4
votes
2
answers
3k
views
Efficently invert tiny matrix in Fortran
I have a piece of code in Fortran90 in which I have to solve both a non-linear (with the Newton-Raphson method, for which I have to invert the Jacobian matrix) and a linear system of equations. When I ...
3
votes
1
answer
288
views
precision loss in non-trigonometric, periodic functions using FFTW and NaNs after marching forward in time (Fortran)
I have developed a pseudospectral solver of the Navier-Stokes equations using FFTW. I tested my formulation of right hand sides (RHS) of the NS equations against standard trigonometric functions (...
3
votes
2
answers
898
views
Molecular Dynamics: Diffusion with PBC
How can I implement the computation of the diffusion coefficient $D$ using periodic boundary conditions (PBC)?
I use molecular dynamics of a set of $nboby$ particles with positions $pos(3,nbody)$ in ...
3
votes
1
answer
165
views
Shall I use global, heap allocated array or local, stack allocated one if references to its elements are made too many times?
I actually have this data locality as a possible problem for why my fortran program runs somewhat slow. In one part of this program, I have nested loops and throughout these loops, a given section of ...