Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle solver into a single executable #50

Merged
merged 21 commits into from
Mar 23, 2021
Merged

Bundle solver into a single executable #50

merged 21 commits into from
Mar 23, 2021

Conversation

davidscn
Copy link
Member

According to #48

There are certainly some follow up tasks. However, the overall layout should be fine and not change that much.

Point to discuss: how to name the executable and how to switch between the model?

Currently implemented:

./dealii-precice -nonlinear myparameterfile.prm

or

./dealii-precice -linear myparameterfile.prm

@davidscn davidscn added compatibility enhancement New feature or request labels Feb 13, 2021
@uekerman
Copy link
Member

Point to discuss: how to name the executable and how to switch between the model?

How different are the two parameter files? Normally I would expect the switch in there as well.
In the name, we could somehow reflect that it is a solid mechanics solver. This would also be consistent on how we do things with other codes (OpenFOAM, FEniCS, Nutils). I think mentioning dealii as part of the name is not necessary. That should be clear. Can one switch of the coupling completely in the parameter file? Then precice or anything like "coupling" would neither be necessary in the name.

@davidscn
Copy link
Member Author

davidscn commented Mar 1, 2021

I also thought about it. There are some diffs, I guess it could be resolved.

diff linear_elasticity.prm nonlinear_elasticity.prm

17,19c17,21
<   # Time integration scheme
<   # 0 = forward, 1 = backward
<   set theta               = 0.5
---
>   # Newmark beta
>   set beta  = 0.25
> 
>   # Newmark gamma
>   set gamma   = 0.5
26,27c28,29
<   # mu (shear modulus)
<   set mu              = 1538462
---
>   # Poisson's ratio
>   set Poisson's ratio = 0.3
29,30c31,32
<   # lambda
<   set lambda          = 2307692
---
>   # Shear modulus
>   set Shear modulus   = 1538462
47a50,60
> 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

@davidscn
Copy link
Member Author

davidscn commented Mar 2, 2021

Let's put the parameter handling in a separate PR, this one is already rather larger and it would allow to simplify the parameter code.

Regarding the name: what about fsi_solid ? or just solid?

@davidscn davidscn added this to In progress in Restructure Tutorials via automation Mar 17, 2021
@uekerman
Copy link
Member

Regarding the name: what about fsi_solid ? or just solid?

What about elasticity?

@BenjaminRodenberg
Copy link
Member

@davidscn told me this might be valuable input here:

I just tried running

~/tutorials/perpendicular-flap/solid-dealii$ ./run.sh -linear

It would be nice, if one could just provide a prefix instead of adding the executable to the path:

~/tutorials/perpendicular-flap/solid-dealii$ ./run.sh -linear -p /home/benjamin/dealii-adapter/linear_elasticity

My current (hacky) solution is:

~/tutorials/perpendicular-flap/solid-dealii$ git diff run.sh
diff --git a/perpendicular-flap/solid-dealii/run.sh b/perpendicular-flap/solid-dealii/run.sh
index 7eb9e4d..b3fd0f7 100755
--- a/perpendicular-flap/solid-dealii/run.sh
+++ b/perpendicular-flap/solid-dealii/run.sh
@@ -19,7 +19,7 @@ if [ "$1" = "-linear" ]; then
 fi

 if [ $linear -eq 1 ]; then
-        ./linear_elasticity linear_elasticity.prm
+        /home/benjamin/dealii-adapter/linear_elasticity/linear_elasticity linear_elasticity.prm
 elif [ $nonlinear -eq 1 ]; then
         ./nonlinear_elasticity nonlinear_elasticity.prm
 else

@davidscn
Copy link
Member Author

@BenjaminRodenberg I addressed your comment in precice/tutorials#166. You can now use the run.sh script with a prefix
-p=/.../ or --prefix=/mypath/. I will update the documentation accordingly.

@davidscn davidscn merged commit ce6484d into develop Mar 23, 2021
Restructure Tutorials automation moved this from In progress to Done Mar 23, 2021
@davidscn davidscn deleted the bundle_solver branch March 23, 2021 14:36
@davidscn davidscn linked an issue Mar 24, 2021 that may be closed by this pull request
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Discussion: useful deal.II adapter updates Provide better error message, if deal.II version is too old
3 participants