- Improved export to SILO. E, H, and J fields are now exportable as nodal or zonal variables. It is also possible to disable the export of a specific field, see `lua_api.md` (8a831181).
- Leapfrog integration on CPU & GPU (e3d95022).
## Version v0.3 (NOT RELEASED YET)
## Version v0.3 (30/09/2021)
- Volumetric sources on CPU & GPU (2ed2e9e7).
- Fixed issues that prevented compilation on CECI clusters.
@@ -24,8 +24,8 @@ This document describes the API available on the version v0.3 of the solver.
### Postprocessing general variables
-`postpro.silo_output_rate` (integer):
-`postpro.cycle_print_rate` (integer):
-`postpro.silo_output_rate` (integer): rate at which Silo files are produced (for example 100 gives you a Silo file every 100 timesteps)
-`postpro.cycle_print_rate` (integer): rate at which simulation progress state is printed (for example 100 gives you an informational message every 100 timesteps)
### Mesh variables
-`mesh.scalefactor` (real): apply a scaling factor to the mesh.
...
...
@@ -147,6 +147,14 @@ The solver has some facilities to allow validation and comparison with analytica
-`analytical_solution`: a function `f(tag, x, y, z, t)` defining the analytical solution of the problem. If defined, it can be used to compare the numerical solution with the analytical solution during the timestepping. The function has to return 6 values, namely `Ex`, `Ey`, `Ez`, `Hx`, `Hy` and `Hz`.
-`dump_cell_ranks` (bool): if true, and if the solver has MPI support compiled in, add to the Silo output a variable named `cell_ranks` showing the cell-to-rank mapping.
The analytical solution is compared with the current numerical solution via the `compute_error()` function (available only on CPU and CPU/MPI for now). For example (see previous section for the description of `on_timestep`)
```
function on_timestep(ts)
e = compute_error()
end
```
computes the error at each timestep and places it in the variable `e`. This variable provides 6 members named `Ex`, `Ey`, `Ez`, `Hx`, `Hy` and `Hz` so, for example, `e.Ex` gives access to the error of the `x` component of the electric field.
### Postprocessing
The export of the fields E, H and J to Silo is controlled using the appropriate sections in the `postpro` table.
-`postpro["E"].silo_mode` controls the export of the electric field E. Possible values are `"none"` (no export), `"nodal"` (export as a Silo nodal variable) and `"zonal"` (export as a Silo zonal variable)
...
...
@@ -159,5 +167,13 @@ Zonal variables represent the field as a piecewise-constant field evaluated in t
Default mode is `"nodal"`.
Misc functions:
-`compute_energy()`: this functions provides the energy stored in the six fields at the current time (available only on CPU and CPU/MPI for now). For example (see previous section for the description of `on_timestep`)
```
function on_timestep(ts)
e = compute_energy()
end
```
computes the energy at each timestep and places it in the variable `e`. This variable provides 6 members named `Ex`, `Ey`, `Ez`, `Hx`, `Hy` and `Hz` so, for example, `e.Ex` gives access to the error of the `x` component of the electric field.
### Considerations on the evaluation of sources and the computation on GPU
Currently sources for the timestep `t+1` are evaluated asynchronously on the CPU while the GPU is computing the timestep `t`. The sources at `t+1` are then uploaded asynchronously from the CPU to the GPU. This usually works relatively well, especially on big domains with high approximation order, however on small domains at low approximation order you can notice slowdowns. For this reason, if the sources do not need to be evaluated along the whole simulation, it is suggested to turn them off at the appropriate timestep by using the `on_timestep()` callback and the appropriate functions described below. Despite of that, I am not sure that implementing repetitive boundary sources will be necessary.