Efficient data-driven learning of homogenized PDEs
Source code and data for "Linking Machine Learning with Multiscale Numerics: Data-Driven Discovery of Homogenized Equations", by H. Arbabi, J.E. Bunder, G. Samaey, A.J. Roberts and I.G. Kevrekidis, 2020
Summary: we use equation-free numerics (patch dynamics and gap tooth schemes) to generate data for learning homogenized PDEs. The advantage of these methods is that they simulate the detailed PDE only in a fraction of space or space-time and make data collection more efficient. Then we use neural nets to learn the homogenized PDE in two ways: in the functional architecture we precompute the spatial derivatives and ask the neural net to learn the law of the PDE, while in the discretized architecture the net directly learns the spatially discretized PDE.
1d_example loads the patch-dynamics data for 1d heterogeneous diffusion problem, learns the effective coarse-scale PDE from that, and compares it to the homogenized PDE solution. The data is included in 'thehood' folder but one can regenerate the data by running 'generate_data_1d.py' in 'thehood' folder.
2d_example loads the gap-tooth data for 2d heterogeneous diffusion problem, learns the effective coarse-scale PDE from that, and compares it to the homogenized PDE solution. Data for this problem must be generated by running the matlab file 'generate_data_2d.mat' in 'thehood' folder.
The 1d data is generated by the patch dynamics code written by Giovanni Samaey. For a discussion of the method see the paper here.
The 2d data is produced using the equation-free MATLAB package of Anthony Roberts and co-workers. See the user manual in there.