Conversation
…e it into the heat solver.
…and add CSV output for simulation results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces the Crank-Nicolson numerical scheme into the codebase, enabling a new time-stepping method for solving heat equations. The changes include implementing the Crank-Nicolson algorithm, updating the method factory to support it, and modifying the main simulation workflow to use and demonstrate this scheme. Additionally, some code cleanup and minor improvements are made for clarity and robustness.
Crank-Nicolson Scheme Integration:
CrankNicolsonclass implementing the Crank-Nicolson scheme ininclude/methods/crank_nicolson.hppand its algorithm insrc/methods/crank_nicolson.cpp. The scheme uses the Thomas Algorithm to solve the tridiagonal system at each time step. [1] [2]SchemeKindenum and theMethodbase class ininclude/method.hppto includeCrankNicolsonand ensure consistent formatting and extensibility. [1] [2] [3]Method Factory and Solver Updates:
src/method.cppto instantiate the Crank-Nicolson scheme and handle unsupported schemes with clear error messages.src/main.cppto run the Crank-Nicolson solver, set up output directories, and save results using the new scheme. [1] [2] [3]I/O and Output Directory Handling:
src/io.cppand the main workflow to ensure results are saved to the correct location, allowing for flexible output paths. [1] [2]These changes collectively enable the use of the Crank-Nicolson scheme for heat equation simulations, improve code clarity, and ensure results are stored in an organized manner.