Installation
Marmot
By default, a working instance of Marmot, containing specific implementations of finite elements and constitutive models, is required. Marmot itself requires the Eigen library, and potentially Fastor, depending on the requested modules.
Please build Marmot before you build EdelweissFE.
Configuration
Customize setup.py
by defining all paths pointing to the respective libraries.
Default paths are already defined, and usually only minor modifications should be required.
Building EdelweissFE
EdelweissFE depends on several Cython modules, which must be compiled prior to running the EdelweissFE.
To build EdelweissFE and install it using pip, simply run from within the main folder:
cd ./EdelweissFE
pip install .
Run a simulation with an inputfile using
edelweissfe your_input_file.inp
Run all the validation examples
run_tests_edelweissfe ./testfiles/
Recreate the validation reference solutions (only if you know what you are doing)
run_tests_edelweissfe --create
Alternatively, to build the modules (inplace) and not install them using pip, simply run
python setup.py build_ext -i
Enforce a recompilation with
python setup.py build_ext -i --force
TLDR
Assuming that you are in an empty directory, you can quickly get a working version of EdelweissFE in a Linux based environment:
Installation steps
If necessary, get mamba:
curl -L -O \
https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh -b -p ./mambaforge3
Add mamba to your environment:
export EWROOT=$PWD
export PATH=$EWROOT/mambaforge3/bin:$PATH
mamba init --all
exit
Restart shell and activate mamba
export EWROOT=$PWD
mamba activate
Get EdelweissFE:
git clone https://github.com/EdelweissFE/EdelweissFE.git
Install necessary mamba packages:
mamba install --file EdelweissFE/requirements.txt
Get Eigen (for EdelweissFE and Marmot):
cd $EWROOT
git clone --branch 3.4.0 https://gitlab.com/libeigen/eigen.git
cd eigen
mkdir build
cd build
cmake \
-DBUILD_TESTING=OFF \
-DINCLUDE_INSTALL_DIR=$CONDA_PREFIX/include \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
..
make install
Get autodiff (for Marmot):
cd $EWROOT
git clone --branch v1.1.0 https://github.com/autodiff/autodiff.git
cd autodiff
mkdir build
cd build
cmake \
-DAUTODIFF_BUILD_TESTS=OFF \
-DAUTODIFF_BUILD_PYTHON=OFF \
-DAUTODIFF_BUILD_EXAMPLES=OFF \
-DAUTODIFF_BUILD_DOCS=OFF \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
..
make install
Get Fastor:
cd $EWROOT
git clone https://github.com/romeric/Fastor.git
cd Fastor
cmake -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX .
make install
cd ../
Get Marmot:
cd $EWROOT
git clone --recurse https://github.com/MAteRialMOdelingToolbox/Marmot.git
cd Marmot
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
..
make install
Build and test EdelweissFE:
cd $EWROOT
cd EdelweissFE
pip install .
run_tests_edelweissfe ./testfiles/
Build this documentation:
sphinx-build ./doc/source/ ./docs -b html