Skip to content

Bonus project for the Advanced Programming course @ TUM

License

Notifications You must be signed in to change notification settings

matilde-t/pde-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pde-solver

Description

This package implements a numerical solution for the heat equation in the form $f = h$, where $f = \nabla^2u$ and $h = \frac{\partial u}{\partial t}$.

Visuals

50x50 matrix, left heated border, one heat source and one sink, equispaced, Jacobi solver

Prerequisites

The graphical representation relies on gnuplot, which can be installed through the main Linux package managers, like apt etc

Installation

  1. open the terminal and navigate to your preferred working folder
  2. clone the project using git clone [email protected]:advprog2022/22/pde-solver.git
  3. enter the project folder with cd pde-solver
  4. temporarily switch to dev branch through git checkout dev
  5. create a build directory and go inside it with mkdir build && cd build
  6. call cmake using cmake ../pde-solver (it is fundamental to use cmake and it can be slow because it downloads the plotting library)
  7. call make
  8. execute the program in the terminal with ./pde-solver and follow the instructions on screen

NEW the program can now be used with custom matrices in .csv format (N.B. only files with comma delimiters are supported at the moment). In this case, execute the program with ./pde-solver <path to f.csv> <path to h.csv>

Usage

The instructions that produced the image in Visuals are, for example:

asciicast

Support

If you have any issue, contact us.

Roadmap

The next steps in the development of these project are:

  • First phase
    • output the steady-state values of each node in a result file ✔️
    • write unit tests ✔️
  • Second phase
    • refactor in a object oriented way ✔️
    • add relaxation schemes ✔️
    • add boundary conditions ✔️
  • Third phase
    • add support for user-provided input matrices ✔️
    • analyze performance ✔️
    • improve performance ✔️

Contributing

  • Fork the project
  • You can modify the following modules:
    • the solver, which is defined in solver.h and implemented in the solver.cpp
    • the input matrices , which are constructed through the matrix class, defined in matrixutils.h and implemented in the matrixutils.cpp
    • the user interface, defined in ioutils.h and implemented in ioutils.cpp, so that your changes are easily usable by the end user
  • Once you're done, open a pull request with us

Authors and acknowledgment

Authors: Matilde Tozzi (ge83bug(at)tum.de), Celia Tundidor Centeno (ge87loj(at)mytum.de)

License

MIT

Project status

Ended.

About

Bonus project for the Advanced Programming course @ TUM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published