Buch Modellbildung und Simulation: Difference between revisions

From Sccswiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:
** Am Ende sollte <code>x</code> als Funktionsergebnis zurückgegeben werden
** Am Ende sollte <code>x</code> als Funktionsergebnis zurückgegeben werden
** Und der Rumpf des <code>if</code> wäre einheitlicher mit <code>{}</code>geklammert
** Und der Rumpf des <code>if</code> wäre einheitlicher mit <code>{}</code>geklammert
* Im ganzen Satz: <code>  
** Im ganzen Satz:
multigrid(l, b, x){
::<code> multigrid(l, b, x){</code>
  x = jacobi(l, b, x)              // Vorglätten
::<code>  x = jacobi(l, b, x)              // Vorglätten</code>
  if(l>0)  {                      // Abbruchbedingung
::<code>  if(l>0)  {                      // Abbruchbedingung</code>
    r = residual(l, b, x)          // Residuum berechnen
:::<code>    r = residual(l, b, x)          // Residuum berechnen</code>
    b_c = restrict(l, r)          // Restriktion
:::<code>    b_c = restrict(l, r)          // Restriktion</code>
    e_c = zero_vector(l-1)
:::<code>    e_c = zero_vector(l-1)</code>
    e_c = multigrid(l-1, b_c, e_c) // Rekursion
:::<code>    e_c = multigrid(l-1, b_c, e_c) // Rekursion</code>
    x_delta = interpolate(l, e_c)  // Prolongation
:::<code>    x_delta = interpolate(l, e_c)  // Prolongation</code>
    x = x + x_delta                // Korrektur
:::<code>    x = x + x_delta                // Korrektur</code>
  }
::<code>  }</code>
  x = jacobi(l, b, x)              // Nachglätten
::<code>  x = jacobi(l, b, x)              // Nachglätten</code>
}
::<code>  return x</code>
::<code>}</code>

Revision as of 06:14, 19 August 2009

Modellbildung und Simulation - Eine anwendungsorientierte Einführung

Error creating thumbnail: Unable to save thumbnail to destination

Das Buch "Modellbildung und Simulation - Eine anwendungsorientierte Einführung" ist 2009 im Springer-Verlag erschienen

Errata

  • S. 91, Z. 6: $n_A := |S_A|$ statt $n_A := |S_B|$
  • S. 266, Z. 6: "allen" statt "allem"
  • S. 364, Z10: "vorstellen" statt "vrstellen"
  • S. 365, multigrid-Algorithmus
    • Z. 6: zero_vector(l-1) statt zero_vector(l)
    • Am Ende sollte x als Funktionsergebnis zurückgegeben werden
    • Und der Rumpf des if wäre einheitlicher mit {}geklammert
    • Im ganzen Satz:
multigrid(l, b, x){
x = jacobi(l, b, x) // Vorglätten
if(l>0) { // Abbruchbedingung
r = residual(l, b, x) // Residuum berechnen
b_c = restrict(l, r) // Restriktion
e_c = zero_vector(l-1)
e_c = multigrid(l-1, b_c, e_c) // Rekursion
x_delta = interpolate(l, e_c) // Prolongation
x = x + x_delta // Korrektur
}
x = jacobi(l, b, x) // Nachglätten
return x
}