Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e00abfc

Browse files
committed
- Disable gmsh view addMode Data (time and memory consuming) and gmsh view write
- Write results in VTK format (uses VTU and PVD) - Add some screen display routines
1 parent c8bdb91 commit e00abfc

16 files changed

Lines changed: 1430 additions & 462 deletions

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DGFEM for Acoustic Wave Propagation
22

3-
[![Build Status](https://travis-ci.org/pvanberg/DGFEM-Acoustic.svg?branch=master)](https://travis-ci.org/pvanberg/DGFEM-Acoustic) [![Maintenance](https://img.shields.io/badge/Version-1.2.0-e67e22.svg)](https://github.com/pvanberg/MATH0471-DG/releases/tag/v1.2.0) [![Maintenance](https://img.shields.io/badge/c++-14%20|%2017%20|%2020-27ae60.svg)](https://github.com/pvanberg/MATH0471-DG/releases/tag/v1.0.0)
3+
[![Build Status](https://travis-ci.org/pvanberg/DGFEM-Acoustic.svg?branch=master)]() [![Maintenance](https://img.shields.io/badge/version-1.2.1-red)](https://gitlab.ensam.eu/khelladi/DGFEM-Acoustic/-/tree/v1.2.1) [![Maintenance](https://img.shields.io/badge/c++-14%20|%2017%20|%2020-27ae60.svg)](https://gitlab.ensam.eu/khelladi/DGFEM-Acoustic/-/tree/v1.2.1)
44

55
This repository implements a discontinuous Galerkin finite element method (DGFEM) applied to the linearized Euler equations and the acoustic perturbation equations. The solver is based on [GMSH](http://gmsh.info/) library and supports a wide range of features:
66

@@ -14,7 +14,7 @@ For more information, a detailled report is available [here](https://github.com/
1414

1515
| Auditorium | Isosurfaces | Bulk|
1616
| ------------- |:-------------:| :-------------:|
17-
| <img src="https://raw.githubusercontent.com/pvanberg/DGFEM-Acoustic/master/assets/auditorium_source2_2.png" width="400" height="200" /> | <img src="https://raw.githubusercontent.com/pvanberg/DGFEM-Acoustic/master/assets/auditorium_source_iso1.png" width="400" height="200" /> | <img src="https://raw.githubusercontent.com/pvanberg/DGFEM-Acoustic/master/assets/auditorium_source_bulk1.png" width="400" height="200" /> |
17+
| <img src="https://gitlab.ensam.eu/khelladi/DGFEM-Acoustic/-/raw/b1026a1c6b9d312d02f6f70e776ed98e054ef00a/assets/auditorium_source2_2.png" width="400" height="200" /> | <img src="https://gitlab.ensam.eu/khelladi/DGFEM-Acoustic/-/raw/b1026a1c6b9d312d02f6f70e776ed98e054ef00a/assets/auditorium_source_iso1.png" width="400" height="200" /> | <img src="https://gitlab.ensam.eu/khelladi/DGFEM-Acoustic/-/raw/b1026a1c6b9d312d02f6f70e776ed98e054ef00a/assets/auditorium_source_bulk1.png" width="400" height="200" /> |
1818

1919

2020
## Getting Started
@@ -34,10 +34,11 @@ OpenMP
3434
### Installing
3535

3636
```
37-
git clone https://github.com/pvanberg/MATH0471-DG.git
38-
cd MATH0471-DG
37+
git clone https://gitlab.ensam.eu/khelladi/DGFEM-Acoustic.git
38+
cd DGFEM-Acoustic
3939
mkdir build && cd build
40-
cmake .. && make -j4
40+
cmake ../ -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DGMSH_INCLUDE_DIRS="../gmsh-4.1.5-Linux64-sdk/include" -DGMSH_LIBRARIES="../gmsh-4.1.5-Linux64-sdk/lib/libgmsh.so" -DGMSH_EXECUTABLE="../gmsh-4.1.5-Linux64-sdk/bin/gmsh" -DEIGEN_INCLUDE_DIRS="/usr/include/eigen3"
41+
make -j4
4142
```
4243

4344
## Running the tests
@@ -61,3 +62,6 @@ cd bin
6162
* Pierre-Olivier Vanberg
6263
* Martin Lacroix
6364
* Tom Servais
65+
66+
## Contributors
67+
* Sofiane Khelladi

build.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ echo
77

88
echo "[1] Get depedencies and external libraries.";
99

10-
module load cmake/3.11.1
11-
module load gcc/4.9.2
1210

1311
dpkg -s cmake > /dev/null 2>&1;
1412
if [ $? -eq 0 ]; then
@@ -48,16 +46,16 @@ else
4846
echo "Lapack/Blas installed.";
4947
fi
5048

51-
if [ ! -d "gmsh-4.1.4-Linux64-sdk" ]; then
49+
if [ ! -d "gmsh-4.1.5-Linux64-sdk" ]; then
5250
echo "Gmsh not found, installing...";
53-
wget http://gmsh.info/bin/Linux/gmsh-4.1.4-Linux64-sdk.tgz
54-
tar -xf gmsh-4.1.4-Linux64-sdk.tgz
55-
rm -rf gmsh-4.1.4-Linux64-sdk.tgz
51+
wget http://gmsh.info/bin/Linux/gmsh-4.1.5-Linux64-sdk.tgz
52+
tar -xf gmsh-4.1.5-Linux64-sdk.tgz
53+
rm -rf gmsh-4.1.5-Linux64-sdk.tgz
5654
echo "Gmsh installed."
5755
else
5856
echo "Gmsh found.";
5957
fi
60-
cd gmsh-4.1.4-Linux64-sdk/
58+
cd gmsh-4.1.5-Linux64-sdk/
6159
export FC=gfortran
6260
export PATH=${PWD}/bin:${PWD}/lib:${PATH}
6361
export INCLUDE=${PWD}/include:${INCLUDE}
@@ -67,16 +65,16 @@ export DYLD_LIBRARY_PATH=${PWD}/lib:${DYLD_LIBRARY_PATH}
6765
cd ../
6866

6967

70-
if [ ! -d "eigen-eigen-323c052e1731" ]; then
68+
if [ ! -d "eigen-3.4.0" ]; then
7169
echo "Eigen not found, installing...";
72-
wget http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
73-
tar -xf 3.3.7.tar.gz
74-
rm -rf 3.3.7.tar.gz
70+
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
71+
tar -xf eigen-3.4.0.tar.gz
72+
rm -rf eigen-3.4.0.tar.gz
7573
echo "Eigen installed."
7674
else
7775
echo "Eigen found."
7876
fi
79-
cd eigen-eigen-323c052e1731/
77+
cd eigen-3.4.0/
8078
export INCLUDE=${PWD}:${INCLUDE}
8179
cd ../
8280

doc/config/Cube.conf

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[Config]
2+
3+
# How to use:
4+
# 1) Compile the DGalerkin sources (cmake && make)
5+
# 2) ./DGalerkin mymesh.msh myconfig.conf
6+
# -> First args = mesh file, Second arg = config file
7+
8+
# Initial, final time and time step(t>0)
9+
timeStart=0
10+
timeEnd=0.005
11+
timeStep=0.00005
12+
13+
# Saving rate:
14+
timeRate=0.0001
15+
16+
# Element Type:
17+
# ["Lagrange", "IsoParametric", ...]
18+
elementType=Lagrange
19+
20+
# Time integration method:
21+
# ["Euler1", "Euler2", "Runge-Kutta"...]
22+
timeIntMethod=Runge-Kutta
23+
24+
# Boundary condition:
25+
# /!\ The physical group name must match the Gmsh name (case sensitive)
26+
Reflecting = Reflecting
27+
Absorbing = Absorbing
28+
MyPhysicalName = Absorbing
29+
30+
# Number of thread
31+
numThreads=12
32+
33+
# Mean Flow parameters
34+
v0_x = 0
35+
v0_y = 0
36+
v0_z = 0
37+
rho0 = 1.225
38+
c0 = 343
39+
40+
# Source:
41+
# name = fct,x,y,z, size, intensity,frequency,phase,duration
42+
# - fct supported = [monopole, dipole, quadrupole]
43+
# - (x,y,z) = source position
44+
# - intensity = source intensity
45+
# - frequency = source frequency
46+
# NB: Extended source or Multiple sources are supported.
47+
# (source1 = ..., source2 = ...) indice must change.
48+
#source1 = monopole, 3,1.2,0, 0.1, 10,1500,0,0.01
49+
50+
# Initial condition:
51+
# name = gaussian,x,y,z, size, amplitude
52+
# - fct supported = [gaussian]
53+
# - (x,y,z) = position
54+
# - amplitude = initial amplitude
55+
# NB: Multiple CI are supported and recursively added.
56+
# (initial condition1 = ..., initial condition = ...)
57+
initialCondtition1 = gaussian, 0,0,0,1,1
58+
59+
# Save file:
60+
# i.e. where the solution is stored
61+
saveFile=data.msh
62+
63+
64+

doc/config/Room_2D.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Absorbing = Absorbing
2828
MyPhysicalName = Absorbing
2929

3030
# Number of thread
31-
numThreads=4
31+
numThreads=64
3232

3333
# Mean Flow parameters
3434
v0_x = 0

doc/config/Square.conf

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[Config]
2+
3+
# How to use:
4+
# 1) Compile the DGalerkin sources (cmake && make)
5+
# 2) ./DGalerkin mymesh.msh myconfig.conf
6+
# -> First args = mesh file, Second arg = config file
7+
8+
# Initial, final time and time step(t>0)
9+
timeStart=0
10+
timeEnd=0.005
11+
timeStep=0.00005
12+
13+
# Saving rate:
14+
timeRate=0.0001
15+
16+
# Element Type:
17+
# ["Lagrange", "IsoParametric", ...]
18+
elementType=Lagrange
19+
20+
# Time integration method:
21+
# ["Euler1", "Euler2", "Runge-Kutta"...]
22+
timeIntMethod=Runge-Kutta
23+
24+
# Boundary condition:
25+
# /!\ The physical group name must match the Gmsh name (case sensitive)
26+
Reflecting = Reflecting
27+
Absorbing = Absorbing
28+
MyPhysicalName = Absorbing
29+
30+
# Number of thread
31+
numThreads=12
32+
33+
# Mean Flow parameters
34+
v0_x = 0
35+
v0_y = 0
36+
v0_z = 0
37+
rho0 = 1.225
38+
c0 = 343
39+
40+
# Source:
41+
# name = fct,x,y,z, size, intensity,frequency,phase,duration
42+
# - fct supported = [monopole, dipole, quadrupole]
43+
# - (x,y,z) = source position
44+
# - intensity = source intensity
45+
# - frequency = source frequency
46+
# NB: Extended source or Multiple sources are supported.
47+
# (source1 = ..., source2 = ...) indice must change.
48+
#source1 = monopole, 3,1.2,0, 0.1, 10,1500,0,0.01
49+
50+
# Initial condition:
51+
# name = gaussian,x,y,z, size, amplitude
52+
# - fct supported = [gaussian]
53+
# - (x,y,z) = position
54+
# - amplitude = initial amplitude
55+
# NB: Multiple CI are supported and recursively added.
56+
# (initial condition1 = ..., initial condition = ...)
57+
initialCondtition1 = gaussian, 0,0,0,1,1
58+
59+
# Save file:
60+
# i.e. where the solution is stored
61+
saveFile=data.msh
62+
63+
64+

doc/config/Urban.conf

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[Config]
2+
3+
# How to use:
4+
# 1) Compile the DGalerkin sources (cmake && make)
5+
# 2) ./DGalerkin mymesh.msh myconfig.conf
6+
# -> First args = mesh file, Second arg = config file
7+
8+
# Initial, final time and time step(t>0)
9+
timeStart=0
10+
timeEnd=5.0
11+
timeStep=0.001
12+
13+
# Saving rate:
14+
timeRate=0.01
15+
16+
# Element Type:
17+
# ["Lagrange", "IsoParametric", ...]
18+
elementType=Lagrange
19+
20+
# Time integration method:
21+
# ["Euler1", "Euler2", "Runge-Kutta"...]
22+
timeIntMethod=Runge-Kutta
23+
24+
25+
# Boundary condition:
26+
# /!\ The physical group name must match the Gmsh name (case sensitive)
27+
Reflecting = Reflecting
28+
Absorbing = Absorbing
29+
MyPhysicalName = Absorbing
30+
31+
# Number of thread
32+
numThreads=100
33+
34+
# Mean Flow parameters
35+
v0_x = 0
36+
v0_y = 0
37+
v0_z = 0
38+
rho0 = 1.225
39+
c0 = 343
40+
41+
# Source:
42+
# name = fct,x,y,z, size, intensity,frequency,phase,duration
43+
# - fct supported = [monopole, dipole, quadrupole]
44+
# - (x,y,z) = source position
45+
# - intensity = source intensity
46+
# - frequency = source frequency
47+
# NB: Extended source or Multiple sources are supported.
48+
# (source1 = ..., source2 = ...) indice must change.
49+
source1 = dipole, -600,100,0, 30, 2,10,0,5
50+
source2 = dipole, -600,0,0, 30, 2,10,0,5
51+
source3 = dipole, -600,-100,0, 30, 2,10,0,5
52+
53+
# Initial condition:
54+
# name = gaussian,x,y,z, size, amplitude
55+
# - fct supported = [gaussian]
56+
# - (x,y,z) = position
57+
# - amplitude = initial amplitude
58+
# NB: Multiple CI are supported and recursively added.
59+
# (initial condition1 = ..., initial condition = ...)
60+
#initialCondtition1 = gaussian, 0,0,0,1,1
61+
62+
# Save file:
63+
# i.e. where the solution is stored
64+
saveFile=data.msh
65+
66+
67+

doc/config/Urban_3D.conf

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[Config]
2+
3+
# How to use:
4+
# 1) Compile the DGalerkin sources (cmake && make)
5+
# 2) ./DGalerkin mymesh.msh myconfig.conf
6+
# -> First args = mesh file, Second arg = config file
7+
8+
# Initial, final time and time step(t>0)
9+
timeStart=0
10+
timeEnd=5.0
11+
timeStep=0.001
12+
13+
# Saving rate:
14+
timeRate=0.01
15+
16+
# Element Type:
17+
# ["Lagrange", "IsoParametric", ...]
18+
elementType=Lagrange
19+
20+
# Time integration method:
21+
# ["Euler1", "Euler2", "Runge-Kutta"...]
22+
timeIntMethod=Runge-Kutta
23+
24+
25+
# Boundary condition:
26+
# /!\ The physical group name must match the Gmsh name (case sensitive)
27+
Reflecting = Reflecting
28+
Absorbing = Absorbing
29+
MyPhysicalName = Absorbing
30+
31+
# Number of thread
32+
numThreads=100
33+
34+
# Mean Flow parameters
35+
v0_x = 0
36+
v0_y = 7.0
37+
v0_z = 0
38+
rho0 = 1.225
39+
c0 = 343
40+
41+
# Source:
42+
# name = fct,x,y,z, size, intensity,frequency,phase,duration
43+
# - fct supported = [monopole, dipole, quadrupole]
44+
# - (x,y,z) = source position
45+
# - intensity = source intensity
46+
# - frequency = source frequency
47+
# NB: Extended source or Multiple sources are supported.
48+
# (source1 = ..., source2 = ...) indice must change.
49+
source1 = monopole, 100, -600, 100, 100, 2, 5, 0, 5
50+
source2 = monopole, 0, -600, 100, 100, 2, 5, 0, 5
51+
source3 = monopole, -100, -600, 100, 100, 2, 5, 0, 5
52+
# source4 = dipole, -500,-50,150, 30, 2,5,0,5
53+
# source5 = dipole, -500,50,150, 30, 2,10,0,5
54+
55+
# Initial condition:
56+
# name = gaussian,x,y,z, size, amplitude
57+
# - fct supported = [gaussian]
58+
# - (x,y,z) = position
59+
# - amplitude = initial amplitude
60+
# NB: Multiple CI are supported and recursively added.
61+
# (initial condition1 = ..., initial condition = ...)
62+
#initialCondtition1 = gaussian, 0,0,0,1,1
63+
64+
# Save file:
65+
# i.e. where the solution is stored
66+
saveFile=data.msh
67+
68+
69+

0 commit comments

Comments
 (0)