Skip to content

Commit

Permalink
Merge pull request #44 from luca-heltai/dim-spacedim
Browse files Browse the repository at this point in the history
Change the way dim and spacedim work.
  • Loading branch information
luca-heltai authored Jun 24, 2024
2 parents 6d00429 + 731b345 commit 4ddff07
Show file tree
Hide file tree
Showing 66 changed files with 2,614 additions and 1,503 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,44 @@ name: github-docker

on:
push:
branches: [main]
branches: [main, 'docker*']

jobs:
build-master-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image of master
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./docker/
file: ./docker/Dockerfile.fsi-suite
cache-from: type=registry,ref=heltai/dealii:vscode
cache-to: type=inline
platforms: linux/arm64,linux/amd64
push: true
tags: heltai/fsi-suite:latest
tags: |
heltai/fsi-suite:latest
ghr.io/${{ github.repository }}:latest
39 changes: 29 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,46 @@
"random": "cpp",
"codecvt": "cpp",
"filesystem": "cpp",
"*.ipp": "cpp"
"*.ipp": "cpp",
"__bit_reference": "cpp",
"__config": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__verbose_abort": "cpp",
"any": "cpp",
"charconv": "cpp",
"execution": "cpp",
"ios": "cpp",
"locale": "cpp",
"queue": "cpp",
"regex": "cpp",
"source_location": "cpp",
"span": "cpp",
"stack": "cpp"
},
"peacock.remoteColor": "#dd0531",
"peacock.color": "#215732",
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#fa1b49",
"activityBar.activeBackground": "#2f7c47",
"activityBar.activeBorder": "#155e02",
"activityBar.background": "#fa1b49",
"activityBar.background": "#2f7c47",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#155e02",
"activityBarBadge.background": "#422c74",
"activityBarBadge.foreground": "#e7e7e7",
"sash.hoverBorder": "#fa1b49",
"statusBar.background": "#dd0531",
"sash.hoverBorder": "#2f7c47",
"statusBar.background": "#215732",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#fa1b49",
"statusBarItem.remoteBackground": "#dd0531",
"statusBarItem.hoverBackground": "#2f7c47",
"statusBarItem.remoteBackground": "#215732",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#dd0531",
"titleBar.activeBackground": "#215732",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#dd053199",
"titleBar.inactiveBackground": "#21573299",
"titleBar.inactiveForeground": "#e7e7e799",
"commandCenter.border": "#e7e7e799"
},
Expand Down
72 changes: 37 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ interaction problems: mathematical modeling and numerical approximation"**
| <!-- --> | <!-- --> |
| -- | -- |
| **Author** | Luca Heltai <luca.heltai@sissa.it> |
| **GitHub Repository:** | https://github.com/luca-heltai/fsi-suite |
| **GitHub Pages:** | https://luca-heltai.github.io/fsi-suite/ |
| **GitHub Repository:** | <https://github.com/luca-heltai/fsi-suite> |
| **GitHub Pages:** | <https://luca-heltai.github.io/fsi-suite/> |
| **Licence:** | see the file [LICENCE.md](./LICENCE.md) |

## Course Introduction

Fluid-structure interaction (FSI) refers to the multiphysics coupling between
the laws that describe fluid dynamics and structural mechanics.
the laws that describe fluid dynamics and structural mechanics.

This page collects the material that I have used for a course given at Kaust
(https://www.kaust.edu.sa/en) during the spring semester of 2022.
(<https://www.kaust.edu.sa/en>) during the spring semester of 2022.

The course covers three main topics: i) basics of continuum mechanics, ii)
mathematical modeling of FSI problems, and iii) numerical implementations based
on the finite element method. Theoretical lectures are backed up by applied
laboratories based on the C++ language, using example codes developed with the
open source finite element library deal.II (www.dealii.org). I cover basic
open source finite element library deal.II (<www.dealii.org>). I cover basic
principles of continuum mechanics, discuss Lagrangian, Eulerian, and Arbitrary
Lagrangian-Eulerian formulations, and cover different coupling strategies, both
from the theoretical point of view, and with the aid of computational
Expand All @@ -32,8 +33,8 @@ finite element approximations for the solution of continuum mechanics problems,
including non-linear mechanics, computational fluid dynamics, and
fluid-structure-interaction problems.

A glimpse of the PDEs that are discussed in the course is given by the following
graph
A glimpse of the PDEs that are discussed in the course is given by the following
graph

@dotfile serial.dot width=100%

Expand All @@ -42,7 +43,7 @@ graph
The laboratory part should enable a PhD student working on numerical analysis
of PDEs to implement state-of-the-art adaptive finite element codes for FSI
problems, that run in parallel, using modern C++ libraries. The implementation
are based on the `deal.II` library (www.dealii.org).
are based on the `deal.II` library (<www.dealii.org>).

Main topics covered by these lectures:

Expand All @@ -57,27 +58,27 @@ Main topics covered by these lectures:
Continuous Integration Status
-----------------------------

Up to date online documentation for the codes used in the laboratories is here:
Up to date online documentation for the codes used in the laboratories is here:

https://luca-heltai.github.io/fsi-suite/
<https://luca-heltai.github.io/fsi-suite/>

| System | Status |
| ------ | ------- |
| ------ | ------- |
| **Continous Integration** | [![GitHub CI](https://github.com/luca-heltai/fsi-suite/actions/workflows/tests.yml/badge.svg)](https://github.com/luca-heltai/fsi-suite/actions/workflows/tests.yml) |
| **Docker** | [![github-docker](https://github.com/luca-heltai/fsi-suite/actions/workflows/docker.yml/badge.svg)](https://github.com/luca-heltai/fsi-suite/actions/workflows/docker.yml) |
| **Doxygen** | [![Doxygen](https://github.com/luca-heltai/fsi-suite/actions/workflows/doxygen.yml/badge.svg)](https://github.com/luca-heltai/fsi-suite/actions/workflows/doxygen.yml) |
| **Indent** | [![Indent](https://github.com/luca-heltai/fsi-suite/actions/workflows/indentation.yml/badge.svg)](https://github.com/luca-heltai/fsi-suite/actions/workflows/indentation.yml) |


## Useful links

One of my courses on theory and practice of finite elements:
- https://www.math.sissa.it/course/phd-course/theory-and-practice-finite-element-methods

- <https://www.math.sissa.it/course/phd-course/theory-and-practice-finite-element-methods>

Exceptional video lectures by Prof. Wolfgang Bangerth, that cover all the
things you will ever need for finite element programming.

- https://www.math.colostate.edu/~bangerth/videos.html
- <https://www.math.colostate.edu/~bangerth/videos.html>

## Quick start

Expand All @@ -94,23 +95,23 @@ you should see the following output:

Will run program-name with program-options, possibly via mpirun, passing -np N to mpirun.
Here is a list of programs you can run:
linear_elasticity.g mpi_stokes.g
distributed_lagrange mesh_handler poisson
distributed_lagrange.g mesh_handler.g poisson.g
dof_plotter mpi_linear_elasticity reduced_lagrange
dof_plotter.g mpi_linear_elasticity.g reduced_lagrange.g
fsi_test mpi_poisson stokes
fsi_test.g mpi_poisson.g stokes.g
linear_elasticity mpi_stokes
linear_elasticity.g mpi_stokes.g
distributed_lagrange mesh_handler poisson
distributed_lagrange.g mesh_handler.g poisson.g
dof_plotter mpi_linear_elasticity reduced_lagrange
dof_plotter.g mpi_linear_elasticity.g reduced_lagrange.g
fsi_test mpi_poisson stokes
fsi_test.g mpi_poisson.g stokes.g
linear_elasticity mpi_stokes

Programs ending with .g are compiled with debug symbols. To see help on how to run
any of the programs, add a -h flag at the end.

The above command will download the latest docker image from the `main` branch
of this repository (which is built and uploaded to
https://hub.docker.com/r/heltai/fsi-suite at every commit to master), mount the
<https://hub.docker.com/r/heltai/fsi-suite> at every commit to master), mount the
current directory, in a directory with the same path inside the container, and
the program you selected. For example,
the program you selected. For example,

./fsi-suite.sh -np 4 mpi_poisson.g

Expand All @@ -119,10 +120,10 @@ problem in parallel, using 4 processors. You can change grid, boundary
conditions, forcing terms, finite element spaces, etc. by editing the
configuration file which is created the first time you run the program, and then
passing it as an argument to the program itself, i.e., in the example above, the
parameter file that would be generated is `used_mpi_poisson.g_2d.prm`, which you
parameter file that would be generated is `used_mpi_poisson.g.prm`, which you
can edit and then pass as input to the program itself:

./fsi-suite.sh -np 4 mpi_poisson.g used_mpi_poisson.g_2d.prm
./fsi-suite.sh -np 4 mpi_poisson.g used_mpi_poisson.g.prm

If you want to read some documentation of what each parameter does and how it
works, you can call the program passing a non-existing parameter file:
Expand All @@ -143,7 +144,7 @@ works, you can call the program passing a non-existing parameter file:

The created parameter file will also contain documentation for each parameter.
Running again the same command will now use the parameter file that was just
created:
created:

./fsi-suite.sh -np 4 mpi_poisson.g my_test.prm

Expand All @@ -170,28 +171,29 @@ created:
| setup_system | 1 | 0.0124s | 18% |
| solve | 1 | 0.00547s | 7.8% |
+---------------------------------+-----------+------------+------------+

## Course program

A tentative detailed program is shown below
A tentative detailed program is shown below
(this will be updated during the course to reflect the actual course content)

1. Course introduction.
1. Course introduction.
- Motivating examples
- Basic principles and background knowledge.

2. Recap on Finite Element Methods
- Introduction to deal.II.

3. Basic principles of continuum mechanics
- conservation equations
3. Basic principles of continuum mechanics
- conservation equations
- constitutive equations
- kinematics
- transport theorems

3. Lagrangian formulation of continuum mechanics (solids).
- Static and compressible linear elasticity

4. Recap on mixed problems
4. Recap on mixed problems
- Static incompressible linear elasticity

5. Eulerian formulation of continuum mechanics
Expand All @@ -200,13 +202,13 @@ A tentative detailed program is shown below
6. Recap on time discretization schemes
- Time dependent Stokes problem
- Time dependent linear elasticity (wave equations)
7. Treating non-linearities

7. Treating non-linearities
- IMEX
- predictor corrector
- fixed point
- Newton

8. Navier-Stokes equations

9. Segregated coupling
Expand Down
Loading

0 comments on commit 4ddff07

Please sign in to comment.