Skip to content
Snippets Groups Projects
webmanue's avatar
webmanue authored
Resolve "Build image via Docker Compose"

Closes #68

See merge request mechanics-and-materials/ae108!60
a5104ac8
History

AE108

Introduction

The aim of this project is to provide a C++ foundation for computational solid mechanics simulations using a variational framework, primarily focusing on the Finite Element Method (FEM). See the Computational Solid Mechanics lecture notes for more information about the approach that is used. The code is developed by the Mechanics & Materials Lab at ETH Zurich.

Summary

The following libraries are provided:

  • ae108-cmdline: Read command line parameters.

    A simple library for reading command line parameters with few lines of code (based on Boost.Program_options).

  • ae108-cpppetsc: Create a mesh.

    A library for creating a FEM mesh and managing the degrees of freedom associated with the elements and their vertices (based on PETSc's DMPLEX). It also provides wrappers around PETSc's solvers (KSP, SNES, and TAO).

  • ae108-elements: Define elements.

    A library for specifying the behaviour of the elements that make up the mesh. For instance, use this library to define the energy needed to deform an element.

  • ae108-assembly: Assemble local data.

    A library for assembling MPI-local data in cpppetsc meshes. For instance, assemble the local energy by summing the energy of all local element instances.

  • ae108-solve: Minimize the total energy.

    A library for minimizing the assembled total energy using PETSc's solvers or optimizers as provided by cpppetsc.

Installation

The project uses CMake as its build system generator. The following third party libraries are required and located using CMake's find_package.

Of course, these libraries are covered by their own license terms. Since PETSc does not provide a CMake configuration file, PETSc is found using the provided find module in cmake/modules/, which in turn is based on pkg-config.

Once you have installed these libraries, run CMake to build the project, choosing a location to install the library to by specifying CMAKE_INSTALL_PREFIX; see the following example. Of course, depending on your setup, you might need to add a -DCMAKE_PREFIX_PATH='...' parameter to tell CMake the location of the third party library installations.

mkdir build
cd build
cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX='install/to/path' \
    ..

Now run make to build and install:

make -j$(nproc) install

Usage

To link and use the libraries point CMake to the installation using -DCMAKE_PREFIX_PATH='...' and use CMake's find_package to find the package ae108. Now link the libraries that you want to link using CMake's target_link_libraries. The following targets are installed:

  • ae108::cmdline
  • ae108::cpppetsc
  • ae108::elements
  • ae108::assembly
  • ae108::solve

License

AE108 is available under the Apache 2.0 license.

Releases

The latest release is v0.1.0. It is also available via the ETH library: ae108.