Description
Exercise 1: Checkpoints
Write a subroutine to be used as a checkpoint for debugging.
(a) Include a control on a logical variable (Debug=.true. or .false.) (b) Include an additional (optional) string to be printed
(c) Include additional (optional) variables to be printed
Exercise 2: Documentation
Rewrite Exercise 3 of Week 1 including:
(a) Documentation. (b) Comments.
(c) Pre- and post- conditions. (d) Error handling
(e) Checkpoints
Exercise 3: Derived Types
In Fortran90 write a MODULE which contains a double complex matrix derived TYPE that includes the components: Matrix elements, Matrix Dimensions, Matrix Trace, and Matrix Determinant.
(a) Define the correspondent TYPE.
(b) Define a function/subroutine that initializes this new TYPE
(c) Define the functions/subroutines Trace and Adjoint
(d) Define the correspondent Interfaces of the previous points.
(e) Define a subroutine that writes on file the Matrix TYPE in a readable form. (f) Include everything in a test program.
Page 1 of 1