Programmierpraktikum NPDGL I
|
Exact solution for 1D evolution example. Mehr ...
#include <function_library.hh>
Öffentliche Methoden | |
double | operator() (const double x) const |
Auswertung der Funktion. | |
void | setTime (const double t) |
method to update the internal time variable |
Exact solution for 1D evolution example.
This implements an exact solution for the 1D evolution example Evolutionsgleichung in 1D on the domain \(\Omega = [a,b] = [0,5]\) with end time \(T = 4\)
\[ u(x,t) = \left\{ \begin{array}{cc} 0 & \mbox{ für } x<1 \\ \frac{1}{t}(x-1) & \mbox{ für } 1\leq x < x_s(t) \\ \frac{1}{2-t}(x-3) & \mbox{ für } x_s(t) \leq x < 3, t \in[0,2) \\ 0 & \mbox{ für } 3\leq x, t \in[0,2) \\ 0 & \mbox{ für } x_s(t) \leq x , 2 \leq t\\ \end{array} \right. \]
with the curve
\[ x_s(t) = \left\{ \begin{array}{cc} 1+t & \mbox{ für } 0\leq t < 2 \\ 1+\sqrt{2t} & \mbox{ für } 2\leq t. \\ \end{array} \right. \]
double ExerciseA_Exact::operator() | ( | const double | x | ) | const [inline] |
Auswertung der Funktion.
Diese Methode wertet die Funktion \( f \) an einer Stelle \( x \in \mathbb{R} \) aus.
x | Das Argument \(x\) an welcher die Funktion ausgewertet werden soll. |
Erneute Implementation von Function.