SubjectsSubjects(version: 945)
Course, academic year 2023/2024
   Login via CAS
Fortran Programming - NPRF017
Title: Programování ve Fortranu
Guaranteed by: Department of Geophysics (32-KG)
Faculty: Faculty of Mathematics and Physics
Actual: from 2021
Semester: winter
E-Credits: 3
Hours per week, examination: winter s.:2/0, Ex [HT]
Capacity: unlimited
Min. number of students: unlimited
4EU+: no
Virtual mobility / capacity: no
State of the course: taught
Language: Czech
Teaching methods: full-time
Teaching methods: full-time
Additional information: http://geo.mff.cuni.cz/~lh
Guarantor: RNDr. Ladislav Hanyk, Ph.D.
Classification: Physics > Mathematics for Physicists
Annotation -
Last update: HANYK/MFF.CUNI.CZ (12.04.2008)
Course of programming in the Fortran language. Fortran standards 77, 90/95 and 2003. Using compilers for Microsoft Windows and Linux. Good manners of Fortran programmers.
Aim of the course -
Last update: HANYK/MFF.CUNI.CZ (12.04.2008)

Students writing fluently source codes in Fortran 95, understanding Fortran 77 and looking forward to Fortran 2003 compilers.

Course completion requirements - Czech
Last update: RNDr. Ladislav Hanyk, Ph.D. (10.10.2017)

Předmět bude zakončen zkouškou po předložení vypracovaných domácích úkolů.

Literature -
Last update: RNDr. Ladislav Hanyk, Ph.D. (04.10.2011)
  • Hřebíček J. a kol., FORTRAN 77 a vědeckotechnické výpočty, Academia, 1989
  • Metcalf M., J. Reid, M. Cohen, Modern Fortran Explained, Oxford Science, 2011
  • Press W.H., S.A. Teukolsky, W.T. Vetterling, B.P. Flannery, Numerical Recipes in Fortran 77: The Art of Scientific Computing, Second Edition, Cambridge University Press, 1996 (http://www.nr.com)
  • and more at
  • http://en.wikipedia.org/wiki/Fortran
  • http://www.fortran.com/fortran/metcalf.htm
  • http://www.root.cz/serialy/fortran-pro-vsechny
  • http://www.pbm.com/~lindahl/real.programmers.html
Teaching methods -
Last update: RNDr. Ladislav Hanyk, Ph.D. (27.09.2011)

Lecture and homeworks

Requirements to the exam - Czech
Last update: RNDr. Ladislav Hanyk, Ph.D. (10.10.2017)

Zkouška je ústní, požadavky odpovídají sylabu v rozsahu prezentovaném na přednášce.

Syllabus -
Last update: RNDr. Ladislav Hanyk, Ph.D. (20.10.2011)

Why Fortran? Norms and compilers of Fortran, literature on Fortran, Fortran on the web. Characteristic features, common rumors.

Summary of terms: language elements, data types, constants, names, variables, pointers, specification and control statements, program units, source forms.

Program structure: main program, subprograms, modules, submodules, nesting of subprograms.

Control statements: assignments, conditional and unconditional branches, loops, procedure calls, input/output statements etc.

Data types and kinds. Specification statements, attributes, initialization. Expressions: operators, priority, type conversion, intrinsic procedures. Other specification statements.

Arrays: shape, specification. Static, allocatable, automatic and formal arrays. Array constructor. Conformable arrays, array sections, elemental functions and expressions, array-handling intrinsic procedures. Forall and where statements. Applicability of allocatable arrays.

Procedures: functions and subroutines. Arguments of procedures, specification and passing, passing of arrays, compatibility of formal and actual arguments. External, module and internal procedures, explicit interfaces. Scoping units, local data, module data, global names. Recursive, pure and elemental procedures, overloading of procedures.

Data transfer: input and output statements, format definition, edit descriptors. Operations on external files. Format conversion with internal files.

Pointers and targets. Pointer assignment, allocation and deallocation. Pointer arrays and arrays of pointers. Problematic situations.

Structures and objects: specification of derived types and structures, structure constructors. Defined operator and assignment. Type extension, type-bound procedure, polymorphic variable, abstract type, finalization.

Legacy restrictions and obsolescent features of Fortran 77, 90 and 95.

Parallelization in Fortran: OpenMP directives, MPI procedures. PGI accelerator for graphics processing units.

Libraries of numerical methods for Fortran compilers: LAPACK, Intel MKL, IMSL, NAG, Numerical Recipes.

 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html