Giter Club home page Giter Club logo

distributed_poisson_solver's Introduction

Large Scale Distributed Poisson Equation Solver

Introduction

This code is designed to numerically solve the Poisson equation,

PoissonEquation

in 2D and 3D using the local discontinuous Galerkin (LDG) method from scratch.

Why I Wrote This

The tutorial codes in the deal.ii library (step-12 and step-39) use the MeshWorker interface to build discontinuous Galerkin (DG) methods. While this is very convenient, I could not use this framework for solving my research roblem and I needed write the LDG method from scratch. I thought it would help for others to have access to this example that goes through writing a discontinuous Galerkin method from scatch and also shows how to do it in a distributed setting using the Trilinos library. Therefore, I submitted this code to the deal.II code-gallery, you can find it here. This example may also be of interest to users that wish to use the LDG method, as the method is distinctly different from the Interior Penalty Discontinuous Galerkin (IPDG) methods and was not covered in other tutorials on DG methods.

Why Local Discontinuous Galerkin Methods?

The LDG method is very useful when one is working with a differential equation and desires both approximations to the scalar unknown function as well as its flux. The mixed method a method where one can obtain both the scalar unknown function as we as its flux, however, the LDG method has less unknowns to solve for compared to the mixed finite element method when using the Raviart-Thomas element. The LDG method also approximates the scalar unknown function and its flux using discontinous polynomial basis function. This makes it much more suitable when one wishes to use local mesh refinement as hanging nodes are not an issue as they are in the mixed method or other finite element methods. For an introduction do the LDG method, see the write-up here.

Requirements

The requirements for this software are,

  1. deal.ii library version 8.3.0 or higher,
  2. CMake version 2.8 or higher,
  3. MPI version 2/3.1.4,
  4. Trilinos version 11.12,
  5. p4est version 1.1,
  6. ParaView for visualization.

Installation

First obtain and install a copy of the dealii deal.ii library version 8.3.0 or higher as well as the other dependencies. See the dealii library for installation instructions and installation instructions for Trilinos and p4est.

Compiling

To generate a makefile for this code using CMake, type the following command into the terminal from the main directory:

cmake . -DDEAL_II_DIR=/path_to_deal.ii

To compile the code in debug mode use:

make

To compile the code in release mode use:

make release	

Either of these commands will create the executable, main, however the release mode will make a faster executable.

Using the code

To run the code on N processor type the following command into ther terminal from the main directory,

mpirun -np N ./main

The output of the code will be .vtu and .pvtu and be written to disk in parallel. The results can be viewed using ParaView. An example of the results for a 3D problem are shown below,

Poisson

distributed_poisson_solver's People

Contributors

mdh266 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.