Skip to content

ericaloken/Project1-FYS3150

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 1 - Solving the 1D Poisson Equation

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.

Project description

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.

Folder overview

src

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.

python

All Python scripts (.py files) for plotting and error calulations are found withing this folder. Each problem has a corresponding .py file.

results

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.

report

Folder containing the resulting project report as .pdf and .tex files.

Running the code

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.

About

Solving the 1D Poisson Equation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published