Skip to main content

Environment variables

The structure of easifem library after installation is given in Figure 1.

In this figure "EASIFEM_INSTALL_DIR" is the location of parent directory where EASIFEM will be installed. For example, if you want to install easifem at ~/local, then EASIFEM_INSTALL_DIR=~/local.

Environment variables

var-namedescriptioncomment
EASIFEM_INSTALL_DIRlocation where easifem is installedexample: /opt, ${HOME}, /usr/local/
EASIFEM_SOURCE_DIRlocation where the source code of easifem will be storedexample: ~/Dropbox, ~/code
EASIFEM_BUILD_DIRlocation where easifem will be buildTo keep your source directory clean, always keep your build directory separated from build directory
EASIFEM_EXTPKGSlocation where external packages necessary for easifem are installedIt is given by EASIFEM_INSTALL_DIR/easifem/extpkgs
EASIFEM_BASElocation where easifemBase library is installedIt is given by: EASIFEM_BASE=EASIFEM_INSTALL_DIR/easifem/base
EASIFEM_CLASSESlocation where easifemClasses library is installedIt is given by: EASIFEM_INSTALL_DIR/easifem/classes
EASIFEM_MATERIALSlocation where easifemMaterials library is installedIt is given by: EASIFEM_INSTALL_DIR/easifem/materials
EASIFEM_KERNELSlocation where easifemKernels library is installedIt is given by: EASIFEM_INSTALL_DIR/easifem/kernels

Setting up environment on UNIX and LINUX

The easiest way to work with the EASIFEM is easifem command line interface.

  • First download the easifem from pip by using following command.
pip install easifem
  • Then, we can set up the environment variables by using following command.
easifem setenv --install /home/easifem/install --build /home/easifem/build --source /home/easifem/src
  • This command will create config files for bash, zsh, and fish shell in ~/.config/easifem directory. For bash and zsh the name of the file is easifemvar.sh, and for fish the name of the file is easifemvar.fish.
  • Then, you can run following command to bring the changes in your current shell session.
bash and zsh
source ${HOME}/.config/easifem/easifemvar.sh
fish
source $HOME/.config/easifem/easifemvar.fish
info
  • If you are using bash or zsh shell, then you can place easifemvar.sh in your shell. For bash or zsh shell, open .bashrc or .zshrc in your editor and add the following line at the end of the file:
source ${HOME}/.config/easifem/easifemvar.sh
  • If you are using fish shell, then you can place easifemvar.fish in your shell. For fish shell, open config.fish in your editor and add the following line at the end of the file:
source $HOME/.config/easifem/easifemvar.fish

Bash, Zsh shell

If you do not want to use EASIFEM-cli, then please copy the above-mentioned template file and place it in .bashrc or .zshrc.

Fish shell

If you do not want to use EASIFEM-cli, then please copy the above-mentioned template file and place it in config.fish.

Setting up environment on Windows 

Coming soon.