Commit 423408ef authored by Mark Olesen's avatar Mark Olesen

CONFIG: adjust directory layout

- combine library sources into a single faAvalanche library

- solvers and utilities under applications/

- tutorials run/clean using standard functions
parent ecbaf732
#!/bin/bash
#SUBMODELS
(cd frictionModels && wclean && rm -rf lnInclude)
(cd entrainmentModels && wclean && rm -rf lnInclude)
#PREPROCESSING
(cd slopeMesh && wclean)
(cd releaseAreaMapping && wclean)
#SOLVER
(cd implicitSolver && wclean)
#CASES
(cd tutorials/simpleslope && ./Allclean)
(cd tutorials/entrainment && ./Allclean)
#!/bin/bash
./Allwmake
#CASES
echo ''
echo 'running case simpleslope'
(cd tutorials/simpleslope && ./Allrun)
echo ''
echo 'running case entrainment'
(cd tutorials/entrainment && ./Allrun)
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
src/Allwclean
wclean -all applications
#------------------------------------------------------------------------------
#!/bin/bash
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#SUBMODELS
(cd frictionModels && wmake libso)
(cd entrainmentModels && wmake libso)
# Parse arguments for library compilation
if [ -f $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments ]
then . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
fi
#PREPROCESSING
(cd slopeMesh && wmake)
(cd releaseAreaMapping && wmake)
#------------------------------------------------------------------------------
#SOLVER
(cd implicitSolver && wmake)
\ No newline at end of file
src/Allwmake $targetType $*
applications/Allwmake $targetType $*
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
if [ -f $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments ]
then . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
fi
#------------------------------------------------------------------------------
wmake -all $targetType solvers
wmake -all $targetType utilities
#------------------------------------------------------------------------------
......@@ -3,14 +3,10 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-I$(LIB_SRC)/foam/lnInclude \
-IfrictionModel \
-I. \
-DFULLDEBUG -g -O0 -fpermissive
-I../../../src/avalanche/lnInclude
EXE_LIBS = \
-lfiniteArea \
-lfiniteVolume \
-llduSolvers \
-lfoam
-L$(FOAM_USER_LIBBIN) \
-lfaAvalanche
......@@ -2,15 +2,8 @@ EXE_INC = \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-I$(LIB_SRC)/foam/lnInclude \
-IfrictionModel \
-I. \
-DFULLDEBUG -g -O0 -fpermissive
-I$(LIB_SRC)/cfdTools/general/lnInclude
EXE_LIBS = \
-lfiniteArea \
-lfiniteVolume \
-llduSolvers \
-lfoam
-lfiniteVolume
......@@ -3,9 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-DFULLDEBUG -g -O0
-IelevationModels/elevationModel
EXE_LIBS = \
-lfiniteArea \
......
entrainmentModel/entrainmentModel.C
entrainmentModel/newEntrainmentModel.C
depositionModel/depositionModel.C
depositionModel/newDepositionModel.C
entrainmentOff/entrainmentOff.C
Erosionenergy/Erosionenergy.C
Front/Front.C
IsslerFC/IsslerFC.C
Medina/Medina.C
depositionOff/depositionOff.C
Stopingprofile/Stopingprofile.C
LIB = $(FOAM_USER_LIBBIN)/libfaEntrainmentModels
frictionModel/frictionModel.C
frictionModel/newFrictionModel.C
PoliquenForterre/PoliquenForterre.C
muI/muI.C
Voellmy/Voellmy.C
kt/kt.C
DarcyWeisbach/DarcyWeisbach.C
ManningStrickler/ManningStrickler.C
LIB = $(FOAM_USER_LIBBIN)/libfaFrictionModels
EXE_INC = \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-I$(LIB_SRC)/foam/lnInclude \
-I../frictionModels/lnInclude \
-I../entrainmentModels/lnInclude \
-DFULLDEBUG -g -O0 -fpermissive
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-lfaFrictionModels \
-lfaEntrainmentModels \
-lfiniteArea \
-lfiniteVolume
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
wclean avalanche
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
if [ -f $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments ]
then . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
fi
#------------------------------------------------------------------------------
wmake $targetType avalanche
#------------------------------------------------------------------------------
entrainment = entrainmentModels
$(entrainment)/entrainmentModel/entrainmentModel.C
$(entrainment)/entrainmentModel/newEntrainmentModel.C
$(entrainment)/depositionModel/depositionModel.C
$(entrainment)/depositionModel/newDepositionModel.C
$(entrainment)/entrainmentOff/entrainmentOff.C
$(entrainment)/Erosionenergy/Erosionenergy.C
$(entrainment)/Front/Front.C
$(entrainment)/IsslerFC/IsslerFC.C
$(entrainment)/Medina/Medina.C
$(entrainment)/depositionOff/depositionOff.C
$(entrainment)/Stopingprofile/Stopingprofile.C
friction = frictionModels
$(friction)/frictionModel/frictionModel.C
$(friction)/frictionModel/newFrictionModel.C
$(friction)/PoliquenForterre/PoliquenForterre.C
$(friction)/muI/muI.C
$(friction)/Voellmy/Voellmy.C
$(friction)/kt/kt.C
$(friction)/DarcyWeisbach/DarcyWeisbach.C
$(friction)/ManningStrickler/ManningStrickler.C
LIB = $(FOAM_USER_LIBBIN)/libfaAvalanche
......@@ -3,10 +3,9 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/cfdTools/general/lnInclude \
-I./elevationModels/elevationModel \
-DFULLDEBUG -g -O0
-IfrictionModel \
EXE_LIBS = \
-lfiniteArea \
-lfiniteVolume
-lfiniteVolume \
-llduSolvers
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "--------"
echo "Cleaning tutorials ..."
echo "Removing backup files"
find . \( \
-name '*~' -o -name '*.bak' \
-name core -o -name 'core.[1-9]*' \
-name '*.pvs' -o -name '*.OpenFOAM' -name '*.foam' \
\) -type f -delete
rm -f logs testLoopReport > /dev/null 2>&1
foamCleanTutorials cases
echo "--------"
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
for tutName in simpleslope entrainment
do
echo
echo "running tutorial case $tutName"
echo
(cd $tutName && ./Allrun)
done
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cleanCase0
cleanFaMesh
echo "clearing results..."
rm -rf [0-9]* log.*
rm -rf 0
rm -rf constant/polyMesh/boundary
rm -rf constant/polyMesh/faces
rm -rf constant/polyMesh/neighbour
rm -rf constant/polyMesh/owner
rm -rf constant/polyMesh/points
rm -rf constant/faMesh/faBoundary
rm -rf constant/faMesh/faceLabels
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
echo "clearing results..."
rm -rf [0-9]* log.*
cp -r org0 0
# Restore initial fields
restore0Dir
runApplication slopeMesh
runApplication makeFaMesh
runApplication releaseAreaMapping
echo -n "creating FVMesh..."
if slopeMesh > log.slopeMesh; then
echo " OK"
else
echo " FAILED"
exit 1
fi
echo -n "creating FAMesh..."
if makeFaMesh > log.makeFaMesh; then
echo " OK"
else
echo " FAILED"
exit 1
fi
echo -n "setting releaseArea..."
if releaseAreaMapping > log.releaseAreaMapping; then
echo " OK"
else
echo " FAILED"
exit 1
fi
echo "running simulation..."
if faSavageHutterFoam | tee log.faSavageHutterFoam | grep "^Time = "; then
echo "\n\nSIMULATION FINISHED"
else
echo "\n\nSIMULATION FAILED"
exit 1
fi
runApplication $(getApplication)
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cleanCase0
cleanFaMesh
echo "clearing results..."
rm -rf [0-9]* log.*
rm -rf 0
rm -rf constant/polyMesh/boundary
rm -rf constant/polyMesh/faces
rm -rf constant/polyMesh/neighbour
rm -rf constant/polyMesh/owner
rm -rf constant/polyMesh/points
rm -rf constant/faMesh/faBoundary
rm -rf constant/faMesh/faceLabels
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
echo "clearing results..."
rm -rf [0-9]* log.*
cp -r org0 0
# Restore initial fields
restore0Dir
runApplication slopeMesh
echo -n "creating FVMesh..."
if slopeMesh > log.slopeMesh; then
echo " OK"
else
echo " FAILED"
exit 1
fi
runApplication makeFaMesh
echo -n "creating FAMesh..."
if makeFaMesh > log.makeFaMesh; then
echo " OK"
else
echo " FAILED"
exit 1
fi
echo -n "setting releaseArea..."
if releaseAreaMapping > log.releaseAreaMapping; then
echo " OK"
else
echo " FAILED"
exit 1
fi
echo "running simulation..."
if faSavageHutterFoam | tee log.faSavageHutterFoam | grep "^Time = "; then
echo "\n\nSIMULATION FINISHED"
else
echo "\n\nSIMULATION FAILED"
exit 1
fi
runApplication releaseAreaMapping
runApplication $(getApplication)
#------------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment