-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:rboman/progs
- Loading branch information
Showing
78 changed files
with
2,319 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# merge master into boman branch for all Metafor repos | ||
# this script should be run from the root directory of the workspace | ||
|
||
# note: the script does not push boman branch to origin | ||
|
||
|
||
function update_repo { | ||
cd $1 | ||
git checkout boman | ||
git pull | ||
git merge origin/master | ||
cd .. | ||
} | ||
|
||
# update each repo one by one | ||
update_repo oo_meta | ||
update_repo oo_nda | ||
update_repo keygen | ||
update_repo parasolid | ||
update_repo MetaforSetup | ||
|
||
# linuxbin uses "master" branch | ||
cd linuxbin | ||
git checkout master | ||
git pull | ||
|
||
# pull the changes manually... |
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.
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 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# list of ignored files/folders | ||
|
||
build/ | ||
*~ | ||
*.o | ||
*.obj | ||
*.bak | ||
.vscode/ | ||
*.msh | ||
gmsh-sdk/ | ||
eigen/ | ||
*.tgz | ||
*.zip | ||
*.swp | ||
a.out | ||
|
||
# latex | ||
*.aux | ||
*.log | ||
*.nav | ||
*.out | ||
!fig_*.pdf | ||
*.snm | ||
*.synctex* | ||
*.toc | ||
*.fls | ||
*.fdb_latexmk | ||
*.bbl | ||
*.blg | ||
|
||
Backup_of* | ||
tmp/ | ||
out.txt | ||
*.db |
This file contains 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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
stages: | ||
- build | ||
- deploy | ||
|
||
build_cpp: | ||
image: registry.gitlab.com/rboman_docker/gmsh | ||
stage: build | ||
script: | ||
- source ./envs/linux-macos.sh | ||
- cd lib && ./get_gmsh.sh && cd .. | ||
# -- | ||
- cd examples/gmsh_api | ||
- mkdir build | ||
- cd build | ||
- cmake .. | ||
- make -j 4 | ||
#- ./code1_loadgeo ../rectangle.geo | ||
- ./code2_getgroups ../rectangle.geo | ||
- ./code3_buildphymap ../rectangle.geo | ||
- ./code4_hierarchy ../rectangle.geo | ||
- ./code5_elprops | ||
- ./code6_allnodes ../rectangle.geo | ||
- ./code7_parameters ../rectangle.geo | ||
- ./code8_jacobians ../mono.geo | ||
#- ./code9_views ../rectangle.geo | ||
- cd ../../.. | ||
# -- | ||
- cd examples/sparse_solve | ||
- mkdir build | ||
- cd build | ||
- cmake .. | ||
- make -j 4 | ||
- ./sparse_solve | ||
- cd ../../.. | ||
# -- | ||
- cd examples/openmp | ||
- mkdir build | ||
- cd build | ||
- cmake .. | ||
- make -j 4 | ||
- ./omp_hello | ||
- cd ../../.. | ||
# -- | ||
- cd examples/snippets | ||
- mkdir build | ||
- cd build | ||
- cmake -DCMAKE_BUILD_TYPE=Release .. | ||
- make -j 4 | ||
- ./edges -nopopup | ||
- ./set_of_pairs | ||
- cd ../../.. | ||
# -- | ||
- cd src | ||
- mkdir build | ||
- cd build | ||
- cmake .. | ||
- make -j 4 | ||
- ./solver | ||
- cd ../.. | ||
|
||
build_pdf: | ||
stage: build | ||
image: aergus/latex | ||
script: | ||
- cd doc | ||
- make | ||
- cd DGM | ||
- make | ||
artifacts: | ||
name: "$CI_PROJECT_NAME-$CI_COMMIT_SHA" | ||
paths: | ||
- "doc/**/*.pdf" | ||
exclude: | ||
- doc/**/fig_*.pdf | ||
- doc/DGM/figures/*.pdf | ||
only: | ||
- master | ||
|
||
pages: | ||
stage: deploy | ||
script: | ||
- ls -alF | ||
- mkdir public | ||
# copy pdfs to the root folder of the project: | ||
# e.g. https://rboman.gitlabpages.uliege.be/math0471/bem.pdf ... | ||
- find doc \( -name "*.pdf" ! -name "fig_*.pdf" \) -print -exec cp {} public \; | ||
artifacts: | ||
paths: | ||
- public | ||
only: | ||
- master | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# math0471 | ||
|
||
This GitLab repository contains the course material for the "Multiphysics integrated computational project" (math0471). | ||
|
||
Please go to the 📑[Wiki](https://gitlab.uliege.be/rboman/math0471/wikis/home) for detailed instructions. | ||
|
||
<br/> | ||
|
||
Documents: <br/> | ||
📒[The DG method - A short intro to theory and practical implementation (K. Hillewaert)](https://rboman.gitlabpages.uliege.be/math0471/DGM.pdf) - ♻️ updated May 10th!<br/> | ||
📒[First use of Gmsh & Gmsh SDK (R. Boman)](https://mseduculiegebe-my.sharepoint.com/:b:/g/personal/r_boman_uliege_be/EegFscDvD-VKoJJUHcogq3ABzbshh5NcbG0czBvlTvZCDw?e=Cjl660&download=1) <br/> | ||
📒[Mémo "Interpolation / Approximation" (R. Boman)](https://rboman.gitlabpages.uliege.be/dg/hw1_interpolation.pdf) <br/> | ||
📒[Discontinuous Galerkin Method for scalar advection (J.-F. Remacle)](https://mseduculiegebe-my.sharepoint.com/:b:/g/personal/r_boman_uliege_be/ERc_3fa02ddEkQ-B9nBRcfUBNqhbeBzxDDWQluyqt-WFyw?e=6njbPc&download=1) <br/> | ||
📒[Mémo "advection scalaire" (R.Boman)](https://rboman.gitlabpages.uliege.be/dg/hw2_scalar_advection.pdf)<br/> | ||
📒[Mémo "diffusion scalaire" (R.Boman)](https://rboman.gitlabpages.uliege.be/dg/hw2_scalar_diffusion.pdf)<br/> | ||
📒[Mémo "acoustique" (R.Boman)](https://rboman.gitlabpages.uliege.be/dg/hw3_acoustics.pdf) | ||
|
||
|
||
Important links: <br/> | ||
📝[Statement of the problem](https://rboman.gitlabpages.uliege.be/math0471/statement_2023.pdf) <br/> | ||
🗓️[Important dates](https://gitlab.uliege.be/rboman/math0471/-/wikis/Calendar) <br/> | ||
🔗[Course description on ULiege website](https://www.programmes.uliege.be/cocoon/20222023/en/cours/MATH0471-3.html) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# basic makefile for LaTeX/Markdown | ||
# uses latexmf for .tex files | ||
# uses pandoc for .md files | ||
|
||
TEXDOCS = $(patsubst %.tex,%.pdf,$(wildcard *.tex)) | ||
MDDOCS = $(patsubst %.md,%.pdf,$(wildcard *.md)) | ||
all: $(TEXDOCS) $(MDDOCS) | ||
%.pdf: %.tex | ||
@latexmk -pdf -quiet -pdflatex="pdflatex -interaction=nonstopmode" $< | ||
%.pdf: %.md | ||
@pandoc $< -o $@ | ||
clean: | ||
@latexmk -C -quiet | ||
@rm -f *.bm *.vrb *.nav *.snm *.synctex.gz | ||
@rm -f $(MDDOCS) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# math0471/doc | ||
|
||
This folder contains the source files of the presentations seen in class. | ||
|
||
* [empty document](https://rboman.gitlabpages.uliege.be/math0471/example.pdf) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Example | ||
|
||
This is an example. |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
:: shell used to latex/pandoc all the files | ||
:: => open msys2 console + miktex | ||
|
||
:: not needed (already in PATH) | ||
:: set PATH=%PATH%;C:\Users\r_bom\AppData\Local\Programs\MiKTeX\miktex\bin\x64 | ||
|
||
C:\msys64\msys2_shell.cmd -msys2 -here -full-path |
This file contains 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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
\documentclass[a4paper,12pt]{article} | ||
|
||
\usepackage{a4wide} | ||
\usepackage[utf8]{inputenc} | ||
\usepackage[colorlinks=true,urlcolor=blue]{hyperref} | ||
\usepackage{hyperref} | ||
\usepackage{xcolor} | ||
|
||
\setlength{\parindent}{0mm} | ||
\setlength{\parskip}{1em} | ||
|
||
\begin{document} | ||
|
||
\begin{center} \Large Discontinuous Galerkin Method for Aeroacoustics | ||
\end{center} | ||
|
||
\begin{center} | ||
MATH0471 -- Spring 2023 \bigskip | ||
\end{center} | ||
|
||
\bigskip | ||
|
||
This project consists in studying the problem of sound propagation in the presence of a non-trivial mean flow in an engine nacelle. This kind of study is of primary importance in the design of aircraft. | ||
|
||
The problem can be solved in two successive steps: the solution of the mean potential flow, which can be modeled by an elliptic PDE, and the solution of small perturbations around this mean flow, which is described by an hyperbolic linear system of 3 equations. These 2 problems will be solved by two distinct solvers. The elliptic solver will provide the mean velocity field to the acoustic solver. | ||
|
||
Both sets of equations will be spatially discretized in 2D using the Discontinuous Galerkin (DG) method and Lagrange nodal basis functions on unstructured meshes. | ||
Since the DG method requires a more elaborated mesh data structure than the | ||
classical finite element method, the numerical schemes will be implemented with | ||
the help of the Gmsh SDK\footnote{\url{http://gmsh.info}} so that meshing, | ||
computation of surface integrals and postprocessing of results will be | ||
simplified. | ||
|
||
The solvers will be first developed, tested and validated for the solution of simple scalar diffusion and advection problems. Then, they will be enhanced for the solution of the mean flow and the acoustic problem. Finally they will be coupled and validated on reference configurations where analytical solutions can be calculated\footnote{Boucheron et al. 2006 -- Analytical solution of multimodal acoustic propagation in circular ducts with laminar mean flow profile -- \url{https://doi.org/10.1016/j.jsv.2005.08.017}} and on more sophisticated geometries. | ||
|
||
The project is organized as follows: | ||
\begin{enumerate} | ||
\item Students will be divided in 2 groups. Each group will write its own | ||
solvers. Within each group, one subgroup will be in charge of developing the | ||
elliptic solver for the mean flow and one subgroup will be in charge of the hyperbolic solver for the acoustic problem. The group as a whole will be responsible for the coupling and the final applications. | ||
\item Four intermediate deadlines are given, with a mandatory (but not graded) | ||
8-page progress report that should detail the computer implementation and the | ||
mathematical, numerical and physical experiments. | ||
\item The final report (about 60 pages) will present the method and numerical | ||
results, the computer implementation and a detailed analysis of physical | ||
experiments on non-trivial configurations. | ||
\item An oral presentation of the main project results will be organized during | ||
the June exam session; individual theoretical and practical questions will be | ||
asked to each member of the groups. | ||
\end{enumerate} | ||
|
||
Important dates: | ||
\begin{enumerate} | ||
\item \textbf{Wednesday March 1st: Intermediate deadline \#1 (Interpolation errors with Gmsh SDK)}. The first weeks will be focused on setting up the development environment\footnote{see | ||
the wiki \url{https://gitlab.uliege.be/rboman/math0471}} (compiler, GitLab repository) and learning the Gmsh SDK (reading of a mesh, calculation of Jacobians, evaluation of shape functions and numerical integration). This first exercise consists in writing a program which takes a geometry and a function as input. The geometry is then meshed by Gmsh, and the function is interpolated at the nodes of the mesh. The program should compute the L2-norm of the interpolation error, show its convergence, and display the interpolated field in Gmsh. | ||
\item \textbf{Wednesday March 29th: Intermediate deadline \#2 (Scalar DG solvers)}. Implementation of the DG method using Lagrange shape functions of arbitrary order for the solution of a diffusion equation (subgroup 1) and a transport equation (subgroup 2) in 2D. | ||
The implementation should take advantage of the Gmsh library for creating or reading the mesh, computing values of shape functions and Jacobians, as well as exporting results. | ||
\item \textbf{Wednesday April 26th): Intermediate deadline \#3 (Mean-flow solver and acoustic solver)}. Modification of the two codes for the solution of the mean-flow and the acoustic problems. | ||
\item \textbf{Wednesday May 10th: Intermediate deadline \#4 (Applications)}. Coupling of the two codes. Tests and analysis of physical results on more sophisticated geometries. | ||
\item \textbf{Wednesday May 17th: Final deadline}. Final report and code. | ||
\item \textbf{June session: Exam}. Oral presentation of the projects. | ||
\end{enumerate} | ||
|
||
\sloppypar The full source code should be tagged in the ULiège GitLab for each | ||
deadline, and should be directly configurable and compilable on the CECI | ||
clusters\footnote {\url{https://www.ceci-hpc.be}}. The reports in PDF format should also be associated to this tag on | ||
GitLab for each deadline. | ||
|
||
\end{document} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# math0471/envs | ||
|
||
This folder contains 2 scripts for the correct definition of environment variables of your system so that | ||
* Your c++ compiler (g++) is available from the command line, | ||
* Eigen and gmsh libraries and header files can be found by cmake, | ||
* The gmsh executable can be used in the command line (by just typing `gmsh`). | ||
* `cmake` and `make` can be used on Windows as if you were on linux/mac (see `cmake.cmd` and `make.cmd` for more information) | ||
|
||
Use `windows.cmd` on Windows (run it or double-click on it) | ||
|
||
Use `linux-macos.sh` on linux or macOS with the command: | ||
``` | ||
source linux-macos.sh | ||
``` | ||
Use `nic5.sh` on the [CECI clusters](https://www.ceci-hpc.be/clusters.html): | ||
``` | ||
source nic5.sh | ||
``` |
This file contains 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
# This file setup an environment which allows you to compile the code | ||
# on Linux or macOS using the default compiler (gcc or clang) | ||
# | ||
# HOW TO USE THIS FILE? | ||
# open a terminal | ||
# source ./envs/linux-macos.sh | ||
# mkdir build | ||
# cd build | ||
# cmake .. | ||
# make | ||
# [executables are built in the bin/ folder] | ||
|
||
# Detect shell | ||
if [ -n "$ZSH_VERSION" ]; then | ||
SOURCE=${(%):-%N} # from https://stackoverflow.com/questions/9901210/bash-source0-equivalent-in-zsh | ||
elif [ -n "$BASH_VERSION" ]; then | ||
SOURCE=${BASH_SOURCE[0]} | ||
else | ||
echo "Shell not recognized; only bash and zsh are supported!" | ||
exit 1 | ||
fi | ||
|
||
# Get the absolute path of the root folder | ||
DIR="$( cd "$( dirname $SOURCE )" && pwd && echo x)"; DIR="${DIR%x}" | ||
abspath=$(dirname $DIR ) | ||
|
||
# set the location of gmsh SDK ( **MODIFY THIS LINE FOR YOUR SYSTEM** ) | ||
GMSHSDK=${abspath}/lib/gmsh-sdk | ||
EIGEN=${abspath}/lib/eigen | ||
|
||
# where are gmsh and gmsh-**.so ? | ||
export PATH=${GMSHSDK}/bin:${GMSHSDK}/lib:${PATH} | ||
# where is gmsh.h ? | ||
export INCLUDE=${EIGEN}:${GMSHSDK}/include:${INCLUDE} | ||
# where is gmsh.lib ? | ||
export LIB=${GMSHSDK}/lib:${LIB} | ||
# where is gmsh.py ? (required only if you want to use the python API) | ||
export PYTHONPATH=${GMSHSDK}/lib:${PYTHONPATH} | ||
# the following command is only useful for macOS | ||
export DYLD_LIBRARY_PATH=${GMSHSDK}/lib:${DYLD_LIBRARY_PATH} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Note: `mingw32-make` (which generates classic makefiles) is not able to handle paths with special characters (utf-8) neither for the compiler path, nor for the source files. | ||
|
||
It means that `mingw32-make` cannot be used if the username contains accented characters. |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
cmake.exe -G"MinGW Makefiles" %* |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
mingw32-make.exe %* |
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module load releases/2021b | ||
module load libGLU | ||
module load CMake | ||
module load GCC |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
!ninja.exe |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Ninja is used by default on Windows because mingw32-make is not able to handle paths with special characters (utf-8) neither for the compiler path, nor for the source files. | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
cmake.exe -G"Ninja" %* |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
ninja.exe %* |
Binary file not shown.
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Example of VSCode configuration files | ||
|
||
These folders contain some examples of advanced configuration files of VSCode for linux, mac and windows. | ||
|
||
They can be copied in the `.vscode/` folder of the project. | ||
|
||
* `c_cpp_properties.json`: helps VSCode "Intellisense" find the header files such as `<gmsh.h>` or `<iostream>` if they appear underlined in red. | ||
* `launch.json`: defines a "debug" configuration which allows for interactive debugging with the mouse in the GUI of VSCode. | ||
* `settings.json`: defines the environment needed by CMake to build the projects, so that running `envs/windows.cmd` is not needed anymore. |
Oops, something went wrong.