1D Heat Equation Solver 1.0
Computational Methods Assignment 2025
Loading...
Searching...
No Matches
Laasonen Class Reference

Laasonen implicit method (Backward Euler in time + Central in space). Unconditionally stable for the 1D heat equation. More...

#include <laasonen.hpp>

Inheritance diagram for Laasonen:
Inheritance graph
Collaboration diagram for Laasonen:
Collaboration graph

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

Detailed Description

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.

Member Function Documentation

◆ name()

std::string Laasonen::name ( ) const
inlineoverridevirtual

Get human-readable name of the scheme.

Implements Method.

Definition at line 14 of file laasonen.hpp.

◆ step()

void Laasonen::step ( const Grid & g,
double D,
double dt,
const std::vector< double > & Tprev,
const std::vector< double > & Tcurr,
std::vector< double > & Tnext ) const
overridevirtual

Computes the temperature field at the next time step (T^{n+1}).

Parameters
gGrid metadata (spacing dx and node count Nx).
DThermal diffusivity [cm^2/h].
dtTime step size [h].
TprevTemperature 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.
TcurrTemperature at time step n (Read-only).
TnextOutput vector to be filled with temperature at time step n+1.

Implements Method.

Definition at line 6 of file laasonen.cpp.

◆ uses_previous_step()

bool Laasonen::uses_previous_step ( ) const
inlineoverridevirtualnoexcept

Indicates if the scheme requires data from time step n-1.

Returns
true For 3-level schemes (e.g., Richardson, DuFort-Frankel).
false For 2-level schemes (e.g., Laasonen, Crank-Nicolson).

Implements Method.

Definition at line 26 of file laasonen.hpp.


The documentation for this class was generated from the following files: