diff --git a/appl/coupling-ff-pm/iterative-reversed/Allclean.sh b/appl/coupling-ff-pm/iterative-reversed/Allclean.sh new file mode 100755 index 0000000000000000000000000000000000000000..69871e45d4a35484fab4b70a4e7b2b7e49040a14 --- /dev/null +++ b/appl/coupling-ff-pm/iterative-reversed/Allclean.sh @@ -0,0 +1,12 @@ +#! /usr/bin/env bash + + +ff_solver="test_ff_reversed" +pm_solver="test_pm_reversed" + + +rm -rf "precice-run/" +rm -f "${ff_solver}.log" "${pm_solver}.log" +rm -f precice-*.log +rm -f precice-*.json + diff --git a/appl/coupling-ff-pm/iterative-reversed/Allrun.sh b/appl/coupling-ff-pm/iterative-reversed/Allrun.sh new file mode 100755 index 0000000000000000000000000000000000000000..1c7953b179afbd1d986ef47c519120cd753d55fe --- /dev/null +++ b/appl/coupling-ff-pm/iterative-reversed/Allrun.sh @@ -0,0 +1,31 @@ +#! /usr/bin/env bash + +solver_input="params.input" + +ff_solver="test_ff_reversed" +pm_solver="test_pm_reversed" + +precice_config="precice-config-serial-implicit-reversed.xml" + +rm -rf "precice-run/" +ff_cmd="./${ff_solver} - ${precice_config}" +echo "${ff_cmd}" +./${ff_solver} - ${precice_config} > ${ff_solver}.log 2>&1 & +PIDFluid=$! +./${pm_solver} - ${precice_config} > ${pm_solver}.log 2>&1 & +PIDSolid=$! + +echo "Waiting for the participants to exit..." +echo "(you may run 'tail -f ${ff_solver}.log' or 'tail -f ${pm_solver}.log' in another terminal to check the progress)" + +wait ${PIDFluid} +wait ${PIDSolid} + +if [ $? -ne 0 ] || [ "$(grep -c -E "error:" ${ff_solver}.log)" -ne 0 ] || [ "$(grep -c -E "error:" ${pm_solver}.log)" -ne 0 ]; then + echo "" + echo "Something went wrong... See the log files for more." +else + echo "" + echo "The simulation completed!" +fi + diff --git a/appl/coupling-ff-pm/iterative-reversed/precice-config-serial-implicit-reversed.xml b/appl/coupling-ff-pm/iterative-reversed/precice-config-serial-implicit-reversed.xml index 4df0f6f97df2fc5f126811e32862aa05b733a6fd..973fe15b255bde4e2cfaf774cdbbaf115719968a 100644 --- a/appl/coupling-ff-pm/iterative-reversed/precice-config-serial-implicit-reversed.xml +++ b/appl/coupling-ff-pm/iterative-reversed/precice-config-serial-implicit-reversed.xml @@ -35,32 +35,24 @@ <participant name="Darcy"> <use-mesh name="DarcyMesh" provide="yes"/> + <read-data name="Pressure" mesh="DarcyMesh"/> <write-data name="Velocity" mesh="DarcyMesh"/> </participant> - <m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" exchange-directory="/tmp/coupling" /> + <m2n:sockets from="FreeFlow" to="Darcy" distribution-type="gather-scatter" network="lo" /> <coupling-scheme:serial-implicit> - <max-time value="100"/> + <max-time value="1"/> <timestep-length value="1" /> <max-iterations value="100"/> <participants first="FreeFlow" second="Darcy"/> - - <!-- - <participants first="Darcy" second="FreeFlow"/> - --> - - <exchange data="Pressure" mesh="FreeFlowMesh" from="FreeFlow" to="Darcy" initialize="false" /> - <exchange data="Velocity" mesh="FreeFlowMesh" from="Darcy" to="FreeFlow" initialize="true" /> + <exchange data="Pressure" mesh="DarcyMesh" from="FreeFlow" to="Darcy" initialize="false" /> + <exchange data="Velocity" mesh="DarcyMesh" from="Darcy" to="FreeFlow" initialize="true" /> - <!-- - <relative-convergence-measure limit="1.0e-6" data="Velocity" mesh="FreeFlowMesh"/> - --> - <relative-convergence-measure limit="1.0e-8" data="Pressure" mesh="DarcyMesh"/> <relative-convergence-measure limit="1.0e-8" data="Velocity" mesh="DarcyMesh"/>