Converting equations to Fortran code

  • Context: Fortran 
  • Thread starter Thread starter jf22901
  • Start date Start date
  • Tags Tags
    Code Fortran
Click For Summary
SUMMARY

This discussion focuses on converting mathematical equations into Fortran code, particularly for solving initial and boundary value problems. The user has a foundational understanding of numerical methods, including Euler’s midpoint, trapezoidal methods, and Runge-Kutta methods, but seeks deeper insights into the coding process. Recommendations include exploring numerical analysis books that provide sample programs and tutorials, emphasizing the importance of understanding the rationale behind chosen methods. The discussion highlights that simple tasks, such as finding the area under a curve, can be implemented using straightforward loops in Fortran.

PREREQUISITES
  • Basic understanding of numerical methods, including Euler’s midpoint and Runge-Kutta methods.
  • Familiarity with Fortran programming language.
  • Knowledge of initial and boundary value problems in mathematics.
  • Concept of numerical integration techniques.
NEXT STEPS
  • Study numerical analysis textbooks that include Fortran code examples.
  • Learn about implementing Euler’s method and Runge-Kutta methods in Fortran.
  • Research best practices for numerical integration in programming.
  • Explore online resources that explain the development of numerical algorithms in Fortran.
USEFUL FOR

Mathematicians transitioning to programming, Fortran developers, and anyone interested in numerical methods and their implementation in code.

jf22901
Messages
55
Reaction score
1
Hi everyone

I've been doing maths for quite a while now, but have never done any programming until recently. What I'm finding difficult is how you go from an initial value/boundary value problem on a bit of paper to a piece of code that will approximate the equation. I've done a bit of book work on numerical methods (Euler’s midpoint/trapezoidal methods, Runge–Kutta methods) so understand the basics, but would like a more thorough knowledge.

Can anyone suggest any good sites/documents/books that give examples or explanations? Searching online brings up loads of pre-prepared Fortran codes to solve all sorts of things, but I want to know how these codes were created, why they chose the methods they did etc.

Thanks very much in advance. :smile:
 
Technology news on Phys.org
Most numerical analysis books offer pretty easy sample programs and tutorials on how to program those exact problems. Finding the area under the curve via an integral is simply a do-loop in FORTRAN. If you narrow your step size, you should get a reasonably accurate result.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
17K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 34 ·
2
Replies
34
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 54 ·
2
Replies
54
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K