Skip to content

arifyunando/numerical_methods_f

Repository files navigation

Numerical Methods for Engineers with Modern Fortran

Chapra S. C. & Canale R. P. (2015). Numerical methods for engineers (7th ed.). McGraw-Hill Higher Education.

Description

This repository contains implementations of the algorithm described in Chapra & Canale's book, "Numerical Methods for Engineers". Each folder contains different topics and hence can be studied separately.

About Numerical Methods

In numerical analysis, a numerical method is a mathematical tool designed to solve numerical problems. The implementation of a numerical method with an appropriate convergence check in a programming language is called a numerical algorithm. - Wikipedia
---
Numerical methods are techniques by which mathematical problems are formulated so that they can be solved with arithmetic operations. Although there are many kinds of numerical methods, they have one common characteristic: they invariably involve large numbers of tedious arithmetic calculations. It is little wonder that with the development of fast, effi cient digital computers, the role of numerical methods in engineering problem solving has increased dramatically in recent years. - Chapra & Canale (2015)

Compiling and Running the Codes

This repository is arranged such that every folder has its own topic and CMakeLists.txt file for easy compilation with CMake. To install CMake 3.15, please run this following commands

sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt update
sudo apt upgrade

The code then can be compiled using GNU Fortran Compiler with this following commands.

sudo apt update 
sudo apt upgrade -y
sudo apt install -y build-essential 
cd <topic_folder>
mkdir build; cd build
cmake ..
make install

These commands will put the compiled binaries in a subfolder called bin which placed at <project_parent>/<topic_folder>/build/ along with any input files that is needed for testing.

For quick test, go into the binary folder and run ctest as follows. Note that -VV gives you very verbrose testing. Help information for the ctest command can be accessed through --help argument.

ctest -VV

Information on how to use the binary can be access through --help, -H argument when calling the binary, for example:

roots --help

Table of Contents

  1. Roots of Equations
  2. Linear Algebraic Equations
  3. Optimizations
  4. Curve Fitting
  5. Numerical Differentiation and Integrations
  6. Ordinary Differential Equations
  7. Partial Differential Equations

Disclaimers and Contribution

This is a simple study repository, thus the quality of the code is not the priority. Since it is basically a study log, contributions from third parties is not expected. Though, you are very welcome to fork this repository and give a GitHub star ⭐

Author

Arif Y. Sunanhadikusuma (Soen)
---
LinkedIn
Civil Engineering (S.T.)
Department of Civil Engineering
Parahyangan Catholic University, Indonesia
---
Geotechnical Engineering (M.Sc)
Civiel Techniek en Geowetenschappen (CiTG)
TU Delft, The Netherlands

About

Fortran implementation of Chapra S. C. & Canale R. P. (2015). Numerical methods for engineers (7th ed.). McGraw-Hill Higher Education.

Topics

Resources

License

Stars

Watchers

Forks