Skip to content

Commit

Permalink
Update deal.II scripts (#166)
Browse files Browse the repository at this point in the history
* Update script and merged parameter files for deal.II

* Apply suggestions from code review

* Update parameter files

* Remove duplicated parameter file

* Update run scripts

* Update last run.sh script

* Fix typos in parameter files

* Update multiple-perpendicular-flaps/solid-right-dealii/parameters.prm

* Add comment on linear residual in parameter file

Co-authored-by: Benjamin Uekermann <[email protected]>
  • Loading branch information
davidscn and uekerman authored Mar 23, 2021
1 parent ef72a0d commit 32bc673
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 354 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,51 @@ 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 2D, this value is best set at 2. In 3D, a value of 1 works fine.
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.
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

Expand Down
39 changes: 21 additions & 18 deletions multiple-perpendicular-flaps/solid-left-dealii/run.sh
Original file line number Diff line number Diff line change
@@ -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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,51 @@ 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 2D, this value is best set at 2. In 3D, a value of 1 works fine.
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.
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

Expand Down
39 changes: 21 additions & 18 deletions multiple-perpendicular-flaps/solid-right-dealii/run.sh
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 32bc673

Please sign in to comment.