0. a wrap up - tum › ... › ss11 › 11einausgabe › aa-wrap-up.pdf · 2011-03-21 · 0. a wrap...

Post on 24-Jun-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

0. A Wrap Up

March 21, 2011

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 1 of 16

Outline

• Important concepts of C/C++ &missing topics.

• Further literature & lectures.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 2 of 16

Missing C++

• Static variables (class variables; seeslides of session 10)

• Standard library (STL)

• Containers• Iterators• Math library

• Exceptions & error handling

• Outlook to C++Ox

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 3 of 16

Important Concepts (1/2)

• von-Neumann architecture, and, in particular, the linearised memory.

• Definition of an algorithm.

• Interplay of compiler, linker, interpreted programs, and machine language.

• Idea of a variable and its instantiation.

• Overview of built-in data types—please note the default-value paradigm in contextwith default constructors.

• Terms syntax and semantic.

• Comments.

• Assignment statements (equal sign) in combination with case distinction.

• An idea of the rounding error (normalisation process).

• Strict vs. non-strict boolean logic.

• Different variants of branches and loops.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 4 of 16

Important Concepts (2/2)

• Scopes.

• Notion of a function and the three call paradigms.

• Keyword const in different context.

• Recursion and its different types.

• Enums.

• Split-up of an application into header and implementation files.

• Pointers, arrays, and strings.

• Concept of 0-terminated strings.

• Structures (n-tupels).

• Dynamic memory management.

• Encapsulation.

• Methods instead of functions on structs.

• Constructor and destructor concept.

• Inheritance.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 5 of 16

The three pillars of science

Theory ExperimentSimulation

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 6 of 16

The didactic concept revisited

In theory there is no difference between theory and practice. In practice there is.

Yogi Berra

We didn’t practice—no even in the tutorials—but just started to train the very basics. Sofar, there’s no arts involved.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 7 of 16

Further literature & topics

• Martin Fowler: Refactoring• Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides. Design Patterns:

Elements of Reusable Software• Randall Hyde: Write Great Code I: Understanding the machine• Randall Hyde: Write Great Code II: Thinking Low-level, Writing High-level• Scott Meyers. Effective C++• Scott Meyers. More Effective C++

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 8 of 16

The Scientific Workflow

Modelling NumericalTreatment

Design ofSoftware

Implementation

NumericalExperiments

Postprocessing

Visualisation Tests

In math, there’s tons of lectures on pre-coding topics. In computer science and, inparticular, in the application areas, there’s tons of lectures on the post-coding andmodelling topics.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 9 of 16

Coding & scientific computing continued

Parallel Numerics

• Winter term.• Prof. Dr. Thomas Huckle• Study (mainly) linear algebra with

respect to parallelisation• Use MPI with C programming

language

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 10 of 16

Coding & scientific computing continued

Algorithmen des wissenschaftlichen RechnensAlgorithms of Scientific Computing

• Summer and winter term.• Prof. Dr. Hans-Joachim Bungartz et. al.• FFT, SFCs, and hierarchical models (part I)• Sparse grids, molecular dynamics, AMG (part II)

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 11 of 16

Coding & scientific computing continued

CDF Lab

• Summer term.• Philipp Neumann et. al.• Program a CFD solver (almost from

skratch)• following the book from Griebel et. al.• in four sessions.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 12 of 16

Projects, Hiwis, etc.

In theory there is no difference between theory and practice. In practice there is.

Yogi Berra

Use the time you have at the university to train and play around ...(you’ll sit in a company later way too long anyway)

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 13 of 16

FRAVE

• Showcase room of computer science department.• Several codes (most of them in C/C++).• Nice starting point to get an impression about what is going on in Scientific

Computing.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 14 of 16

Peano

• Big C++ project kicked-off at the chair.• Open source, and• available at www5.in.tum.de/peano.• Feel free to download it and study a

real-world PDE piece of software.

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 15 of 16

Good luck ...

... and see you all at the exam!

0. A Wrap Up

Einfuhrung in die Programmierung—Introduction to C/C++, Tobias Weinzierl page 16 of 16

top related