|
1D Heat Equation Solver 1.0
Computational Methods Assignment 2025
|
Uniform 1D grid on x ∈ [0, L], including both boundary nodes. More...
#include <grid.hpp>

Public Member Functions | |
| Grid (double L_cm, double dx_cm) | |
| Construct a grid with given length and spacing. | |
Public Attributes | |
| double | L |
| Domain length [cm]. | |
| double | dx |
| Spatial step [cm]. | |
| std::size_t | Nx |
| Number of nodes (including boundaries). | |
| std::vector< double > | x |
| Node coordinates [cm]. | |
Uniform 1D grid on x ∈ [0, L], including both boundary nodes.
Builds Nx = round(L/dx) + 1 nodes with coordinates x[i] = i * dx.
| Grid::Grid | ( | double | L_cm, |
| double | dx_cm ) |
| std::size_t Grid::Nx |