Albany-LCM (Laboratory for Computational Mechanics) is a fork of Albany, an implicit, unstructured grid, finite element code for the solution and analysis of multiphysics problems. Albany-LCM focuses on computational solid mechanics and thermo-mechanics, with nearly 200 regression tests demonstrating capabilities across a wide variety of problems.
Solid mechanics simulation of a notched cylinder using the alternating Schwarz-based multi-scale coupling capability in Albany-LCM.
- Large-scale parallel simulations (2.1+ billion DOFs) using MPI
- Automatic differentiation via Sacado
- Constitutive models: linear elasticity, J2 plasticity, crystal plasticity, hyperelasticity, damage models
- Schwarz alternating method for multi-scale coupling
- Arctic Coastal Erosion (ACE) model: coupled thermo-mechanical model with permafrost constitutive models, part of the InterFACE project
- Data transfer between coupled domains via DataTransferKit (DTK)
Albany-LCM requires Trilinos and the following system packages.
sudo dnf install \
blas blas-devel boost boost-devel boost-openmpi boost-openmpi-devel \
cmake gcc-c++ gcc-gfortran gtest-devel git \
hdf5 hdf5-devel hdf5-openmpi hdf5-openmpi-devel \
lapack lapack-devel netcdf netcdf-devel netcdf-openmpi netcdf-openmpi-devel \
openblas openblas-devel openmpi openmpi-devel environment-modulesOptional (for clang builds):
sudo dnf install clang clang-develCMake 3.27+ is required. If your system cmake is older:
spack install cmake@3.27sudo apt install \
libblas-dev libboost-dev libboost-program-options-dev \
cmake g++ gfortran git \
libhdf5-openmpi-dev liblapack-dev libnetcdf-dev \
libopenmpi-dev mpi-default-bin environment-modulesmkdir ~/LCM && cd ~/LCM
git clone git@github.com:trilinos/Trilinos.git
git clone git@github.com:sandialabs/LCM.git
git clone -b dtk-2.0-tpetra-static-graph git@github.com:ikalash/DataTransferKit.git
cp -r DataTransferKit Trilinos/Add to ~/.bashrc:
export LCM_DIR=~/LCM
module use $LCM_DIR/LCM/doc/LCM/modulefilesLog out and back in, or source ~/.bashrc.
cd ~/LCM
ln -s LCM/doc/LCM/build/lcm .cd ~/LCM
module load release # loads serial-gcc-release environment
./lcm clean trilinos # clean previous builds
./lcm config trilinos 16 # configure Trilinos (16 = parallel threads)
./lcm build trilinos 16 # build Trilinos
./lcm clean lcm # clean previous LCM build
./lcm config lcm 16 # configure LCM
./lcm build lcm 16 # build LCM
./lcm test lcm # run test suiteOr do everything at once:
./lcm all 16lcm clean <package> Clean build (and install for trilinos)
lcm config <package> [N] Configure package
lcm build <package> [N] Build package with N threads (default: nproc)
lcm test <package> Run tests
lcm all [N] Full pipeline: clean + config + build + test
lcm help Show help
Modules configure the compiler, architecture, and build type. Available configurations:
| Module | Compiler | Build Type |
|---|---|---|
serial-gcc-release |
GCC | Release (optimized) |
serial-gcc-debug |
GCC | Debug (symbols) |
serial-clang-release |
Clang | Release |
serial-clang-debug |
Clang | Debug |
The release module is an alias for serial-gcc-release.
Load a module before building:
module load serial-clang-release
./lcm all 16 --module=serial-clang-releaseBuild directories are named by configuration, e.g. lcm-build-serial-gcc-release.
A corresponding Trilinos installation must exist for each configuration.
After building, the Albany executable is in the build directory:
cd ~/LCM/lcm-build-serial-gcc-release/tests/LCM/Pressure
mpiexec -np 4 ~/LCM/lcm-build-serial-gcc-release/src/Albany input_tetra4.yamlThe module system adds build and Trilinos install directories to PATH, so after loading a module, Albany and Trilinos tools (decomp, epu, exodiff) are available directly.
The test suite is in tests/ and runs via CTest:
./lcm test lcmIndividual tests can be run from their subdirectory:
cd ~/LCM/lcm-build-serial-gcc-release/tests/LCM/Pressure
ctestMany tests run in parallel using up to 4 MPI ranks.
The doc/LCM/build/clone-build-test.sh script clones all repositories from scratch and runs the full build and test suite. It is typically run via cron:
# In crontab:
00 00 * * 1-5 cd /home/lcm/LCM; bash -l -c "./clone-build-test.sh"Development discussion: https://github.com/sandialabs/LCM/issues
We follow the Google C++ Style Guide. Use clang-format with the .clang-format file in src/LCM/:
clang-format -i <source file>Please ensure all tests pass before pushing changes.
- Alejandro Mota (amota@sandia.gov)
- Irina Tezaur (ikalash@sandia.gov)

