Skip to content

Commit

Permalink
Merge branch 'CFD-GO:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisMitchell authored Jan 10, 2024
2 parents f5d00cb + 8912ba1 commit 472db73
Show file tree
Hide file tree
Showing 137 changed files with 110,327 additions and 6,314 deletions.
18 changes: 12 additions & 6 deletions .github/actions/install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,26 @@ runs:
shell: bash
name: "Installing CUDA"
run: |
GPU="${{ inputs.cuda }}"
if test "$GPU" == "true"
VER="${{ inputs.cuda }}"
if test "$VER" == "true"
then
GPU="11.7"
VER="11.7"
fi
tools/install.sh ${{inputs.options}} cuda $GPU
CUDA_PATH=/usr/local/cuda-$GPU
tools/install.sh ${{inputs.options}} cuda $VER
CUDA_PATH=/usr/local/cuda-$VER
echo "$CUDA_PATH/bin" >>$GITHUB_PATH
echo "LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH" >>$GITHUB_ENV
echo "CUDA_PATH=$CUDA_PATH" >>$GITHUB_OUTPUT
- if: inputs.hip != 'false'
name: "Installing ROCm/HIP"
shell: bash
run: tools/install.sh ${{inputs.options}} hip ${{ inputs.hip }}
run: |
VER="${{ inputs.hip }}"
if test "$VER" == "true"
then
VER="5.4.1"
fi
tools/install.sh ${{inputs.options}} hip $VER
- if: inputs.openmpi != 'false'
name: "Installing OpenMPI"
shell: bash
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ inputs:
model:
description: model to compile
default: 'd2q9'
tests:
description: what tests to run
default: ''

runs:
using: 'composite'
steps:
- shell: bash
name: Run tests
run: tools/tests.sh ${{ inputs.model }}
run: tools/tests.sh ${{ inputs.model }} ${{ inputs.tests }}
57 changes: 57 additions & 0 deletions .github/workflows/rinside.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: RInside

on: [ push, pull_request ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
model:
- d2q9
precision:
- float
- double
arch:
- cpu
- cuda
- hip
include:
- precision: "double"
arch: "cpu"
test: true
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
submodules: ${{ matrix.test }}
- name: Install dependencies
uses: ./.github/actions/install
with:
r: true
rdep: true
openmpi: true
rinside: true
reticulate: ${{ matrix.test }}
cuda: ${{ matrix.arch == 'cuda' }}
hip: ${{ matrix.arch == 'hip' }}
- name: Configure
uses: ./.github/actions/configure
with:
gpu: ${{ matrix.arch == 'cuda' }}
hip: ${{ matrix.arch == 'hip' }}
cuda_arch: sm_60
rinside: true
paranoid: true
precision: ${{ matrix.precision }}
- name: Compile
uses: ./.github/actions/compile
with:
model: ${{ matrix.model }}
- if: matrix.test
name: Run tests
uses: ./.github/actions/test
with:
model: ${{ matrix.model }}
tests: rinside
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Developed at:
- [Interdisciplinary Centre for Mathematical and Computational Modelling](https://icm.edu.pl/en) at [University of Warsaw](https://www.uw.edu.pl/)

### Citation
Please use **appropriate citations if using this software** in any research publication. The publication should cite [the original paper about TCLB](https://doi.org/10.1016/j.camwa.2015.12.043) and papers which describe the used LMB models. You can find the list of TCLB publications at [docs.tclb.io/general-info/publications/](https://docs.tclb.io/general-info/publications/). You can also find the information about published articles in the source code of the models.
Please use **appropriate citations if using this software** in any research publication. The publication should cite [the original paper about TCLB](https://doi.org/10.1016/j.camwa.2015.12.043) and papers which describe the used LBM models. You can find the list of TCLB publications at [docs.tclb.io/general-info/publications/](https://docs.tclb.io/general-info/publications/). You can also find the information about published articles in the source code of the models.
The code can be cited additionally, by its [Zenodo DOI](https://doi.org/10.5281/zenodo.3550331).

### License
Expand All @@ -143,4 +143,4 @@ This software is distributed under the [GPL v3 License](LICENSE).

If you need this software under a different license, please contact the main author.

Contact: llaniewski([monkey](https://en.wikipedia.org/wiki/At_sign#Names_in_other_languages))meil.pw.edu.pl
Contact: lukasz.laniewski([monkey](https://en.wikipedia.org/wiki/At_sign#Names_in_other_languages))pw.edu.pl
101,748 changes: 101,748 additions & 0 deletions example/data/karman_ARB_P00.cxn

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions models/multiphase/d2q9_pf_velocity/Dynamics.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ if (Options$RT) {
AddStage("BaseInit" , "Init_distributions" , save=Fields$group %in% c("g","h","Vel"))

# iteration
AddStage("BaseIter" , "calcHydroIter" , save=Fields$group %in% c("g","h","Vel","nw") , load=DensityAll$group %in% c("g","h","Vel","nw")) # TODO: is nw needed here?
AddStage("BaseIter" , "calcHydroIter" , save=Fields$group %in% c("g","h","Vel","nw") , load=DensityAll$group %in% c("PF","g","h","Vel","nw")) # TODO: is nw needed here?
AddStage("PhaseIter" , "calcPhaseFIter" , save=Fields$group %in% c("PF") , load=DensityAll$group %in% c("g","h","Vel","nw"))
AddStage("WallIter" , "calcWallPhaseIter" , save=Fields$group %in% c("PF") , load=DensityAll$group %in% c("nw"))
AddStage("WallIter" , "calcWallPhaseIter" , save=Fields$group %in% c("PF") , load=DensityAll$group %in% c("nw","PF")) # Purposefully read/write of PF for boundary. complex geom may force RACE condition.
}

AddAction("Iteration", c("BaseIter", "PhaseIter","WallIter"))
AddAction("Init" , c("PhaseInit","WallInit", "WallIter","BaseInit"))

# Outputs:
AddQuantity(name="Rho", unit="kg/m3")
AddQuantity(name="PhaseField",unit="1")
AddQuantity(name="U", unit="m/s",vector=T)
AddQuantity(name="NormalizedPressure", unit="Pa")
AddQuantity(name="Pressure", unit="Pa")
AddQuantity(name="Rho", unit="kg/m3")
AddQuantity(name="PhaseField", unit="1")
AddQuantity(name="U", unit="m/s",vector=T)
AddQuantity(name="NormalizedPressure", unit="1")
AddQuantity(name="Pressure", unit="Pa")
AddQuantity(name="Normal", unit="1", vector=T)

# Initialisation States
Expand Down Expand Up @@ -209,5 +209,4 @@ if (Options$Outflow) {
}
AddNodeType(name="Solid", group="BOUNDARY")
AddNodeType(name="Wall", group="BOUNDARY")
AddNodeType(name="BGK", group="COLLISION")
AddNodeType(name="MRT", group="COLLISION")
Loading

0 comments on commit 472db73

Please sign in to comment.