1D Heat Equation Solver 1.0
Computational Methods Assignment 2025
Loading...
Searching...
No Matches
grid.hpp File Reference

Uniform 1D spatial grid. More...

#include <vector>
#include <cstddef>
Include dependency graph for grid.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Grid
 Uniform 1D grid on x ∈ [0, L], including both boundary nodes. More...

Functions

bool validate_grid (const Grid &g, double tol=1e-12)
 Validate grid consistency (assertions in Debug mode).

Detailed Description

Uniform 1D spatial grid.

Definition in file grid.hpp.

Function Documentation

◆ validate_grid()

bool validate_grid ( const Grid & g,
double tol = 1e-12 )

Validate grid consistency (assertions in Debug mode).

Checks endpoints, monotonicity, uniform spacing and Nx consistency.

Parameters
gGrid to validate
tolTolerance for floating-point comparisons (default 1e-12)
Returns
true if all assertions pass

Definition at line 26 of file grid.cpp.

Here is the caller graph for this function: