Vật lý tính toán nhập môn: Ứng dụng máy tính giải bài toán vật lý (Klein & Godunov)

Khám phá vật lý tính toán nhập môn: Các khái niệm cơ bản, phương pháp mô phỏng và ứng dụng thực tế. Tài liệu học tập cho sinh viên và nhà nghiên cứu.

Trường đại học

Cambridge University Press

Chuyên ngành

Vật lý tính toán

Người đăng

Ẩn danh

Thể loại

Sách giáo trình

2006

149
0
0

Phí lưu trữ

35 Point

Mục lục chi tiết

Preface

1. Chapter 1: Introduction

1.1. The need for computers in science

1.2. What is computational physics?

1.3. Linux and C++

2. Basics

2.1. Basic computer hardware

2.3. How does it work?

3. Short introduction to Linux

3.1. Getting started and logging in

3.3. The filesystem, or where is everything?

3.4. Moving around in your system

3.5. Listing your directory

3.6. Creating your own files

3.7. Doing some work

3.9. Machine representation and precision

3.4. Polynomial interpolation

4.6. Rational function interpolation

4.7. Exercises

5. Taking derivatives

5.1. General discussion of derivatives with computers

5.3. Central difference and higher order methods

5.4. Higher order derivatives

5.5. Exercises

6. Numerical integration

6.1. Introduction to numerical integration

6.2. The simplest integration methods

6.3. More advanced integration

6.4. Exercises

7. Solution of nonlinear equations

7.3. Method of secants

7.4. Brute force method

7.5. Exercises

8. Differential equations

8.2. A brush up on differential equations

8.3. Introduction to the simple and modified Euler methods

8.4. The simple Euler method

8.5. The modified Euler method

8.6. Runge–Kutta method

8.7. Adaptive step size Runge–Kutta

8.8. The damped oscillator

8.1. Linear systems of equations

9.3. Standard libraries

9.5. Exercises

10. Random processes and Monte Carlo simulation

10.1. Random processes in science

10.2. Random number generators

10.3. The random walk

10.4. Random numbers for nonuniform distributions

10.5. Monte Carlo integration

10.6. Exercises

References

Appendix A The ROOT system

A.1. What is ROOT

A.2. The ROOT basics

A.3. The first steps

A.5. Exercises

Appendix B Free scientific libraries

B.3. Where to obtain ROOT

Appendix C FORTRAN and C++

C.1. Calling FORTRAN from C++

Appendix D Program listings

D.2. Runge–Kutta program

D.3. Random walk in two dimensions

D.4. Acceptance and rejection method with sin(x) distribution

Index

Tóm tắt

I. Vật lý tính toán nhập môn Cách máy tính giải bài toán

Vật lý tính toán là một lĩnh vực sử dụng khoa học máy tính để giải quyết các bài toán vật lý lý thuyết. Nó kết hợp kiến thức về vật lý, toán học và lập trình để xây dựng các mô hình hóa vật lýmô phỏng vật lý hệ thống phức tạp, từ đó đưa ra các dự đoán và giải thích về hành vi của chúng. Trong thế giới hiện đại, máy tính đã trở thành một công cụ không thể thiếu đối với các nhà vật lý. Chúng được sử dụng để phân tích dữ liệu vật lý, giải phương trình vi phân, mô phỏng Monte Carlo, và nhiều tác vụ khác. Sự phát triển của máy tính đã mở ra những cánh cửa mới cho việc nghiên cứu vật lý, cho phép chúng ta khám phá những hệ thống mà trước đây không thể tiếp cận được bằng các phương pháp lý thuyết hoặc thực nghiệm truyền thống. Tài liệu gốc nhấn mạnh rằng máy tính là một trong những công cụ quan trọng nhất dành cho các nhà vật lý (Andi Klein và Alexander Godunov). Mục tiêu của bài viết này là cung cấp một cái nhìn tổng quan về vật lý tính toán, giới thiệu các khái niệm cơ bản, và minh họa cách máy tính có thể được sử dụng để giải quyết các bài toán vật lý thực tế.

1.1. Sự cần thiết của máy tính trong khoa học hiện đại

Máy tính đã trở thành một phần không thể thiếu của cuộc sống hàng ngày. Các kỹ năng tính toán rất cần thiết để chuẩn bị cho sinh viên cả học sau đại học và môi trường làm việc ngày nay. Vật lý là nền tảng của mọi lĩnh vực công nghệ. Khi bạn có hiểu biết vững chắc về vật lý và bí quyết tính toán để tính toán các giải pháp cho các vấn đề phức tạp, thành công chắc chắn sẽ theo bạn trong môi trường công nghệ cao của thế kỷ XXI.

1.2. Định nghĩa và phạm vi của Vật lý tính toán

Vật lý tính toán cung cấp một phương tiện để giải quyết các vấn đề số phức tạp. Bản thân nó sẽ không cung cấp bất kỳ cái nhìn sâu sắc nào về một vấn đề (sau tất cả, một máy tính chỉ thông minh như người dùng của nó), nhưng nó sẽ cho phép bạn tấn công các vấn đề mà nếu không có thể không giải được. Một khía cạnh quan trọng của vật lý tính toán là mô hình hóa các hệ thống phức tạp lớn.

II. Thách thức khi giải bài toán vật lý phức tạp bằng phương pháp truyền thống

Các phương pháp truyền thống thường gặp khó khăn khi giải quyết các bài toán vật lý có tính phi tuyến, nhiều chiều, hoặc liên quan đến số lượng lớn các thành phần tương tác. Việc giải phương trình vi phân bằng tay trở nên bất khả thi, và các mô hình hóa vật lý đơn giản thường không đủ để mô tả chính xác hiện tượng. Mô phỏng vật lý đòi hỏi khối lượng tính toán khổng lồ, vượt quá khả năng của các phương pháp thủ công. Ví dụ, việc mô phỏng sự chuyển động của các hạt trong một chất lỏng, hoặc sự lan truyền của sóng điện từ trong một môi trường phức tạp, đòi hỏi phải giải quyết hàng triệu hoặc thậm chí hàng tỷ phương trình đồng thời. Các phương pháp lý thuyết thường dựa trên các giả định đơn giản hóa, có thể dẫn đến kết quả không chính xác. Để có được kết quả đáng tin cậy, cần phải sử dụng các phương pháp số và máy tính.

2.1. Giới hạn của phương pháp giải tích trong Vật lý

Khi chỉ quan tâm đến sự hiểu biết khái niệm về lĩnh vực này hoặc ước tính kết quả của một thí nghiệm, giải tích đơn giản có lẽ sẽ đủ. Chúng ta có thể giải quyết vấn đề về một quả bóng đại bác mà không có lực cản của không khí hoặc lực Coriolis bằng toán học rất sơ cấp, nhưng một khi chúng ta bao gồm các hiệu ứng này, giải pháp trở nên phức tạp hơn một chút.

2.2. Độ phức tạp của hệ thống nhiều vật và tương tác

Vật lý, là một khoa học thực nghiệm, cũng đòi hỏi kết quả đo được có ý nghĩa thống kê, có nghĩa là chúng ta phải lặp lại một thí nghiệm nhiều lần, đòi hỏi cùng một tính toán lặp đi lặp lại và so sánh kết quả. Điều này sau đó dẫn đến câu hỏi làm thế nào để trình bày kết quả của bạn. Dễ dàng hơn nhiều để xác định khả năng tương thích của các điểm dữ liệu từ một biểu đồ, thay vì cố gắng so sánh, nói, 1000 số với nhau và xác định xem có một độ lệch đáng kể hay không.

III. Các phương pháp số và giải thuật số cơ bản trong vật lý tính toán

Trong vật lý tính toán, nhiều phương pháp số và giải thuật số được sử dụng để xấp xỉ nghiệm của các phương trình vi phân, tính tích phân, và thực hiện các phép toán khác. Các phương pháp phổ biến bao gồm phương pháp sai phân hữu hạn, phương pháp phần tử hữu hạn, phương pháp Monte Carlo, và các phương pháp tối ưu hóa. Mỗi phương pháp có những ưu điểm và nhược điểm riêng, và việc lựa chọn phương pháp phù hợp phụ thuộc vào đặc điểm của bài toán vật lý cụ thể. Chẳng hạn, phương pháp Monte Carlo thường được sử dụng để mô phỏng các hệ thống thống kê, trong khi phương pháp phần tử hữu hạn thường được sử dụng để giải các bài toán về cơ học chất rắn và chất lỏng. Việc hiểu rõ các phương pháp số và giải thuật số là rất quan trọng để có thể áp dụng chúng một cách hiệu quả và đánh giá độ chính xác của kết quả.

3.1. Phương pháp sai phân hữu hạn và ứng dụng

Phương pháp sai phân hữu hạn là một phương pháp số để xấp xỉ nghiệm của các phương trình vi phân bằng cách thay thế các đạo hàm bằng các sai phân hữu hạn. Phương pháp này thường được sử dụng để giải các bài toán về truyền nhiệt, truyền khối, và cơ học chất lỏng.

3.2. Phương pháp Monte Carlo trong mô phỏng hệ thống

Phương pháp Monte Carlo là một phương pháp số sử dụng số ngẫu nhiên để giải quyết các bài toán. Phương pháp này thường được sử dụng để mô phỏng các hệ thống thống kê, tính tích phân nhiều chiều, và giải các phương trình tích phân.

3.3. Giới thiệu về giải phương trình vi phân bằng phương pháp số

Nghiên cứu về một hệ thống con lắc hỗn loạn. Một lần nữa, vật lý tính toán và các phương pháp số của nó là một công cụ hoàn hảo để nghiên cứu các hệ thống như vậy. Nếu các hệ thống này hoàn toàn giới hạn trong vật lý, người ta có thể tranh luận rằng điều này không đáng được điều trị mở rộng trong một khóa học đại học. Tuy nhiên, có một danh sách ngày càng tăng các lĩnh vực sử dụng các phương trình này; ví dụ, khí tượng học, dịch tễ học, thần kinh học và thiên văn học chỉ là một vài ví dụ.

IV. Ngôn ngữ lập trình và công cụ hỗ trợ trong vật lý tính toán

Việc lựa chọn ngôn ngữ lập trình phù hợp là rất quan trọng trong vật lý tính toán. Python, MATLAB, và C++ là những lựa chọn phổ biến. Python nổi tiếng với tính dễ học, thư viện phong phú (NumPy, SciPy, Matplotlib), và khả năng tích hợp với các công cụ tính toán vật lý khác. MATLAB cung cấp một môi trường tính toán mạnh mẽ với nhiều hàm tích hợp cho các phép toán số và phân tích dữ liệu. C++ được sử dụng cho các ứng dụng đòi hỏi hiệu năng cao và khả năng kiểm soát phần cứng. Bên cạnh ngôn ngữ lập trình, các phần mềm mô phỏng vật lý như COMSOL, ANSYS, và OpenFOAM cũng được sử dụng rộng rãi. Việc nắm vững các công cụ tính toán vật lýphần mềm mô phỏng vật lý là rất cần thiết để có thể thực hiện các nghiên cứu vật lý tính toán một cách hiệu quả.

4.1. Ưu điểm và nhược điểm của Python MATLAB C

Python nổi tiếng với tính dễ học, thư viện phong phú (NumPy, SciPy, Matplotlib), và khả năng tích hợp với các công cụ tính toán vật lý khác. MATLAB cung cấp một môi trường tính toán mạnh mẽ với nhiều hàm tích hợp cho các phép toán số và phân tích dữ liệu. C++ được sử dụng cho các ứng dụng đòi hỏi hiệu năng cao và khả năng kiểm soát phần cứng.

4.2. Giới thiệu các thư viện và công cụ hỗ trợ NumPy SciPy Matplotlib

NumPy cung cấp các đối tượng mảng đa chiều và các hàm toán học cho việc xử lý mảng. SciPy cung cấp các hàm cho tối ưu hóa, tích phân, giải phương trình vi phân, và nhiều tác vụ khoa học khác. Matplotlib cung cấp các công cụ để tạo ra các biểu đồ và đồ thị chất lượng cao.

4.3. Tại sao nên dùng Linux cho lập trình Vật Lý Tính Toán

Chúng tôi sử dụng Linux làm hệ điều hành được lựa chọn cho cuốn sách giáo trình này vì: • Linux có sẵn rộng rãi mà không mất chi phí; • Linux chạy trên hầu hết tất cả các máy tính có sẵn; • nó có sự ổn định lâu dài không đạt được bởi bất kỳ hệ điều hành PC nào khác; • Các bản phân phối Linux bao gồm rất nhiều phần mềm miễn phí, i., PASCAL, FOR-TRAN, C, C++.

V. Ứng dụng thực tiễn của Vật lý tính toán trong nghiên cứu khoa học

Vật lý tính toán được ứng dụng rộng rãi trong nhiều lĩnh vực của vật lý, bao gồm cơ học lượng tử, cơ học thống kê, điện động lực học, và vật liệu học. Các nhà nghiên cứu sử dụng vật lý tính toán để mô phỏng hành vi của các vật liệu mới, dự đoán tính chất của các phân tử, và nghiên cứu các hiện tượng vật lý phức tạp. Ví dụ, vật lý tính toán có thể được sử dụng để mô phỏng quá trình tổng hợp vật liệu nano, tính toán cấu trúc điện tử của các chất bán dẫn, hoặc nghiên cứu sự tương tác giữa ánh sáng và vật chất. Các kết quả thu được từ các mô phỏng vật lý có thể giúp các nhà khoa học hiểu rõ hơn về thế giới tự nhiên, và phát triển các công nghệ mới.

5.1. Mô phỏng vật liệu mới và dự đoán tính chất

Vật lý tính toán có thể được sử dụng để mô phỏng cấu trúc và tính chất của các vật liệu mới, giúp các nhà khoa học khám phá các vật liệu có tiềm năng ứng dụng trong các lĩnh vực như năng lượng, điện tử, và y sinh.

5.2. Nghiên cứu tương tác ánh sáng và vật chất

Vật lý tính toán có thể được sử dụng để mô phỏng sự tương tác giữa ánh sáng và vật chất, giúp các nhà khoa học hiểu rõ hơn về các hiện tượng quang học và phát triển các thiết bị quang điện tử mới.

5.3. Ứng dụng Vật Lý Tính Toán trong cơ học lượng tử

Nghiên cứu các trạng thái lượng tử của các hệ nhiều hạt, tính toán các tính chất của các phân tử và vật liệu ở cấp độ nguyên tử.

VI. Kết luận và tương lai của Vật lý tính toán Xu hướng phát triển

Vật lý tính toán đã trở thành một công cụ không thể thiếu trong nghiên cứu vật lý hiện đại. Với sự phát triển của khoa học máy tính và các phương pháp số, vật lý tính toán sẽ tiếp tục đóng vai trò quan trọng trong việc khám phá những bí ẩn của vũ trụ, và phát triển các công nghệ mới. Các xu hướng phát triển trong vật lý tính toán bao gồm việc sử dụng machine learning trong vật lý để phân tích dữ liệu vật lý và xây dựng các mô hình hóa vật lý, phát triển các phương pháp số hiệu quả hơn, và mô phỏng các hệ thống phức tạp hơn. Vật lý tính toán sẽ tiếp tục là một lĩnh vực nghiên cứu đầy hứa hẹn, mang lại những khám phá quan trọng cho khoa học và công nghệ.

6.1. Sự phát triển của Machine Learning trong Vật lý

Sử dụng các thuật toán machine learning để phân tích dữ liệu vật lý và xây dựng các mô hình hóa vật lý, giúp các nhà khoa học khám phá các mối quan hệ phức tạp trong dữ liệu và dự đoán hành vi của các hệ thống vật lý.

6.2. Các hướng nghiên cứu mới trong Vật lý tính toán

Phát triển các phương pháp số hiệu quả hơn cho các bài toán vật lý phức tạp, khám phá các thuật toán mới để tối ưu hóa hiệu năng tính toán, và mô phỏng các hệ thống lớn hơn và phức tạp hơn.

27/09/2025

Trích đoạn nội dung tài liệu

This page intentionally left blank www.com Introductory Computational Physics Computers are one of the most important tools available to physicists, whether for calculating and displaying results, simulating experiments, or solving complex systems of equations. Introducing students to computational physics, this textbook shows how to use computers to solve mathematical problems in physics and teaches students about choosing different numerical approaches. It also introduces students to many of the programs and packages available. The book relies solely on free software: the operating system chosen is Linux, which comes with an excellent C++ compiler, and the graphical interface is the ROOT package available for free from CERN.

This up-to-date, broad scope textbook is suitable for undergraduates starting on computational physics courses. It includes exercises and many examples of programs. Online resources at www.org/9780521828627 feature additional reference information, solutions, and updates on new techniques, software and hardware used in physics. Andi Klein is a Technical Staff member at Los Alamos National Laboratory, New Mexico.

He gained his Ph. from the University of Basel, Switzerland. He held the position of Professor of Physics at Old Dominion University, Virginia, from 1990 to 2002, where he taught courses in computational physics. Alexander Godunov is Assistant Professor at the Department of Physics, Old Dominion University, Virginia.

He gained his Ph. from Moscow State University, Russia and has held research positions at Tulane University, Louisiana, and visiting positions at research centers in France and Russia.com Introductory Computational Physics Andi Klein and Alexander Godunov Los Alamos National Laboratory and Old Dominion University www.com cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo Cambridge University Press The Edinburgh Building, Cambridge cb2 2ru, UK Published in the United States of America by Cambridge University Press, New York www.org Information on this title: www.org/9780521828628 © Cambridge University Press 2006 This publication is in copyright. Subject to statutory exception and to the provision of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published in print format isbn-13 978-0-511-16650-1 eBook (Adobe Reader) isbn-10 0-511-16650-8 eBook (Adobe Reader) isbn-13 978-0-521-82862-8 hardback isbn-10 0-521-82862-7 hardback isbn-13 978-0-521-53562-5 isbn-10 0-521-53562-x Cambridge University Press has no responsibility for the persistence or accuracy of urls for external or third-party internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.com Contents Preface page ix 1 Introduction 1 1.1 The need for computers in science 1 1.2 What is computational physics? 1 1.3 Linux and C++ 2 2 Basics 5 2.1 Basic computer hardware 5 2.3 How does it work? 9 3 Short introduction to Linux 11 3.1 Getting started and logging in 11 3.3 The filesystem, or where is everything? 12 3.4 Moving around in your system 13 3.5 Listing your directory 14 3.6 Creating your own files 15 3.7 Doing some work 17 3.9 Machine representation and precision 20 3.4 Polynomial interpolation 31 v www.com vi Contents 4.6 Rational function interpolation 34 4.7 Exercises 35 5 Taking derivatives 37 5.1 General discussion of derivatives with computers 37 5.3 Central difference and higher order methods 38 5.4 Higher order derivatives 40 5.5 Exercises 40 6 Numerical integration 41 6.1 Introduction to numerical integration 41 6.2 The simplest integration methods 42 6.3 More advanced integration 44 6.4 Exercises 49 7 Solution of nonlinear equations 51 7.3 Method of secants 52 7.4 Brute force method 53 7.5 Exercises 53 8 Differential equations 55 8.2 A brush up on differential equations 55 8.3 Introduction to the simple and modified Euler methods 57 8.4 The simple Euler method 58 8.5 The modified Euler method 62 8.6 Runge–Kutta method 65 8.7 Adaptive step size Runge–Kutta 70 8.8 The damped oscillator 72 8.1 Linear systems of equations 83 9.3 Standard libraries 86 www.com Contents vii 9.5 Exercises 88 10 Random processes and Monte Carlo simulation 89 10.1 Random processes in science 89 10.2 Random number generators 90 10.3 The random walk 92 10.4 Random numbers for nonuniform distributions 97 10.5 Monte Carlo integration 101 10.6 Exercises 103 References 105 Appendix A The ROOT system 107 A.1 What is ROOT 107 A.2 The ROOT basics 107 A.3 The first steps 108 A.5 Exercises 115 Appendix B Free scientific libraries 117 B.3 Where to obtain ROOT 118 Appendix C FORTRAN and C++ 119 C.1 Calling FORTRAN from C++ 120 Appendix D Program listings 121 D.2 Runge–Kutta program 123 D.3 Random walk in two dimensions 131 D.4 Acceptance and rejection method with sin(x) distribution 134 Index 137 www.com Preface Computers are one of the most important tools in any field of science and especially in physics.

A student in an undergraduate lab will appreciate the help of a computer in calculating a result from a series of measurements. The more advanced researcher will use them for tasks like simulating an experiment, or solving complex systems of equations. Physics is deeply connected to mathematics and requires a lot of calculational skills. If one is only interested in a conceptual understanding of the field, or an estimate of the outcome of an experiment, simple calculus will probably suffice.

We can solve the problem of a cannon ball without air resistance or Coriolis force with very elementary math, but once we include these effects, the solution becomes quite a bit more complicated. Physics, being an experimental science, also requires that the measured results are statistically significant, meaning we have to repeat an experiment several times, necessitating the same calculation over and over again and comparing the results. This then leads to the question of how to present your results. It is much easier to determine the compatibility of data points from a graph, rather than to try to compare say 1000 numbers with each other and determine whether there is a significant deviation.

From this it is clear that the computer should not only “crunch numbers,” but should also be able to display the results graphically. Computers have been used in physics research for many years and there is a plethora of programs and packages on the Web which can be used to solve different problems. In this book we are trying to use as many of these available solutions as possible and not reinvent the wheel. Some of these packages have been written in FORTRAN, and in Appendix C you will find a description of how to call a FORTRAN subroutine from a C++ program.

As we stated above, physics relies heavily on graphical representations. Usually, the scientist would save the results from some calculations into a file, which then can be read and used for display by a graphics package like gnuplot or a spreadsheet program with graphics capability. We have decided to pursue ix www.com x Preface a different path, namely using the ROOT package [1] developed at the high energy physics lab CERN in Switzerland. ROOT, being an object oriented C++ package, not only provides a lot of physics and math C++-classes but also has an excellent graphics environment, which lets you create publication quality graphs and plots.

This package is constantly being developed and new features and classes are being added. There is an excellent user’s guide, which can be found on the ROOT website in different formats. In order to get started quickly we have given a short introduction in Appendix A.com Chapter 1 Introduction 1.1 The need for computers in science Over the last few decades, computers have become part of everyday life. Once the domain of science and business, today almost every home has a per- sonal computer (PC), and children grow up learning expressions like “hard- ware,” “software,” and “IRQ.” However, teaching computational techniques to undergraduates is just starting to become part of the science curriculum.

Computational skills are essential to prepare students both for graduate school and for today’s work environment. Physics is a corner-stone of every technological field. When you have a solid understanding of physics, and the computational know-how to calculate solutions to complex problems, success is sure to follow you in the high-tech environment of the twenty-first century.2 What is computational physics? Computational physics provides a means to solve complex numerical prob- lems. In itself it will not give any insight into a problem (after all, a computer is only as intelligent as its user), but it will enable you to attack problems which otherwise might not be solvable.

Recall your first physics course. A typical introductory physics problem is to calculate the motion of a cannon ball in two dimensions. This problem is always treated without air resistance. One of the difficulties of physics is that the moment one goes away from such an idealized system, the task rapidly becomes rather complicated.

If we want to calculate the solution with real-world elements (e., drag), things become rather difficult. A way out of this mess is to use the methods of computational physics to solve this linear differential equation.com 2 Introduction One important aspect of computational physics is modeling large complex systems. For example, if you are a stock broker, how will you predict stock market performance? Or if you are a meteorologist, how would you try to predict changes in climate? You would solve these problems by employing Monte Carlo techniques. This technique is simply impossible without com- puters and, as just noted, has applications which reach far beyond physics.

Another class of physics problems are phenomena which are represented by nonlinear differential equations, like the chaotic pendulum. Again, computa- tional physics and its numerical methods are a perfect tool to study such sys- tems. If these systems were purely confined to physics, one might argue that this does not deserve an extended treatment in an undergraduate course. How- ever, there is an increasing list of fields which use these equations; for exam- ple, meteorology, epidemiology, neurology and astronomy to name just a few.

An advantage of computational physics is that one can start with a simple problem which is easily solvable analytically. The analytical solution illus- trates the underlying physics and allows one the possibility to compare the computer program with the analytical solution. Once a program has been written which can handle the case with the typical physicist’s approximation, then you add more and more complex real-world factors. With this short introduction, we hope that we have sparked your interest in learning computational physics.

Before we get to the heart of it, however, we want to tell you what computer operating system and language we will be using.3 Linux and C++ Linux You may be accustomed to the Microsoft Windows or Apple MAC operating systems. In science and in companies with large computing needs, however, UNIX is the most widely used operating system platform. Linux is a UNIX- type operating system originally developed by Linus Torwald which runs on PCs. Today hundreds of people around the world continue to work on this system and either provide software updates or write new software.

We use Linux as the operating system of choice for this text book because: • Linux is widely available at no cost; • Linux runs on almost all available computers; • it has long-term stability not achieved by any other PC operating system; • Linux distributions include a lot of free software, i., PASCAL, FOR- TRAN, C, C++.3 Linux and C++ 3 In today’s trend to use networked clusters of workstations for large computa- tional tasks, knowledge of UNIX/Linux will provide you with an additional, highly marketable skill. C++ In science, historically the most widely used programming language was FORTRAN, a fact reflected in all the mathematical and statistical libraries still in use the world over (e., SLATEC, LAPACK, CERNLIB). One disad- vantage of FORTRAN has always been that it was strongly decoupled from the hardware. If you wanted to write a program which would interact directly with one of the peripherals, you would have to write code in assembly lan- guage.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ