Giter Site home page Giter Site logo

pdelab's Introduction

Overview

An object oriented framework for solving and analyzing PDEs. This project grew organically while I worked (read: toiled) on my graduate degree. The goal of the framework was to abstract away the mechanics and other "lower level" code needed to solve PDEs so the researcher can spend more time focusing on their solver (i.e. their "business logic").

Installation

  1. Open pdelab/makefile and pdelab/examples/makefile. Edit the compiler and linker locations and flags for each. This should be the only change necessary to the makefiles.

  2. Excecute the following make commands from the project's root directory,

$ cd pdelab
$ make spotless
$ make
  1. (Optionally) Add the paths "pdelab/bin/" and "pdelab/py" to your .profile
  2. Type pdelab from the project's root directory to launch the CLI.

TL;DR: Quick start guide

The easiest way to get started is to follow the installation guide and then run a test. In a terminal, type

$ pdelab
pdelab> sim advec 2000
pdelab> script advec 1 0 2000 0
pdelab> gnuplot
gnuplot> load 'gp/advec.gp'
gnuplot> exit
pdelab> exit
$

This should simulate and display the advection equation.

Instruction scripts

Create the following script under the name "pde/foo.pde"...

# This file will solve the advection equation using finite
# differencing techniques and will plot the resulting
# time series in gnuplot. 500 timesteps are calculated.

# This file will also set an instruction to calculate the norm
# of the solution as a function of time. It will store the
# resulting time series in normdata/advec.dat

set norm advec normdata/ 
sim advec 500 
script advec 1 0 500 0 
gnuplot -persist "gp/advec.gp'

then run the set of instructions from a terminal window...

$ pdelab
pdelab> load foo

This runs a simulation, creates a file that gnuplot can read, calculates norms, and plots the results. All that as needed from the researcher to get this working was Example.h and Example.cpp which contains the numerical algorithm for solving the advection equation.

More complicated analysis is possible using some of the other Instructions (see diffnorm.py) or if there is a need for one that doesn't exist, you can always make a new one!

Dependencies

In order to use pdelab, you will at least need the gcc compiler and the make utility installed. pdelab has been built on a Mac OSX and Linux with the gcc and intel compilers. Here are some other useful packages that will make for a much richer experience.

$ pip freeze 
python-2.6.5
gnuplot-py-1.8
ipython-0.10-py2.6
numpy-1.4.1rc3-py2.6
scipy-0.7.2rc3-py2.6
matplotlib-0.99.1.1-py2.6
setuptools-0.6c11-py2.6

Author

[email protected]

pdelab's People

Contributors

wilsojb avatar

Stargazers

Mert Candar 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.