Skip to content

Fortran Numerical Methods is an open-source project that provides efficient and well-organized implementations of various numerical methods in the Fortran programming language. It includes solutions for ordinary differential equations, numerical interpolation, and root-finding of equations, among others.

License

Notifications You must be signed in to change notification settings

c4rlosr4ul/fortran-numerical-methods

Repository files navigation

Fortran Numerical Methods

Language: English Language: Español

Welcome to our repository dedicated to the implementations of various numerical methods using the Fortran programming language. We offer a wide range of methods that can be utilized in many fields of study, from solving ordinary differential equations, numerical interpolation, to finding roots of equations, and much more.

Repository Structure

  • data: This directory stores data files that serve as input for our demonstration programs.
  • modules: This directory contains Fortran modules for distinct numerical methods.
  • outputs: This directory is used for storing output files generated by our demonstration programs.
  • trash: This is a temporary holding directory for ephemeral files and files that are currently in the process of organization.

Featured Programs and Method Implementations

Below is a list of our main programs and the numerical methods they implement. Each table entry indicates the current implementation status. We continue to work on this repository and expect to complete unfinished methods soon.

Numerical Methods Status

Differentiation and Integration

Main Program Method Status
main_derivative.f90 Numerical Derivatives ✔️
main_integration.f90 Trapezoidal Method ✔️
Simpson's 1/3 Method ✔️
Simpson's 3/8 Method ✔️
Romberg Method ✔️
Gaussian Quadrature

Interpolation Methods

Main Program Method Status
main_interpolation.f90 Lagrange Interpolation ✔️
Newton's Forward Interpolation ✔️
Newton's Backward Interpolation
Spline Interpolation

Ordinary Differential Equations

Main Program Method Status
main_ode.f90 Euler's Method (1st Order) ✔️
Runge-Kutta 2nd Order (1st Order) ✔️
Runge-Kutta 4th Order (1st Order) ✔️
Euler's Method (2nd Order) ✔️
Verlet Method (2nd Order) ✔️
Runge-Kutta 2nd Order (2nd Order) ✔️
Runge-Kutta 4th Order (2nd Order) ✔️

Random Methods

Main Program Method Status
main_random_methods.f90 Monte Carlo Method ✔️
Monte Carlo Integration ✔️
Double Integral Monte Carlo ✔️

Root Finding

Main Program Method Status
main_root_finding.f90 Bisection Method ✔️
Secant Method ✔️
Newton's Method for Root Finding ✔️
Fixed-Point Iteration

Partial Differential Equations

Main Program Method Status
main_pde.f90 Finite Difference Method 🔄
Finite Element Method 🔄
Crank-Nicolson Method 🔄

Optimization

Main Program Method Status
main_optimization.f90 Gradient Descent Method 🔄
Newton's Method for Optimization 🔄
Genetic Algorithm 🔄
Simulated Annealing

Matrix Computations

Main Program Method Status
main_matrix_computations.f90 Matrix Inversion 🔄
Matrix Determinant 🔄
Eigenvalues and Eigenvectors 🔄
LU Decomposition

Statistical Methods

Main Program Method Status
main_statistical_methods.f90 Least Squares Regression 🔄
Principal Component Analysis 🔄
Bootstrap Resampling 🔄
Chi-Square Test

Key to Status

✔️ - Completed and available for use.

❌ - Not yet implemented.

... - Partially implemented or under development.

🔄 - To Do

This repository is under active development. If a method is not currently available or under development, please check back for updates. Contributions are always welcome.

[Additional methods and their respective example usage can be found in the full

to maintain a conversational pace.

Compilation and Execution Instructions

Follow these steps to compile and run any of the main programs:

  1. Navigate to the repository root directory.

  2. Compile the desired main program using gfortran. For instance, to compile main_derivative.f90, run:

    gfortran modules/edo_solution.f90 main_edo.f90 -o main_edo.out 
  1. Run the compiled program. For example, to execute main_derivative.out, run:
    ./main_edo.out 

Contributing

We appreciate and welcome all contributions. Kindly create a branch from your fork and submit a pull request detailing your changes.

Licensing

This project operates under the MIT License. Please see the LICENSE file for more comprehensive details.

Please note: It's essential to provide a copy of the license or a link to it. The readme mentions that the project is under the MIT License but does not provide a copy or a link. The missing part of the license makes it unclear what rules apply to people who want to use, change, or contribute to the software.

About

Fortran Numerical Methods is an open-source project that provides efficient and well-organized implementations of various numerical methods in the Fortran programming language. It includes solutions for ordinary differential equations, numerical interpolation, and root-finding of equations, among others.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published