Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nummet

Implementation of various algorithms for Numerical Methods class, in Fortran.

Mainly exposed as a library. Support for CMake and FPM is planned.

Done in a Test Driven Development fashion using test-drive

Contents

  1. Interpolation:
    1. Newton's Forward
    2. Newton's Backward
    3. Newton's Divided Difference
    4. Lagrange's
  2. DiffyQ:
    1. Range-Kutta 2 (Modified Euler)
    2. Euler's Method
    3. Range-Kutta 4
    4. Milne's Predictor Corrector
    5. Taylor Series Method
  3. Algebraic Equations:
    1. Bisection
    2. Newton-Rhapson
    3. Regula Falsi
  4. System of Linear Equations
    1. Gauss Elimination
    2. Gaus Jordan
    3. Gauss Seidel
    4. LU Factorisation [Not Implementing. Use stdlib_linalg->solve_lu]
  5. Finite Differences BVP
    1. 2nd Order Solver
  6. TBD

Note

Please check iter_zero after using set_first_interval. Only continue if iter_zero is false. If it is true then that indicates that the first interval search was not successfuly. You can override this behaviour by manually specifying the first interval while defining an instance of algeb_prob and setting iter_zero to false and setting correct [a,b] for it. When you do want to use set_first_interval, you can ignore iter_zero by not providing it in the constructor and setting any random a,b

Caution

DiffyQ's return value is currently not precision controlled. It is on TODO for now. The output is correct.

Note: DiffyQ's support first order derivatives only. The diffyq_prob type should be used as a derived type to set a problem using init_prob. The eqn_interface provides a general interface to represent the diffyq.

Running Tests

cd nummet
fpm build
fpm test

TODO

  • GNUPlot Integration (ogpf)
  • Switch to using ISO types.
  • Look into real(dp) for diffyQ
  • Use select type to extract the solve implementations in the diffyQ modules as a single function1.

Notes

  • Newton's Backward: p + i - 1
  • Newton's Forward: p - i + 1

Footnotes

  1. I am aware of the code repetition in the diffyq modules (the driver function is very much the same). The only reason they are kept that way is the function call changes in each. A simple select type would do the trick is what I am expecting but in an ideal case some metaprogramming way would be nice.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages