In this paper, we propose Five-point stencil CNN (FCNN) containing a five-point stencil kernel and a trainable approximation function. We consider reaction-diffusion type equations including heat, Fisher’s, Allen-Cahn equations, and reaction-diffusion equations with trigonometric functions terms. We show that FCNNs are trained well using few data (used only two consecutive data) and then can predict reaction-diffusion evolutions with diverse initial conditions.
"""
--eq: 'he', 'fe', 'ac', 'sine', 'tanh' (str)
--c: diffusion coefficient (float)
--r: reaction coefficient (float)
--numepochs: number of epochs (int)
--sig: standard deviation for noise generation (float)
--poly_order: order of polynomial approximation (int)
--lr: learning rate (float)
--pretrained: pretrained model path (str)
"""
python train.py --eq sine --poly_order 9 --r 40 --c 0.1
Relative L2 error with the 95% confidence interval over 100 different random initial values
"""
--eq: 'he', 'fe', 'ac', 'sine', 'tanh' (str)
--c: diffusion coefficient (float)
--r: reaction coefficient (float)
--max_iter: max iteration (int)
--poly_order: order of polynomial approximation (int)
--pretrained: pretrained model path (str)
"""
Once your model is trained you can evaluate the pretrained model. (Check your hyperparameters)
python evaluation.py --eq fe --r 20 --pretrained './models/fe/fe_3_0.pth' --poly_order 3
"""
--eq: 'he', 'fe', 'ac', 'sine', 'tanh' (str)
--init: 'circle', 'star', 'threecircles', 'maze', 'torus' (str)
--c: diffusion coefficient (float)
--r: reaction coefficient (float)
--max_iter: max iteration (int)
--poly_order: order of polynomial approximation (int)
--pretrained: pretrained model path (str)
"""
Once your model is trained you can evaluate the pretrained model. (Check your hyperparameters)
python test.py --eq ac --init star --r 6944 --pretrained './models/ac/ac_3_0.pth' --max_iter 2500
Code MIT license