DynEarthSol3D, DES3D in short, is a finite element code that solves the momentum balance and the heat transfer in Lagrangian form using unstructured meshes. It can be used to study the long-term deformation of Earth's lithosphere and problems alike.
- You will need a recent C++ compiler that supports C++11 standard. (GNU g++ 4.4 or newer version will suffice.)
- You will need a recent version of
Boost::Program_optionslibrary (1.42 or newer version). Instructions for building the library:- Download the source code from www.boost.org
- In the untarred source directory, run
./bootstrap.sh - In the same directory, run
./b2 --with-program_options -qto build the library.
- You will need Python 2.6+ or 3.2+ and the Numpy package.
- Exodus for importing a mesh in the ExodusII format
- Suggested building procedure
- Run the following in the root directory of DES3D:
git clone https://github.com/sandialabs/seacas.git cd seacas && export ACCESS=`pwd` COMPILER=gnu MATIO=NO GNU_PARALLEL=NO CGNS=NO FMT=NO ./install-tpl.sh mkdir build; cd build ../cmake-exodus make; make install
- Run the following in the root directory of DES3D:
- The above procedure will download and build NetCDF and HDF5; and then build EXODUS.
- The header files and built shared library will be in
./seacas/includeand./seacas/lib.
- Suggested building procedure
- MMG3D for mesh optimization during remeshing in three-dimensional models
- Suggested building procedure
- Run the following in the root directory of DES3D:
git clone https://github.com/MmgTools/mmg.git cd mmg; mkdir build; cd build cmake .. make
- The header files and built shared library will be in
mmg/build/includeandmmg/build/lib.
- Run the following in the root directory of DES3D:
- Suggested building procedure
- Build docker image
./build.sh
- Run docker
docker run --rm -it dynearthsol/gcc-11 # default compiler
- Edit
Makefile- Modify
BOOST_ROOT_DIRif you manually built or installed boost library.- If you followed the instructions above to build
Boost::Program_optionslibrary, setBOOST_ROOT_DIRto the untarred boost directory.
- If you followed the instructions above to build
- If importing an exodus mesh:
- Set
useexo = 1andndims = 3. Only 3D exodus mesh can be imported. - Set
EXO_INCLUDEandEXO_LIB_DIRpaths if different from the default values.
- Set
- If mesh optimization with mmg is desired for remeshing:
- Set
usemmg = 1. - Set
MMG_INCLUDEandMMG_LIB_DIRpaths if different from the default values.
- Set
- Modify
- Run
maketo build optimized executable. - Or run
make opt=0to build a debugging executable. - Or run
make openmp=0to build the executable without OpenMP. This is necessary to debug the code under valgrind. - Or run
make opt=-1to build a memory-specific debugging executable using-fsanitize=address, a compiler flag for detacting memory address issues. It can show where the issue occurs and where variables are allocated during execution, without needing additional tools such as GDB or Valgrind. However, valgrind cannot easily coexist with -fsanitize=address. as using both together may cause library-related errors.
- Execute
dynearthsol2d [inputfile: examples/defaults.cfg by default]. - Pay attention to any warnings. For instance, if a warning about potential race condition is printed on screen, do follow the given suggestions.
- Several example input files are provided under
examples/directory. The format of the input file is described inexamples/defaults.cfg. - Benchmark cases with analytical solution can be found under
benchmarks/directory. - Execute the executable with
-hflag to see the available input parameters and their descriptions.
- Run
2vtk.py [modelname: 'results' by default]to convert the binary output to VTK files. - Execute
2vtk.py -hto see more usage information. - Some of the simulation outputs might be disabled. Edit
2vtk.pyandoutput.cxxto disable/enable them. - Plot the VTK files with Paraview or Visit.
Bug reports, comments, and suggestions are always welcome. The best channel is to create an issue on the Issue Tracker here: https://github.com/GeoFLAC/DynEarthSol/issues
This program is free software: you can redistribute it and/or modify it under the terms of the MIT / X Windows System license. See LICENSE for the full text.
The files under the subdirectories 3x3-C/, ann/, tetgen/
and triangles/ are distributed by their own license(s).