KIT | KIT-Bibliothek | Impressum | Datenschutz

Numerical experiments to "Numerical homogenization of time-dependent Maxwell's equations with dispersion effects"

Freese, Jan Philip

Abstract (englisch):
This code has been used for the numerical experiments in the thesis "Numerical homogenization of time-dependent Maxwell's equations with dispersion effects" by Jan Philip Freese, see

Open Access Logo

Zugehörige Institution(en) am KIT Institut für Angewandte und Numerische Mathematik (IANM)
Sonderforschungsbereich 1173 (SFB 1173)
Publikationstyp Forschungsdaten
Publikationsdatum 04.02.2021
Erstellungsdatum 01.01.2017 - 25.11.2020
Identifikator DOI (KIT): 10.5445/IR/1000129217
KITopen-ID: 1000129217
Lizenz Creative Commons Namensnennung – Nicht kommerziell – Weitergabe unter gleichen Bedingungen 4.0 International
Projektinformation SFB 1173/2 (DFG, DFG KOORD, SFB 1173/2 2019)
Schlagwörter Maxwell equations, Sobolev equation, time-integration, homogenization, heterogeneous multiscale method, recursive convolution, memory variable


This code was used for the numerical experiments of the PhD thesis "Numerical homogenization of time-dependent Maxwell's equations with dispersion effects" by P. Freese (cf. Section 7.2, Section 7.3)
The computations are done in C++ using the Finite Element library deal.II.



The structure is as follows:

  • The folder executables contains Bash scripts for all figures and tables separately. All figures from Section 7.2 may be computed using the at ones. Similarly, the figures from Section 7.3 are computed using the script. Moreover, the script runs the deal.II distclean command in all programs.
  • The folder matlab_plot_files contains Matlab scripts for the convergence plots and related tables
  • The folder paraview_plot_files contains Paraview states to generate the solution plots
  • In programs the actual source code is stored within three different programs that are
    • hmm_for_Maxwell_conductivity_memory_variable: Code that applies the Heterogeneous Multiscale Method combined with the memory variable technique as explained in Section 6.2.3
    • hmm_for_Maxwell_conductivity_recursive_convolution: Code that applies the Heterogeneous Multiscale Method combined with the recursive convolution technique as explained in Section 6.2.2
    • microproblem_conductivity: Code that solves the microscopic cell problems
  • In results the results of the computations are stored according to the sub structure of the programs folder


In order to run the program, open a terminal session in the folder executables and run one of the Bash scripts providing at least the additional argument:

  • Number of kernels (-n): One should usually use one job for each processor core on the machine

Use a command like

    bash figure*.sh -n number_of_kernels

It may be mandatory to provide the location of your deal.II installation as well. This is done by providing another argument:

  • Path to deal (-D): Path to the deal.II installation

Use a command like

    bash figure*.sh -n number_of_kernels -D path_to_deal

If you can not execute the Bash scripts, you have to build the program and copy/edit the config/source files yourself. Still, the necessary information is found in the bash scripts, so just use a text editor to open those files and execute the steps by hand.


If you unpack this code within the examples folder of deal.II you can simply use the following example code to run the Bash script (generating data for Figure 7.2 and Table 7.1 with 4 kernels)

    bash -n 4 -D ../../../../



The Matlab scripts are used to generate the plots and tables. The tables are directly prompted to the Matlab output.


To load the state files in Paraview, select File->Load State.... Select the respective .pvsm file of the figure you want to plot. As Load State Data File Options choose Search files under specified directory and select the results folder. Paraview should find the files itself.


  • The scripts and save reference solutions that are used to compute the errors between different levels of refinement. These solutions are stored in programs/hmm_for_Maxwell_conductivity_recursive_convolution/data/. If you want to run these scripts a second time you either have to delete the solutions (and compute the solutions again) or you have to set the Output.Reference_Solution flag in the respective config file in programs/hmm_for_Maxwell_conductivity_recursive_convolution/config_files/ to false (which makes the computation even faster).
  • Be aware that, depending on your computer, the computations may take several hours or days.
Art der Forschungsdaten Dataset
Relationen in KITopen
KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft
KITopen Landing Page