-
Notifications
You must be signed in to change notification settings - Fork 11
Compiling code in Linux
In order to obtain the source code, you will need to clone the repository using git. You can install git through the following command in Linux Ubuntu:
sudo apt-get install git
Once git is installed you can fetch the code by using this command in a terminal:
git clone https://github.com/geomechanics/mpm.git mpm
Alternatively, one can go to our GitHub, click the green "Code" button, and "Download ZIP" to manually download the compressed .zip
folder.
-
Go to the downloaded mpm folder and run
mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ -DNO_KAHIP=True ..
-
Run
make clean && make -jN
(where N is the number of cores).
Note: check number of cores with lscpu
To compile either mpm
, mpmtest_unit
, or mpmtest_small
alone, run make mpm -jN
, make mpmtest_unit -jN
, make mpmtest_small -jN
(where N is the number of cores).
This is an alternative to make.
-
Run
mkdir build && cd build && cmake -GNinja -DCMAKE_CXX_COMPILER=g++ ..
. -
Run
ninja
Please include -DPARTIO_ROOT=/path/to/partio/
in the cmake command. A typical cmake command would look like cmake -DCMAKE_BUILD_TYPE=Release -DPARTIO_ROOT=~/workspace/partio/ ..
- Prerequisite packages
- Compiling MPM in Linux
- Compiling MPM in ARM-based MacOS
- Advanced compilation with MPI
- Explicit single-phase MPM
- Implicit linear and nonlinear schemes
- Semi-implicit Navier Stokes solver
- Two-phase MPM solver
- Using higher-order basis functions
- Infinitesimal strain
- Finite strain
- Fluids