Include figures with caption for problem 2, 7, 8, and 10

This commit is contained in:
Janita Willumsen 2023-09-12 21:40:19 +02:00
parent e516104576
commit b88a9027bc
5 changed files with 40 additions and 4 deletions

Binary file not shown.

View File

@ -1,3 +1,8 @@
\section*{Problem 10} \section*{Problem 10}
% Time and show result, and link to relevant files % Time and show result, and link to relevant files
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth]{images/problem10.pdf}
\caption{Timing of general algorithm vs. special for step sizes $n_{steps}$}
\end{figure}

View File

@ -6,6 +6,8 @@ Point generator code: https://github.uio.no/FYS3150-G2-203/Project-1/blob/main/s
Plotting code: https://github.uio.no/FYS3150-G2-2023/Project-1/blob/main/src/analyticPlot.py Plotting code: https://github.uio.no/FYS3150-G2-2023/Project-1/blob/main/src/analyticPlot.py
Here is the plot of the analytical solution for $u(x)$. \begin{figure}[H]
\centering
\includegraphics[scale=.5]{analytical_solution.pdf} \includegraphics[width=0.8\linewidth]{images/analytical_solution.pdf}
\caption{Plot of the analytical solution $u(x)$.}
\end{figure}

View File

@ -5,5 +5,10 @@
The code can be found at https://github.uio.no/FYS3150-G2-2023/Project-1/blob/coryab/final-run/src/generalAlgorithm.cpp The code can be found at https://github.uio.no/FYS3150-G2-2023/Project-1/blob/coryab/final-run/src/generalAlgorithm.cpp
\subsection*{b)} \subsection*{b)}
Increasing the number of steps results in an approximation close to the exact solution.
\begin{figure}[H]
\centering
\includegraphics[width=0.8\linewidth]{images/problem7.pdf}
\caption{Plot showing the numeric solution of $u_{approx}$ for $n_{steps}$ and the exact solution $u_{exact}$.}
\end{figure}
\includegraphics{problem7}

View File

@ -1,3 +1,27 @@
\section*{Problem 8} \section*{Problem 8}
%link to relvant files and show plots %link to relvant files and show plots
\subsection*{a)}
Increasing number of steps result in a decrease of absolute error.
\begin{figure}[H]
\centering
\includegraphics[width=0.8\linewidth]{images/problem8_a.pdf}
\caption{Absolute error for different step sizes $n_{steps}$.}
\end{figure}
\subsection*{b)}
Increasing number of steps also result in a decrease of absolute error.
\begin{figure}[H]
\centering
\includegraphics[width=0.8\linewidth]{images/problem8_b.pdf}
\caption{Relative error for different step sizes $n_{steps}$.}
\end{figure}
\subsection*{c)}
Increasing number of steps result in a decrease of maximum relative error, up to a certain number of steps. At $n_{steps} \approx 10^{5}$ the maximumrelative error increase.
This can be related to loss of numerical precicion when step size is small.
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth]{images/problem8_c.pdf}
\caption{Maximum relative error for each step sizes $n_{steps}$.}
\end{figure}