Skip to content

Commit eceaafa

Browse files
authored
Merge branch 'master' into ROMs4MovingDomainsUpdated
2 parents c405223 + d3083b0 commit eceaafa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4962
-217
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build Dependencies Docker Images
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
REGISTRY: docker.io
8+
IMAGE_NAME: ithacafv/ithacafv-dependencies
9+
10+
jobs:
11+
build-amd64-deps:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
digest: ${{ steps.build.outputs.digest }}
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Log into registry ${{ env.REGISTRY }}
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ${{ env.REGISTRY }}
27+
username: ${{ secrets.DOCKER_USERNAME }}
28+
password: ${{ secrets.DOCKER_PASSWORD }}
29+
30+
- name: Build and push AMD64 dependencies
31+
id: build
32+
uses: docker/build-push-action@v5
33+
with:
34+
context: ./dockerfiles/OF2506/amd64-deps
35+
platforms: linux/amd64
36+
push: true
37+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:amd64
38+
cache-from: type=gha
39+
cache-to: type=gha,mode=max
40+
41+
build-arm64-deps:
42+
runs-on: ubuntu-24.04-arm
43+
outputs:
44+
digest: ${{ steps.build.outputs.digest }}
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
49+
50+
- name: Set up Docker Buildx
51+
uses: docker/setup-buildx-action@v3
52+
53+
- name: Log into registry ${{ env.REGISTRY }}
54+
uses: docker/login-action@v3
55+
with:
56+
registry: ${{ env.REGISTRY }}
57+
username: ${{ secrets.DOCKER_USERNAME }}
58+
password: ${{ secrets.DOCKER_PASSWORD }}
59+
60+
- name: Build and push ARM64 dependencies
61+
id: build
62+
uses: docker/build-push-action@v5
63+
with:
64+
context: ./dockerfiles/OF2506/arm64-deps
65+
platforms: linux/arm64
66+
push: true
67+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:arm64
68+
cache-from: type=gha
69+
cache-to: type=gha,mode=max
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Build and Push Multi-Arch Docker Images
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: docker.io
10+
IMAGE_NAME: ithacafv/ithacafv
11+
12+
jobs:
13+
build-amd64:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
digest: ${{ steps.build.outputs.digest }}
17+
metadata: ${{ steps.meta.outputs.json }}
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Log into registry ${{ env.REGISTRY }}
27+
if: github.event_name != 'pull_request'
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ${{ env.REGISTRY }}
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Extract metadata for ITHACA-FV image
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+
tags: |
40+
type=semver,pattern={{version}}
41+
type=raw,value=latest
42+
43+
- name: Build and push AMD64 image
44+
id: build
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: ./dockerfiles
48+
file: ./dockerfiles/Dockerfile
49+
platforms: linux/amd64
50+
labels: ${{ steps.meta.outputs.labels }}
51+
cache-from: type=gha
52+
cache-to: type=gha,mode=max
53+
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
54+
55+
build-arm64:
56+
runs-on: ubuntu-24.04-arm
57+
outputs:
58+
digest: ${{ steps.build.outputs.digest }}
59+
metadata: ${{ steps.meta.outputs.json }}
60+
61+
steps:
62+
- name: Checkout repository
63+
uses: actions/checkout@v4
64+
65+
- name: Set up Docker Buildx
66+
uses: docker/setup-buildx-action@v3
67+
68+
- name: Log into registry ${{ env.REGISTRY }}
69+
if: github.event_name != 'pull_request'
70+
uses: docker/login-action@v3
71+
with:
72+
registry: ${{ env.REGISTRY }}
73+
username: ${{ secrets.DOCKER_USERNAME }}
74+
password: ${{ secrets.DOCKER_PASSWORD }}
75+
76+
- name: Extract metadata for ITHACA-FV image
77+
id: meta
78+
uses: docker/metadata-action@v5
79+
with:
80+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
81+
tags: |
82+
type=semver,pattern={{version}}
83+
type=raw,value=latest
84+
85+
- name: Build and push ARM64 image
86+
id: build
87+
uses: docker/build-push-action@v5
88+
with:
89+
context: ./dockerfiles
90+
file: ./dockerfiles/Dockerfile
91+
platforms: linux/arm64
92+
labels: ${{ steps.meta.outputs.labels }}
93+
cache-from: type=gha
94+
cache-to: type=gha,mode=max
95+
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
96+
97+
merge:
98+
runs-on: ubuntu-latest
99+
needs:
100+
- build-amd64
101+
- build-arm64
102+
steps:
103+
- name: Set up Docker Buildx
104+
uses: docker/setup-buildx-action@v3
105+
106+
- name: Log into registry ${{ env.REGISTRY }}
107+
uses: docker/login-action@v3
108+
with:
109+
registry: ${{ env.REGISTRY }}
110+
username: ${{ secrets.DOCKER_USERNAME }}
111+
password: ${{ secrets.DOCKER_PASSWORD }}
112+
113+
- name: Extract metadata for ITHACA-FV image
114+
id: meta
115+
uses: docker/metadata-action@v5
116+
with:
117+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
118+
tags: |
119+
type=semver,pattern={{version}}
120+
type=raw,value=latest
121+
122+
- name: Create and push manifest list
123+
working-directory: /tmp
124+
run: |
125+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
126+
${{ needs.build-amd64.outputs.digest }} \
127+
${{ needs.build-arm64.outputs.digest }}
128+
env:
129+
DOCKER_METADATA_OUTPUT_JSON: ${{ steps.meta.outputs.json }}

.github/workflows/docker_ithaca.yml

Lines changed: 0 additions & 91 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
Linear and non-linear algebra operations which are not already implemented in OpenFOAM are performed with the external library [**Eigen**](http://eigen.tuxfamily.org/index.php?title=Main_Page). Eigen 3.4 is provided as a git submodule together with ITHACA-FV and is located in the [src/thirdyparty/Eigen](./src/thirdparty/Eigen) folder. For the EigenValue decomposition it is also possible to rely on the [**Spectra-1.2.0**](https://spectralib.org/) library and the source code, as a git submodule, is provided in the [src/thirdyparty/spectra](./src//thirdparty/spectra) folder. Numerical optimization can be performed using the external library [**OptimLib**](https://www.kthohr.com/optimlib.html) and the header based source code, as a git submodule, is provided in the [src/thirdyparty/OptimLib](./src/thirdparty/OptimLib) folder.
2424

25-
**ITHACA-FV** has been tested on several versions of ubuntu, CentOS 7, ArchLinux but can be easily compiled on any linux distribution with a compiled version of OpenFOAM 2106, OpenFOAM 2212, OpenFOAM 2306, OpenFOAM 2312, OpenFOAM 2406, and OpenFOAM 2412.
25+
**ITHACA-FV** has been tested on several versions of ubuntu, CentOS 7, ArchLinux but can be easily compiled on any linux distribution with a compiled version of OpenFOAM 2106, OpenFOAM 2212, OpenFOAM 2306, OpenFOAM 2312, OpenFOAM 2406, OpenFOAM 2412 and OpenFOAM 2506.
2626

2727
### 1. Prerequisites
2828
**ITHACA-FV** requires
@@ -32,12 +32,13 @@ Linear and non-linear algebra operations which are not already implemented in Op
3232
* [**OpenFOAM 2312**](https://www.openfoam.com/news/main-news/openfoam-v2312) or
3333
* [**OpenFOAM 2406**](https://www.openfoam.com/news/main-news/openfoam-v2406) or
3434
* [**OpenFOAM 2412**](https://www.openfoam.com/news/main-news/openfoam-v2412) or
35+
* [**OpenFOAM 2506**](https://www.openfoam.com/news/main-news/openfoam-v2506)
3536

3637

3738
### 2. Installation and usage
3839
First of all you need to source the bashrc file of your installation **OpenFOAM**. This is of course depending on the location of your OpenFOAM installation and of your particular version of OpenFOAM
3940
```
40-
source $HOME/OpenFOAM/OpenFOAM-v2412/etc/bashrc
41+
source $HOME/OpenFOAM/OpenFOAM-v2506/etc/bashrc
4142
```
4243
Then navigate to the folder where you want to install ITHACA-FV such as, for example, your HOME folder
4344
```
@@ -87,13 +88,13 @@ These images are based **OpenFOAM-v2106**, and provided an isolated environment,
8788
In order to pull the image, run the following command:
8889

8990
```
90-
docker pull ithacafv/ithacafv:manifest-latest
91+
docker pull ithacafv/ithacafv:latest
9192
```
9293

9394
Once the image is downloaded, you can start the container and mount the $HOME directory by executing:
9495

9596
```
96-
docker run -ti --rm -v "${HOME}:/home/ithacafv/${USER}" ithacafv/ithacafv:manifest-latest
97+
docker run -ti --rm -v "${HOME}:/home/ithacafv/${USER}" ithacafv/ithacafv:latest
9798
```
9899

99100
### 4. Singularity
@@ -113,7 +114,7 @@ export SINGULARITY_CACHEDIR=$HOME/mycontainter
113114
Buidling singularity image file `.sif` from the docker image, which is build and stored in `$HOME/mycontainter`, The below image used is based **OpenFOAM-v2106**, and where you can find a compiled version of the master branch of **ITHACA-FV**.
114115

115116
```
116-
singularity build ithacafv.sif docker://ithacafv/ithacafv:manifest-latest
117+
singularity build ithacafv.sif docker://ithacafv/ithacafv:latest
117118
```
118119

119120
To view / list all the images/cache,

applications/POD/perform_POD.C

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ int main(int argc, char *argv[])
8484
{
8585
pod_exist = false;
8686
Info << "POD don't exist, performing a POD decomposition" << endl;
87-
mkDir("./ITHACAoutput/POD");
88-
system("ln -s ../../constant ./ITHACAoutput/POD/constant");
89-
system("ln -s ../../0 ./ITHACAoutput/POD/0");
90-
system("ln -s ../../system ./ITHACAoutput/POD/system");
87+
ITHACAutilities::createSymLink("./ITHACAoutput/POD");
9188
}
9289
if(pod_exist == 1)
9390
{

0 commit comments

Comments
 (0)