The code is tested with Python3 environment (3.8, 3.9) and PyTorch (1.11, 11.2) with CUDA (>=11.3).
pip install git+https://github.com/NamGyuKang/CosineSampler.git
You can choose the kernel (cosine, linear, smoothstep), and the multicell (True, False). The multicell is used in PIXEL (Physics-Informed Cell Representation), and if you set the multicell False, and linear kernel, it is the same with Pytorch grid_sample and our CosineSampler support triple backpropagation of kernel.
Second-order PDE (Helmholtz equation)
If you use this code for research, please consider citing:
@article{kang2023pixel,
title={PIXEL: Physics-Informed Cell Representations for Fast and Accurate PDE Solvers},
author={Kang, Namgyu and Lee, Byeonghyeon and Hong, Youngjoon and Yun, Seok-Bae and Park, Eunbyung},
journal={Proceedings of the AAAI Conference on Artificial Intelligence},
year={2023}}