CFDEM_WM_PROJECT_VERSION inconsistency?

Submitted by jpola on Tue, 08/02/2016 - 10:55

Hi,

I installed the CFDEM with OpenFOAM 3.0.1 but there was one issue I had to resolve.

At the end of the CFDEM basrc file (${HOME}/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/bashrc) there is piece of code which defines a flag CFDEM_WM_PROJECT_VERSION

# detect OF version
if [ $WM_PROJECT_VERSION == "3.0.1" ]; then
export CFDEM_WM_PROJECT_VERSION=30
elif [ $WM_PROJECT_VERSION == "2.4.x" ]; then
export CFDEM_WM_PROJECT_VERSION=24
elif [[ $WM_PROJECT_VERSION == "3.2" && $WM_FORK == "extend" ]]; then
export CFDEM_WM_PROJECT_VERSION=132
fi

The OFversion.H however expects this flag but written without underscores

#if(CFDEMWMPROJECTVERSION == 24)
#define version24
#elif(CFDEMWMPROJECTVERSION == 30)
#define version30
#elif(CFDEMWMPROJECTVERSION == 132)
#define versionExt32
#endif

I managed to compile CFDEM by adding additional export to my version of openFOAM (3.0) here is my code:

# detect OF version
if [ $WM_PROJECT_VERSION == "3.0.1" ]; then
export CFDEM_WM_PROJECT_VERSION=30
export CFDEMWMPROJECTVERSION=30 # <--------- here
elif [ $WM_PROJECT_VERSION == "2.4.x" ]; then
export CFDEM_WM_PROJECT_VERSION=24
elif [[ $WM_PROJECT_VERSION == "3.2" && $WM_FORK == "extend" ]]; then
export CFDEM_WM_PROJECT_VERSION=132
fi

Is it some easy bug or this flag is defining the CFDEMWMPROJECTVERSION somewhere else base on the name with underscores.

Regards,
Jakub.

alice's picture

alice | Mon, 09/26/2016 - 13:37

Hello Jakub,
the definition of the environment variable (with underscores) is correct. It is then used in the options files (e.g. src/lagrangian/cfdemParticle/Make/options) to set the PFLAG.
Best regards,
Alice