# Install calculix software dependencies

This was most recently tested to work on ubuntu 20.04.2 LTS.

1. pull the latest list of packages from ubuntu
sudo apt-get update

2. Upgrade to the latest available packages of those that are currently installed. This will take some time (the first time especially).
sudo apt-get upgrade

1. Install the compilers and libraries that are required:
sudo apt-get install libexodusii-dev libspooles-dev libblas3 libblas-dev \
liblapack3 liblapack-dev libarpack2 libarpack2-dev \
libparpack2 gfortran gcc unzip make

2. Install Paraview and optionally emacs (or your preferred text editor):
sudo apt-get install paraview emacs

3. Optionally install the Intel Math Kernel Library (MKL)
• This would make blas, lapack, and arpack redundant (installed above) and may provide faster solutions
• Further, it is closed source non-free and may violate some code licensing restrictions
• It does, however, have the the Pardiso library (which can optionally be used by ccx for improved solver speed)
• The Makefile (see below) assumes this has been installed
sudo apt-get install intel-mkl

4. Optionally install the Pardiso library without the Intel Math Kernel Library (MKL)
• (There is no need if you have installed the Intel MKL library)
• This may provide faster solutions
• Further, it is closed source non-free and may violate some code licensing restrictions
• You will need to edit the Makefile to address this path

# Setup a CalculiX environment

1. Follow the instructions 2-6 at here
2. Alter step 7 (where the Makefile is updated):
cd src
wget https://openaircraft.com/assets/code/calculix/ubuntu-ccx-makefile-2.17.zip
unzip -o ubuntu-ccx-makefile.zip

3. Edit the makefile as necessary (this may not be necessary depending on your choice of patches)
• It is assumed that the pardiso solver is available
• i.e., the Intel MKL library OR the Pardiso library is installed.
• The additional solvers (CUDA-CUSP, etc) are not compiled in by default but can be enabled within the Makefile
• ExodusII is compiled by default but can be disabled within the Makefile
emacs Makefile

4. Then make the binary:
make -j8

5. For convenience, add this working directory to your PATH variable. This needs only be done once:
echo PATH=\$PATH:~/CalculiX/ccx_2.17/src >> ~/.bashrc
source ~/.bashrc


# Run a test job

cd
cd CalculiX
mkdir test
cd test
wget https://openaircraft.com/assets/examples/beamlin.zip
unzip beamlin.zip
ccx_2.17 beamlin -o exo


# Visualize with Paraview

paraview beamlin.exo &

1. In paraview, in the lower left corner, toggle U, S, and E.
2. Click “apply” at the top Change the “solid color” (near top) to “S”.
3. Change “Surface” to “Surface with Edges”
4. Spin the model in the window

# Optionally install netcdf-bin

It is sometimes useful to examine the metadata (and other data) from the exodus file without using paraview. This can be done with netcdf-bin:

sudo apt-get install netcdf-bin
ncdump beamlin.exo


# Support the maintenance of this software

Please donate to support the maintenance of this code!