- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 129
 
Restructure runscripts and related resources #181
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
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            19 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      94127f6
              
                Add common runscript for OpenFOAM
              
              
                MakisH 8df4866
              
                Format files
              
              
                MakisH 7cfe1ff
              
                More formatting
              
              
                MakisH 0046c10
              
                Format cleaning scripts
              
              
                MakisH 37e9d1c
              
                perpendicular-flap OpenFOAM: move 0.orig to 0
              
              
                MakisH 86f5fbc
              
                Drop 0.orig from most OpenFOAM cases
              
              
                MakisH e403b5f
              
                Move 0.orig to 0 also for turek-hron-fsi3
              
              
                MakisH 54494d8
              
                Simplify CalculiX run scripts
              
              
                MakisH 4aa795f
              
                Simplify SU2 runscript
              
              
                MakisH d9c9121
              
                Remove duplicate plotDisplacement.sh
              
              
                MakisH cd2b619
              
                Remove deprecated log cleaning commands
              
              
                MakisH 43a6e31
              
                Tidy up FEniCS run and clean scripts
              
              
                MakisH 75fa649
              
                Tidy up Nutils run and clean scripts
              
              
                MakisH 2409738
              
                Tidy up code_aster run script
              
              
                MakisH 45b3876
              
                Clarify heat exchanger CalculiX gitignore, add 'dummy' to clean targets
              
              
                MakisH 5b5acab
              
                Add warning for preparing code_aster case
              
              
                MakisH 577af4f
              
                Update documentation
              
              
                MakisH e169ad3
              
                Move call to openfoam_remove_empty_dirs to run.sh
              
              
                MakisH 4d584da
              
                Fix clean_fenics
              
              
                MakisH File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,4 +4,3 @@ set -e -u | |
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_openfoam . | ||
| rm -rfv ./0/ # in run.sh, 0.orig/ is copied to 0/ | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,41 +1,8 @@ | ||
| #!/bin/bash | ||
| cd ${0%/*} || exit 1 # Run from this directory | ||
| . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions | ||
| #!/bin/sh | ||
| set -e -u | ||
| 
     | 
||
| # Fluid participant | ||
| 
     | 
||
| # Run this script in one terminal and the execute the coupled_elasto_dynamics bindary | ||
| # in another terminal. | ||
| # These scripts present how the two participants would be started manually. | ||
| 
     | 
||
| # Run this script with "-parallel" for parallel simulations | ||
| 
     | 
||
| # The script "Allclean" cleans-up the result and log files. | ||
| 
     | 
||
| # 1 for true, 0 for false | ||
| parallel=0 | ||
| if [ "$1" = "-parallel" ]; then | ||
| parallel=1 | ||
| fi | ||
| 
     | 
||
| echo "Preparing and running the Fluid participant..." | ||
| 
     | 
||
| rm -rfv 0/ | ||
| cp -r 0.orig/ 0/ | ||
| cp -r constant/polyMesh.orig constant/polyMesh | ||
| checkMesh | ||
| touch fluid-openfoam.foam | ||
| 
     | 
||
| # Run | ||
| solver=$(getApplication) | ||
| procs=$(getNumberOfProcessors) | ||
| if [ $parallel -eq 1 ]; then | ||
| decomposePar -force | ||
| mpirun -np $procs $solver -parallel | ||
| reconstructPar | ||
| else | ||
| $solver | ||
| fi | ||
| 
     | 
||
| # Workaround for issue #26 (OF-adapter, relevant for OF .com versions) | ||
| ../../tools/run-openfoam.sh "$@" | ||
| . ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -3,4 +3,4 @@ set -e -u | |
| 
     | 
||
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_calculix . | ||
| clean_calculix . | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,13 +1,6 @@ | ||
| #!/bin/bash | ||
| cd ${0%/*} || exit 1 # Run from this directory | ||
| #!/bin/sh | ||
| set -e -u | ||
| 
     | 
||
| # This script prepares and runs the CalculiX solver | ||
| 
     | 
||
| # =============== Participant: Solid =========================== | ||
| Solver="ccx_preCICE" | ||
| 
     | 
||
| # Run and get the process id | ||
| echo "Starting the CalculiX..." | ||
| export OMP_NUM_THREADS=1 | ||
| export CCX_NPROC_EQUATION_SOLVER=1 | ||
| ${Solver} -i tube -precice-participant Calculix | ||
| export OMP_NUM_THREADS=1 | ||
| export CCX_NPROC_EQUATION_SOLVER=1 | ||
| ccx_preCICE -i tube -precice-participant Calculix | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,4 +4,3 @@ set -e -u | |
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_openfoam . | ||
| rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/ | ||
        
          
          
            38 changes: 3 additions & 35 deletions
          
          38 
        
  flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,40 +1,8 @@ | ||
| #!/bin/bash | ||
| cd ${0%/*} || exit 1 # Run from this directory | ||
| . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions | ||
| #!/bin/sh | ||
| set -e -u | ||
| 
     | 
||
| # Fluid participant | ||
| 
     | 
||
| # Run this script in one terminal in order to start this participant. | ||
| # Run this script with "-parallel" for parallel simulations | ||
| 
     | 
||
| # 1 for true, 0 for false | ||
| parallel=0 | ||
| if [ "$1" = "-parallel" ]; then | ||
| parallel=1 | ||
| fi | ||
| 
     | 
||
| echo "Preparing and running the Fluid participant..." | ||
| 
     | 
||
| rm -rfv 0/ | ||
| cp -r 0.orig/ 0/ | ||
| blockMesh | ||
| checkMesh | ||
| touch fluid-openfoam.foam | ||
| 
     | 
||
| # Run | ||
| solver=$(getApplication) | ||
| procs=$(getNumberOfProcessors) | ||
| 
     | 
||
| if [ $parallel -eq 1 ]; then | ||
| decomposePar -force | ||
| mpirun -np $procs $solver -parallel | ||
| reconstructPar | ||
| else | ||
| $solver | ||
| fi | ||
| 
     | 
||
| # Workaround for issue #26 | ||
| ../../tools/run-openfoam.sh "$@" | ||
| . ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs | ||
| 
     | 
||
| echo "" | ||
| echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed." | 
            File renamed without changes.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,4 +4,3 @@ set -e -u | |
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_openfoam . | ||
| rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/ | ||
        
          
          
            38 changes: 3 additions & 35 deletions
          
          38 
        
  flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,40 +1,8 @@ | ||
| #!/bin/bash | ||
| cd ${0%/*} || exit 1 # Run from this directory | ||
| . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions | ||
| #!/bin/sh | ||
| set -e -u | ||
| 
     | 
||
| # Fluid participant | ||
| 
     | 
||
| # Run this script in one terminal in order to start this participant. | ||
| # Run this script with "-parallel" for parallel simulations | ||
| 
     | 
||
| # 1 for true, 0 for false | ||
| parallel=0 | ||
| if [ "$1" = "-parallel" ]; then | ||
| parallel=1 | ||
| fi | ||
| 
     | 
||
| echo "Preparing and running the Fluid participant..." | ||
| 
     | 
||
| rm -rfv 0/ | ||
| cp -r 0.orig/ 0/ | ||
| blockMesh | ||
| checkMesh | ||
| touch solid-openfoam.foam | ||
| 
     | 
||
| # Run | ||
| solver=$(getApplication) | ||
| procs=$(getNumberOfProcessors) | ||
| 
     | 
||
| if [ $parallel -eq 1 ]; then | ||
| decomposePar -force | ||
| mpirun -np $procs $solver -parallel | ||
| reconstructPar | ||
| else | ||
| $solver | ||
| fi | ||
| 
     | 
||
| # Workaround for issue #26 | ||
| ../../tools/run-openfoam.sh "$@" | ||
| . ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs | ||
| 
     | 
||
| echo "" | ||
| echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed." | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,4 +4,3 @@ set -e -u | |
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_openfoam . | ||
| rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/ | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,41 +1,8 @@ | ||
| #!/bin/bash | ||
| cd ${0%/*} || exit 1 # Run from this directory | ||
| . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions | ||
| #!/bin/sh | ||
| set -e -u | ||
| 
     | 
||
| # Fluid participant | ||
| 
     | 
||
| # Run this script in one terminal and the execute the coupled_elasto_dynamics bindary | ||
| # in another terminal. | ||
| # These scripts present how the two participants would be started manually. | ||
| 
     | 
||
| # Run this script with "-parallel" for parallel simulations | ||
| 
     | 
||
| # The script "Allclean" cleans-up the result and log files. | ||
| 
     | 
||
| # 1 for true, 0 for false | ||
| parallel=0 | ||
| if [ "$1" = "-parallel" ]; then | ||
| parallel=1 | ||
| fi | ||
| 
     | 
||
| echo "Preparing and running the Fluid participant..." | ||
| 
     | 
||
| rm -rfv 0/ | ||
| cp -r 0.orig/ 0/ | ||
| blockMesh | ||
| checkMesh | ||
| touch fluid-openfoam.foam | ||
| 
     | 
||
| # Run | ||
| solver=$(getApplication) | ||
| procs=$(getNumberOfProcessors) | ||
| if [ $parallel -eq 1 ]; then | ||
| decomposePar -force | ||
| mpirun -np $procs $solver -parallel | ||
| reconstructPar | ||
| else | ||
| $solver | ||
| fi | ||
| 
     | 
||
| # Workaround for issue #26 (OF-adapter, relevant for OF .com versions) | ||
| ../../tools/run-openfoam.sh "$@" | ||
| . ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -3,4 +3,4 @@ set -e -u | |
| 
     | 
||
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_codeaster . | ||
| clean_codeaster . | ||
        
          
          
            14 changes: 10 additions & 4 deletions
          
          14 
        
  flow-over-heated-plate-steady-state/solid-codeaster/run.sh
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,10 @@ | ||
| #!/bin/bash | ||
| export TUTORIAL_ROOT=${PWD} | ||
| export PRECICE_PARTICIPANT=Solid | ||
| as_run --run solid.export | ||
| #!/bin/sh | ||
| set -e -u | ||
| 
     | 
||
| echo "Warning: this case requires a manual preparation step for code_aster." | ||
| echo "See the tutorial and code_aster adapter documentation pages for more:" | ||
| echo "https://www.precice.org/adapter-code_aster.html\n" | ||
| 
     | 
||
| export TUTORIAL_ROOT=${PWD} | ||
| export PRECICE_PARTICIPANT=Solid | ||
| as_run --run solid.export | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
            File renamed without changes.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,4 +4,3 @@ set -e -u | |
| . ../../tools/cleaning-tools.sh | ||
| 
     | 
||
| clean_openfoam . | ||
| rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/ | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.