From 5b3c9f93d81c2ac3296a9d85b1eb9a6df40fd26b Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Thu, 18 Mar 2021 16:14:21 +0100 Subject: [PATCH 1/9] Update script and merged parameter files for deal.II --- .../solid-dealii/nonlinear_elasticity.prm | 81 ------------------- .../{linear_elasticity.prm => parameters.prm} | 30 ++++--- perpendicular-flap/solid-dealii/run.sh | 18 +---- 3 files changed, 20 insertions(+), 109 deletions(-) delete mode 100644 perpendicular-flap/solid-dealii/nonlinear_elasticity.prm rename perpendicular-flap/solid-dealii/{linear_elasticity.prm => parameters.prm} (73%) diff --git a/perpendicular-flap/solid-dealii/nonlinear_elasticity.prm b/perpendicular-flap/solid-dealii/nonlinear_elasticity.prm deleted file mode 100644 index cb760534e..000000000 --- a/perpendicular-flap/solid-dealii/nonlinear_elasticity.prm +++ /dev/null @@ -1,81 +0,0 @@ -# Listing of Parameters -# Dimensional quantities are in SI units -# -------------------------------------- - -subsection Time - # End time - set End time = 5 - - # Time step size - set Time step size = 0.01 - - # Output interval - set Output interval = 10 -end - -subsection Discretization - # Newmark beta - set beta = 0.25 - - # Newmark gamma - set gamma = 0.5 - - # Polynomial degree of the FE system - set Polynomial degree = 4 -end - -subsection System properties - # Poisson's ratio - set Poisson's ratio = 0.3 - - # Shear modulus - set Shear modulus = 1538462 - - # Density - set rho = 3000 - - # Body forces x,y,z - set body forces = 0.0,0.0,0.0 -end - -subsection Linear solver - # Linear solver iterations (multiples of the system matrix size) - set Max iteration multiplier = 1 - - # Linear solver residual (scaled by residual norm) - set Residual = 1e-6 - - # Linear solver: CG or Direct - set Solver type = Direct -end - -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed - set Max iterations Newton-Raphson = 10 - - # Displacement error tolerance - set Tolerance displacement = 1.0e-6 - - # Force residual tolerance - set Tolerance force = 1.0e-9 -end - -subsection precice configuration - # Cases: FSI3 or PF for perpendicular flap - set Scenario = PF - - # Name of the precice configuration file - set precice config-file = ../precice-config.xml - - # Name of the participant in the precice-config.xml file - set Participant name = Solid - - # Name of the coupling mesh in the precice-config.xml file - set Mesh name = Solid-Mesh - - # Name of the read data in the precice-config.xml file - set Read data name = Force - - # Name of the write data in the precice-config.xml file - set Write data name = Displacement -end diff --git a/perpendicular-flap/solid-dealii/linear_elasticity.prm b/perpendicular-flap/solid-dealii/parameters.prm similarity index 73% rename from perpendicular-flap/solid-dealii/linear_elasticity.prm rename to perpendicular-flap/solid-dealii/parameters.prm index 91b5bb05c..1aea26c27 100644 --- a/perpendicular-flap/solid-dealii/linear_elasticity.prm +++ b/perpendicular-flap/solid-dealii/parameters.prm @@ -14,29 +14,28 @@ subsection Time end subsection Discretization - # Time integration scheme - # 0 = forward, 1 = backward - set theta = 0.5 - # Polynomial degree of the FE system set Polynomial degree = 4 end subsection System properties - # mu (shear modulus) - set mu = 1538462 + # Poisson's ratio + set Poisson's ratio = 0.3 - # lambda - set lambda = 2307692 + # Shear modulus + set Shear modulus = 1538462 - # density + # Density set rho = 3000 - # body forces x,y,z + # Body forces x,y,z set body forces = 0.0,0.0,0.0 end -subsection Linear solver +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = linear + # Linear solver iterations (multiples of the system matrix size) set Max iteration multiplier = 1 @@ -45,6 +44,15 @@ subsection Linear solver # Linear solver: CG or Direct set Solver type = Direct + + # Number of Newton-Raphson iterations allowed + set Max iterations Newton-Raphson = 10 + + # Displacement error tolerance + set Tolerance displacement = 1.0e-6 + + # Force residual tolerance + set Tolerance force = 1.0e-9 end subsection precice configuration diff --git a/perpendicular-flap/solid-dealii/run.sh b/perpendicular-flap/solid-dealii/run.sh index 7eb9e4d94..80cdec87d 100755 --- a/perpendicular-flap/solid-dealii/run.sh +++ b/perpendicular-flap/solid-dealii/run.sh @@ -7,21 +7,5 @@ cd ${0%/*} || exit 1 # Run from this directory # in another terminal. # These scripts present how the two participants would be started manually. -# 1 for true, 0 for false -nonlinear=0 -if [ "$1" = "-nonlinear" ]; then - nonlinear=1 -fi +./elasticity parameters.prm -linear=0 -if [ "$1" = "-linear" ]; then - linear=1 -fi - -if [ $linear -eq 1 ]; then - ./linear_elasticity linear_elasticity.prm -elif [ $nonlinear -eq 1 ]; then - ./nonlinear_elasticity nonlinear_elasticity.prm -else - echo "No solver type specified. Please specify -linear or -nonlinear as solver type" -fi From ed5f7f570194486421c1cefb481d819228ae8fcd Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Sun, 21 Mar 2021 14:19:07 +0100 Subject: [PATCH 2/9] Apply suggestions from code review --- .../solid-dealii/parameters.prm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/perpendicular-flap/solid-dealii/parameters.prm b/perpendicular-flap/solid-dealii/parameters.prm index 1aea26c27..697bc6f47 100644 --- a/perpendicular-flap/solid-dealii/parameters.prm +++ b/perpendicular-flap/solid-dealii/parameters.prm @@ -34,24 +34,25 @@ end subsection Solver # Structural model to be used: linear or neo-Hookean - set Model = linear + set Model = neo-Hookean - # Linear solver iterations (multiples of the system matrix size) + # Linear solver: CG or Direct + set Solver type = Direct + + # Max CG solver iterations (multiples of the system matrix size) + # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. set Max iteration multiplier = 1 - # Linear solver residual (scaled by residual norm) + # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) set Residual = 1e-6 - # Linear solver: CG or Direct - set Solver type = Direct - - # Number of Newton-Raphson iterations allowed + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) set Max iterations Newton-Raphson = 10 - # Displacement error tolerance + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) set Tolerance displacement = 1.0e-6 - # Force residual tolerance + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) set Tolerance force = 1.0e-9 end From 9675bca3dd3c72f92a45ffb8fa86c76cb701a06e Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Sun, 21 Mar 2021 15:07:23 +0100 Subject: [PATCH 3/9] Update parameter files --- .../solid-left-dealii/linear_elasticity.prm | 71 ----------------- ...onlinear_elasticity.prm => parameters.prm} | 40 +++++----- .../solid-right-dealii/linear_elasticity.prm | 71 ----------------- ...onlinear_elasticity.prm => parameters.prm} | 40 +++++----- .../solid-dealii/parameters.prm | 2 +- turek-hron-fsi3/solid-dealii/parameters.prm | 77 +++++++++++++++++++ 6 files changed, 114 insertions(+), 187 deletions(-) delete mode 100644 multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm rename multiple-perpendicular-flaps/solid-left-dealii/{nonlinear_elasticity.prm => parameters.prm} (65%) delete mode 100644 multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm rename multiple-perpendicular-flaps/solid-right-dealii/{nonlinear_elasticity.prm => parameters.prm} (65%) create mode 100644 turek-hron-fsi3/solid-dealii/parameters.prm diff --git a/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm b/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm deleted file mode 100644 index 019f7f406..000000000 --- a/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm +++ /dev/null @@ -1,71 +0,0 @@ -# Listing of Parameters -# Dimensional quantities are in SI units -# -------------------------------------- - -subsection Time - # End time - set End time = 5 - - # Time step size - set Time step size = 0.01 - - # Write results every x timesteps - set Output interval = 10 -end - -subsection Discretization - # Time integration scheme - # 0 = forward, 1 = backward - set theta = 0.5 - - # Polynomial degree of the FE system - set Polynomial degree = 4 -end - -subsection System properties - # mu (shear modulus) - set mu = 153846 - - # lambda - set lambda = 230769 - - # density - set rho = 3000 - - # body forces x,y,z - set body forces = 0.0,0.0,0.0 -end - -subsection Linear solver - # Linear solver iterations (multiples of the system matrix size) - set Max iteration multiplier = 1 - - # Linear solver residual (scaled by residual norm) - set Residual = 1e-6 - - # Linear solver: CG or Direct - set Solver type = Direct -end - -subsection precice configuration - # Cases: FSI3 or PF for perpendicular flap - set Scenario = PF - - # Name of the precice configuration file - set precice config-file = ../precice-config.xml - - # Name of the participant in the precice-config.xml file - set Participant name = Solid1 - - # Name of the coupling mesh in the precice-config.xml file - set Mesh name = Solid1-Mesh - - # Name of the read data in the precice-config.xml file - set Read data name = Stress1 - - # Name of the write data in the precice-config.xml file - set Write data name = Displacement1 - - # PF x-location - set Flap location = -1.0 -end diff --git a/multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm similarity index 65% rename from multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm rename to multiple-perpendicular-flaps/solid-left-dealii/parameters.prm index cf1d4fdab..d8740f772 100644 --- a/multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm +++ b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm @@ -9,54 +9,50 @@ subsection Time # Time step size set Time step size = 0.01 - # Output interval - set Output interval = 10 + # Write results every x timesteps + set Output interval = 10 end subsection Discretization - # Newmark beta - set beta = 0.25 - - # Newmark gamma - set gamma = 0.5 - # Polynomial degree of the FE system set Polynomial degree = 4 end subsection System properties # Poisson's ratio - set Poisson's ratio = 0.375 + set Poisson's ratio = 0.3 # Shear modulus - set Shear modulus = 153846 + set Shear modulus = 1538462 # Density - set rho = 3000 + set rho = 3000 # Body forces x,y,z set body forces = 0.0,0.0,0.0 end -subsection Linear solver - # Linear solver iterations (multiples of the system matrix size) - set Max iteration multiplier = 1 - - # Linear solver residual (scaled by residual norm) - set Residual = 1e-6 +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = linear # Linear solver: CG or Direct set Solver type = Direct -end -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed + # Max CG solver iterations (multiples of the system matrix size) + # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + set Max iteration multiplier = 1 + + # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + set Residual = 1e-6 + + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) set Max iterations Newton-Raphson = 10 - # Displacement error tolerance + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) set Tolerance displacement = 1.0e-6 - # Force residual tolerance + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) set Tolerance force = 1.0e-9 end diff --git a/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm b/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm deleted file mode 100644 index e5cab3f73..000000000 --- a/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm +++ /dev/null @@ -1,71 +0,0 @@ -# Listing of Parameters -# Dimensional quantities are in SI units -# -------------------------------------- - -subsection Time - # End time - set End time = 5 - - # Time step size - set Time step size = 0.01 - - # Write results every x timesteps - set Output interval = 10 -end - -subsection Discretization - # Time integration scheme - # 0 = forward, 1 = backward - set theta = 0.5 - - # Polynomial degree of the FE system - set Polynomial degree = 4 -end - -subsection System properties - # mu (shear modulus) - set mu = 153846 - - # lambda - set lambda = 230769 - - # density - set rho = 3000 - - # body forces x,y,z - set body forces = 0.0,0.0,0.0 -end - -subsection Linear solver - # Linear solver iterations (multiples of the system matrix size) - set Max iteration multiplier = 1 - - # Linear solver residual (scaled by residual norm) - set Residual = 1e-6 - - # Linear solver: CG or Direct - set Solver type = Direct -end - -subsection precice configuration - # Cases: FSI3 or PF for perpendicular flap - set Scenario = PF - - # Name of the precice configuration file - set precice config-file = ../precice-config.xml - - # Name of the participant in the precice-config.xml file - set Participant name = Solid2 - - # Name of the coupling mesh in the precice-config.xml file - set Mesh name = Solid2-Mesh - - # Name of the read data in the precice-config.xml file - set Read data name = Stress2 - - # Name of the write data in the precice-config.xml file - set Write data name = Displacement2 - - # PF x-location - set Flap location = 1.0 -end diff --git a/multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm similarity index 65% rename from multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm rename to multiple-perpendicular-flaps/solid-right-dealii/parameters.prm index f0f1289ee..4df8bf180 100644 --- a/multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm +++ b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm @@ -9,54 +9,50 @@ subsection Time # Time step size set Time step size = 0.01 - # Output interval - set Output interval = 10 + # Write results every x timesteps + set Output interval = 10 end subsection Discretization - # Newmark beta - set beta = 0.25 - - # Newmark gamma - set gamma = 0.5 - # Polynomial degree of the FE system set Polynomial degree = 4 end subsection System properties # Poisson's ratio - set Poisson's ratio = 0.375 + set Poisson's ratio = 0.3 # Shear modulus - set Shear modulus = 153846 + set Shear modulus = 1538462 # Density - set rho = 3000 + set rho = 3000 # Body forces x,y,z set body forces = 0.0,0.0,0.0 end -subsection Linear solver - # Linear solver iterations (multiples of the system matrix size) - set Max iteration multiplier = 1 - - # Linear solver residual (scaled by residual norm) - set Residual = 1e-6 +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = linear # Linear solver: CG or Direct set Solver type = Direct -end -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed + # Max CG solver iterations (multiples of the system matrix size) + # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + set Max iteration multiplier = 1 + + # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + set Residual = 1e-6 + + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) set Max iterations Newton-Raphson = 10 - # Displacement error tolerance + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) set Tolerance displacement = 1.0e-6 - # Force residual tolerance + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) set Tolerance force = 1.0e-9 end diff --git a/perpendicular-flap/solid-dealii/parameters.prm b/perpendicular-flap/solid-dealii/parameters.prm index 697bc6f47..d26dd7870 100644 --- a/perpendicular-flap/solid-dealii/parameters.prm +++ b/perpendicular-flap/solid-dealii/parameters.prm @@ -34,7 +34,7 @@ end subsection Solver # Structural model to be used: linear or neo-Hookean - set Model = neo-Hookean + set Model = linear # Linear solver: CG or Direct set Solver type = Direct diff --git a/turek-hron-fsi3/solid-dealii/parameters.prm b/turek-hron-fsi3/solid-dealii/parameters.prm new file mode 100644 index 000000000..3c41041ec --- /dev/null +++ b/turek-hron-fsi3/solid-dealii/parameters.prm @@ -0,0 +1,77 @@ +# Listing of Parameters +# Dimensional quantities are in SI units +# -------------------------------------- + +subsection Time + # End time + set End time = 15 + + # Time step size + set Time step size = 0.001 + + # Write results every x timesteps + set Output interval = 100 +end + +subsection Discretization + # Polynomial degree of the FE system + set Polynomial degree = 4 +end + +subsection System properties + # Poisson's ratio + set Poisson's ratio = 0.4 + + # Shear modulus + set Shear modulus = 2.0e6 + + # Density + set rho = 1000 + + # Body forces x,y,z + set body forces = 0.0,0.0,0.0 +end + +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = neo-Hookean + + # Linear solver: CG or Direct + set Solver type = Direct + + # Max CG solver iterations (multiples of the system matrix size) + # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + set Max iteration multiplier = 1 + + # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + set Residual = 1e-6 + + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) + set Max iterations Newton-Raphson = 10 + + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) + set Tolerance displacement = 1.0e-6 + + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) + set Tolerance force = 1.0e-9 +end + +subsection precice configuration + # Cases: FSI3 or PF for perpendicular flap + set Scenario = FSI3 + + # Name of the precice configuration file + set precice config-file = ../precice-config.xml + + # Name of the participant in the precice-config.xml file + set Participant name = Solid + + # Name of the coupling mesh in the precice-config.xml file + set Mesh name = Solid-Mesh + + # Name of the read data in the precice-config.xml file + set Read data name = Stress + + # Name of the write data in the precice-config.xml file + set Write data name = Displacement +end From b97c8599e69026f5a858152d1e579e33d227a393 Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Sun, 21 Mar 2021 15:07:57 +0100 Subject: [PATCH 4/9] Remove duplicated parameter file --- .../solid-dealii/nonlinear_elasticity.prm | 81 ------------------- 1 file changed, 81 deletions(-) delete mode 100644 turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm diff --git a/turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm b/turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm deleted file mode 100644 index 00167df21..000000000 --- a/turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm +++ /dev/null @@ -1,81 +0,0 @@ -# Listing of Parameters -# Dimensional quantities are in SI units -# -------------------------------------- - -subsection Time - # End time - set End time = 15 - - # Time step size - set Time step size = 0.001 - - # Output interval - set Output interval = 100 -end - -subsection Discretization - # Newmark beta - set beta = 0.25 - - # Newmark gamma - set gamma = 0.5 - - # Polynomial degree of the FE system - set Polynomial degree = 4 -end - -subsection System properties - # Poisson's ratio - set Poisson's ratio = 0.4 - - # Shear modulus - set Shear modulus = 2.0e6 - - # Density - set rho = 1000 - - # Body forces x,y,z - set body forces = 0.0,0.0,0.0 -end - -subsection Linear solver - # Linear solver iterations (multiples of the system matrix size) - set Max iteration multiplier = 1 - - # Linear solver residual (scaled by residual norm) - set Residual = 1e-6 - - # Linear solver: CG or Direct - set Solver type = Direct -end - -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed - set Max iterations Newton-Raphson = 10 - - # Displacement error tolerance - set Tolerance displacement = 1.0e-6 - - # Force residual tolerance - set Tolerance force = 1.0e-9 -end - -subsection precice configuration - # Cases: FSI3 or PF for perpendicular flap - set Scenario = FSI3 - - # Name of the precice configuration file - set precice config-file = ../precice-config.xml - - # Name of the participant in the precice-config.xml file - set Participant name = Solid - - # Name of the coupling mesh in the precice-config.xml file - set Mesh name = Solid-Mesh - - # Name of the read data in the precice-config.xml file - set Read data name = Stress - - # Name of the write data in the precice-config.xml file - set Write data name = Displacement -end From 3d1f49eec16e616281c1a819b3ad6c5c52dfb840 Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Sun, 21 Mar 2021 15:40:27 +0100 Subject: [PATCH 5/9] Update run scripts --- .../solid-left-dealii/run.sh | 39 ++++++++++--------- .../solid-right-dealii/run.sh | 39 ++++++++++--------- perpendicular-flap/solid-dealii/run.sh | 21 +++++++++- 3 files changed, 62 insertions(+), 37 deletions(-) diff --git a/multiple-perpendicular-flaps/solid-left-dealii/run.sh b/multiple-perpendicular-flaps/solid-left-dealii/run.sh index 57978366e..03c71ca0f 100755 --- a/multiple-perpendicular-flaps/solid-left-dealii/run.sh +++ b/multiple-perpendicular-flaps/solid-left-dealii/run.sh @@ -1,27 +1,30 @@ #!/bin/bash cd ${0%/*} || exit 1 # Run from this directory -# Solid1 participant +# Solid participant # Run this script in one terminal and the execute the Fluid participant -# and the Solid2 participant in another terminal. -# These scripts present how the three participants would be started manually. +# in another terminal. +# These scripts present how the two participants would be started manually. -# 1 for true, 0 for false -nonlinear=0 -if [ "$1" = "-nonlinear" ]; then - nonlinear=1 -fi +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done -linear=0 -if [ "$1" = "-linear" ]; then - linear=1 +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" fi -if [ $linear -eq 1 ]; then - ./linear_elasticity linear_elasticity.prm -elif [ $nonlinear -eq 1 ]; then - ./nonlinear_elasticity nonlinear_elasticity.prm -else - echo "No solver type specified. Please specify -linear or -nonlinear as solver type" -fi diff --git a/multiple-perpendicular-flaps/solid-right-dealii/run.sh b/multiple-perpendicular-flaps/solid-right-dealii/run.sh index c85f04d60..03c71ca0f 100755 --- a/multiple-perpendicular-flaps/solid-right-dealii/run.sh +++ b/multiple-perpendicular-flaps/solid-right-dealii/run.sh @@ -1,27 +1,30 @@ #!/bin/bash cd ${0%/*} || exit 1 # Run from this directory -# Solid2 participant +# Solid participant # Run this script in one terminal and the execute the Fluid participant -# and the Solid1 participant in another terminal. -# These scripts present how the three participants would be started manually. +# in another terminal. +# These scripts present how the two participants would be started manually. -# 1 for true, 0 for false -nonlinear=0 -if [ "$1" = "-nonlinear" ]; then - nonlinear=1 -fi +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done -linear=0 -if [ "$1" = "-linear" ]; then - linear=1 +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" fi -if [ $linear -eq 1 ]; then - ./linear_elasticity linear_elasticity.prm -elif [ $nonlinear -eq 1 ]; then - ./nonlinear_elasticity nonlinear_elasticity.prm -else - echo "No solver type specified. Please specify -linear or -nonlinear as solver type" -fi diff --git a/perpendicular-flap/solid-dealii/run.sh b/perpendicular-flap/solid-dealii/run.sh index 80cdec87d..03c71ca0f 100755 --- a/perpendicular-flap/solid-dealii/run.sh +++ b/perpendicular-flap/solid-dealii/run.sh @@ -7,5 +7,24 @@ cd ${0%/*} || exit 1 # Run from this directory # in another terminal. # These scripts present how the two participants would be started manually. -./elasticity parameters.prm +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done + +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" +fi From 4d7b928533b4d8f441548256c0717eb160b6fd95 Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Sun, 21 Mar 2021 15:41:27 +0100 Subject: [PATCH 6/9] Update last run.sh script --- turek-hron-fsi3/solid-dealii/run.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/turek-hron-fsi3/solid-dealii/run.sh b/turek-hron-fsi3/solid-dealii/run.sh index 7626688c9..03c71ca0f 100755 --- a/turek-hron-fsi3/solid-dealii/run.sh +++ b/turek-hron-fsi3/solid-dealii/run.sh @@ -7,4 +7,24 @@ cd ${0%/*} || exit 1 # Run from this directory # in another terminal. # These scripts present how the two participants would be started manually. -./nonlinear_elasticity nonlinear_elasticity.prm +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done + +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" +fi + From cb2c7aa3fc79ef5fa9ceba68e5f47a7e78a1e966 Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Mon, 22 Mar 2021 08:29:28 +0100 Subject: [PATCH 7/9] Fix typos in parameter files --- multiple-perpendicular-flaps/solid-left-dealii/parameters.prm | 2 +- multiple-perpendicular-flaps/solid-right-dealii/parameters.prm | 2 +- perpendicular-flap/solid-dealii/parameters.prm | 2 +- turek-hron-fsi3/solid-dealii/parameters.prm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm index d8740f772..9de97c264 100644 --- a/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm +++ b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm @@ -40,7 +40,7 @@ subsection Solver set Solver type = Direct # Max CG solver iterations (multiples of the system matrix size) - # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) diff --git a/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm index 4df8bf180..85a76b5e5 100644 --- a/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm +++ b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm @@ -40,7 +40,7 @@ subsection Solver set Solver type = Direct # Max CG solver iterations (multiples of the system matrix size) - # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) diff --git a/perpendicular-flap/solid-dealii/parameters.prm b/perpendicular-flap/solid-dealii/parameters.prm index d26dd7870..e2763a5ba 100644 --- a/perpendicular-flap/solid-dealii/parameters.prm +++ b/perpendicular-flap/solid-dealii/parameters.prm @@ -40,7 +40,7 @@ subsection Solver set Solver type = Direct # Max CG solver iterations (multiples of the system matrix size) - # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) diff --git a/turek-hron-fsi3/solid-dealii/parameters.prm b/turek-hron-fsi3/solid-dealii/parameters.prm index 3c41041ec..e5dc263e3 100644 --- a/turek-hron-fsi3/solid-dealii/parameters.prm +++ b/turek-hron-fsi3/solid-dealii/parameters.prm @@ -40,7 +40,7 @@ subsection Solver set Solver type = Direct # Max CG solver iterations (multiples of the system matrix size) - # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine. + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) From e3161c89e7495cd145d81f9624dce186460022a1 Mon Sep 17 00:00:00 2001 From: Benjamin Uekermann Date: Tue, 23 Mar 2021 14:25:56 +0100 Subject: [PATCH 8/9] Update multiple-perpendicular-flaps/solid-right-dealii/parameters.prm --- multiple-perpendicular-flaps/solid-right-dealii/parameters.prm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm index 85a76b5e5..5820cf08f 100644 --- a/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm +++ b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm @@ -43,7 +43,8 @@ subsection Solver # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 - # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. set Residual = 1e-6 # Number of Newton-Raphson iterations allowed (ignored if Model == linear) From e5805294003f88d8ca85745ad5542364587f379e Mon Sep 17 00:00:00 2001 From: DavidSCN Date: Tue, 23 Mar 2021 15:34:52 +0100 Subject: [PATCH 9/9] Add comment on linear residual in parameter file --- multiple-perpendicular-flaps/solid-left-dealii/parameters.prm | 3 ++- multiple-perpendicular-flaps/solid-right-dealii/parameters.prm | 2 +- perpendicular-flap/solid-dealii/parameters.prm | 3 ++- turek-hron-fsi3/solid-dealii/parameters.prm | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm index 9de97c264..8c9bbd96e 100644 --- a/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm +++ b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm @@ -43,7 +43,8 @@ subsection Solver # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 - # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. set Residual = 1e-6 # Number of Newton-Raphson iterations allowed (ignored if Model == linear) diff --git a/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm index 5820cf08f..5845d12c5 100644 --- a/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm +++ b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm @@ -44,7 +44,7 @@ subsection Solver set Max iteration multiplier = 1 # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) - # Hard-coded to absolute criterion of 1e-10 for the linear model. + # Hard-coded to absolute criterion of 1e-10 for the linear model. set Residual = 1e-6 # Number of Newton-Raphson iterations allowed (ignored if Model == linear) diff --git a/perpendicular-flap/solid-dealii/parameters.prm b/perpendicular-flap/solid-dealii/parameters.prm index e2763a5ba..2dda02e2e 100644 --- a/perpendicular-flap/solid-dealii/parameters.prm +++ b/perpendicular-flap/solid-dealii/parameters.prm @@ -43,7 +43,8 @@ subsection Solver # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 - # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. set Residual = 1e-6 # Number of Newton-Raphson iterations allowed (ignored if Model == linear) diff --git a/turek-hron-fsi3/solid-dealii/parameters.prm b/turek-hron-fsi3/solid-dealii/parameters.prm index e5dc263e3..62625fd22 100644 --- a/turek-hron-fsi3/solid-dealii/parameters.prm +++ b/turek-hron-fsi3/solid-dealii/parameters.prm @@ -43,7 +43,8 @@ subsection Solver # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 - # Absolute CG solver residual (multiplied by residual norm, ignored if Model == linear) + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. set Residual = 1e-6 # Number of Newton-Raphson iterations allowed (ignored if Model == linear)