Skip to content

Koushikphy/Fortran-Topics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 

Repository files navigation

A Collection for some random & useful Fortran codes

Modern Fortran features:

  1. Object Oriented Programming
  2. Explicit Interface
  3. Polymorphism
    1. Operator overloading
    2. Operator overloading 2
  4. Overload derived data type constructor
  5. Generic function bound to derived type
  6. Parse Commandline arguments
  7. Pointer
  8. Interoperability with C: Call C/C++ functions from Fortran
  9. Preprocessing
  10. Submodule
  11. Coarray Fortran
  12. OpenMP Cheat Sheet for Fortran
  13. MPI Cheat Sheet for Fortran
  14. CUDA Fortran: Fortran programming on GPU

Useful codes

  1. MPI+OpenMP Boilerplate
  2. MPI list node names
  3. linspace/arrange analogous to NumPy
  4. Factorial
  5. Get number of lines and columns in a data file
  6. Namelist file I/O
  7. Config Parser: Parse key-value pair from configuration file
  8. NetCDF read/write/append data
  9. Spline Interpolation
  10. Spline Smoother
  11. LAPACK: Diagonalize matrix (Symmetric/tridiagonal/general/ComplexHermitian)
    1. Fourier Transform with fftw
    2. Differentiation with FFT
    3. FFTW uses different different definition to fourn
    4. Remove noise from signal using FFT
  12. Solve System of linear equations using SVD
  13. Solving differential equations with LSODA/E
  14. Different time utilities
    1. Stop watch like timer
    2. strftime
  15. Different system utilities
    1. Catch kill/interrupt signal inside code
    2. Get memory usage of current executable
    3. Get full system path from relative path
  16. Different string utilities
    1. integer/float to string and vice-versa
    2. upper to lower case and vice-versa
    3. String joining with + operator
    4. Join array of number/string to a single array
    5. Center align string
  17. Progress bar with fortran
  • There may be several program in the src directory that are not listed here.

Useful links:

  1. GNU Fortran(9.3) manual
  2. Mistakes in Fortran 90 Programs That Might Surprise You
  3. https://github.com/urbanjost/general-purpose-fortran
  4. Commands, tools & know-how to work with Linux in a better way
  5. Numerical-Analysis-Problems
  6. Determining Root Cause of Segmentation Faults SIGSEGV or SIGBUS errors