This repository contain the codes (written in C++) for the Ghost Fluid Method (GFM) of Liu et al. (1999, JCP). Finite Difference Method is used to discretize the Poisson equation.
The codes (ps_1a.cpp, ps_1b.cpp, ps_2.cpp, etc.) are designed to solve the test problems (Examples 1, 2, ..., resectively) of Liu et al. (1999, JCP).
Liu, X.D., Fedkiw, R.P. and Kang, M., 2000. A boundary condition capturing method for Poisson's equation on irregular domains. Journal of computational Physics, 160(1), pp.151-178.
This solver needs:
- gcc
To install gcc (compiler for C++ code)
sudo apt install build-essentialThe process is similar for all the codes (ps_*.cpp). To compile the code ps_1a.cpp
g++ ps_1a.cpp -o outputTo run this code
./output