Skip to content

Feat/laasonen#53

Merged
Broky64 merged 4 commits intodevfrom
feat/laasonen
Dec 1, 2025
Merged

Feat/laasonen#53
Broky64 merged 4 commits intodevfrom
feat/laasonen

Conversation

@Broky64
Copy link
Owner

@Broky64 Broky64 commented Dec 1, 2025

This pull request introduces a full implementation and integration of the Laasonen implicit numerical scheme for solving the 1D heat equation. It refactors the method interface to support multiple schemes, updates the solver to use the new method factory, and adds functionality for saving simulation results as CSV files. The main program is reworked to drive a Laasonen test simulation and output results. Below are the most important changes grouped by theme:

Numerical Method Infrastructure

  • Refactored the method interface in method.hpp to support multiple schemes (Richardson, DuFortFrankel, Laasonen) via the SchemeKind enum, and updated the abstract Method class to clarify the interface and allow for both two-level and three-level schemes. The factory function make_method now creates the appropriate scheme instance.
  • Implemented the Laasonen implicit scheme in methods/laasonen.hpp and methods/laasonen.cpp, including the Thomas algorithm for solving the tridiagonal system at each time step. [1] [2]
  • Updated the method factory in src/method.cpp to construct a Laasonen object when requested, and to throw clear errors for unsupported schemes.

Solver and Simulation Driver

  • Refactored the solver in solver.cpp to use the new method factory, clarified the initialization and time-marching logic, and ensured proper boundary condition handling and field bootstrapping for both two-level and three-level schemes.
  • Rewrote the main program in main.cpp to drive a Laasonen simulation, prompt for user parameters, select the numerical method, and run the solver, saving results at regular intervals.

Output and File Handling

  • Added a callback function in main.cpp to save temperature profiles as CSV files in a structured output directory, and updated io.cpp to support flexible output paths. [1] [2]
  • Minor refactor in io.cpp to clean up includes and improve file path handling for result output.

These changes collectively enable running and exporting results from the Laasonen scheme for the 1D heat equation.

Broky64 and others added 4 commits November 5, 2025 17:09
- Refactor method interface to include Laasonen scheme
- Add Laasonen class with time-stepping logic
- Update factory method to create LaasonenMethod instance
- Modify HeatSolver to support Laasonen scheme execution
- Enhance main program to test Laasonen scheme and save results as CSV
…e its step signature and Thomas algorithm, and add method naming.
@Broky64 Broky64 merged commit f8869f8 into dev Dec 1, 2025
0 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant