This repository contains the work done by Erica Løken for Project 1 in the course FYS3150 – Computational Physics at the University of Oslo.
This project folder is organized into 4 subfolders src, python, results and report.
The goal of this project is to solve the one-dimensional Poisson equation by discretization and implementation of the Thomas algorithm. Two versions of the algorithm are implemented:
- general algorithm for solving an arbitrary tridiagonal system
- special algorithm optimized for the Poisson problem
The two algorithms are compared using error analysis and timing tests.
Contains all C++ source files. Each problem has its own .cpp file for solving the given problem. Each program writes output data to text files generated by the program and saves it in the results folder.
All Python scripts (.py files) for plotting and error calulations are found withing this folder. Each problem has a corresponding .py file.
This is an empty folder storing all output files generated by C++ programs. The folder is empty in the repository, but will be populated when running the code.
Folder containing the resulting project report as .pdf and .tex files.
The C++ programs must be executed in the order as the problems (1-10). This ensures that the required text files are generated for the subsequent programs in order for the program to run properly.