Merge branch 'feature/environment_setup' into feature/cherry_pick_PUBLIC

This commit is contained in:
danielque
2017-08-22 15:55:47 +02:00
24 changed files with 295 additions and 179 deletions

View File

@ -1,52 +1,76 @@
#----------------------------------*-sh-*--------------------------------------
# CFDEMcoupling
# Christoph Goniva
# June 2012
#
# Copyright 2009-2012 JKU Linz
# Copyright 2012-2015 DCS Computing GmbH, Linz
# Copyright 2015- JKU Linz
#------------------------------------------------------------------------------
#
# Script
# File
# etc/bashrc
#
# Description
# Startup file for cfdem exporting environment variables
# Sourced ~/.bashrc
# Startup file for CFDEMcoupling
# Sourced from ~/.profile or ~/.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_PROJECT_DIR/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
#================================================#
# 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
#------------------------------------------------------------------------------
#- export environment variables (adapt to your paths)
# Source initialization functions
#------------------------------------------------------------------------------
. $WM_PROJECT_DIR/etc/config.sh/functions
#------------------------------------------------------------------------------
# Evaluate command-line parameters
# these can be used to set/unset values
#------------------------------------------------------------------------------
_foamEval $@
#------------------------------------------------------------------------------
#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
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
#- 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
@ -54,49 +78,67 @@ 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
#- 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
#-----------------------------------------------------
# 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
export CFDEM_Many2ManyLIB_MAKEFILENAME=fedora_fpic
#- 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
export CFDEM_LIB_DIR=$CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
#- path to apps
export CFDEM_APP_DIR=$FOAM_USER_APPBIN
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
#------------------------------------------------------------------------------
#- settings for lpp postproc tool
# 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
@ -109,8 +151,9 @@ export CFDEM_LPP_CHUNKSIZE=1
alias lpp='python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE'
#------------------------------------------------------------------------------
#- aliases for easy navigation (no changes necessary)
# aliases for easy navigation (no changes necessary)
#------------------------------------------------------------------------------
#- shortcut to cfdem path
alias cfdem='cd $CFDEM_PROJECT_DIR'
@ -197,7 +240,7 @@ export -f cfdemGrep
cfdemListFiles() { find $1 > listOfFiles.txt; } #keep the dir in list
export -f cfdemListFiles
# check if the run directory exists
#- check if the user directory exists
if [ -d "$CFDEM_PROJECT_USER_DIR" ]; then
:
else

View File

@ -1,7 +1,7 @@
#!/bin/bash
#===================================================================#
# sytsem settings test routine for cfdem project
# sytsem settings test routine for cfdem project
# Christoph Goniva - May. 2011, DCS Computing GmbH
#===================================================================#
@ -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

193
etc/cshrc
View File

@ -1,51 +1,109 @@
#----------------------------------*-sh-*--------------------------------------
# CFDEMcoupling
# Christoph Goniva
# June 2012
#
# Copyright 2009-2012 JKU Linz
# Copyright 2012-2015 DCS Computing GmbH, Linz
# Copyright 2015- JKU Linz
#------------------------------------------------------------------------------
#
# Script
# File
# etc/cshrc
#
# Description
# Startup file for cfdem exporting environment variables
# Sourced ~/.cshrc
# 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
#
#- adapt this and add to ./cshrc
#- you can test the correctness using cfdemSystemTest.sh
# 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
################################################################################
##================================================#
##- 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_PROJECT_DIR/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."
#- 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
#- LIGGGHTS lib name
setenv CFDEM_LIGGGHTS_LIB_NAME lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME
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
@ -53,36 +111,64 @@ 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
#- 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
#-----------------------------------------------------
# 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
setenv CFDEM_Many2ManyLIB_MAKEFILENAME fedora_fpic
#- 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
setenv CFDEM_LIB_DIR $CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
#- path to apps
setenv CFDEM_APP_DIR $FOAM_USER_APPBIN
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
@ -98,8 +184,9 @@ setenv CFDEM_LPP_CHUNKSIZE 1
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)
# aliases for easy navigation (no changes necessary)
#------------------------------------------------------------------------------
#- shortcut to cfdem path
alias cfdem 'cd $CFDEM_PROJECT_DIR'
@ -178,13 +265,13 @@ alias cfdemLiggghtsPar 'echo "mpirun -np xx -machinefile mynodes $CFDEM_LIGGGHTS
#- shortcut to run lpp
alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py \!:1'
# check if the directory exists
#- 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=$<
set YN=$<
if ( $YN == "y" ) then
mkdir -p $CFDEM_PROJECT_USER_DIR
cd $CFDEM_PROJECT_USER_DIR

View File

@ -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..."

View File

@ -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]})")"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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..."
#--------------------------------------------------------------------------------#

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
#------------------------------#

View File

@ -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

View File

@ -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

View File

@ -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..."
#--------------------------------------------------------------------------------#

View File

@ -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

View File

@ -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..."
#--------------------------------------------------------------------------------#