Part 3. Advanced Fortran use

In this part, you’ll get an introduction to parallelism and working with advanced data structures.

Chapter 7 introduces images and coarrays for parallel programming. This is the parallel programming model that’s built into Fortran. In this chapter, you’ll write your first program to analyze weather buoy data in parallel. Here, we’ll also implement the parallel version of the tsunami simulator.

Chapter 8 covers derived types, which is the Fortran concept of classes in object-oriented programming. Derived types will allow you to create your own custom data types that can have other data as components and procedures as bound methods. In this chapter, we’ll transition the tsunami simulator from a one-dimensional to a two-dimensional solver.

In chapter 9, you’ll learn how to write generic procedures that can work on arguments with any data type. This will be important in any scenario where input data can come in more than one data type. You’ll also have your first encounter with custom operators, beyond the built-in ones that we’ve been working with so far.

Finally, chapter 10 will teach you how to define your own operators for your derived types and override the existing arithmetic or logical operators with your own. You’ll see that this is quite powerful--it will allow you to create your own data structures and your own rules to govern them. We’ll use these capabilities in the tsunami simulator to make our parallel variables synchronize automatically on assignment. At this point, we’ll have mostly completed our journey with the tsunami simulator.

This is the heaviest part of the book. Approach it with patience and an open mind. At the end, you’ll be able to understand, reuse, and extend most of the existing Fortran code in the wild. For the first time, you’ll also be able to write your own parallel programs from scratch.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.189.247