Difference between revisions of "Effective Analysis Programming 1"

From Gridkaschool
(Technical specification/requirements)
Line 1: Line 1:
  +
==Introduction==
  +
  +
We give an introduction to advanced topics of C++. These include inheritance, templates, stable numerical calculations, debugging and profiling.
  +
The main focus is on rules and guidelines to write clear code and avoid common pitfalls.
  +
  +
Desirable Prerequisite: Basic knowledge of C/C++
  +
  +
  +
==Nodes==
  +
* gks-044.scc.kit.edu 141.52.174.44
  +
* gks-246.scc.kit.edu 141.52.174.246
  +
  +
==Lectures==
  +
* Floating point arithmetic, numerical algorihms
  +
* Coding Guidelines 1(Organization and policy, Design style, Coding style, Function)
  +
  +
==Exercises==
  +
  +
===Monte Carlo method for moment of inertia===
  +
Random numbers can be used to solve complex integrals. Here, you are asked to compute the moment of inertia <math>J = \int_V \vec{r}_{\perp}\!^{2}\rho(\vec r)\mathrm{d}V</math> of a thin cylindrical shell and a cylinder, with radius R and length l. View the body as a composition of points with equal mass and sum up each point's moment of inertia <math>J = \sum_{i=1}^N m r_{i,\perp}^2</math>.
  +
  +
Start with the program: [[Media:zylinder.cc]]
  +
  +
To get started execute:
  +
<pre>
  +
mkdir zylinder
  +
wget
  +
g++ -o zylinder zylinder.cc
  +
./zylinder
  +
</pre>
  +
  +
===Implement Vector class===
  +
===Version Control===
  +
===Makefile===
  +
===Overload operator()===
  +
===Inheritance===
  +
  +
 
===[[Internals:EA|Technical specification/requirements]]===
 
===[[Internals:EA|Technical specification/requirements]]===

Revision as of 15:13, 27 August 2012

Introduction

We give an introduction to advanced topics of C++. These include inheritance, templates, stable numerical calculations, debugging and profiling. The main focus is on rules and guidelines to write clear code and avoid common pitfalls.

Desirable Prerequisite: Basic knowledge of C/C++


Nodes

  • gks-044.scc.kit.edu 141.52.174.44
  • gks-246.scc.kit.edu 141.52.174.246

Lectures

  • Floating point arithmetic, numerical algorihms
  • Coding Guidelines 1(Organization and policy, Design style, Coding style, Function)

Exercises

Monte Carlo method for moment of inertia

Random numbers can be used to solve complex integrals. Here, you are asked to compute the moment of inertia <math>J = \int_V \vec{r}_{\perp}\!^{2}\rho(\vec r)\mathrm{d}V</math> of a thin cylindrical shell and a cylinder, with radius R and length l. View the body as a composition of points with equal mass and sum up each point's moment of inertia <math>J = \sum_{i=1}^N m r_{i,\perp}^2</math>.

Start with the program: Media:zylinder.cc

To get started execute:

mkdir zylinder
wget
g++ -o zylinder zylinder.cc
./zylinder

Implement Vector class

Version Control

Makefile

Overload operator()

Inheritance

Technical specification/requirements