30 void run(
const std::function<
void(
double,
const Grid&,
const std::vector<double>&)>& onDump);
39 std::vector<double>
T_;
std::vector< double > Tprev_
Previous solution (stores T^{n-1} when required).
PhysParams phys_
Physical parameters (copied for convenience).
void apply_dirichlet(std::vector< double > &T) const
Apply Dirichlet boundary conditions (Tsur) at both ends of the vector.
std::vector< double > next_
Buffer used to store the next time layer T^{n+1}.
NumParams num_
Numerical parameters (copied for convenience).
std::unique_ptr< Method > method_
Selected time integration method.
void bootstrap_if_needed()
Perform a warm-up step when the method needs two previous time levels.
void run(const std::function< void(double, const Grid &, const std::vector< double > &)> &onDump)
Run the simulation from t=0 to t=tEnd.
HeatSolver(const PhysParams &phys, const NumParams &num, SchemeKind scheme)
Construct the solver with physical and numerical parameters and a scheme kind.
Grid grid_
Spatial grid built from phys/num input.
std::vector< double > T_
Current solution (typically holds T^n).
void init_field()
Initialize the temperature field with Tin and enforce boundary conditions.
bool uses_prev_step_
True when the method requires T^{n-1}.
SchemeKind
Enumeration of the numerical schemes available in the solver.
Uniform 1D grid on x ∈ [0, L], including both boundary nodes.
Numerical parameters controlling the discretization and output.
Physical parameters of the wall heat conduction problem.
Basic physical and numerical parameter types for the 1D heat problem.