dbeurle / neon

A finite element code
Other
10 stars 8 forks source link
continuum-mechanics fem finite-element-method nonlinear work-in-progress

Build Status Documentation Status Documentation License: MIT

neon

A non-linear finite element code. This project is still under development and is not considered stable.

Building

Before using the package, the code needs to be compiled and installed on the local system. There are two ways of accomplishing this task; using a docker image in a secure environment with the dependencies already handled, or compiling this on the host operating system.

Docker

Go to the top level directory in the git repository and enter

This will pull down the base image and then clone the git repository inside the docker container. The original hosting can be found at https://hub.docker.com/r/dbeurle/neon/

Once this is completed, enter the following commands to enter the docker container

The instructions in the section below can now be followed with the copy of the repository inside the docker container without worrying about dependencies.

Linux

The external dependencies are:

Other dependencies are pulled in during build time with CMake and include

For best performance build with native optimisations on for the machine you are using. This will automatically trigger Eigen to use wider SIMD instruction when available on native architecture at the expense of portability.

The build instructions for debug are

and for release mode with optimisations

If the code is only used on a particular machine, then machine specification optimisations can be invoked by specifying the CMake symbol

which enables the compiler to generate the best machine code for your platform.

If you have an NVIDIA graphics card, then you can use the CUDA enabled iterative solvers by specifying the CMake symbol

CUDA doesn't follow the latest GCC so a compatibility package is usually provided. CMake can be told to use a specific compiler for the host compilation through

For checking the successful compilation of the program, invoke the test suite by executing

in the build directory.

Ubuntu 18.04

Install dependencies through the package manager:

$ sudo apt install cmake git mercurial zlib1g-dev libcurl4-openssl-dev libvtk6-dev libtbb-dev libboost-filesystem-dev libmumps-seq-dev libopenblas-dev libarpack2-dev libscotch-dev hwloc libhwloc-dev gfortran

Then clone the repository and add

$ git clone https://github.com/dbeurle/neon.git

and enter the repository

$ cd neon/docker && sh install_pastix.sh

After this compiles and fails to install, enter the commands to install and link the libraries

$ cd pastix_5.2.3/build && sudo make install && sudo ln -s /usr/local/lib/libpastix.so /usr/lib/libpastix.so

Provide the sudo password when prompted.

Now we are going to create the build directory and compile. Navigate back to the neon directory and create and enter the build directory

$ mkdir build && cd build

We can create the compilation environment and setup optimisations using CMake with

$ cmake -DCMAKE_BUILD_TYPE=Release ..

Finally compiling with

$ make all -jN

where N is the number of parallel build jobs you want to run.

You can then install using

$ sudo make install

and run the test suite with

$ ctest -jN

to ensure the program is behaving as expected.

Licensing

See the LICENSE.md file for the project license and the licenses of the included dependencies.

Contributions

Many thanks to the contributors of ideas, code and theoretical discussions:

If you are missing please open an issue and I'll happily add you to the list.