diff --git a/docs/html/_formulas_dark 2.tex b/docs/html/_formulas_dark 2.tex new file mode 100644 index 0000000..2ae6bc1 --- /dev/null +++ b/docs/html/_formulas_dark 2.tex @@ -0,0 +1,53 @@ +\documentclass{article} +\usepackage{iftex} +\usepackage{ifthen} +\usepackage{epsfig} +\usepackage[utf8]{inputenc} +\usepackage{xcolor} +\color{white} +\pagecolor{black} +\ifPDFTeX +\usepackage{newunicodechar} + \makeatletter + \def\doxynewunicodechar#1#2{% + \@tempswafalse + \edef\nuc@tempa{\detokenize{#1}}% + \if\relax\nuc@tempa\relax + \nuc@emptyargerr + \else + \edef\@tempb{\expandafter\@car\nuc@tempa\@nil}% + \nuc@check + \if@tempswa + \@namedef{u8:\nuc@tempa}{#2}% + \fi + \fi + } + \makeatother + \doxynewunicodechar{⁻}{${}^{-}$}% Superscript minus + \doxynewunicodechar{²}{${}^{2}$}% Superscript two + \doxynewunicodechar{³}{${}^{3}$}% Superscript three + +\fi +\pagestyle{empty} +\begin{document} +\[ T_i^{n+1} = T_i^{n-1} + 2 r \left( T_{i+1}^n - 2 T_i^n + T_{i-1}^n \right), + \quad r = \frac{D \, \Delta t}{\Delta x^2} +\] +\pagebreak + +$T^{n-1}$ +\pagebreak + +$T^n$ +\pagebreak + +$T^{n+1}$ +\pagebreak + +$T^{n}$ +\pagebreak + +$i = 1, \dots, N-2$ +\pagebreak + +\end{document} diff --git a/docs/html/analytical_8cpp_source 2.html b/docs/html/analytical_8cpp_source 2.html new file mode 100644 index 0000000..be72c37 --- /dev/null +++ b/docs/html/analytical_8cpp_source 2.html @@ -0,0 +1,171 @@ + + +
+ + + + +|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
Go to the source code of this file.
++Classes | |
| class | Analytical |
| Analytical solution for the 1D heat equation. More... | |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
| CAnalytical | Analytical solution for the 1D heat equation |
| CCrankNicolson | Crank-Nicolson scheme implementation |
| CDuFortFrankel | |
| CGrid | Uniform 1D grid on x ∈ [0, L], including both boundary nodes |
| CHeatSolver | |
| CLaasonen | Laasonen implicit method (Backward Euler in time + Central in space). Unconditionally stable for the 1D heat equation |
| CMethod | Abstract interface for time-integration schemes solving the 1D heat equation |
| CNumParams | Numerical parameters controlling the discretization and output |
| CPhysParams | Physical parameters of the wall heat conduction problem |
| CRichardson | Implementation of the explicit Richardson scheme (CTCS) |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
#include <dufort_frankel.hpp>
+
++Public Member Functions | |
| std::string | name () const override |
| Get human-readable name of the scheme. | |
| void | step (const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const override |
| Computes the temperature field at the next time step (T^{n+1}). | |
| bool | uses_previous_step () const noexcept override |
| Indicates if the scheme requires data from time step n-1. | |
| Public Member Functions inherited from Method | |
| virtual | ~Method ()=default |
Definition at line 12 of file dufort_frankel.hpp.
+
+
|
+ +inlineoverridevirtual | +
Get human-readable name of the scheme.
+ +Implements Method.
+ +Definition at line 15 of file dufort_frankel.hpp.
+ +
+
|
+ +overridevirtual | +
Computes the temperature field at the next time step (T^{n+1}).
+| g | Grid metadata (spacing dx and node count Nx). |
| D | Thermal diffusivity [cm^2/h]. |
| dt | Time step size [h]. |
| Tprev | Temperature at time step n-1 (Read-only). Required only for 3-level schemes (Richardson, DuFort-Frankel). For 2-level schemes, this vector may be ignored. |
| Tcurr | Temperature at time step n (Read-only). |
| Tnext | Output vector to be filled with temperature at time step n+1. |
Implements Method.
+ +Definition at line 6 of file dufort_frankel.cpp.
+ +
+
|
+ +inlineoverridevirtualnoexcept | +
Indicates if the scheme requires data from time step n-1.
+Implements Method.
+ +Definition at line 25 of file dufort_frankel.hpp.
+ +|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
This is the complete list of members for DuFortFrankel, including all inherited members.
+| name() const override | DuFortFrankel | inlinevirtual |
| step(const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const override | DuFortFrankel | virtual |
| uses_previous_step() const noexcept override | DuFortFrankel | inlinevirtual |
| ~Method()=default | Method | virtual |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
Laasonen implicit method (Backward Euler in time + Central in space). Unconditionally stable for the 1D heat equation. + More...
+ +#include <laasonen.hpp>
+
++Public Member Functions | |
| std::string | name () const override |
| Get human-readable name of the scheme. | |
| void | step (const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const override |
| Computes the temperature field at the next time step (T^{n+1}). | |
| bool | uses_previous_step () const noexcept override |
| Indicates if the scheme requires data from time step n-1. | |
| Public Member Functions inherited from Method | |
| virtual | ~Method ()=default |
Laasonen implicit method (Backward Euler in time + Central in space). Unconditionally stable for the 1D heat equation.
+ +Definition at line 11 of file laasonen.hpp.
+
+
|
+ +inlineoverridevirtual | +
Get human-readable name of the scheme.
+ +Implements Method.
+ +Definition at line 14 of file laasonen.hpp.
+ +
+
|
+ +overridevirtual | +
Computes the temperature field at the next time step (T^{n+1}).
+| g | Grid metadata (spacing dx and node count Nx). |
| D | Thermal diffusivity [cm^2/h]. |
| dt | Time step size [h]. |
| Tprev | Temperature at time step n-1 (Read-only). Required only for 3-level schemes (Richardson, DuFort-Frankel). For 2-level schemes, this vector may be ignored. |
| Tcurr | Temperature at time step n (Read-only). |
| Tnext | Output vector to be filled with temperature at time step n+1. |
Implements Method.
+ +Definition at line 6 of file laasonen.cpp.
+ +
+
|
+ +inlineoverridevirtualnoexcept | +
Indicates if the scheme requires data from time step n-1.
+Implements Method.
+ +Definition at line 26 of file laasonen.hpp.
+ +|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
This is the complete list of members for Laasonen, including all inherited members.
+| name() const override | Laasonen | inlinevirtual |
| step(const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const override | Laasonen | virtual |
| uses_previous_step() const noexcept override | Laasonen | inlinevirtual |
| ~Method()=default | Method | virtual |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
Abstract interface for time-integration schemes solving the 1D heat equation. + More...
+ +#include <method.hpp>
+
++Public Member Functions | |
| virtual | ~Method ()=default |
| virtual std::string | name () const =0 |
| Get human-readable name of the scheme. | |
| virtual void | step (const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const =0 |
| Computes the temperature field at the next time step (T^{n+1}). | |
| virtual bool | uses_previous_step () const =0 |
| Indicates if the scheme requires data from time step n-1. | |
Abstract interface for time-integration schemes solving the 1D heat equation.
+This interface abstracts away the difference between explicit/implicit schemes and 2-level/3-level time stepping schemes.
+ +Definition at line 27 of file method.hpp.
+
+
|
+ +virtualdefault | +
+
|
+ +pure virtual | +
Get human-readable name of the scheme.
+ +Implemented in CrankNicolson, DuFortFrankel, Laasonen, and Richardson.
+ +
+
|
+ +pure virtual | +
Computes the temperature field at the next time step (T^{n+1}).
+| g | Grid metadata (spacing dx and node count Nx). |
| D | Thermal diffusivity [cm^2/h]. |
| dt | Time step size [h]. |
| Tprev | Temperature at time step n-1 (Read-only). Required only for 3-level schemes (Richardson, DuFort-Frankel). For 2-level schemes, this vector may be ignored. |
| Tcurr | Temperature at time step n (Read-only). |
| Tnext | Output vector to be filled with temperature at time step n+1. |
Implemented in CrankNicolson, DuFortFrankel, Laasonen, and Richardson.
+ +
+
|
+ +pure virtual | +
Indicates if the scheme requires data from time step n-1.
+Implemented in CrankNicolson, DuFortFrankel, Laasonen, and Richardson.
+ +|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
This is the complete list of members for Method, including all inherited members.
+| name() const =0 | Method | pure virtual |
| step(const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const =0 | Method | pure virtual |
| uses_previous_step() const =0 | Method | pure virtual |
| ~Method()=default | Method | virtual |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
Implementation of the explicit Richardson scheme (CTCS). + More...
+ +#include <richardson.hpp>
+
++Public Member Functions | |
| bool | uses_previous_step () const noexcept override |
| Indicate that this is a three-level scheme. | |
| std::string | name () const override |
| Get human-readable name of the scheme. | |
| void | step (const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const override |
| Advance one time step using the Richardson explicit scheme. | |
| Public Member Functions inherited from Method | |
| virtual | ~Method ()=default |
Implementation of the explicit Richardson scheme (CTCS).
+The scheme reads:
+![\[ T_i^{n+1} = T_i^{n-1} + 2 r \left( T_{i+1}^n - 2 T_i^n + T_{i-1}^n \right),
+ \quad r = \frac{D \, \Delta t}{\Delta x^2}
+\]](form_0.png)
It is a three-level scheme, therefore it requires both 


Definition at line 26 of file richardson.hpp.
+
+
|
+ +inlineoverridevirtual | +
Get human-readable name of the scheme.
+Implements Method.
+ +Definition at line 42 of file richardson.hpp.
+ +
+
|
+ +overridevirtual | +
Advance one time step using the Richardson explicit scheme.
+This computes 



| g | Grid metadata (spacing and number of nodes) |
| D | Diffusivity [cm^2/h] |
| dt | Time step [h] |
| Tprev | Temperature field at previous time layer ![]() |
| Tcurr | Temperature field at current time layer ![]() |
| Tnext | Output temperature field to be filled with ![]() |
Implements Method.
+ +Definition at line 10 of file richardson.cpp.
+ +
+
|
+ +inlineoverridevirtualnoexcept | +
Indicate that this is a three-level scheme.
+
Implements Method.
+ +Definition at line 33 of file richardson.hpp.
+ +|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
This is the complete list of members for Richardson, including all inherited members.
+| name() const override | Richardson | inlinevirtual |
| step(const Grid &g, double D, double dt, const std::vector< double > &Tprev, const std::vector< double > &Tcurr, std::vector< double > &Tnext) const override | Richardson | virtual |
| uses_previous_step() const noexcept override | Richardson | inlinevirtual |
| ~Method()=default | Method | virtual |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
Go to the source code of this file.
++Classes | |
| class | CrankNicolson |
| Crank-Nicolson scheme implementation. More... | |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
+Files | |
| analytical.cpp | |
| crank_nicolson.cpp | |
| Implementation of the Crank-Nicolson scheme using the Thomas Algorithm. | |
| dufort_frankel.cpp | |
| laasonen.cpp | |
| richardson.cpp | |
| Richardson explicit scheme implementation. | |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
+Files | |
| analytical.hpp | |
| crank_nicolson.hpp | |
| dufort_frankel.hpp | |
| DuFort–Frankel explicit method (3-level scheme). | |
| laasonen.hpp | |
| richardson.hpp | |
| Richardson explicit (central time - central space) scheme for the 1D heat equation. | |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
+Directories | |
| methods | |
+Files | |
| grid.cpp | |
| Implementation of the uniform 1D grid and its validator. | |
| io.cpp | |
| main.cpp | |
| Test driver for the 1D heat conduction solver. Supports DuFort-Frankel, Richardson, Laasonen, and Crank-Nicolson schemes. | |
| method.cpp | |
| Factory implementation for numerical schemes. | |
| solver.cpp | |
| Time-marching driver for the 1D heat equation. | |
| user_input.cpp | |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
+Directories | |
| methods | |
+Files | |
| grid.hpp | |
| Uniform 1D spatial grid. | |
| io.hpp | |
| CSV utilities. | |
| method.hpp | |
| solver.hpp | |
| High-level solver orchestrating BCs and time integration. | |
| types.hpp | |
| Basic physical and numerical parameter types for the 1D heat problem. | |
| user_input.h | |
| Utility functions for safe user input from the console. | |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
| include | |
| methods | |
| analytical.hpp | |
| crank_nicolson.hpp | |
| dufort_frankel.hpp | DuFort–Frankel explicit method (3-level scheme) |
| laasonen.hpp | |
| richardson.hpp | Richardson explicit (central time - central space) scheme for the 1D heat equation |
| grid.hpp | Uniform 1D spatial grid |
| io.hpp | CSV utilities |
| method.hpp | |
| solver.hpp | High-level solver orchestrating BCs and time integration |
| types.hpp | Basic physical and numerical parameter types for the 1D heat problem |
| user_input.h | Utility functions for safe user input from the console |
| src | |
| methods | |
| analytical.cpp | |
| crank_nicolson.cpp | Implementation of the Crank-Nicolson scheme using the Thomas Algorithm |
| dufort_frankel.cpp | |
| laasonen.cpp | |
| richardson.cpp | Richardson explicit scheme implementation |
| grid.cpp | Implementation of the uniform 1D grid and its validator |
| io.cpp | |
| main.cpp | Test driver for the 1D heat conduction solver. Supports DuFort-Frankel, Richardson, Laasonen, and Crank-Nicolson schemes |
| method.cpp | Factory implementation for numerical schemes |
| solver.cpp | Time-marching driver for the 1D heat equation |
| user_input.cpp |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
| CAnalytical | Analytical solution for the 1D heat equation |
| CGrid | Uniform 1D grid on x ∈ [0, L], including both boundary nodes |
| CHeatSolver | |
| CMethod | Abstract interface for time-integration schemes solving the 1D heat equation |
| CCrankNicolson | Crank-Nicolson scheme implementation |
| CDuFortFrankel | |
| CLaasonen | Laasonen implicit method (Backward Euler in time + Central in space). Unconditionally stable for the 1D heat equation |
| CRichardson | Implementation of the explicit Richardson scheme (CTCS) |
| CNumParams | Numerical parameters controlling the discretization and output |
| CPhysParams | Physical parameters of the wall heat conduction problem |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+
CSV utilities. +More...
+#include <string>#include <vector>Go to the source code of this file.
++Functions | |
| void | save_profile_csv (const std::string &path, const std::vector< double > &x, const std::vector< double > &T) |
| Save a temperature profile (x, T) to a CSV file. | |
CSV utilities.
+ +Definition in file io.hpp.
+| void save_profile_csv | +( | +const std::string & | path, | +
| + | + | const std::vector< double > & | x, | +
| + | + | const std::vector< double > & | T ) | +
Save a temperature profile (x, T) to a CSV file.
+This function automatically creates the directory structure if missing. Example output path: "result/dufort_frankel/t_0.10.csv"
+| path | Relative or absolute path to the file. |
| x | Spatial coordinates [cm]. |
| T | Temperature values [°C]. |
|
+ 1D Heat Equation Solver 1.0
+
+ Computational Methods Assignment 2025
+ |
+