Base
Before installing the easifemBase library please make sure that you have installed
EASIFEM CLI (recommended method)
You can install easifemBase by using the command line application.
easifem install base
The toml configuration file is given below.
name = "base"
buildSystem = "cmake"
isActive = true
git = 'github.com/easifem/base.git'
sourceDir = "${HOME}/Dropbox/easifem/easifem-base/"
buildDir = "${HOME}/.easifem/easifem/build/base/"
installDir = "${HOME}/.easifem/easifem/install/base/"
buildType = "Debug" # "Debug", "Both"
buildSharedLibs = true
buildStaticLibs = false
usePreset = true
libName = "easifemBase"
targetName = "easifemBase"
projectName = "easifemBase"
intSize = 32 # Default integer size
realSize = 64 # default real size
maxNNE = 128 # maximum number of nodes in an element to consider
maxNodeToNode = 128 # maximum number of node to nodes.
maxNodeToElem = 128 # maximum number of node to element.
runtest = true
license = "GPL3"
buildOptions = [
"-D USE_OPENMP:BOOL=ON",
"-D USE_PLPLOT:BOOL=ON",
"-D USE_BLAS95:BOOL=ON",
"-D USE_LAPACK95:BOOL=ON",
"-D USE_FFTW:BOOL=ON",
"-D USE_GTK:BOOL=OFF",
"-D USE_ARPACK:BOOL=ON",
"-D USE_PARPACK:BOOL=OFF",
"-D USE_SUPERLU:BOOL=ON",
"-D USE_LIS:BOOL=ON",
"-D USE_METIS:BOOL=OFF",
"-D USE_LUA:BOOL=ON",
"-D USE_INT32:BOOL=ON",
"-D USE_REAL64:BOOL=ON",
"-D USE_COLORDISP:BOOL=ON",
]
dependencies = [
"arpack",
"sparsekit",
"superlu",
"lis",
"fftw",
"lapack95",
"tomlf",
]
Using CMake
easifem uses CMake build system.
To manually install easifem from the source we need to perform following tasks.
- Download the source code from git repository.
- Configuration the project by using CMake.
- Build by using CMake.
- Install by using CMake.
Step-1: Download source code
Download the source code from git repository by using one of the methods:
- Git+https
- Git+ssh
- GitHub CLI
- ↢
git clone https://github.com/easifem/base.git base
git clone git@github.com:easifem/base.git base
gh repo clone easifem/base base
Step-2: Configuration
After downloading the source code, enter the source directory, and make a build directory.
cd base
mkdir ./build
To configure the easifemBase library you can define following variables:
| Variable | Type | Options | Default |
|---|---|---|---|
CMAKE_BUILD_TYPE | STRING | Release, Debug | Release |
BUILD_SHARED_LIBS | BOOL | ON, OFF | ON |
CMAKE_INSTALL_PREFIX | PATH | Please specify | $EASIFEM_BASE |
USE_OpenMP | BOOL | ON, OFF | ON |
USE_PLPLOT | BOOL | ON, OFF | ON |
USE_BLAS95 | BOOL | ON, OFF | ON |
USE_LAPACK95 | BOOL | ON, OFF | ON |
USE_FFTW | BOOL | ON, OFF | ON |
USE_GTK | BOOL | ON, OFF | OFF |
USE_ARPACK | BOOL | ON, OFF | ON |
USE_SUPERLU | BOOL | ON, OFF | ON |
USE_LIS | BOOL | ON, OFF | ON |
USE_PARPACK | BOOL | ON, OFF | OFF |
USE_METIS | BOOL | ON, OFF* | OFF |
USE_SUPERLU | BOOL | ON, OFF* | OFF |
USE_RAYLIB | BOOL | ON, OFF* | OFF |
USE_GTK | BOOL | ON, OFF* | OFF |
USE_LUA | BOOL | ON, OFF* | OFF |
USE_GMSH_SDK | BOOL | ON, OFF* | OFF |
USE_Int32 | BOOL | ON, OFF | ON |
USE_Int64 | BOOL | ON, OFF | ON |
USE_Real32 | BOOL | ON, OFF | ON |
USE_Real64 | BOOL | ON, OFF | ON |
USE_COLORDISP | BOOL | ON, OFF | ON |
Step-3 and 4: Build and Install
After configuration, you can build and install the library by using:
cmake --build ./build --target --install
An example of configuration step
export EASIFEM_BASE=${HOME}/.local/easifem/base
cmake -G "Ninja" -S ./ -B ./build \
-D USE_OpenMP:BOOL=ON \
-D CMAKE_BUILD_TYPE:STRING=Release \
-D BUILD_SHARED_LIBS:BOOL=ON \
-D USE_PLPLOT:BOOL=ON \
-D CMAKE_INSTALL_PREFIX:PATH=${EASIFEM_BASE} \
-D USE_BLAS95:BOOL=ON \
-D USE_LAPACK95:BOOL=ON \
-D USE_FFTW:BOOL=ON \
-D USE_GTK:BOOL=OFF \
-D USE_ARPACK:BOOL=ON \
-D USE_PARPACK:BOOL=OFF \
-D USE_LIS:BOOL=ON \
-D USE_LIS:BOOL=OFF \
-D USE_METIS:BOOL=OFF \
-D USE_Int32:BOOL=ON \
-D USE_Real64:BOOL=ON
Build options
CMAKE_BUILD_TYPE
If CMAKE_BUILD_TYPE denotes the build type of library. You can read more it at the cmake website.
This variable is string type and it can take following values:
Release: IfCMAKE_BUILD_TYPEis set toRelease, then highly optimized version ofeasifemBaseis built without any debugging facility. This option should be used by the users of easifem.Debug: IfCMAKE_BUILD_TYPEis set toDebug, then library is built with debugging facility. This is useful for developer of easifem. No optimization, asserts enabled, [custom debug (output) code enabled], debug info included in executable (so you can step through the code with a debugger and have address to source-file:line-number translation).RelWithDebInfo: optimized, with debug info, but no debug (output) code or asserts.MinSizeRel: same as Release but optimizing for size rather than speed.
You can set this option by using --D CMAKE_BUILD_TYPE:STRING=Release.
BUILD_SHARED_LIBS
If BUILD_SHARED_LIBS is set to ON, then position independent code (PIC) shared library will be built. Otherwise, a static library will be built.
You can read more about BUILD_SHARED_LIBS at the cmake website.
You can set this option by using --D BUILD_SHARED_LIBS:BOOL=ON.
CMAKE_INSTALL_PREFIX
CMAKE_INSTALL_PREFIX is a PATH option, which specifies the location of file system where easifemBase library will be installed. If you have set the environment variables correctly then you can specify it to $EASIFEM_BASE, which is given by $EASIFEM_INSTALL_DIR/easifem/base/
You can set this option by using --D CMAKE_INSTALL_PREFIX:PATH=$EASIFEM_BASE.
You can read about CMAKE_INSTALL_PREFIX at the cmake website.
USE_OpenMP
USE_OpenMPif set toON, theeasifemBaselibrary is built withOpenMPwith shared memory parallelization.- The default value is
ON - You can set this option by using
--D USE_OpenMP:BOOL=ON.
USE_PLPLOT
- If
USE_PLPLOTis set toON, thenPlPlotlibrary will be used for plotting figures. If you have set this option toONthen make sure you have downloadedPlPlotlibrary while building system requirements. - In case
USE_PlPLOTis set toOFF, thenPlPlotlibrary will not be used for plotting figures. In this case, plotting may not be possible fromeasifemlibrary. - The default value is
ON - You can set this option by using
--D USE_PLPLOT:BOOL=ON.
USE_BLAS95
- If
USE_BLAS95is set toON, then FORTRAN-95 interface toBLASlibrary will be used. In external packages if you have installedBLAS95library, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_BLAS95:BOOL=ON.
USE_LAPACK95
- If
USE_LAPACK95is set toON, then FORTRAN-95 interface toLAPACKlibrary will be used. In external packages if you have installedLAPACK95library, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_LAPACK95:BOOL=ON.
USE_FFTW
- If
USE_FFTWis set toON, thenFFTWlibrary will be used for Fast Fourier Transform.FFTWstands for Fast Fourier Library in the West. In external packages if you have installedFFTWlibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_FFTW:BOOL=ON.
USE_GTK
- If
USE_GTKis set toON, thenGTKlibrary will be used for making Graphic User Interfaces. In external packages if you have installedgtk4library, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_GTK:BOOL=OFF.
USE_ARPACK
- If
USE_ARPACKis set toON, thenARPACKlibrary will be used for computing eigenvalues and eigenvectors of sparse matrices. In external packages if you have installedarpacklibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_ARPACK:BOOL=ON.
USE_SUPERLU
- If
USE_SUPERLUis set toON, thensuperlulibrary will be used for linear solver. In external packages if you have installedsuperlulibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_SUPERLU:BOOL=ON.
USE_LIS
- If
USE_LISis set toON, thenLISlibrary will be used for solving system of linear equations by using iterative methods. In external packages if you have installedlislibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_LIS:BOOL=ON.
USE_PARPACK
- If
USE_PARPACKis set toON, then parallelARPACKlibrary calledPARPACKwill be used for computing the eigenvalues and eigenvectors of large sparse matrices. In external packages if you have installedparpacklibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_PARPACK:BOOL=OFF.
USE_METIS
- If
USE_METISis set toON, thenMETISlibrary will be used for graph partitioning. In external packages if you have installedmetislibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_METIS:BOOL=OFF.
USE_SUPERLU
- If
USE_SUPERLUis set toON, thensuperlulibrary will be used for linear solver. In external packages if you have installedsuperlulibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
ON - You can set this option by using
--D USE_SUPERLU:BOOL=ON.
USE_RAYLIB
- If
USE_RAYLIBis set toON, thenrayliblibrary will be used for making Graphic User Interfaces. In external packages if you have installedrayliblibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_RAYLIB:BOOL=ON.
USE_GTK
- If
USE_GTKis set toON, thenGTKlibrary will be used for making Graphic User Interfaces. In external packages if you have installedgtk4library, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_GTK:BOOL=ON.
USE_LUA
- If
USE_LUAis set toON, thenlualibrary will be used for scripting. In external packages if you have installedlualibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_LUA:BOOL=ON.
An example of configuration step is given below:
USE_GMSH_SDK
- If
USE_GMSH_SDKis set toON, thenGmshlibrary will be used for meshing. In external packages if you have installedGmshlibrary, then you can set this option toON, otherwise set it toOFF. - The default value is
OFF - You can set this option by using
--D USE_GMSH_SDK:BOOL=ON.
USE_Int32
- If
USE_Int32is set toON, then 32-bit integer numbers will be used as default integers. Please do not set this toOFF. - The default value is
ON - You can set this option by using
--D USE_Int32:BOOL=ON.
USE_Int64
- If
USE_Int64is set toON, then 64-bit integer numbers will be used as default integers. By default it is set toOFF. - The default value is
OFF - You can set this option by using
--D USE_Int64:BOOL=ON.
USE_Real32
- If
USE_Real32is set toON, then 32-bit real numbers will be used as default real numbers. - The default value is
OFF - You can set this option by using
--D USE_Real32:BOOL=ON.
USE_Real64
- If
USE_Real64is set toON, then 64-bit real numbers will be used as default real numbers. Please do not set this toOFF. - The default value is
ON - You can set this option by using
--D USE_Real64:BOOL=ON.
USE_COLORDISP
- If
USE_COLORDISPis set toON, then display in terminal will be colored. - The default value is
ON - You can set this option by using
--D USE_COLORDISP:BOOL=ON.