#!/bin/bash fail () { echo Execution aborted. read -n1 -r -p "Press any key to continue..." key exit 1 } # "name" and "dirout" are named according to the testcase export name=CaseBowling export dirout=${name}_out export diroutdata=${dirout}/data # "executables" are renamed and called from their directory export dirbin="$EBROOTDUALSPHYSICS/DualSPHysics-5.0.164/bin/linux/" export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${dirbin} export gencase="${dirbin}/GenCase_linux64" export dualsphysicscpu="${dirbin}/DualSPHysics5.0CPU_linux64" export dualsphysicsgpu="${dirbin}/DualSPHysics5.0_linux64" export boundaryvtk="${dirbin}/BoundaryVTK_linux64" export partvtk="${dirbin}/PartVTK_linux64" export partvtkout="${dirbin}/PartVTKOut_linux64" export measuretool="${dirbin}/MeasureTool_linux64" export computeforces="${dirbin}/ComputeForces_linux64" export isosurface="${dirbin}/IsoSurface_linux64" export flowtool="${dirbin}/FlowTool_linux64" export floatinginfo="${dirbin}/FloatingInfo_linux64" # CODES are executed according the selected parameters of execution in this testcase ${gencase} ${name}_Def ${dirout}/${name} -save:all if [ $? -ne 0 ] ; then fail; fi ${dualsphysicscpu} ${dirout}/${name} ${dirout} -dirdataout data -svres if [ $? -ne 0 ] ; then fail; fi export dirout2=${dirout}/particles ${partvtk} -dirin ${diroutdata} -savevtk ${dirout2}/PartFluid -onlytype:-all,+fluid if [ $? -ne 0 ] ; then fail; fi ${partvtk} -dirin ${diroutdata} -savevtk ${dirout2}/PartBlocks -onlytype:-all,+floating if [ $? -ne 0 ] ; then fail; fi export dirout2=${dirout}/surface ${isosurface} -dirin ${diroutdata} -saveiso ${dirout2}/Surface if [ $? -ne 0 ] ; then fail; fi read -n1 -r -p "Press any key to continue..." key