Module Description

PHY2004 Scientific Programming in C

2010-2011

Code: PHY2004
Level: 2
Title: Scientific Programming in C
InstructorsDr J.M. Rowe
CATS Credit Value: 10
ECTS Credit Value: 5
Pre-requisites: N/A
Co-requisites: N/A
DurationM1-M11
Availability: unrestricted
Background Assumed: IT Skills for Physicists (PHY1108)
Directed Study Time: 11 practical sessions of 2 hours
Private Study Time: 34 hours
Assessment Tasks Time: 44 hours

Aims

A knowledge of a computing language and how to write programs to solve physics related problems is a valuable transferable skill. It is taught though a series of practical sessions in which the students initially learn to understand the logic of the source code and are required to modify the code for a number of prepared projects. There is currently a high demand in many industries to recruit future employees who have a working knowledge of the C programming language. As a result the module now uses C in preference to Fortran, although the principles involved are applicable to almost any procedural programming language.

This module provides a general introduction to programming in C and to the basic elements of ANSI C. It is designed to give students the ability to write simple computer programs in C and to be able to understand such programs written by others. The module covers control structures (loops, if statements, switches), functions and input/output operations which are introduced using simple physics-related problems. The course forms part of a package of computing course given in the School and provides the basic training for those students wishing to take PHY3134 Computational Physics.

Intended Learning Outcomes

Students should be able to:

Module Specific Skills

Discipline Specific Skills

Personal and Key Skills

make straightforward use of a professional programming IDE.

Learning / Teaching Methods

Guided self-study; 11 two-hour practical workshops; e-learning resources.

Assignments

Four two-weekly homework assignments (10 hours each) to be completed before the end of the week following the class. A project (20 hours) to be submitted by the end of week 11.

Assessment

Two-weekly homework assignments and classwork (40%), theory test (10%), project (20%), and a practical test (30%).

Syllabus Plan and Content

  1. The Xcode Integrated Development Environment and C-compiler
  2. ANSI C
    1. The C-compiler
    2. Local and global variables (integers, real, character)
    3. Arithmetic expressions, relational, logical, increment and decrement operators
    4. Input/output (formats, data files, etc.)
    5. Functions and program structure (standard functions, user-defined functions)
    6. Header files
    7. Arrays (strings, multidimensional arrays)
    8. Rounding errors and accuracy considerations
    9. Good programming practice

Core Text

McGrath M. (2002), C Programming in Easy Steps (3rd edition), Computer Step, ISBN 1-840-78203-X (UL: 005.133 MCG)

Supplementary Text(s)

Kernighan B.W. and Richie D.M. (1988), The C Programming Language (2nd edition), Prentice Hall, ISBN 0-13-110362-8 (UL: 001.6424/C KER)
Oualline S. (1997), Practical C Programming (3rd edition), O'Reilly, ISBN 1-565-92306-5 (UL: 005.133 OUA)

Formative Mechanisms

Performance in classwork is monitored throughout and problems discussed with individuals during the class. Advice for better programming is written on homework assignments. Results of the CA tests are discussed with individuals and a summary of common errors given to all students.

Evaluation Mechanisms

The module will be evaluated using information gathered via the student representation mechanisms, the staff peer appraisal scheme, and measures of student attainment based on summative assessment.

Validate   Link-check © Copyright & disclaimer Share