NumMeth-22: Kapitel 10 fertig, Übung 9 fertig
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
\documentclass[12pt,a4paper]{uebungen}
|
||||
\usepackage{german}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{epsfig}
|
||||
\usepackage[amssymb]{SIunits}
|
||||
\usepackage{wrapfig}
|
||||
\usepackage{graphics}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{url}
|
||||
\usepackage{pgf}
|
||||
\usepackage{listings}
|
||||
\lstset{language=[ANSI]C++,basicstyle=\ttfamily,commentstyle=\itshape,
|
||||
keywordstyle=\bfseries,extendedchars=true,backgroundcolor=\color{gray}}
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
%\graphicspath{{../../../GALLERY/}}
|
||||
%------------------------------------------------------------------------------
|
||||
\setlength{\topmargin}{-2.5cm}
|
||||
\setlength{\textheight}{26.0cm}
|
||||
\setlength{\textwidth}{17cm}
|
||||
\setlength{\oddsidemargin}{-0.5cm}
|
||||
\setlength{\evensidemargin}{-0.5cm}
|
||||
\setlength{\parskip}{0pt}
|
||||
\setlength{\parindent}{0pt}
|
||||
\pagestyle{empty}
|
||||
%------------------------------------------------------------------------------
|
||||
\newcommand{\vt}[1]{\vec{#1}}
|
||||
\newcommand{\mt}[1]{\underline{\underline{#1}}}
|
||||
\newcommand{\dt}[1]{\left\vert\underline{\underline{#1}}\right\vert}
|
||||
\newcommand{\mo}{\!\!\!\!\!-1}
|
||||
%------------------------------------------------------------------------------
|
||||
\def\bbbr{{\rm I\!R}}
|
||||
%------------------------------------------------------------------------------
|
||||
\begin{document}
|
||||
%------------------------------------------------------------------------------
|
||||
\thispagestyle{myheadings}
|
||||
\begin{center}
|
||||
{\bf \underline{\Large Exercises in ``Numerical Methods in Plasma Astrophysics''}}\\
|
||||
%\hfill\\
|
||||
%{\bf \large }\\
|
||||
\hfill\\
|
||||
{\bf \large Winter 2022/23 \hfill Exercise 9}\\
|
||||
\end{center}
|
||||
\noindent
|
||||
%
|
||||
\section*{\large Exercise 9: Rubber duck race}\vspace*{-0.0cm}
|
||||
%
|
||||
Rubber ducks are clearly racing animals, they love surfing the wild waters of the Neckar! We will try to follow such a race through the magic of computer simulations. Let's assume the race takes place in the well-known 1D Neckar that is described by the Burgers' equation. Due to the large extent of the Neckar it is absolutely necessary to make use of MPI to solve the the numerical problem.
|
||||
|
||||
Two rubber ducks are taken as test particles in this 1D flow that will be advected along with the local flow speed.
|
||||
|
||||
\begin{center}
|
||||
\pgfimage[width=.7\textwidth]{entenrennen}
|
||||
\end{center}
|
||||
|
||||
\bigskip
|
||||
\textbf{a)} Use the code sample discussed in the lecture to perform multi-CPU simulations of the Burgers' equation (you are free to use the [incompressible] Navier-Stokes equation instead, but that's far more complicated\dots)
|
||||
|
||||
\textbf{b)} Define a rubber duck class with position and velocity and place two instances into the simulation domain. The rubber ducks will at some point follow the flow to the next processor, in this case the rubber duck has to be transferred to the next CPU as well.\\
|
||||
Hint: In every step neighbouring CPUs should communicate the number of rubber ducks to be transferred. Then a number of \texttt{double} values (2 per rubber duck: position and velocity) are transferred. On the old CPU the rubber duck has to be destroyed and created on the new CPU. There may be more than one rubber duck per CPU.
|
||||
|
||||
|
||||
\end{document}
|
||||
%------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user