1D Heat Equation Solver 1.0
Computational Methods Assignment 2025
Loading...
Searching...
No Matches
laasonen.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "method.hpp"
4#include <string>
5#include <vector>
6
7/**
8 * @brief Laasonen implicit method (Backward Euler in time + Central in space).
9 * Unconditionally stable for the 1D heat equation.
10 */
11class Laasonen : public Method
12{
13 public:
14 std::string name() const override
15 {
16 return "Laasonen";
17 }
18
19 void step(const Grid& g,
20 double D,
21 double dt,
22 const std::vector<double>& Tprev,
23 const std::vector<double>& Tcurr,
24 std::vector<double>& Tnext) const override;
25
26 bool uses_previous_step() const noexcept override
27 {
28 return false;
29 }
30};
Laasonen implicit method (Backward Euler in time + Central in space). Unconditionally stable for the ...
Definition laasonen.hpp:12
bool uses_previous_step() const noexcept override
Indicates if the scheme requires data from time step n-1.
Definition laasonen.hpp:26
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}).
Definition laasonen.cpp:6
std::string name() const override
Get human-readable name of the scheme.
Definition laasonen.hpp:14
Abstract interface for time-integration schemes solving the 1D heat equation.
Definition method.hpp:28
Uniform 1D grid on x ∈ [0, L], including both boundary nodes.
Definition grid.hpp:15