Skip to content

Commit

Permalink
merge sm/mastertmp and tested for examples in README
Browse files Browse the repository at this point in the history
  • Loading branch information
smarras79 committed Sep 21, 2024
2 parents 744339a + 5a53a1c commit eba9aa3
Show file tree
Hide file tree
Showing 32 changed files with 153,055 additions and 84 deletions.
48 changes: 17 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,35 +182,13 @@ If you are interested in contributing, please get in touch:

To install and run the code assume Julia 1.10.0

## Setup
## Setup with CPUs

After cloning Jexpresso do the following:

1.
```bashx
```bash
>> cd $JEXPRESSO_HOME
>> julia --project=.
>> julia --project=. -e "using Pkg; Pkg.instantiate(); Pkg.API.precompile()"
```

If on Apple, add Metal to the dependencies and continue to point 2:

1.apple
```
julia> ]
pkg> add Metal
```

2.
```
pkg> instantiate
```
```
pkg> precompile
```

Notice that points 1. and 2. are for all, but 1.apple is required only for Apple users.

To run Jexpresso, do as follows:
followed by the following:

Push problem name to ARGS
You need to do this only when you run a new problem
Expand All @@ -231,11 +209,6 @@ julia> push!(empty!(ARGS), "CompEuler", "thetaTracers");
julia> include("./src/Jexpresso.jl")
```

<img src="assets/rtbHole.gif"
alt="Markdown icon"
style="float: left; margin-right: 5px;" />


<img src="assets/thetaTracersMeshUnstr.png"
alt="Markdown icon"
style="float: left; margin-right: 5px;" />
Expand Down Expand Up @@ -322,6 +295,19 @@ julia> include("./src/Jexpresso.jl")
alt="Markdown icon"
style="float: left; margin-right: 7px;" />

A second version of this tests generate images with the solutions at different times overlapped.

This version is defined in [`problems/equations/AdvDiff/Wave_Train_Overlapping_Plot`](https://github.com/smarras79/Jexpresso/tree/master/problems/equations/AdvDiff/Wave_Train_Overlapping_Plot) and by default output will be written to `output/AdvDiff/Wave_Train_Overlapping_Plot`. To run this version of the problem execute the following from the Julia command line:

```bash
julia> push!(empty!(ARGS), "AdvDiff", "Wave_Train_Overlapping_Plot");
julia> include("./src/Jexpresso.jl")
```

<img src="assets/Wave_Train_overlap.png"
alt="Markdown icon"
style="float: left; margin-right: 7px;" />

Test 3: 2D advection-diffusion equation

The problem is defined in [`problems/equations/AdvDiff/2D_laguerre`](https://github.com/smarras79/Jexpresso/tree/master/problems/equations/AdvDiff/2d_Laguerre) and by default output will be written to `output/AdvDiff/2D_laguerre`. To solve this problem run the following commands from the Julia command line:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/features/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Timing was measured using Julia 1.9.3 on a Macbook Air M1 2020, with macOS Big S

| Time integrator | max $\Delta t$ (s) | Effective resolution (m) | Order | ${\color{red}{Jexpresso}}$ (s) | ${\color{blue}{F90}}$ (s)|
| :-------------------------| :-------------------------| :-------------------------| :-------------------------| :-------------------------| :------------------------|
| SSPRK33 | 0.2 | $$125\times 125$$ | 4 | 9.75 | 9.2028 |
| SSPRK53 | 0.3 | " | " | 9.00 | 10.53 |
| SSPRK33 | 0.2 | $$125\times 125$$ | 4 | 9.75 | 9.2028 |
| SSPRK54 | 0.4 | " | " | 10.47 | NA |
| DP5 (Dormand-Prince RK54) | 0.6 | " | " | 19.80 | NA |
| SSPRK73 | 0.4 | " | " | 12.95 | NA |
Expand Down
65 changes: 65 additions & 0 deletions meshes/gmsh_grids/hexa_BOMEX-16x16x19.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
nelemx = 16;
nelemy = 16;
nelemz = 19;

xmin = 0;
xmax = 6400;
ymin = 0;
ymax = 6400;
zmin = 0;
zmax = 3000;
gridsize = (xmax-xmin) / nelemx;

Point(1) = {xmin, ymin, zmin, gridsize};
Point(2) = {xmax, ymin, zmin, gridsize};
Point(3) = {xmax, ymin, zmax, gridsize};
Point(4) = {xmin, ymin, zmax, gridsize};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};


npx = nelemx + 1;
npy = nelemy + 1;
npz = nelemz + 1;

//Horizontal sides
Transfinite Line {1, 3} = npx; //Ceil((xmax-xmin)/gridsize) Using Progression 1;
//Vertical sides
Transfinite Line {4, -2} = npz Using Progression 1.0;


Line Loop(11) = {4, 1, 2, 3};
Plane Surface(12) = {11};

Transfinite Surface {12};
Recombine Surface {12};

surfaceVector = Extrude {0,(ymax-ymin),0} {
Surface{12};
Layers{nelemy};
Recombine;
};
//Coherence;

/* surfaceVector contains in the following order:
[0] - front surface (opposed to source surface)
[1] - extruded volume
[2] - bottom surface (belonging to 1st line in "Line Loop (6)")
[3] - right surface (belonging to 2nd line in "Line Loop (6)")
[4] - top surface (belonging to 3rd line in "Line Loop (6)")
[5] - left surface (belonging to 4th line in "Line Loop (6)")
*/
Physical Surface("bottom") = {12};
Physical Volume("internal") = {1};
Physical Surface("back") = {25};
Physical Surface("front") = {33};
Physical Surface("left") = {21};
Physical Surface("right") = {29};
Physical Surface("top") = {34}; // from Plane Surface (6) ...
//+
Show "*";
//+
Show "*";
Loading

0 comments on commit eba9aa3

Please sign in to comment.