diff --git a/applications/solvers/cfdemSolverIB/Make/options b/applications/solvers/cfdemSolverIB/Make/options index b841d1a3..9ef40aef 100755 --- a/applications/solvers/cfdemSolverIB/Make/options +++ b/applications/solvers/cfdemSolverIB/Make/options @@ -1,6 +1,7 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/cfdemSolverPiso/Make/options b/applications/solvers/cfdemSolverPiso/Make/options index 91f9f553..22cdcc2b 100644 --- a/applications/solvers/cfdemSolverPiso/Make/options +++ b/applications/solvers/cfdemSolverPiso/Make/options @@ -1,6 +1,7 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/cfdemSolverPisoMS/Make/options b/applications/solvers/cfdemSolverPisoMS/Make/options index aa6e3aeb..b273ccb1 100644 --- a/applications/solvers/cfdemSolverPisoMS/Make/options +++ b/applications/solvers/cfdemSolverPisoMS/Make/options @@ -1,6 +1,7 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \ diff --git a/applications/solvers/cfdemSolverPisoScalar/Make/options b/applications/solvers/cfdemSolverPisoScalar/Make/options index b5046521..5e43f56a 100644 --- a/applications/solvers/cfdemSolverPisoScalar/Make/options +++ b/applications/solvers/cfdemSolverPisoScalar/Make/options @@ -1,6 +1,7 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/solvers/cfdemSolverRhoPimple/Make/options b/applications/solvers/cfdemSolverRhoPimple/Make/options index 3529eff7..0377ece5 100644 --- a/applications/solvers/cfdemSolverRhoPimple/Make/options +++ b/applications/solvers/cfdemSolverRhoPimple/Make/options @@ -4,6 +4,7 @@ PFLAGS+= -Dcompre EXE_INC = \ $(PFLAGS) \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/applications/utilities/cfdemPostproc/Make/options b/applications/utilities/cfdemPostproc/Make/options index 21948957..105b3029 100644 --- a/applications/utilities/cfdemPostproc/Make/options +++ b/applications/utilities/cfdemPostproc/Make/options @@ -1,6 +1,7 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ diff --git a/src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H b/etc/OFversion/OFversion.H similarity index 100% rename from src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H rename to etc/OFversion/OFversion.H diff --git a/src/lagrangian/cfdemParticle/etc/additionalLibs b/etc/additionalLibs similarity index 100% rename from src/lagrangian/cfdemParticle/etc/additionalLibs rename to etc/additionalLibs diff --git a/etc/bashrc b/etc/bashrc new file mode 100755 index 00000000..5e90ed8c --- /dev/null +++ b/etc/bashrc @@ -0,0 +1,259 @@ +#----------------------------------*-sh-*-------------------------------------- +# CFDEMcoupling +# +# Copyright 2009-2012 JKU Linz +# Copyright 2012-2015 DCS Computing GmbH, Linz +# Copyright 2015- JKU Linz +#------------------------------------------------------------------------------ +# +# File +# etc/bashrc +# +# Description +# Startup file for CFDEMcoupling +# Sourced from ~/.profile or ~/.bashrc +# +# you can test the correctness using cfdemSystemTest.sh +#------------------------------------------------------------------------------ + +export CFDEM_PROJECT=CFDEM +export CFDEM_VERSION=17.02 + +################################################################################ +# USER EDITABLE PART: Changes made here may be lost with the next upgrade +# +# Please set to the appropriate path if the default is not correct. +# +# activate compatible OpenFOAM version +. $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc +# +# CFDEMcoupling +export CFDEM_INST_DIR=$HOME/$CFDEM_PROJECT +export CFDEM_PROJECT_DIR=$CFDEM_INST_DIR/CFDEMcoupling +export CFDEM_PROJECT_USER_DIR=$CFDEM_INST_DIR/$USER-$WM_PROJECT_VERSION +# +# LIGGGHTS +export CFDEM_LIGGGHTS_INST_DIR=$CFDEM_INST_DIR/LIGGGHTS +# +# LPP installation path +export CFDEM_LPP_INST_DIR=$CFDEM_INST_DIR/LPP +# +# Path to additional libraries +export CFDEM_ADD_LIBS_DIR= +# +# END OF (NORMAL) USER EDITABLE PART +################################################################################ + +#- The old dirs to be cleaned from the environment variables +cfdemOldDirs="$CFDEM_LIGGGHTS_BIN_DIR $CFDEM_APP_DIR $CFDEM_LIB_DIR" + +export CFDEM_LIGGGHTS_SRC_DIR=$CFDEM_LIGGGHTS_INST_DIR/src +export CFDEM_LIGGGHTS_BIN_DIR=$CFDEM_LIGGGHTS_INST_DIR/src-build + +#------------------------------------------------------------------------------ +# Source initialization functions +#------------------------------------------------------------------------------ +. $WM_PROJECT_DIR/etc/config.sh/functions + +#------------------------------------------------------------------------------ +# Evaluate command-line parameters +# these can be used to set/unset values +#------------------------------------------------------------------------------ +_foamEval $@ + +#------------------------------------------------------------------------------ + +export CFDEM_SRC_DIR=$CFDEM_PROJECT_DIR/src +export CFDEM_SOLVER_DIR=$CFDEM_PROJECT_DIR/applications/solvers +export CFDEM_UT_DIR=$CFDEM_PROJECT_DIR/applications/utilities +export CFDEM_DOC_DIR=$CFDEM_PROJECT_DIR/doc +export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials +export CFDEM_LPP_DIR=$CFDEM_LPP_INST_DIR/src + +#------------------------------------------------------------------------------ + +#- CFDEM lib name +export CFDEM_LIB_NAME=lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION + +#- CFDEM compressible lib name +export CFDEM_LIB_COMP_NAME=lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSION + +#- Check if additional libraries should be compiled together with solvers +if [[ $CFDEM_ADD_LIBS_DIR == "" ]]; then + export CFDEM_ADD_LIBS_DIR=$CFDEM_PROJECT_DIR/etc +else + echo "using CFDEM_ADD_LIBS_DIR=$CFDEM_ADD_LIBS_DIR defined by user." +fi + +#------------------------------------------------------------------------------ + +#- LMP Many2Many lib path and makefile +export CFDEM_Many2ManyLIB_PATH=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library +export CFDEM_Many2ManyLIB_MAKEFILENAME=fedora_fpic + +#------------------------------------------------------------------------------ + +#- path to test harness +export CFDEM_TEST_HARNESS_PATH=$CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION + +#- path to libraries +export CFDEM_LIB_DIR=$CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/lib + +#- path to apps +export CFDEM_APP_DIR=$CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/bin + +#- create directories +mkdir -p $CFDEM_LIB_DIR +mkdir -p $CFDEM_APP_DIR + +#- path to OF version flag file +export CFDEM_OFVERSION_DIR=$CFDEM_PROJECT_DIR/etc/OFversion + +#------------------------------------------------------------------------------ +# Clean standard environment variables (PATH, LD_LIBRARY_PATH) +#------------------------------------------------------------------------------ +foamClean=$WM_PROJECT_DIR/bin/foamCleanPath + +#- Clean PATH +cleaned=`$foamClean "$PATH" "$cfdemOldDirs"` && PATH="$cleaned" + +#- Clean LD_LIBRARY_PATH +cleaned=`$foamClean "$LD_LIBRARY_PATH" "$cfdemOldDirs"` \ + && LD_LIBRARY_PATH="$cleaned" + +export PATH LD_LIBRARY_PATH + +#- add binary directories to $PATH +_foamAddPath $CFDEM_APP_DIR:$CFDEM_LIGGGHTS_BIN_DIR +_foamAddLib $CFDEM_LIB_DIR + +#------------------------------------------------------------------------------ +# Cleanup environment: +#------------------------------------------------------------------------------ +unset cleaned foamClean cfdemOldDirs + +#------------------------------------------------------------------------------ +# Unload initialization functions: +#------------------------------------------------------------------------------ +. $WM_PROJECT_DIR/etc/config.sh/functions + +#------------------------------------------------------------------------------ +# Settings for lpp postproc tool +#------------------------------------------------------------------------------ + +#- nr of procs for lpp tool +export CFDEM_LPP_NPROCS=4 + +#- nr of procs for lpp tool +export CFDEM_LPP_CHUNKSIZE=1 + +#- shortcut to run lpp +alias lpp='python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE' + +#------------------------------------------------------------------------------ +# aliases for easy navigation (no changes necessary) +#------------------------------------------------------------------------------ + +#- shortcut to cfdem path +alias cfdem='cd $CFDEM_PROJECT_DIR' + +#- shortcut to src path +alias cfdemSrc='cd $CFDEM_SRC_DIR' + +#- shortcut to tutorial path +alias cfdemTut='cd $CFDEM_TUT_DIR' + +#- shortcut to solver path +alias cfdemSol='cd $CFDEM_SOLVER_DIR' + +#- shortcut to utilities path +alias cfdemUt='cd $CFDEM_UT_DIR' + +#- shortcut to run path +alias cfdemRun='cd $CFDEM_PROJECT_USER_DIR/run' + +#- shortcut to user solver path +alias cfdemUsrSol='cd $CFDEM_PROJECT_USER_DIR/applications/solvers' + +#- shortcut to documentation path +alias cfdemDoc='cd $CFDEM_DOC_DIR' + +#- shortcut to open the doxygen with firefox +alias cfdemDox='firefox $CFDEM_DOC_DIR/doxygen/html/index.html' + +#- shortcut to LIGGGHTS path +alias cfdemLIG='cd $CFDEM_LIGGGHTS_SRC_DIR' + +#- shortcut to system test +alias cfdemSysTest='bash $CFDEM_PROJECT_DIR/etc/cfdemSystemTest.sh' + +#- shortcut to pull LIGGGHTS +alias cfdemPullLIG='bash $CFDEM_PROJECT_DIR/etc/pullLIGGGHTS.sh' + +#- shortcut to pull CFDEMcoupling +alias cfdemPullCFDEMcoupling='bash $CFDEM_PROJECT_DIR/etc/pullCFDEMcoupling.sh' + +#- shortcut to clean CFDEM +alias cfdemCleanCFDEM='bash $CFDEM_PROJECT_DIR/etc/cleanCFDEMcoupling.sh' + +#- shortcut to compile LIGGGHTS + sublibraries +alias cfdemCompLIG='bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS.sh' + +#- shortcut to compile CFDEMcoupling +LIGGGHTS +alias cfdemCompCFDEMall='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_all.sh' + +#- shortcut to compile CFDEMcoupling (src+solvers) +alias cfdemCompCFDEM='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling.sh' + +#- shortcut to compile CFDEMcoupling src +alias cfdemCompCFDEMsrc='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_src.sh' + +#- shortcut to compile CFDEMcoupling solvers +alias cfdemCompCFDEMsol='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_sol.sh' + +#- shortcut to compile CFDEMcoupling utilities +alias cfdemCompCFDEMuti='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_uti.sh' + +#- shortcut to test basic tutorials +alias cfdemTestTUT='bash $CFDEM_PROJECT_DIR/etc/testTutorials.sh' + +#- shortcut to visualize the clock model data +alias vizClock='python $CFDEM_UT_DIR/vizClock/matPlot.py' + +#- recursive touch of current directory +alias touchRec='find ./* -exec touch {} \;' + +#- shortcut to run liggghts in serial +cfdemLiggghts() { $CFDEM_LIGGGHTS_BIN_DIR/liggghts < $1; } +export -f cfdemLiggghts + +#- shortcut to run liggghts in parallel +cfdemLiggghtsPar() { mpirun -np $2 $CFDEM_LIGGGHTS_BIN_DIR/liggghts < $1; } +export -f cfdemLiggghtsPar + +#- shortcut to open files including a pattern +cfdemGrep() { grep -rl "$1" ./* | xargs gedit; } +export -f cfdemGrep + +#- shortcut lo list files in a directory +#cfdemListFiles() { find $1 | sed s:""$1"":: > listOfFiles.txt; } #leave out the dir iteslf in list +cfdemListFiles() { find $1 > listOfFiles.txt; } #keep the dir in list +export -f cfdemListFiles + +#- check if the user directory exists +if [ -d "$CFDEM_PROJECT_USER_DIR" ]; then + : +else + echo "make new dirs $CFDEM_PROJECT_USER_DIR ? (y/n)" + read YN + if [ $YN == "y" ]; then + mkdir -p $CFDEM_PROJECT_USER_DIR + cd $CFDEM_PROJECT_USER_DIR + mkdir run + mkdir -p log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION + mkdir -p applications/solvers + else + echo "aborted by user." + #exit + fi +fi diff --git a/src/lagrangian/cfdemParticle/etc/cfdemSystemTest.sh b/etc/cfdemSystemTest.sh similarity index 82% rename from src/lagrangian/cfdemParticle/etc/cfdemSystemTest.sh rename to etc/cfdemSystemTest.sh index e64b8e95..544fc321 100755 --- a/src/lagrangian/cfdemParticle/etc/cfdemSystemTest.sh +++ b/etc/cfdemSystemTest.sh @@ -1,12 +1,12 @@ #!/bin/bash #===================================================================# -# sytsem settings test routine for cfdem project +# sytsem settings test routine for cfdem project # Christoph Goniva - May. 2011, DCS Computing GmbH #===================================================================# #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #- show gcc settings checkGPP="true" @@ -36,16 +36,14 @@ checkDirComment "$CFDEM_LIGGGHTS_SRC_DIR" '$CFDEM_LIGGGHTS_SRC_DIR' "yes" checkEnvComment "$CFDEM_LIGGGHTS_BIN_DIR" '$CFDEM_LIGGGHTS_BIN_DIR' "yes" checkDirComment "$CFDEM_LPP_DIR" '$CFDEM_LPP_DIR' "yes" checkDirComment "$CFDEM_ADD_LIBS_DIR" '$CFDEM_ADD_LIBS_DIR' "yes" -checkDirComment "$CFDEM_PIZZA_DIR" '$CFDEM_PIZZA_DIR' "no" checkDirComment "$CFDEM_TEST_HARNESS_PATH" '$CFDEM_TEST_HARNESS_PATH' "no" -#checkDirComment "$C3PO_SRC_DIR" '$C3PO_SRC_DIR' "no" echo "" echo "library names" -echo '$CFDEM_LIGGGHTS_LIB_NAME = '"$CFDEM_LIGGGHTS_LIB_NAME" echo '$CFDEM_LIB_NAME = '"$CFDEM_LIB_NAME" -echo '$LD_LIBRARY_PATH = '"$LD_LIBRARY_PATH" -echo '$WM_NCOMPPROCS = '"$WM_NCOMPPROCS" +echo '$PATH = '"$PATH" +echo '$LD_LIBRARY_PATH = '"$LD_LIBRARY_PATH" +echo '$WM_NCOMPPROCS = '"$WM_NCOMPPROCS" echo "*******************" @@ -79,6 +77,6 @@ if [ $checkAddOn == "true" ] if [ $(checkDir $filePath) == "true" ]; then source $filePath/etc/$packageName"SystemTest.sh" else - echo "$packageName does not exist." + echo "$packageName does not exist." fi fi diff --git a/src/lagrangian/cfdemParticle/etc/cleanCFDEMcoupling.sh b/etc/cleanCFDEMcoupling.sh similarity index 88% rename from src/lagrangian/cfdemParticle/etc/cleanCFDEMcoupling.sh rename to etc/cleanCFDEMcoupling.sh index 99008b3c..b8ca631e 100644 --- a/src/lagrangian/cfdemParticle/etc/cleanCFDEMcoupling.sh +++ b/etc/cleanCFDEMcoupling.sh @@ -6,7 +6,7 @@ #===================================================================# #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #================================================================================# # clean src remove object files diff --git a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh b/etc/compileCFDEMcoupling.sh similarity index 72% rename from src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh rename to etc/compileCFDEMcoupling.sh index 9792a1a4..8854966b 100755 --- a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh +++ b/etc/compileCFDEMcoupling.sh @@ -6,26 +6,26 @@ #===================================================================# #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh NOW="$(date +"%Y-%m-%d-%H:%M")" logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #================================================================================# # compile src #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh +bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_src.sh #================================================================================# # compile solvers #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh +bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_sol.sh #================================================================================# # compile utilities #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh +bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_uti.sh diff --git a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_all.sh b/etc/compileCFDEMcoupling_all.sh similarity index 75% rename from src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_all.sh rename to etc/compileCFDEMcoupling_all.sh index 96c4c91a..aacc641c 100755 --- a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_all.sh +++ b/etc/compileCFDEMcoupling_all.sh @@ -7,26 +7,26 @@ #===================================================================# #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh NOW="$(date +"%Y-%m-%d-%H:%M")" logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #================================================================================# # compile LIGGGHTS src #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh +bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS.sh #================================================================================# # compile LIGGGHTS libraries #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh +bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS_lib.sh #================================================================================# # compile CFDEMcoupling #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh +bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling.sh diff --git a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh b/etc/compileCFDEMcoupling_sol.sh similarity index 97% rename from src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh rename to etc/compileCFDEMcoupling_sol.sh index 6dbbb3a0..96678146 100755 --- a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh +++ b/etc/compileCFDEMcoupling_sol.sh @@ -8,9 +8,9 @@ whitelist="solver-list.txt" #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #- remove old success/fail logs diff --git a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh b/etc/compileCFDEMcoupling_src.sh similarity index 91% rename from src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh rename to etc/compileCFDEMcoupling_src.sh index a4b531c3..9af4cb54 100755 --- a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh +++ b/etc/compileCFDEMcoupling_src.sh @@ -7,20 +7,20 @@ #===================================================================# #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh NOW="$(date +"%Y-%m-%d-%H:%M")" logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #================================================================================# # compile src #================================================================================# -whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/library-list.txt" +whitelist="$CFDEM_PROJECT_DIR/etc/library-list.txt" echo "" echo "Please provide the libraries to be compiled in the $CWD/$whitelist file." diff --git a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh b/etc/compileCFDEMcoupling_uti.sh similarity index 96% rename from src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh rename to etc/compileCFDEMcoupling_uti.sh index d4e0306e..6efddf2a 100644 --- a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh +++ b/etc/compileCFDEMcoupling_uti.sh @@ -8,9 +8,9 @@ whitelist="utilities-list.txt" #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir CWD="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" diff --git a/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh b/etc/compileLIGGGHTS.sh similarity index 88% rename from src/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh rename to etc/compileLIGGGHTS.sh index a5c35c54..2c627888 100755 --- a/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh +++ b/etc/compileLIGGGHTS.sh @@ -6,12 +6,12 @@ #=================================================================== #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh NOW="$(date +"%Y-%m-%d-%H:%M")" logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #================================================================================# @@ -38,4 +38,4 @@ compileLIGGGHTS $logpath $logfileName $headerText #================================================================================# # compile LIGGGHTS libraries #================================================================================# -bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh +bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS_lib.sh diff --git a/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh b/etc/compileLIGGGHTS_lib.sh similarity index 92% rename from src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh rename to etc/compileLIGGGHTS_lib.sh index 4461d7de..4725f09b 100755 --- a/src/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh +++ b/etc/compileLIGGGHTS_lib.sh @@ -6,19 +6,19 @@ #===================================================================# #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh NOW="$(date +"%Y-%m-%d-%H:%M")" logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #================================================================================# # compile src #================================================================================# - whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/library-liggghts-list.txt" + whitelist="$CFDEM_PROJECT_DIR/etc/library-liggghts-list.txt" echo "" echo "Compiling sub-libraries of LIGGGHTS now..." echo "Please provide the libraries to be compiled in the $CWD/$whitelist file." diff --git a/src/lagrangian/cfdemParticle/etc/controlDict_cgs_2.1.x b/etc/controlDict_cgs_2.1.x similarity index 100% rename from src/lagrangian/cfdemParticle/etc/controlDict_cgs_2.1.x rename to etc/controlDict_cgs_2.1.x diff --git a/src/lagrangian/cfdemParticle/etc/controlDict_cgs_2.2.x b/etc/controlDict_cgs_2.2.x similarity index 100% rename from src/lagrangian/cfdemParticle/etc/controlDict_cgs_2.2.x rename to etc/controlDict_cgs_2.2.x diff --git a/etc/cshrc b/etc/cshrc new file mode 100755 index 00000000..f0a6a532 --- /dev/null +++ b/etc/cshrc @@ -0,0 +1,289 @@ +#----------------------------------*-sh-*-------------------------------------- +# CFDEMcoupling +# +# Copyright 2009-2012 JKU Linz +# Copyright 2012-2015 DCS Computing GmbH, Linz +# Copyright 2015- JKU Linz +#------------------------------------------------------------------------------ +# +# File +# etc/cshrc +# +# Description +# Startup file for CFDEMcoupling +# Sourced from ~/.cshrc +#------------------------------------------------------------------------------ + +setenv CFDEM_PROJECT CFDEM +setenv CFDEM_VERSION 17.02 + +################################################################################ +# USER EDITABLE PART: Changes made here may be lost with the next upgrade +# +# Please set to the appropriate path if the default is not correct. +# +# activate compatible OpenFOAM version +. $HOME/OpenFOAM/OpenFOAM-4.x/etc/cshrc +# +# CFDEMcoupling +setenv CFDEM_INST_DIR $HOME/$CFDEM_PROJECT +setenv CFDEM_PROJECT_DIR $CFDEM_INST_DIR/CFDEMcoupling +setenv CFDEM_PROJECT_USER_DIR $CFDEM_INST_DIR/$USER-$WM_PROJECT_VERSION +# +# LIGGGHTS +setenv CFDEM_LIGGGHTS_INST_DIR $CFDEM_INST_DIR/LIGGGHTS +# +# LPP installation path +setenv CFDEM_LPP_INST_DIR $CFDEM_INST_DIR/LPP +# +# Path to additional libraries +setenv CFDEM_ADD_LIBS_DIR +# +# END OF (NORMAL) USER EDITABLE PART +################################################################################ + +#- The old dirs to be cleaned from the environment variables +set cfdemOldDirs= +if ( $?CFDEM_LIGGGHTS_BIN_DIR ) then + set cfdemOldDirs="$cfdemOldDirs $CFDEM_LIGGGHTS_BIN_DIR" +endif +if ( $?CFDEM_APP_DIR ) then + set cfdemOldDirs="$cfdemOldDirs $CFDEM_APP_DIR" +endif +if ( $?CFDEM_LIB_DIR ) then + set cfdemOldDirs="$cfdemOldDirs $CFDEM_LIB_DIR" +endif + +setenv CFDEM_LIGGGHTS_SRC_DIR $CFDEM_LIGGGHTS_INST_DIR/src +setenv CFDEM_LIGGGHTS_BIN_DIR $CFDEM_LIGGGHTS_INST_DIR/src-build + +#------------------------------------------------------------------------------ +# Source files, possibly with some verbosity +#------------------------------------------------------------------------------ +alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* != "") source \!*' + +#------------------------------------------------------------------------------ +# Evaluate command-line parameters +# these can be used to set/unset values +#------------------------------------------------------------------------------ +while ( $#argv > 0 ) + switch ($argv[1]) + case -*: + # stray option (not meant for us here) -> get out + break + breaksw + case *=: + # name= -> unsetenv name + if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//" + eval "unsetenv $argv[1]:s/=//" + breaksw + case *=*: + # name=value -> setenv name value + if ($?FOAM_VERBOSE && $?prompt) echo "setenv $argv[1]:s/=/ /" + eval "setenv $argv[1]:s/=/ /" + breaksw + default: + # filename: source it + if ( -f "$1" ) then + _foamSource "$1" + else + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"` + endif + breaksw + endsw + shift +end + +#------------------------------------------------------------------------------ + +setenv CFDEM_SRC_DIR $CFDEM_PROJECT_DIR/src +setenv CFDEM_SOLVER_DIR $CFDEM_PROJECT_DIR/applications/solvers +setenv CFDEM_UT_DIR $CFDEM_PROJECT_DIR/applications/utilities +setenv CFDEM_DOC_DIR $CFDEM_PROJECT_DIR/doc +setenv CFDEM_TUT_DIR $CFDEM_PROJECT_DIR/tutorials +setenv CFDEM_LPP_DIR $CFDEM_LPP_INST_DIR/src + +#------------------------------------------------------------------------------ + +#- CFDEM lib name +setenv CFDEM_LIB_NAME lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION + +#- CFDEM compressible lib name +setenv CFDEM_LIB_COMP_NAME lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSION + +#- Check if additional libraries should be compiled together with solvers +if ( ! ($?CFDEM_ADD_LIBS_DIR) ) then + setenv CFDEM_ADD_LIBS_DIR $CFDEM_PROJECT_DIR/etc +else + echo "using CFDEM_ADD_LIBS_DIR=$CFDEM_ADD_LIBS_DIR defined by user." +endif + +#------------------------------------------------------------------------------ + +#- LMP Many2Many lib path and makefile +setenv CFDEM_Many2ManyLIB_PATH $CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library +setenv CFDEM_Many2ManyLIB_MAKEFILENAME fedora_fpic + +#------------------------------------------------------------------------------ + +#- path to test harness +setenv CFDEM_TEST_HARNESS_PATH $CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION + +#- path to libraries +setenv CFDEM_LIB_DIR $CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/lib + +#- path to apps +setenv CFDEM_APP_DIR $CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/bin + +#- create directories +mkdir -p $CFDEM_LIB_DIR +mkdir -p $CFDEM_APP_DIR + +#- path to OF version flag file +setenv CFDEM_OFVERSION_DIR $CFDEM_PROJECT_DIR/etc/OFversion + +#------------------------------------------------------------------------------ +# Clean standard environment variables (PATH, LD_LIBRARY_PATH) +#------------------------------------------------------------------------------ +set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath + +#- prevent local variables from shadowing setenv variables +unset PATH LD_LIBRARY_PATH + +if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH '' + +#- Clean PATH +set cleaned=`$foamClean "$PATH" "$cfdemOldDirs"` +if ( $status == 0 ) setenv PATH $cleaned + +#- Clean LD_LIBRARY_PATH +set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$cfdemOldDirs"` +if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned + +#- add binary directories to $PATH +_foamAddPath $CFDEM_APP_DIR:$CFDEM_LIGGGHTS_BIN_DIR +_foamAddLib $CFDEM_LIB_DIR + +#------------------------------------------------------------------------------ +# Cleanup environment: +#------------------------------------------------------------------------------ +unset cleaned foamClean cfdemOldDirs +unalias _foamSource + +#------------------------------------------------------------------------------ +#- settings for lpp postproc tool +#------------------------------------------------------------------------------ + +#- nr of procs for lpp tool +setenv CFDEM_LPP_NPROCS 4 + +#- nr of procs for lpp tool +setenv CFDEM_LPP_CHUNKSIZE 1 + +#- shortcut to run lpp +alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE \!:1' + +#------------------------------------------------------------------------------ +# aliases for easy navigation (no changes necessary) +#------------------------------------------------------------------------------ + +#- shortcut to cfdem path +alias cfdem 'cd $CFDEM_PROJECT_DIR' + +#- shortcut to src path +alias cfdemSrc 'cd $CFDEM_SRC_DIR' + +#- shortcut to tutorial path +alias cfdemTut 'cd $CFDEM_TUT_DIR' + +#- shortcut to solver path +alias cfdemSol 'cd $CFDEM_SOLVER_DIR' + +#- shortcut to utilities path +alias cfdemUt 'cd $CFDEM_UT_DIR' + +#- shortcut to run path +alias cfdemRun 'cd $CFDEM_PROJECT_USER_DIR/run' + +#- shortcut to user solver path +alias cfdemUsrSol 'cd $CFDEM_PROJECT_USER_DIR/applications/solvers' + +#- shortcut to documentation path +alias cfdemDoc 'cd $CFDEM_DOC_DIR' + +#- shortcut to open the doxygen with firefox +alias cfdemDox 'firefox $CFDEM_DOC_DIR/doxygen/html/index.html' + +#- shortcut to LIGGGHTS path +alias cfdemLIG 'cd $CFDEM_LIGGGHTS_SRC_DIR' + +#- shortcut to system test +alias cfdemSysTest 'bash $CFDEM_PROJECT_DIR/etc/cfdemSystemTest.sh' + +#- shortcut to pull LIGGGHTS +alias cfdemPullLIG 'bash $CFDEM_PROJECT_DIR/etc/pullLIGGGHTS.sh' + +#- shortcut to pull CFDEMcoupling +alias cfdemPullCFDEMcoupling 'bash $CFDEM_PROJECT_DIR/etc/pullCFDEMcoupling.sh' + +#- shortcut to clean CFDEM +alias cfdemCleanCFDEM 'bash $CFDEM_PROJECT_DIR/etc/cleanCFDEMcoupling.sh' + +#- shortcut to compile LIGGGHTS + sublibraries +alias cfdemCompLIG 'bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS.sh' + +#- shortcut to compile CFDEMcoupling +LIGGGHTS +alias cfdemCompCFDEMall 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_all.sh' + +#- shortcut to compile CFDEMcoupling (src+solvers) +alias cfdemCompCFDEM 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling.sh' + +#- shortcut to compile CFDEMcoupling src +alias cfdemCompCFDEMsrc 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_src.sh' + +#- shortcut to compile CFDEMcoupling solvers +alias cfdemCompCFDEMsol 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_sol.sh' + +#- shortcut to compile CFDEMcoupling utilities +alias cfdemCompCFDEMuti 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_uti.sh' + +#- shortcut to test basic tutorials +alias cfdemTestTUT 'bash $CFDEM_PROJECT_DIR/etc/testTutorials.sh' + +#- shortcut to visualize the clock model data +alias vizClock 'python $CFDEM_UT_DIR/vizClock/matPlot.py' + +#- shortcut to run liggghts in serial +alias cfdemLiggghts '$CFDEM_LIGGGHTS_BIN_DIR/liggghts' + +#- shortcut to run liggghts in parallel (no fcts in csh...) +alias cfdemLiggghtsPar 'echo "mpirun -np xx -machinefile mynodes $CFDEM_LIGGGHTS_BIN_DIR/liggghts < in.liggghts_init"' + +#- shortcut to run liggghts in parallel +# unfortunately no functions available in csh + +#- shortcut to run lpp +alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py \!:1' + +#- check if the user directory exists +if ( -d "$CFDEM_PROJECT_USER_DIR" ) then + : +else + if ( -d "$CFDEM_PROJECT_DIR" ) then + echo "make new dirs $CFDEM_PROJECT_USER_DIR ? (y/n)" + set YN=$< + if ( $YN == "y" ) then + mkdir -p $CFDEM_PROJECT_USER_DIR + cd $CFDEM_PROJECT_USER_DIR + mkdir run + mkdir -p log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION + mkdir -p applications/solvers + else + echo "aborted by user." + exit + endif + else + echo "error in CFDEMcoupling's cshrc." + exit + endif +endif diff --git a/src/lagrangian/cfdemParticle/etc/functions.sh b/etc/functions.sh similarity index 99% rename from src/lagrangian/cfdemParticle/etc/functions.sh rename to etc/functions.sh index 5361189b..cdd88ecb 100755 --- a/src/lagrangian/cfdemParticle/etc/functions.sh +++ b/etc/functions.sh @@ -249,7 +249,7 @@ cleanCFDEM() #********************************************** #cleaning libraries - whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/library-list.txt" + whitelist="$CFDEM_PROJECT_DIR/etc/library-list.txt" echo "" echo "Please provide the libraries to be cleaned in the $CWD/$whitelist file." @@ -303,7 +303,7 @@ cleanCFDEM() #********************************************** #cleaning solvers - whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/solver-list.txt" + whitelist="$CFDEM_PROJECT_DIR/etc/solver-list.txt" echo "" echo "Please provide the solvers to be cleaned in the $CWD/$whitelist file." diff --git a/src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt b/etc/library-liggghts-list.txt similarity index 100% rename from src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt rename to etc/library-liggghts-list.txt diff --git a/src/lagrangian/cfdemParticle/etc/library-list.txt b/etc/library-list.txt similarity index 100% rename from src/lagrangian/cfdemParticle/etc/library-list.txt rename to etc/library-list.txt diff --git a/src/lagrangian/cfdemParticle/etc/log/dummy b/etc/log/.gitignore similarity index 100% rename from src/lagrangian/cfdemParticle/etc/log/dummy rename to etc/log/.gitignore diff --git a/src/lagrangian/cfdemParticle/etc/pullLIGGGHTS.sh b/etc/pullLIGGGHTS.sh similarity index 87% rename from src/lagrangian/cfdemParticle/etc/pullLIGGGHTS.sh rename to etc/pullLIGGGHTS.sh index c21b979a..170faec7 100644 --- a/src/lagrangian/cfdemParticle/etc/pullLIGGGHTS.sh +++ b/etc/pullLIGGGHTS.sh @@ -6,12 +6,12 @@ #=================================================================== #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh NOW="$(date +"%Y-%m-%d-%H:%M")" logDir="log" -cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc +cd $CFDEM_PROJECT_DIR/etc mkdir -p $logDir #--------------------------------------------------------------------------------# diff --git a/src/lagrangian/cfdemParticle/etc/solver-list.txt b/etc/solver-list.txt similarity index 100% rename from src/lagrangian/cfdemParticle/etc/solver-list.txt rename to etc/solver-list.txt diff --git a/src/lagrangian/cfdemParticle/etc/testTutorials.sh b/etc/testTutorials.sh similarity index 100% rename from src/lagrangian/cfdemParticle/etc/testTutorials.sh rename to etc/testTutorials.sh diff --git a/src/lagrangian/cfdemParticle/etc/tutorial-list.txt b/etc/tutorial-list.txt similarity index 100% rename from src/lagrangian/cfdemParticle/etc/tutorial-list.txt rename to etc/tutorial-list.txt diff --git a/src/lagrangian/cfdemParticle/etc/utilities-list.txt b/etc/utilities-list.txt similarity index 100% rename from src/lagrangian/cfdemParticle/etc/utilities-list.txt rename to etc/utilities-list.txt diff --git a/src/lagrangian/cfdemParticle/Make/options b/src/lagrangian/cfdemParticle/Make/options index 779508e0..9c152540 100644 --- a/src/lagrangian/cfdemParticle/Make/options +++ b/src/lagrangian/cfdemParticle/Make/options @@ -9,6 +9,7 @@ include $(CFDEM_ADD_LIBS_DIR)/additionalLibs EXE_INC = \ $(PFLAGS) \ $(PINC) \ + -I$(CFDEM_OFVERSION_DIR) \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ diff --git a/src/lagrangian/cfdemParticle/etc/bashrc b/src/lagrangian/cfdemParticle/etc/bashrc deleted file mode 100755 index 3f11759f..00000000 --- a/src/lagrangian/cfdemParticle/etc/bashrc +++ /dev/null @@ -1,216 +0,0 @@ -#----------------------------------*-sh-*-------------------------------------- -# CFDEMcoupling -# Christoph Goniva -# June 2012 -#------------------------------------------------------------------------------ -# -# Script -# etc/bashrc -# -# Description -# Startup file for cfdem exporting environment variables -# Sourced ~/.bashrc -# -#- adapt this and add to ./bashrc -#- you can test the correctness using cfdemSystemTest.sh - -##================================================# -##- source cfdem env vars -#export CFDEM_VERSION=PUBLIC -#export CFDEM_PROJECT_DIR=$HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION -#export CFDEM_SRC_DIR=$CFDEM_PROJECT_DIR/src -#export CFDEM_SOLVER_DIR=$CFDEM_PROJECT_DIR/applications/solvers -#export CFDEM_DOC_DIR=$CFDEM_PROJECT_DIR/doc -#export CFDEM_UT_DIR=$CFDEM_PROJECT_DIR/applications/utilities -#export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials -#export CFDEM_PROJECT_USER_DIR=$HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION -#export CFDEM_bashrc=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc -#export CFDEM_LIGGGHTS_SRC_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src -#export CFDEM_LIGGGHTS_BIN_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src-build -#export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic # obsolete with CMake -#export CFDEM_LPP_DIR=$HOME/LIGGGHTS/mylpp/src -#export CFDEM_PIZZA_DIR=$HOME/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src -#. $CFDEM_bashrc -#================================================# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -#- export environment variables (adapt to your paths) -#------------------------------------------------------------------------------ - -#check if default lammps lib path should be used -if [[ $CFDEM_LAMMPS_LIB_DIR == "" ]]; then - export CFDEM_LAMMPS_LIB_DIR=$CFDEM_LIGGGHTS_SRC_DIR/../lib/ -else - echo "using CFDEM_LAMMPS_LIB_DIR=$CFDEM_LAMMPS_LIB_DIR defined by user." -fi - -#- LIGGGHTS lib name -export CFDEM_LIGGGHTS_LIB_NAME=lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME - -#- CFDEM lib name -export CFDEM_LIB_NAME=lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION - -#- CFDEM compressible lib name -export CFDEM_LIB_COMP_NAME=lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSION - -#check if additional libraries should be compiled together with solvers -if [[ $CFDEM_ADD_LIBS_DIR == "" ]]; then - export CFDEM_ADD_LIBS_DIR=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc -else - echo "using CFDEM_ADD_LIBS_DIR=$CFDEM_ADD_LIBS_DIR defined by user." -fi - -#----------------------------------------------------- -# additional libraries - -#- LMP Many2Many lib path and makefile -export CFDEM_Many2ManyLIB_PATH=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library -export CFDEM_Many2ManyLIB_MAKEFILENAME=$CFDEM_LIGGGHTS_MAKEFILE_NAME - -#- LMP M2M lib path and makefile -export CFDEM_M2MLIB_PATH=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayM2M/library -export CFDEM_M2MLIB_MAKEFILENAME=$CFDEM_LIGGGHTS_MAKEFILE_NAME - -#- LMP POEMS lib path and makefile -export CFDEM_POEMSLIB_PATH=$CFDEM_LAMMPS_LIB_DIR/poems -export CFDEM_POEMSLIB_MAKEFILENAME=g++ - -#- LMP ASPHERE lib path and makefile -export CFDEM_ASPHERELIB_PATH=$CFDEM_LAMMPS_LIB_DIR/poems -export CFDEM_ASPHERELIB_MAKEFILENAME=g++ - -#-C3PO library -export C3PO_SRC_DIR=$CFDEM_SRC_DIR/c3po -#----------------------------------------------------- - -#- path to test harness -export CFDEM_TEST_HARNESS_PATH=$CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION - -#- path to libraries -export CFDEM_LIB_DIR=$FOAM_USER_LIBBIN - -#- path to apps -export CFDEM_APP_DIR=$FOAM_USER_APPBIN - -#- path to OF version flag file -export CFDEM_OFVERSION_DIR=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/OFversion -#------------------------------------------------------------------------------ -#- settings for lpp postproc tool -#------------------------------------------------------------------------------ - -#- nr of procs for lpp tool -export CFDEM_LPP_NPROCS=4 - -#- nr of procs for lpp tool -export CFDEM_LPP_CHUNKSIZE=1 - -#- shortcut to run lpp -alias lpp='python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE' - -#------------------------------------------------------------------------------ -#- aliases for easy navigation (no changes necessary) -#------------------------------------------------------------------------------ -#- shortcut to cfdem path -alias cfdem='cd $CFDEM_PROJECT_DIR' - -#- shortcut to src path -alias cfdemSrc='cd $CFDEM_SRC_DIR' - -#- shortcut to tutorial path -alias cfdemTut='cd $CFDEM_TUT_DIR' - -#- shortcut to solver path -alias cfdemSol='cd $CFDEM_SOLVER_DIR' - -#- shortcut to utilities path -alias cfdemUt='cd $CFDEM_UT_DIR' - -#- shortcut to run path -alias cfdemRun='cd $CFDEM_PROJECT_USER_DIR/run' - -#- shortcut to user solver path -alias cfdemUsrSol='cd $CFDEM_PROJECT_USER_DIR/applications/solvers' - -#- shortcut to documentation path -alias cfdemDoc='cd $CFDEM_DOC_DIR' - -#- shortcut to open the doxygen with firefox -alias cfdemDox='firefox $CFDEM_DOC_DIR/doxygen/html/index.html' - -#- shortcut to LIGGGHTS path -alias cfdemLIG='cd $CFDEM_LIGGGHTS_SRC_DIR' - -#- shortcut to system test -alias cfdemSysTest='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/cfdemSystemTest.sh' - -#- shortcut to pull LIGGGHTS -alias cfdemPullLIG='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/pullLIGGGHTS.sh' - -#- shortcut to pull CFDEMcoupling -alias cfdemPullCFDEMcoupling='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/pullCFDEMcoupling.sh' - -#- shortcut to clean CFDEM -alias cfdemCleanCFDEM='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/cleanCFDEMcoupling.sh' - -#- shortcut to compile LIGGGHTS + sublibraries -alias cfdemCompLIG='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh' - -#- shortcut to compile CFDEMcoupling +LIGGGHTS -alias cfdemCompCFDEMall='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_all.sh' - -#- shortcut to compile CFDEMcoupling (src+solvers) -alias cfdemCompCFDEM='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh' - -#- shortcut to compile CFDEMcoupling src -alias cfdemCompCFDEMsrc='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh' - -#- shortcut to compile CFDEMcoupling solvers -alias cfdemCompCFDEMsol='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh' - -#- shortcut to compile CFDEMcoupling utilities -alias cfdemCompCFDEMuti='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh' - -#- shortcut to test basic tutorials -alias cfdemTestTUT='bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/testTutorials.sh' - -#- shortcut to visualize the clock model data -alias vizClock='python $CFDEM_UT_DIR/vizClock/matPlot.py' - -#- recursive touch of current directory -alias touchRec='find ./* -exec touch {} \;' - -#- shortcut to run liggghts in serial -cfdemLiggghts() { $CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME < $1; } -export -f cfdemLiggghts - -#- shortcut to run liggghts in parallel -cfdemLiggghtsPar() { mpirun -np $2 $CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME < $1; } -export -f cfdemLiggghtsPar - -#- shortcut to open files including a pattern -cfdemGrep() { grep -rl "$1" ./* | xargs gedit; } -export -f cfdemGrep - -#- shortcut lo list files in a directory -#cfdemListFiles() { find $1 | sed s:""$1"":: > listOfFiles.txt; } #leave out the dir iteslf in list -cfdemListFiles() { find $1 > listOfFiles.txt; } #keep the dir in list -export -f cfdemListFiles - -# check if the run directory exists -if [ -d "$CFDEM_PROJECT_USER_DIR" ]; then - : -else - echo "make new dirs $CFDEM_PROJECT_USER_DIR ? (y/n)" - read YN - if [ $YN == "y" ]; then - mkdir -p $CFDEM_PROJECT_USER_DIR - cd $CFDEM_PROJECT_USER_DIR - mkdir run - mkdir -p log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION - mkdir -p applications/solvers - else - echo "aborted by user." - #exit - fi -fi diff --git a/src/lagrangian/cfdemParticle/etc/cshrc b/src/lagrangian/cfdemParticle/etc/cshrc deleted file mode 100755 index 54154dfb..00000000 --- a/src/lagrangian/cfdemParticle/etc/cshrc +++ /dev/null @@ -1,202 +0,0 @@ -#----------------------------------*-sh-*-------------------------------------- -# CFDEMcoupling -# Christoph Goniva -# June 2012 -#------------------------------------------------------------------------------ -# -# Script -# etc/cshrc -# -# Description -# Startup file for cfdem exporting environment variables -# Sourced ~/.cshrc -# -#- adapt this and add to ./cshrc -#- you can test the correctness using cfdemSystemTest.sh - -##================================================# -##- source cfdem env vars -#setenv CFDEM_VERSION PUBLIC -#setenv CFDEM_PROJECT_DIR $HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION -#setenv CFDEM_SRC_DIR $CFDEM_PROJECT_DIR/src/lagrangian/cfdemParticle -#setenv CFDEM_SOLVER_DIR $CFDEM_PROJECT_DIR/applications/solvers -#setenv CFDEM_DOC_DIR $CFDEM_PROJECT_DIR/doc -#setenv CFDEM_UT_DIR $CFDEM_PROJECT_DIR/applications/utilities -#setenv CFDEM_TUT_DIR $CFDEM_PROJECT_DIR/tutorials -#setenv CFDEM_PROJECT_USER_DIR $HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION -#setenv CFDEM_bashrc $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/cshrc -#setenv CFDEM_LIGGGHTS_SRC_DIR $HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src -#setenv CFDEM_LIGGGHTS_MAKEFILE_NAME fedora_fpic -#setenv CFDEM_LPP_DIR $HOME/LIGGGHTS/mylpp/src -#setenv CFDEM_PIZZA_DIR $HOME/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src -#source $CFDEM_bashrc -#================================================# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -#- export environment variables (adapt to your paths) -#------------------------------------------------------------------------------ - -#check if default lammps lib path should be used -if ( ! ($?CFDEM_LAMMPS_LIB_DIR) ) then - setenv CFDEM_LAMMPS_LIB_DIR $CFDEM_LIGGGHTS_SRC_DIR"/../lib/" -else - echo "using CFDEM_LAMMPS_LIB_DIR=$CFDEM_LAMMPS_LIB_DIR defined by user." -endif - -#- LIGGGHTS lib name -setenv CFDEM_LIGGGHTS_LIB_NAME lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME - -#- CFDEM lib name -setenv CFDEM_LIB_NAME lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION - -#- CFDEM compressible lib name -setenv CFDEM_LIB_COMP_NAME lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSION - -#check if additional libraries should be compiled together with solvers -if ( ! ($?CFDEM_ADD_LIBS_DIR) ) then - setenv CFDEM_ADD_LIBS_DIR $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc -else - echo "using CFDEM_ADD_LIBS_DIR=$CFDEM_ADD_LIBS_DIR defined by user." -endif - -#----------------------------------------------------- -# additional libraries - -#- LMP Many2Many lib path and makefile -setenv CFDEM_Many2ManyLIB_PATH $CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library -setenv CFDEM_Many2ManyLIB_MAKEFILENAME $CFDEM_LIGGGHTS_MAKEFILE_NAME - -#- LMP M2M lib path -setenv CFDEM_M2MLIB_PATH $CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayM2M/library -setenv CFDEM_M2MLIB_MAKEFILENAME $CFDEM_LIGGGHTS_MAKEFILE_NAME - -#- LMP POEMS lib path -setenv CFDEM_POEMSLIB_PATH $CFDEM_LIGGGHTS_SRC_DIR/../lib/poems -setenv CFDEM_POEMSLIB_MAKEFILENAME g++ - -#- path to test harness -setenv CFDEM_TEST_HARNESS_PATH $CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION - -#- path to libraries -setenv CFDEM_LIB_DIR $FOAM_USER_LIBBIN - -#- path to apps -setenv CFDEM_APP_DIR $FOAM_USER_APPBIN - -#------------------------------------------------------------------------------ -#- settings for lpp postproc tool -#------------------------------------------------------------------------------ - -#- nr of procs for lpp tool -setenv CFDEM_LPP_NPROCS 4 - -#- nr of procs for lpp tool -setenv CFDEM_LPP_CHUNKSIZE 1 - -#- shortcut to run lpp -alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE \!:1' - -#------------------------------------------------------------------------------ -#- aliases for easy navigation (no changes necessary) -#------------------------------------------------------------------------------ -#- shortcut to cfdem path -alias cfdem 'cd $CFDEM_PROJECT_DIR' - -#- shortcut to src path -alias cfdemSrc 'cd $CFDEM_SRC_DIR' - -#- shortcut to tutorial path -alias cfdemTut 'cd $CFDEM_TUT_DIR' - -#- shortcut to solver path -alias cfdemSol 'cd $CFDEM_SOLVER_DIR' - -#- shortcut to utilities path -alias cfdemUt 'cd $CFDEM_UT_DIR' - -#- shortcut to run path -alias cfdemRun 'cd $CFDEM_PROJECT_USER_DIR/run' - -#- shortcut to user solver path -alias cfdemUsrSol 'cd $CFDEM_PROJECT_USER_DIR/applications/solvers' - -#- shortcut to documentation path -alias cfdemDoc 'cd $CFDEM_DOC_DIR' - -#- shortcut to open the doxygen with firefox -alias cfdemDox 'firefox $CFDEM_DOC_DIR/doxygen/html/index.html' - -#- shortcut to LIGGGHTS path -alias cfdemLIG 'cd $CFDEM_LIGGGHTS_SRC_DIR' - -#- shortcut to system test -alias cfdemSysTest 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/cfdemSystemTest.sh' - -#- shortcut to pull LIGGGHTS -alias cfdemPullLIG 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/pullLIGGGHTS.sh' - -#- shortcut to pull CFDEMcoupling -alias cfdemPullCFDEMcoupling 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/pullCFDEMcoupling.sh' - -#- shortcut to clean CFDEM -alias cfdemCleanCFDEM 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/cleanCFDEMcoupling.sh' - -#- shortcut to compile LIGGGHTS + sublibraries -alias cfdemCompLIG 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh' - -#- shortcut to compile CFDEMcoupling +LIGGGHTS -alias cfdemCompCFDEMall 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_all.sh' - -#- shortcut to compile CFDEMcoupling (src+solvers) -alias cfdemCompCFDEM 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh' - -#- shortcut to compile CFDEMcoupling src -alias cfdemCompCFDEMsrc 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh' - -#- shortcut to compile CFDEMcoupling solvers -alias cfdemCompCFDEMsol 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh' - -#- shortcut to compile CFDEMcoupling utilities -alias cfdemCompCFDEMuti 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh' - -#- shortcut to test basic tutorials -alias cfdemTestTUT 'bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/testTutorials.sh' - -#- shortcut to visualize the clock model data -alias vizClock 'python $CFDEM_UT_DIR/vizClock/matPlot.py' - -#- shortcut to run liggghts in serial -alias cfdemLiggghts '$CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME' - -#- shortcut to run liggghts in parallel (no fcts in csh...) -alias cfdemLiggghtsPar 'echo "mpirun -np xx -machinefile mynodes $CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME < in.liggghts_init"' - -#- shortcut to run liggghts in parallel -# unfortunately no functions available in csh - -#- shortcut to run lpp -alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py \!:1' - -# check if the directory exists -if ( -d "$CFDEM_PROJECT_USER_DIR" ) then - : -else - if ( -d "$CFDEM_PROJECT_DIR" ) then - echo "make new dirs $CFDEM_PROJECT_USER_DIR ? (y/n)" - set YN=$< - if ( $YN == "y" ) then - mkdir -p $CFDEM_PROJECT_USER_DIR - cd $CFDEM_PROJECT_USER_DIR - mkdir run - mkdir -p log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION - mkdir -p applications/solvers - else - echo "aborted by user." - exit - endif - else - echo "error in CFDEMcoupling's cshrc." - exit - endif -endif diff --git a/src/lagrangian/cfdemParticleComp/Make/options b/src/lagrangian/cfdemParticleComp/Make/options index 1bbb8cc5..a7718b58 100644 --- a/src/lagrangian/cfdemParticleComp/Make/options +++ b/src/lagrangian/cfdemParticleComp/Make/options @@ -4,7 +4,7 @@ sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) sinclude $(RULES)/mplib$(WM_MPLIB) -GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) +GIT_VERSION := $(shell git describe --dirty --always --tags) PFLAGS+= -DGITVERSION=\"$(GIT_VERSION)\" PFLAGS+= -Dcompre @@ -12,6 +12,7 @@ PFLAGS+= -Dcompre EXE_INC = \ $(PFLAGS) \ $(PINC) \ + -I$(CFDEM_OFVERSION_DIR) \ -I../cfdemParticle/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ @@ -23,6 +24,9 @@ EXE_INC = \ -I$(CFDEM_LIGGGHTS_SRC_DIR) \ -I$(CFDEM_M2MLIB_PATH) \ -I$(CFDEM_SRC_DIR)/cfdTools \ + -Wno-old-style-cast \ + -Wno-unused-result \ + -Wno-literal-suffix LIB_LIBS = \ $(PLIBS) \ diff --git a/tutorials/cfdemPostproc/fillCylinder/Allrun.sh b/tutorials/cfdemPostproc/fillCylinder/Allrun.sh index b8476329..6230225d 100755 --- a/tutorials/cfdemPostproc/fillCylinder/Allrun.sh +++ b/tutorials/cfdemPostproc/fillCylinder/Allrun.sh @@ -9,7 +9,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #- define variables casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" @@ -73,7 +73,7 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim #foamToVTK - + #- start paraview echo "" echo "trying to start paraview..." diff --git a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/Allrun.sh b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/Allrun.sh index 0c5232c9..1d4838e4 100755 --- a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/Allrun.sh +++ b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/Allrun.sh @@ -1,12 +1,12 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest # Christoph Goniva - July. 2011, mod by Alice Hager - July 2011 #===================================================================# -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #- define variables casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" diff --git a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/parCFDDEMrun.sh index f3c02f0f..967b517e 100644 --- a/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - Feb. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -32,11 +32,11 @@ parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $m if [ $runOctave == "true" ] then - + cd $casePath/CFD/octave octave postproc.m - evince pos_z_two_part_rec_glow.eps - evince vel_z_two_part_rec_glow.eps + evince pos_z_two_part_rec_glow.eps + evince vel_z_two_part_rec_glow.eps #display pos_y_two_part_rec_glow.png & #display vel_y_two_part_rec_glow.png & fi diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh b/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh index 329831fa..30c74145 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/Allrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run ErgunTestCG # Christoph Goniva - Sept. 2010 #===================================================================# @@ -10,7 +10,7 @@ casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh # check if mesh was built if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then @@ -29,4 +29,4 @@ else fi #- run parallel CFD-DEM in new terminal -gnome-terminal --title='cfdemSolverPiso ErgunTestCG CFD' -e "bash $casePath/parCFDDEMrun.sh" +gnome-terminal --title='cfdemSolverPiso ErgunTestCG CFD' -e "bash $casePath/parCFDDEMrun.sh" diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh index 2a476176..1afa125b 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - Feb. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -45,7 +45,7 @@ if [ $runOctave == "true" ] #- run octave octave totalPressureDrop.m - #- show plot + #- show plot evince cfdemSolverPiso_ErgunTestCG.eps #- copy log file to test harness @@ -67,8 +67,6 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD foamToVTK #- serial run of foamToVTK - #source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions - #pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview paraview diff --git a/tutorials/cfdemSolverPiso/ErgunTestCG/parDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestCG/parDEMrun.sh index 9b431c5b..aff0b785 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestCG/parDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestCG/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh index 73c92d20..1043195d 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - Feb. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -45,7 +45,7 @@ if [ $runOctave == "true" ] #- run octave octave totalPressureDrop.m - #- show plot + #- show plot evince cfdemSolverPiso_ErgunTestMPI.eps #- copy log file to test harness @@ -67,8 +67,6 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD foamToVTK #- serial run of foamToVTK - #source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions - #pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview paraview diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/parDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI/parDEMrun.sh index d1e3a033..b5c2d5dd 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI/parDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh echo "starting DEM run in parallel..." #--------------------------------------------------------------------------------# diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parCFDDEMrun.sh index e6c4a062..427ea678 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parCFDDEMrun.sh @@ -1,8 +1,8 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine -# run ErgunTestMPI_cgs +# allrun script for testcase as part of test routine +# run ErgunTestMPI_cgs # Christoph Goniva - March 2013 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -45,7 +45,7 @@ if [ $runOctave == "true" ] #- run octave octave totalPressureDrop.m - #- show plot + #- show plot evince cfdemSolverPiso_ErgunTestMPI.eps #- copy log file to test harness @@ -67,8 +67,6 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD foamToVTK #- serial run of foamToVTK - #source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions - #pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview paraview diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parDEMrun.sh index 9b431c5b..aff0b785 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_cgs/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh index a5564adb..c358ad19 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest # Christoph Goniva - Sept. 2010 #===================================================================# @@ -35,7 +35,7 @@ cp $casePath/CFD/system/controlDict_run $casePath/CFD/system/controlDict #-------------------------------------------------------# #- run parallel CFD-DEM in new terminal -gnome-terminal --title='cfdemSolverPiso ErgunTestMPI_restart CFD' -e "bash $casePath/parCFDDEMrun.sh" +gnome-terminal --title='cfdemSolverPiso ErgunTestMPI_restart CFD' -e "bash $casePath/parCFDDEMrun.sh" #- wait until sim has finished then run octave echo "simulation finished? ...press enter to proceed" @@ -49,7 +49,7 @@ cp $casePath/CFD/constant/couplingProperties_restart $casePath/CFD/constant/coup cp $casePath/CFD/system/controlDict_restart $casePath/CFD/system/controlDict #- run parallel CFD-DEM in new terminal -#gnome-terminal --title='cfdemSolverPiso ErgunTestMPI_restart CFD' -e "bash $casePath/parCFDDEMrun.sh" +#gnome-terminal --title='cfdemSolverPiso ErgunTestMPI_restart CFD' -e "bash $casePath/parCFDDEMrun.sh" bash $casePath/parCFDDEMrun.sh @@ -70,7 +70,7 @@ if [ $runOctave == "true" ] #- run octave octave totalPressureDrop.m - #- show plot + #- show plot evince cfdemSolverPiso_ErgunTestMPI.eps #- copy log file to test harness @@ -92,8 +92,6 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD foamToVTK #- serial run of foamToVTK - #source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions - #pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview paraview diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parCFDDEMrun.sh index 75edf29d..2dd14810 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - Feb. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parDEMrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parDEMrun.sh index 138c7400..fe247127 100755 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parDEMrun.sh +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh index 2d622d70..3e8fcd20 100644 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - Feb. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -42,7 +42,7 @@ if [ $runOctave == "true" ] #- run octave octave settlingVelocity.m - #- show plot + #- show plot evince cfdemSolverPiso_settlingTestMPI.eps #- copy log file to test harness @@ -64,8 +64,6 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD foamToVTK #- serial run of foamToVTK - #source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions - #pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview paraview diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/Allrun.sh b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/Allrun.sh index 5f0949ca..680e02cb 100755 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/Allrun.sh +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/Allrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest # Christoph Goniva - Sept. 2010 #===================================================================# @@ -22,7 +22,7 @@ else fi #- run parallel CFD-DEM in new terminal -gnome-terminal --title='cfdemSolverPisoMS ErgunTestMPI CFD' -e "bash $casePath/parCFDDEMrun.sh" +gnome-terminal --title='cfdemSolverPisoMS ErgunTestMPI CFD' -e "bash $casePath/parCFDDEMrun.sh" if [ $postproc == "true" ] then @@ -38,7 +38,7 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD #foamToVTK #- serial run of foamToVTK - source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions + source $CFDEM_PROJECT_DIR/etc/functions.sh #- include functions pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview diff --git a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh index 800f7aea..d1633aa7 100644 --- a/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPisoMS/ErgunTestMPI/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - Feb. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -42,7 +42,7 @@ rm cfdemSolverPisoMS_ErgunTestMPI.eps #- run octave octave totalPressureDrop.m -#- show plot +#- show plot evince cfdemSolverPisoMS_ErgunTestMPI.eps #------------------------------# diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/parCFDDEMrun.sh b/tutorials/cfdemSolverPisoScalar/packedBedTemp/parCFDDEMrun.sh index c0073d9a..03872339 100644 --- a/tutorials/cfdemSolverPisoScalar/packedBedTemp/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverPisoScalar/packedBedTemp/parCFDDEMrun.sh @@ -1,7 +1,7 @@ #!/bin/bash #===================================================================# -# allrun script for testcase as part of test routine +# allrun script for testcase as part of test routine # run settlingTest CFD part # Christoph Goniva - May. 2011 #===================================================================# @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables @@ -43,7 +43,7 @@ if [ $runOctave == "true" ] #- run octave octave totalPressureDropAndNusselt.m - #- show plots + #- show plots evince cfdemSolverPisoScalar_Nusselt.eps & evince cfdemSolverPisoScalar_pressureDrop.eps #------------------------------# @@ -70,8 +70,6 @@ if [ $postproc == "true" ] #- get VTK data from CFD sim cd $casePath/CFD foamToVTK #- serial run of foamToVTK - #source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh #- include functions - #pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel run of foamToVTK #- start paraview paraview diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/parDEMrun.sh b/tutorials/cfdemSolverPisoScalar/packedBedTemp/parDEMrun.sh index 660b45a1..64e367bb 100755 --- a/tutorials/cfdemSolverPisoScalar/packedBedTemp/parDEMrun.sh +++ b/tutorials/cfdemSolverPisoScalar/packedBedTemp/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables diff --git a/tutorials/cfdemSolverRhoPimple/ErgunTestMPI/parDEMrun.sh b/tutorials/cfdemSolverRhoPimple/ErgunTestMPI/parDEMrun.sh index d1e3a033..b5c2d5dd 100755 --- a/tutorials/cfdemSolverRhoPimple/ErgunTestMPI/parDEMrun.sh +++ b/tutorials/cfdemSolverRhoPimple/ErgunTestMPI/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh echo "starting DEM run in parallel..." #--------------------------------------------------------------------------------# diff --git a/tutorials/cfdemSolverRhoPimple/FinesColumn/parCFDDEMrun.sh b/tutorials/cfdemSolverRhoPimple/FinesColumn/parCFDDEMrun.sh index 226bf237..802c3f12 100755 --- a/tutorials/cfdemSolverRhoPimple/FinesColumn/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverRhoPimple/FinesColumn/parCFDDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh #--------------------------------------------------------------------------------# #- define variables diff --git a/tutorials/cfdemSolverRhoPimple/FinesColumn/parDEMrun.sh b/tutorials/cfdemSolverRhoPimple/FinesColumn/parDEMrun.sh index c7a9b51d..1a45152f 100755 --- a/tutorials/cfdemSolverRhoPimple/FinesColumn/parDEMrun.sh +++ b/tutorials/cfdemSolverRhoPimple/FinesColumn/parDEMrun.sh @@ -10,7 +10,7 @@ . ~/.bashrc #- include functions -source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh +source $CFDEM_PROJECT_DIR/etc/functions.sh echo "starting DEM run in parallel..." #--------------------------------------------------------------------------------#