Max Lübke ecca89cc4a Merge branch '6-document-implementation-of-2d-btcs-adi' into 'main'
Resolve "Document implementation of 2D BTCS ADI"

Closes #6

See merge request mluebke/diffusion!15
2022-05-16 15:58:17 +02:00
2022-05-16 12:23:11 +02:00
2022-05-16 15:43:10 +02:00
2022-05-16 15:43:10 +02:00
2022-05-16 15:43:10 +02:00
2022-05-16 15:43:10 +02:00
2022-05-16 11:34:56 +02:00
2022-05-16 11:34:56 +02:00
2022-03-02 12:28:36 +01:00
2022-05-16 11:46:50 +02:00

BTCSDiffusion

A framework solving diffusion problems using BTCS approach.

About

This project aims to provide a library for solving diffusion problems using the backward Euler method (BTCS) implemented in C++.

The library is built on top of Eigen, providing easy access to data structures and the linear equation solver.

We designed the API to be as much flexible as possible. Nearly every built-in, framework or third-party data structure can be used to model a problem, as long a pointer to continious memory can be providided.

Also we provide basic parallelization by using OpenMP, which can be easily turned on/off during generation of makefiles.

At the current state, only 1D diffusion problems on a regular grid can be solved reliably. The 2D solution is already implemented, but still returns wrong values. This will be fixed in the future.

Getting started

As this diffusion module is designed as a framework library and makefile generation is done by CMake, you're good to go to also use CMake as your build toolkit. If you decide to not use CMake, you need to manually link your application/library to BTCSDiffusion.

  1. Create project directory.

    $ mkdir sample_project && cd sample_project
  2. Clone this repository into path of choice project directory

    $ git clone git@git.gfz-potsdam.de:mluebke/diffusion.git
  3. Add the following line into CMakeLists.txt file:

    add_subdirectory(path_to_diffusion_module EXCLUDE_FROM_ALL)
  4. Write application/library using API of BTCSDiffusion.
  5. Link target application/library against BTCSDiffusion. Do this by adding into according CMakeLists.txt file:

    target_link_libraries(your_libapp BTCSDiffusion)
  6. Build your application/library with CMake.

Usage

Setting up an enviroment to use the BTCSDiffusion module is divided into the following steps:

  1. Defining dimension of diffusion problem.
  2. Set grid sizes in according dimensions.
  3. Set the timestep to simulate.
  4. Defining boundary conditions.
  5. Run the simulation!

This will run a simulation on the defined grid for one species. See the source code documentation of BTCSDiffusion and the examples in the app/ directory for more information.

Roadmap

  • 1D diffusion
  • 2D diffusion
  • 3D diffusion (?)
  • R-API
  • Python-API (?)
  • Testing

License

TODO?

Description
No description provided
Readme 2.5 MiB
Languages
Jupyter Notebook 37.2%
C++ 26.3%
Julia 20.9%
R 8.5%
HTML 4.9%
Other 2.2%