Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Basics
- 3 Short introduction to Linux
- 4 Interpolation
- 5 Taking derivatives
- 6 Numerical integration
- 7 Solution of nonlinear equations
- 8 Differential equations
- 9 Matrices
- 10 Random processes and Monte Carlo simulation
- References
- Appendix A The ROOT system
- Appendix B Free scientific libraries
- Appendix C FORTRAN and C++
- Appendix D Program listings
- Index
2 - Basics
Published online by Cambridge University Press: 04 August 2010
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Basics
- 3 Short introduction to Linux
- 4 Interpolation
- 5 Taking derivatives
- 6 Numerical integration
- 7 Solution of nonlinear equations
- 8 Differential equations
- 9 Matrices
- 10 Random processes and Monte Carlo simulation
- References
- Appendix A The ROOT system
- Appendix B Free scientific libraries
- Appendix C FORTRAN and C++
- Appendix D Program listings
- Index
Summary
Before we start we need to introduce a few concepts of computers and the interaction between you, the user, and the machine. This will help you decide when to write a program for solving a physics or science problem and when it is much easier or faster to use a piece of paper and a pocket calculator. In thinking about computers, remember there is a distinction between hardware and software. Software is divided into the operating system and your particular application, like a spreadsheet, word-processor or a high level language. In this book we will spend most of the time in dealing with issues relevant to physics and the algorithms used to solve problems. However, in order to make this as productive as possible, we will start off with a short description of the hardware and then some discussion of the operating system.
Basic computer hardware
Apart from huge parallel supercomputers, all workstations you can buy today are organized in a similar way (Figure 2.1).
The heart of the computer is the CPU (Central Processing Unit) controlling everything in your workstation. Any disk I/O (Input/Output) or computational task is handled by the CPU. The speed at which this chip can execute an instruction is measured in Hz (cycles per second) at several GHz. The CPU needs places to store data and instructions. There are typically four levels of memory available: level I cache, level II cache, RAM (Random Access Memory) and swap space, the last being on the hard disk.
- Type
- Chapter
- Information
- Introductory Computational Physics , pp. 5 - 10Publisher: Cambridge University PressPrint publication year: 2006