Because of its rich object-oriented features, C++ is rapidly becoming the programming language of choice for science and engineering applications. This text leads beginning and intermediate programmers step-by-step through the difficult aspects of scientific coding, providing a comprehensive survey of object-oriented methods. Numerous aspects of modern programming practice are covered, including object-oriented analysis and design tools, numerical analysis, scientific graphics, software engineering, performance issues and legacy software reuse. Examples and problems are drawn from an extensive range of scientific and engineering applications. The book also includes a full set of free programming and scientific graphics tools that facilitate individual learning and reduce the time required to supervise code development in a classroom setting. This unique text will be invaluable both to students taking a first or second course in computational science and as a reference text for scientific programmers.
Table of Contents
Part I. Basic C++ Programming: 1. Introduction; 2. Installing and running the Dev-C++ programming environment; 3. Introduction to computer and software architecture; 4. Fundamental concepts; 5. Writing a first program; 6. An introduction to object-oriented analysis; 7. C++ object-oriented programming syntax; 8. Control logic and iteration; 9. Basic function properties; 10. Arrays and matrices; 11. Input and output streams; Part II. Numerical Analysis: 12. Numerical error analysis - derivatives; 13. Integration; 14. Root finding procedures; 15. Differential equations; 16. Linear algebra; Part III. Pointers, References and Dynamic Memory Allocation: 17. References; 18. Pointers and dynamic memory allocation; 19. Advanced memory management; 20. The static keyword, multiple and virtual inheritance, templates and the STL library; 21. Program optimization in C++; Part IV. Advanced Numerical Examples: 22. Monte-Carlo methods; 23. Parabolic partial differential equation solvers; Part V. Appendices: Appendix A. Overview of MATLAB; Appendix B. The Borland C++ compiler; Appendix C. The Linux/Windows g++ compiler and profiler; Appendix D. Calling FORTRAN programs from C++; Appendix E. C++ coding standard; References.