Git Product home page Git Product logo

mpm's Introduction

High-Performance Material Point Method (CB-Geo mpm)

CB-Geo Computational Geomechanics Research Group

License Developer docs User docs CircleCI codecov Coverity Language grade: C/C++ Project management Discourse forum

Documentation

Please refer to CB-Geo MPM Documentation for information on compiling, and running the code. The documentation also include the MPM theory.

If you have any issues running or compiling the MPM code please open a issue on the CB-Geo Discourse forum.

Running code on Docker

Running code locally

Prerequisite packages

The following prerequisite packages can be found in the docker image:

Optional

Fedora installation (recommended)

Please run the following command:

dnf install -y boost boost-devel clang clang-analyzer clang-tools-extra cmake cppcheck dnf-plugins-core \
                   eigen3-devel findutils freeglut freeglut-devel gcc gcc-c++ git hdf5 hdf5-devel \
                   kernel-devel lcov libnsl make ninja-build openmpi openmpi-devel tar \
                   valgrind vim vtk vtk-devel wget

Ubuntu installation

Please run the following commands to install dependencies:

sudo apt update
sudo apt upgrade
sudo apt install -y gcc git libboost-all-dev libeigen3-dev libhdf5-serial-dev libopenmpi-dev libomp-dev

If you are running Ubuntu 18.04 or below, you may want to update the GCC version to 9 to have OpenMP 5 specifications support.

sudo apt install software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9

To install other dependencies:

CMake 3.15

sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt update
sudo apt upgrade

OpenGL and X11:Xt

sudo apt-get install freeglut3-dev libxt-dev

VTK

git clone https://gitlab.kitware.com/vtk/vtk.git VTK
cd VTK && mkdir build && cd build/
cmake -DCMAKE_BUILD_TYPE:STRING=Release ..
make -j
sudo make install

Partio for Houdini SFX Visualization

mkdir -p ~/workspace && cd ~/workspace/ && git clone https://github.com/wdas/partio.git && \
    cd partio && cmake . && make

Houdini supported (*.bgeo) files will be generated. These can be rendered using the non-commercial Houdini Apprentice.

KaHIP installation for domain decomposition

cd ~/workspace/ && git clone https://github.com/schulzchristian/KaHIP && \
   cd KaHIP && sh ./compile_withcmake.sh

Compile

See CB-Geo MPM Documentation for more detailed instructions.

  1. Run mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ ...

  2. Run make clean && make -jN (where N is the number of cores).

To compile without KaHIP partitioning use cmake -DNO_KAHIP=True ..

Compile mpm or mpmtest

  • To compile either mpm or mpmtest alone, run make mpm -jN or make mpmtest -jN (where N is the number of cores).

Compile without tests [Editing CMake options]

To compile without tests run: mkdir build && cd build && cmake -DMPM_BUILD_TESTING=Off -DCMAKE_CXX_COMPILER=g++ ...

Compile with MPI (Running on a cluster)

The CB-Geo mpm code can be compiled with MPI to distribute the workload across compute nodes in a cluster.

Additional steps to load OpenMPI on Fedora:

source /etc/profile.d/modules.sh
export MODULEPATH=$MODULEPATH:/usr/share/modulefiles
module load mpi/openmpi-x86_64

Compile with OpenMPI (with halo exchange):

mkdir build && cd build
export CXX_COMPILER=mpicxx
cmake -DCMAKE_BUILD_TYPE=Release -DKAHIP_ROOT=~/workspace/KaHIP/ -DHALO_EXCHANGE=On ..
make -jN

To enable halo exchange set -DHALO_EXCHANGE=On in CMake. Halo exchange is a better MPI communication protocol, however, use this only for larger number of MPI tasks (> 4).

Compile with Ninja build system [Alternative to Make]

  1. Run mkdir build && cd build && cmake -GNinja -DCMAKE_CXX_COMPILER=g++ ...

  2. Run ninja

Compile with Partio viz support

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/ ..

Run tests

  1. Run ./mpmtest -s (for a verbose output) or ctest -VV.

Run MPM

See CB-Geo MPM Documentation for more detailed instructions.

The CB-Geo MPM code uses a JSON file for input configuration. To run the mpm code:

   ./mpm  [-p <parallel>] [-i <input_file>] -f <working_dir> [--]
          [--version] [-h]

For example:

export OMP_SCHEDULE="static,4"
./mpm -f /path/to/input-dir/ -i mpm-usf-3d.json

Where:

   -p <parallel>,  --parallel <parallel>
     Number of parallel threads

   -i <input_file>,  --input_file <input_file>
     Input JSON file [mpm.json]

   -f <working_dir>,  --working_dir <working_dir>
     (required)  Current working folder

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

Running the code with MPI

To run the CB-Geo mpm code on a cluster with MPI:

mpirun -N <#-MPI-tasks> ./mpm -f /path/to/input-dir/ -i mpm.json

For example to run the code on 4 compute nodes (MPI tasks):

mpirun -N 4 ./mpm -f ~/benchmarks/3d/uniaxial-stress -i mpm.json

Authors

Please refer to the list of contributors to the CB-Geo MPM code.

Citation

If you publish results using our code, please acknowledge our work by quoting the following paper:

Kumar, K., Salmond, J., Kularathna, S., Wilkes, C., Tjung, E., Biscontin, G., & Soga, K. (2019). Scalable and modular material point method for large scale simulations. 2nd International Conference on the Material Point Method. Cambridge, UK. https://arxiv.org/abs/1909.13380

mpm's People

Contributors

bodhinandach avatar cbgeo avatar cgeudeker avatar chrisgoddard avatar cw646 avatar ezrayst avatar jgiven100 avatar kks32 avatar piggygeo avatar schdvr avatar srhgk2 avatar thiagordonho avatar tianchitj avatar xinyiqian97 avatar yliang-sn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpm's Issues

Template specialisation with an integer doesn't work

Template specialisation with the dimension parameter doesn't work, it always calls the 3D case, even for the 2D case. The following case should call 2D, instead the call is to the 3D function

template <>
mpm::Cell<2> function(){ std::cout << "2D\n";}

template <>
mpm::Cell<2> function(){ std::cout << "3D\n";}

Expected behaviour for

auto cell = std::make_shared<mpm::Cell<3>>()
cell->function();

is to print 2D instead prints 3D.

Needs template specialisation done through SFINAE

MPM Node class

  • Mass of soil / water

  • Force vector

  • Velocity vector

  • Momentum vector

  • Acceleration vector

Check if a point is inside a hedron or a polygon

  • Using a volume summation of tetrahedron / triangles in 2D to check if a point is inside a given volume or not.
  • Hexahedron for 3D: Made of sub-tetrahedrons
  • Quadrilateral for 2D: Made of sub-triangles

Material Base

  • Material ID

  • Basic material properties

  • Compute stresses and strains

Cam Clay

Depends on #6

  • Implementation

  • Unit testing

Particle unit testing

  • Catch framework to test particle classes
  • Particle

  • ParticleHandler

  • ParticleIterator

  • PropertyPool

  • ParticleAccessor

how to use it?

Dear all,
How to use it? Is there any detail document or user manual?
Thanks a lot!

Learning document

Hi all,
Is there any learning document on the MPM code? For example, the example files, how to running and visual the results.
Thanks a lot!
Best regards,
Henry

Traction

Apply traction on material points

Cundall damping

References

  • MPM modelling of landslides in brittle and unsaturated soils.
  • Two-phase dynamic analysis by material point method for implementation of damping.

Fix serialize/de-serialize in particles

  • The boost serialization function requires a template argument. However, the base class Particle_Base is an abstract base class, and it is not possible to have virtual base class member functions to be templatised.

Node class

  • Node base class

  • Node handler class with iterator

Damping validation test

See section 4.10 in Two-phase dynamic analysis by material point method for implementation of damping for validation of damping in MPM

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.