Skip to content

Commit e4e04f3

Browse files
authored
Merge pull request #23 from CEED/time-integrators
Conservative time integrator
2 parents 15ca551 + c35e01b commit e4e04f3

10 files changed

Lines changed: 456 additions & 116 deletions

README.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Clone and build the parallel version of MFEM:
165165
```
166166
The above uses the `laghos-v1.0` tag of MFEM, which is guaranteed to work with
167167
Laghos v1.0. Alternatively, one can use the latest versions of the MFEM and
168-
Laghos `master` branches (provided there are no conflicts. See the [MFEM
168+
Laghos `master` branches (provided there are no conflicts). See the [MFEM
169169
building page](http://mfem.org/building/) for additional details.
170170

171171
(Optional) Clone and build GLVis:
@@ -255,31 +255,33 @@ partial assembly option (`-pa`).
255255

256256
Some sample runs in 2D and 3D respectively are:
257257
```sh
258-
mpirun -np 8 laghos -p 1 -m data/square01_quad.mesh -rs 3 -tf 0.8 -no-vis -pa
259-
mpirun -np 8 laghos -p 1 -m data/cube01_hex.mesh -rs 2 -tf 0.6 -no-vis -pa
258+
mpirun -np 8 laghos -p 1 -m data/square01_quad.mesh -rs 3 -tf 0.8 -pa
259+
mpirun -np 8 laghos -p 1 -m data/cube01_hex.mesh -rs 2 -tf 0.6 -vis -pa
260260
```
261261

262-
The latter produces the following density plot (when run with the `-vis` instead
263-
of the `-no-vis` option)
262+
The latter produces the following density plot (notice the `-vis` option)
264263

265264
![Sedov blast image](data/sedov.png)
266265

267-
#### Taylor-Green vortex
266+
#### Taylor-Green and Gresho vortices
268267

269-
Laghos includes also a smooth test problem, that exposes all the principal
268+
Laghos includes also smooth test problems that expose all the principal
270269
computational kernels of the problem except for the artificial viscosity
271270
evaluation.
272271

273272
Some sample runs in 2D and 3D respectively are:
274273
```sh
275-
mpirun -np 8 laghos -p 0 -m data/square01_quad.mesh -rs 3 -tf 0.5 -no-vis -pa
276-
mpirun -np 8 laghos -p 0 -m data/cube01_hex.mesh -rs 1 -cfl 0.1 -tf 0.25 -no-vis -pa
274+
mpirun -np 8 laghos -p 0 -m data/square01_quad.mesh -rs 3 -tf 0.5 -pa
275+
mpirun -np 8 laghos -p 0 -m data/cube01_hex.mesh -rs 1 -cfl 0.1 -tf 0.25 -vis -pa
276+
mpirun -np 8 laghos -p 4 -m data/square_gresho.mesh -rs 3 -ok 3 -ot 2 -tf 0.62 -s 7 -vis -pa
277277
```
278278

279-
The latter produces the following velocity magnitude plot (when run with the
280-
`-vis` instead of the `-no-vis` option)
279+
The latter produce the following velocity magnitude plots (notice the `-vis` option)
281280

282-
![Taylor-Green image](data/tg.png)
281+
<table border="0">
282+
<td> <img src="data/tg.png">
283+
<td> <img src="data/gresho.png">
284+
</table>
283285

284286
#### Triple-point problem
285287

@@ -288,27 +290,26 @@ thus examining the complex computational abilities of Laghos.
288290

289291
Some sample runs in 2D and 3D respectively are:
290292
```sh
291-
mpirun -np 8 laghos -p 3 -m data/rectangle01_quad.mesh -rs 2 -tf 2.5 -cfl 0.025 -no-vis -pa
292-
mpirun -np 8 laghos -p 3 -m data/box01_hex.mesh -rs 1 -tf 2.5 -cfl 0.05 -no-vis -pa
293+
mpirun -np 8 laghos -p 3 -m data/rectangle01_quad.mesh -rs 2 -tf 2.5 -cfl 0.025 -pa
294+
mpirun -np 8 laghos -p 3 -m data/box01_hex.mesh -rs 1 -tf 2.5 -cfl 0.05 -vis -pa
293295
```
294296

295-
The latter produces the following specific internal energy plot (when run with
296-
the `-vis` instead of the `-no-vis` option)
297+
The latter produces the following specific internal energy plot (notice the `-vis` option)
297298

298299
![Triple-point image](data/tp.png)
299300

300301
## Verification of Results
301302

302303
To make sure the results are correct, we tabulate reference final iterations
303-
(`step`), time steps (`dt`) and energies (`|e|`) for the nine runs listed above:
304+
(`step`), time steps (`dt`) and energies (`|e|`) for the runs listed below:
304305

305-
1. `mpirun -np 8 laghos -p 0 -m data/square01_quad.mesh -rs 3 -tf 0.75 -no-vis -pa`
306-
2. `mpirun -np 8 laghos -p 0 -m data/cube01_hex.mesh -rs 1 -tf 0.75 -no-vis -pa`
307-
3. `mpirun -np 8 laghos -p 1 -m data/square01_quad.mesh -rs 3 -tf 0.8 -no-vis -pa`
308-
4. `mpirun -np 8 laghos -p 1 -m data/cube01_hex.mesh -rs 2 -tf 0.6 -no-vis -pa`
309-
5. `mpirun -np 8 laghos -p 2 -m data/segment01.mesh -rs 5 -tf 0.2 -no-vis -fa`
310-
6. `mpirun -np 8 laghos -p 3 -m data/rectangle01_quad.mesh -rs 2 -tf 3.0 -no-vis -pa`
311-
7. `mpirun -np 8 laghos -p 3 -m data/box01_hex.mesh -rs 1 -tf 3.0 -no-vis -pa`
306+
1. `mpirun -np 8 laghos -p 0 -m data/square01_quad.mesh -rs 3 -tf 0.75 -pa`
307+
2. `mpirun -np 8 laghos -p 0 -m data/cube01_hex.mesh -rs 1 -tf 0.75 -pa`
308+
3. `mpirun -np 8 laghos -p 1 -m data/square01_quad.mesh -rs 3 -tf 0.8 -pa`
309+
4. `mpirun -np 8 laghos -p 1 -m data/cube01_hex.mesh -rs 2 -tf 0.6 -pa`
310+
5. `mpirun -np 8 laghos -p 2 -m data/segment01.mesh -rs 5 -tf 0.2 -fa`
311+
6. `mpirun -np 8 laghos -p 3 -m data/rectangle01_quad.mesh -rs 2 -tf 3.0 -pa`
312+
7. `mpirun -np 8 laghos -p 4 -m data/square_gresho.mesh -rs 3 -ok 3 -ot 2 -tf 0.62831853 -s 7 -pa`
312313

313314
| `run` | `step` | `dt` | `e` |
314315
| ----- | ------ | ---- | --- |
@@ -318,7 +319,7 @@ To make sure the results are correct, we tabulate reference final iterations
318319
| 4. | 561 | 0.000360 | 134.0937837919 |
319320
| 5. | 414 | 0.000339 | 32.0120759615 |
320321
| 6. | 5310 | 0.000264 | 141.8348694390 |
321-
| 7. | 937 | 0.002285 | 144.0012514765 |
322+
| 7. | 776 | 0.000045 | 409.8243172608 |
322323

323324

324325
An implementation is considered valid if the final energy values are all within
@@ -348,10 +349,8 @@ A sample run on the [Vulcan](https://computation.llnl.gov/computers/vulcan) BG/Q
348349
machine at LLNL is:
349350

350351
```
351-
srun -n 393216 laghos -pa -p 1 -tf 0.6 -no-vis
352-
-pt 322 -m data/cube_12_hex.mesh
353-
--cg-tol 0 --cg-max-iter 50 --max-steps 2
354-
-ok 3 -ot 2 -rs 5 -rp 3
352+
srun -n 393216 laghos -pa -p 1 -tf 0.6 -pt 322 -m data/cube_12_hex.mesh \
353+
--cg-tol 0 --cg-max-iter 50 --max-steps 2 -ok 3 -ot 2 -rs 5 -rp 3
355354
```
356355
This is Q3-Q2 3D computation on 393,216 MPI ranks (24,576 nodes) that produces
357356
rates of approximately 168497, 74221, and 16696 megadofs, and a total FOM of
@@ -373,6 +372,10 @@ the following versions of Laghos have been developed
373372
[OCCA](http://libocca.org/).
374373
- A [RAJA](https://software.llnl.gov/RAJA/)-based version in the
375374
[raja-dev](https://github.com/CEED/Laghos/tree/raja-dev) branch.
375+
- An MFEM/engines-based version in the
376+
[engines-kernels](https://github.com/CEED/Laghos/tree/engines-kernels) branches.
377+
- Version with adaptive mesh refinement in the
378+
[amr-dev](https://github.com/CEED/Laghos/tree/amr-dev) branch.
376379

377380
## Contact
378381

data/gresho.png

147 KB
Loading

data/square_gresho.mesh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
MFEM mesh v1.0
2+
3+
#
4+
# MFEM Geometry Types (see mesh/geom.hpp):
5+
#
6+
# POINT = 0
7+
# SEGMENT = 1
8+
# TRIANGLE = 2
9+
# SQUARE = 3
10+
# TETRAHEDRON = 4
11+
# CUBE = 5
12+
#
13+
14+
dimension
15+
2
16+
17+
elements
18+
4
19+
1 3 0 1 4 3
20+
1 3 1 2 5 4
21+
1 3 3 4 7 6
22+
1 3 4 5 8 7
23+
24+
boundary
25+
8
26+
2 1 0 1
27+
2 1 1 2
28+
2 1 7 6
29+
2 1 8 7
30+
1 1 3 0
31+
1 1 6 3
32+
1 1 2 5
33+
1 1 5 8
34+
35+
vertices
36+
9
37+
38+
nodes
39+
FiniteElementSpace
40+
FiniteElementCollection: Linear
41+
VDim: 2
42+
Ordering: 0
43+
44+
-0.5
45+
0
46+
0.5
47+
-0.5
48+
0
49+
0.5
50+
-0.5
51+
0
52+
0.5
53+
-0.5
54+
-0.5
55+
-0.5
56+
0
57+
0
58+
0
59+
0.5
60+
0.5
61+
0.5

0 commit comments

Comments
 (0)