Giter Site home page Giter Site logo

demo_firedrake's Introduction

Example Project with Firedrake

This Python code is used for teaching purposes and is a modification of the Helmholtz tutorial of Firedrake.

To run it you will need:

  • A Linux distribution (I recommend Ubuntu 20.04 for beginners)
  • Python3 and curl v3.6 or greater (try to use the package repositories to install them)
  • Paraview for the visualization (free of charge)
  • Firedrake

HINT

Follow Firedrake's installation instructions. It will install Firedrake in the folder where you run it from and build it in a virtual environment so it will not mess with your system. The installer may ask you to install missing packages.

Note: On Windows Subsystem for Linux I advise you to use the --minimal-petsc option so that the installation command should look like

python3 firedrake-install --minimal-petsc

After that you will need to activate the environment (just follow the instructions).

You can also use the Eclipse IDE (free of charge) together with the PyDev package that you can get in the Eclipse Marketplace (Menu bar --> Help --> Eclipse Marketplace). In eclipse you can than import the code through Projects from folder or archive. Then edit the project settings and change the project natures to Python nature. Or use any Python IDE that you prefer.

Note that at any rate you will need to point the IDE to use the python3 executable that the Firedrake installation build for you.

Firedrake has a great documentation.


Getting and running the examples

You must first clone the repository:

git clone https://github.com/konsim83/Demo_Firedrake.git

and activate firedrake's virtual environment

source your-firedrake-install-folder/bin/activate

Then enter the code folder

cd Demo_Firedrake/

and type for example

python3 src/helmholtz_1d.py

Open the vtk files that were produced in the data/ folder with Paraview to see the result.

demo_firedrake's People

Contributors

konsim83 avatar

Watchers

James Cloos 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.